当前位置:首页 » 安卓系统 » 编译androidx86

编译androidx86

发布时间: 2025-03-15 16:19:01

㈠ 如何编译android x86模拟器

首先你需要设置一下emulator工具的目录之类的,这个不细说了,
要在.bashrc中新增环境变量,如下
ANDROID_PRODUCT_OUT=~/android/out/target/proct/generic
ANDROID_PRODUCT_OUT_BIN=~/android/out/host/linux-x86/bin
这里是设置你的输出文件的位置和bin工具目录,不用多解释吧?
然后在命令行输入:
export PATH=${PATH}:${ANDROID_PRODUCT_OUT_BIN}:${ANDROID_PRODUCT_OUT};
上面是导入了相关的配置,然后使之生效。
source ~/.bashrc
接着切换到输出的system文件夹
cd ~/android/out/target/proct/generic
然后来创建模拟器
emulator -system system.img -data userdata.img -ramdisk ramdisk.img
如果你运气够好的话,也许现在已经在运行了,不过我运气明显不够好。
提示一:
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.
If you are an Android SDK user, please use ‘@’ or ‘-avd ’
to start a given virtual device (see -help-avd for details).
Otherwise, follow the instructions in -help-disk-images to start the emulator

既然人家提示了,那就按照步骤走吧,输入命令:
emulator -help-avd
接着提示如下:
use ‘-avd ’ to start the emulator program with a given Android
Virtual Device (a.k.a. AVD), where must correspond to the name
of one of the existing AVDs available on your host machine.
See -help-virtual-device to learn how to create/list/manage AVDs.
As a special convenience, using ‘@’ is equivalent to using
‘-avd ’.
跟着提示继续走,输入命令:
emulator -help-virtual-device
又是提示了:
An Android Virtual Device (AVD) models a single virtual
device running the Android platform that has, at least, its own
kernel, system image and data partition.
Only one emulator process can run a given AVD at a time, but
you can create several AVDs and run them concurrently.
You can invoke a given AVD at startup using either ‘-avd ’
or ‘@’, both forms being equivalent. For example, to launch
the AVD named ‘foo’, type:
emulator @foo
The ‘android’ helper tool can be used to manage virtual devices.
For example:
android create avd -n -t 1 # creates a new virtual device.
android list avd # list all virtual devices available.
Try ‘android –help’ for more commands.
Each AVD really corresponds to a content directory which stores
persistent and writable disk images as well as configuration files.
Each AVD must be created against an existing SDK platform or add-on.
For more information on this topic, see -help-sdk-images.

热点内容
视频服务器搭建海康 发布:2025-04-30 23:50:29 浏览:90
xp共享怎么设置密码 发布:2025-04-30 23:50:24 浏览:155
租用电脑主机搭建服务器 发布:2025-04-30 23:28:06 浏览:729
php子类调用父类方法 发布:2025-04-30 23:11:55 浏览:673
存档加密id 发布:2025-04-30 22:20:50 浏览:743
mac搭建php环境 发布:2025-04-30 21:58:13 浏览:137
雅迪电动车配置有哪些 发布:2025-04-30 21:38:27 浏览:156
为什么用文件存储取代mysql 发布:2025-04-30 21:17:26 浏览:611
我的世界免费服务器ip 发布:2025-04-30 20:41:26 浏览:773
华为云相册在哪里找安卓11 发布:2025-04-30 20:19:59 浏览:273