如何在 Android 模拟器上获得 root 访问权限? [英] How to get root access on Android emulator?

查看:45
本文介绍了如何在 Android 模拟器上获得 root 访问权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拥有所有 Android SDK 版本(从 1.5 到 2.3.3),并且我尝试了许多在 Android 模拟器中获取 root 的方法.我不使用任何 Android 设备并在模拟器 (AVD) 上测试所有内容.

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).

我需要在任一 Android 模拟器中获得 root 访问权限才能使用iptables"和busybox"功能.要使用 iptables,我必须具有 root 访问权限.至少 'su' 命令应该在终端模拟器中执行.

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.

我还安装了 z4root 应用程序,

I also installed z4root application,

但是它需要很长时间并且没有完成生根,并且卡住了.有人说如果我们将系统降级到RC30以下,我们就可以获得root权限.如果这是真的,那么该怎么做?我使用 Linux 和 Windows 操作系统.

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.

请有人告诉我有什么方法可以root我的模拟器.

Please someone tell me any method to root my emulator.

推荐答案

如果您有一个具有 root 访问权限的虚拟设备,这应该可以:

If you have a virtual device with root access, this should do the job:

$ > adb shell
generic_x86:/ $
generic_x86:/ $ exit
$ > adb root
restarting adbd as root
$ > adb shell
generic_x86:/ #

如果您不这样做,您可能对此答案感兴趣,该问题解释了如何创建具有根访问权限的虚拟设备,具有 Google API(又名 Google Play 服务),但没有 Google Play 应用.

If you don't, you might be interested in this answer to a different question, which explains how to create an virtual device with root access, with Google APIs (aka Google Play services), but without the Google Play app.

如果您真的需要 Google Play 应用程序,您可能会对其他指导如何根 Android 虚拟设备的答案感兴趣.

If you really need the Google Play app, you might be interested in other answers which instruct how to root an Android virtual device.

这篇关于如何在 Android 模拟器上获得 root 访问权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆