Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android emulator 如何在android 2.3 emulator上获得root访问权限_Android Emulator_Root_Iptables_Terminal Emulator - Fatal编程技术网

Android emulator 如何在android 2.3 emulator上获得root访问权限

Android emulator 如何在android 2.3 emulator上获得root访问权限,android-emulator,root,iptables,terminal-emulator,Android Emulator,Root,Iptables,Terminal Emulator,我正在尝试在我的android emulator上获得根访问权限以运行iptables。我浏览了很多论坛,尝试了很多方法,但似乎没有任何效果。下面是我的设备规范,我在emulator上尝试了一切 版本-2.3 内核版本-2.6.29-00261-g0097074-dirtydigit@digit#20 构建编号-sdk工程2.3 GRH55 79397测试密钥 那么如何成为安卓的根呢。请提供帮助。在SDK r10提供的仿真器上,您可以从主机获得执行“adb shell”的根shell。拥有这样的

我正在尝试在我的android emulator上获得根访问权限以运行iptables。我浏览了很多论坛,尝试了很多方法,但似乎没有任何效果。下面是我的设备规范,我在emulator上尝试了一切

版本-2.3 内核版本-2.6.29-00261-g0097074-dirtydigit@digit#20

构建编号-sdk工程2.3 GRH55 79397测试密钥


那么如何成为安卓的根呢。请提供帮助。

在SDK r10提供的仿真器上,您可以从主机获得执行“adb shell”的根shell。拥有这样的root shell后,您可以按照以下步骤从终端仿真器获取一个命令,该命令可以将您记录为root用户:

# Remount /data to allow executables and setuids on it
mount -o remount,rw /dev/block/mtdblock1 /data

# There's no "cp" command on Android
cat /system/bin/sh > /data/su

# Give setuid permissions to the shell
chmod 7755 /data/su
现在,在emulator中,只需运行“/data/su”即可,您就是root用户

SDK中包含的正常“/system/xbin/su”命令执行内部用户id检查,因此这些命令

mount -o remount,rw /dev/block/mtdblock0 /system
chmod 7755 /system/xbin/su
…就是不行。没有办法欺骗/system/xbin/su来允许普通用户(在我的例子中是uid10018)成为root用户


请注意,处理setuid程序可能会带来安全风险(但不会比使用通用的“su”命令更高)。使用此解决方案的风险由您自己承担。

您的经理是否负责?或者你还需要帮助?thanx。。。我很久以前就知道了。。。我想要永久的根…有什么想法吗?