abdroid 模拟器获得root权限

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.

Best Answer 2
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 shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值