如何启动Android模拟器? [英] How to Root an Android Emulator?

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

问题描述

我知道周围有很多这样的问题,但是似乎没有一个真正对我有用。

I know there are quite a few question like this around but none of them really seems to work for me.

我正在编写一个自动更新并安装程序本身,但是要安装更新,需要用户确认,但我不希望这样做,因为将要部署在其上的设备永远不会被任何人物理使用。因此,要尝试解决此问题,我想启动设备并在代码中使用运行时命令来安装它。

I am writing a program that automatically updates and installs itself, however to install the update it requires user confirmation but I do not want this as the device I will deploy on will never be physically used by anyone. So to try work around this I want to root the device and use a runtime command in the code to get it to just install.

要对此进行测试,我想尝试一下首先要在(AVD)仿真器上安装它,但是(显然)需要将其植根。那么我该怎么办呢?

To test this out I want to try it on the (AVD) emulator first however it (obviously) needs to be rooted. So how would i go about this?

我已经在adb shell中尝试了命令(并在adb shell中尝试了命令),例如:

I have tried commands in the adb shell (and out of it with the adb shell) like:

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

和其他一些我现在无法再次找到,但是它们总是会给我错误,例如无法统计 su之类的东西(如果我可以找到命令并再次重新创建,它们将进行编辑),或者他们只是什么也没说,它不会似乎没有用。

and a few others I can't find again at this moment but they will always give me errors such as cannot stat 'su' and stuff like that (will edit if i can find the commands and recreate again) or they just don't say anything and it doesn't appear to work.

如果这有助于我在Visual Studio中使用xamarin。

If it helps i'm using xamarin in visual studio.

推荐答案

您可以使用 https://www.genymotion.com/ 。默认情况下,所有创建的设备都植根。例如,启动设备,然后键入 adb shell命令。它将打开一个有根的外壳。

You can use https://www.genymotion.com/. All devices created are rooted by default. For example start a device then type adb shell command. It will open a rooted shell.

这篇关于如何启动Android模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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