I have All Android SDK versions(from 1.5 to 2.3.3), and I tried many methods for getting root in Android emulator. I don't use any Android device and test everything on emulator(AVD).
I need to get root access in any one of the Android emulator to use the 'iptables' and 'busybox' functionality. And to use iptables I must have root access. Atleast 'su' command should execute in the terminal emulator.
I also installed z4root application,
But it takes very long time and doesn't finish rooting, and gets stuck. some say that if we downgrade the system to below RC30, this way we can get root access. if this is true, then how to do this? I use both Linux and Windows OS.
Please someone tell me any method to root my emulator.
I think you can use "Root.apk" stored on filecrop ( VISIONary in android system ) to root the emulator because, at each reboot, it root the system. Z4root can't work because it needs rebooting to make the root access working.Sorry for bad english, I'm french.
It assumes that the su binary is located in the working directory. You can find su and superuser here : http://forum.xda-developers.com/showthread.php?t=682828. You need to run these commands each time you launch the emulator. You can write a script that launch the emulator and root it.
4
Source
I believe that the easiest way is to create an alias for the command sh, e.g.
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /systemcd /system/bin
catsh > su && chmod 4775 su