abdroid 模拟器获得root权限

来源:互联网 发布:淘宝上日本直邮靠谱吗 编辑:程序博客网 时间:2024/06/05 08:13

30秒获取root:http://blog.csdn.net/tabactivity/article/details/7884471


参考链接:http://solvedstack.com/questions/how-to-get-root-access-on-android-emulator


How to get root access on Android emulator?

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.

source
  • android-emulator
  • root
Best Answer2
Source

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.

22
Source

Here is the list of commands you have to run while the emulator is running, I test this solution for an avd on Android 2.2 :

adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system  adb push su /system/xbin/su  adb shell chmod 06755 /system  adb shell chmod 06755 /system/xbin/su

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 shellmount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /systemcd /system/bincat sh > su && chmod 4775 su

Tested on Android Emulator 3.0 and higher.



【1】参考链接

http://blog.csdn.net/feifei454498130/article/details/6537274

【2】解决out of memory

http://blog.csdn.net/gumanren/article/details/5858266

0 0
原创粉丝点击