0

I have a script. Say suppose new.sh.It contains

su
cd /data/dalvik-cache/
ls

but i am unable to run the script in my emulator which starts with eclipse project . Any help would be sincerely appreciated.

Thank u, Sindhu

shellter
  • 36,525
  • 7
  • 83
  • 90
sai sindhu
  • 1,155
  • 5
  • 20
  • 30

1 Answers1

2

You can't simply run 'su' on the emulator, there's no root access by default. You'll need to install the 'su' program as well as the SuperUser.apk, and you'll have to do this each time you start the emulator unless using snapshots.

More information and links to the files you need can be found here on SO as well as this blog posting by Russell Davis

Community
  • 1
  • 1
Pedantic
  • 5,032
  • 2
  • 24
  • 37
  • 1
    Ok, so what have you done and what didn't work when you did it? – Pedantic Sep 16 '11 at 19:11
  • Show us your exact cmds, and exact error messages. Good luck. – shellter Sep 16 '11 at 19:18
  • My script consists of the above commands only. i.e. 1.su 2.cd data/dalvik-cache/ 3. ls. I installed superuser.apk and bin files in my emulator. and followed this link.. http://stackoverflow.com/questions/5687082/obtain-root-access-via-su-on-the-android-emulator. – sai sindhu Sep 16 '11 at 22:07
  • I did not get though i tried all these ways. So kindly help me – sai sindhu Sep 16 '11 at 22:08