在Android模拟器运行的自定义ROM [英] Run custom ROM on Android Emulator
问题描述
我下载一个第三方ROM,我想先闪入手机前,在模拟器上运行它。这里的内容 cm-11-20140911-NIGHTLY-p3110.zip
:
1的boot.img
2. file_contexts
3. META-INF /
4.恢复/
5,系统/
我打开的boot.img
使用脚本 unpack-bootimg.pl
并获得 boot.img的内核
和的boot.img-ramdisk.cpio.gz。
然后,我用重新包装系统在 make_ext4fs
并得到了 system.img
。
我创建了一个AVD并执行:
模拟器 - 系统〜/ CM11 / system_new.img -ramdisk〜/ CM11 / boot.img的-ramdisk.cpio.gz -kernel〜/ CM11 / boot.img的内核-avd and442
但我得到的是什么,该模拟器的屏幕只是黑色。有没有从日志消息 ADB -s模拟器-5554
。
现在我很困惑:
- 可以在第三方ROM的模拟器进行测试?
- 我这样做的正确方法?
呀,为什么不。
我们可以在Android AVD闪烁第三方ROM 但是,首先你必须知道以下的事情:
1。 Android模拟器本身是喜欢你的摩托G或的Xperia设备
2。自从ROM为特定设备(支持特定设备的内核)
(许多网站/博客你得到的信息一样,你必须更换的 system.img 从.android \\ AVD \\ avdname.avd文件,但它在技术上是不正确,因为你还requird RAMDISK .IMG )
要做到这一点需要通过下载特定的回购创建自己的AOSP回购,必须建立自己的.IMG文件)
-
您可以通过2种方式做到这一点:
-
替换文件system.img和放大器;从位置的ramdisk.img .android \\ AVD \\ avdname.avd
-
建立你自己的AOSP。前..使午餐选择目标为:仿真器(如:genericX86)即产生所有模拟器特定.IMG文件
-
我已经尝试了很多东西,它有点重要,但有趣的,以下链接可以帮助你:
上运行模拟器 你熟罗p>
<一个href=\"http://forums.androidcentral.com/general-help-how/144804-how-compile-ics-aosp-4-0-3-xoom-gnex-nexus-s.html\"相对=nofollow>创建AOSP项目
I downloaded a third-party ROM, and I want to run it on the emulator first before flash it into the phone. Here is the contents of cm-11-20140911-NIGHTLY-p3110.zip
:
1. boot.img
2. file_contexts
3. META-INF/
4. recovery/
5. system/
I unpacked boot.img
using the script unpack-bootimg.pl
and get boot.img-kernel
, and boot.img-ramdisk.cpio.gz.
Then I repacked the system using the make_ext4fs
and got system.img
.
I created an AVD and execute:
emulator -system ~/cm11/system_new.img -ramdisk ~/cm11/boot.img-ramdisk.cpio.gz -kernel ~/cm11/boot.img-kernel -avd and442
but all I got is nothing, the emulator screen is just black. There is no log message from adb -s emulator-5554
.
Now I am confused:
- can the third-party ROM be tested by the emulator?
- Am I doing the right way?
Yeah why not. We can flash third party ROM on android AVD. But first you must know the following things:
1. Android Emulator is itself a device like your Moto G or Xperia
2. Ever ROM is device specific (Support device specific Kernel)
(on many sites/blogs you got info like you have to replace system.img file from .android\avd\avdname.avd but it is technically incorrect because you also requird ramdisk.img.)
To do this you need to create your own AOSP repo by downloading particular repo and have to build your own .img files)
You can do it by 2 ways :
replace files system.img & ramdisk.img from location .android\avd\avdname.avd
build your own AOSP. before.. make in "lunch" select target as: Emulator(like: genericX86) i.e generate all emulator specific .img files
I have tried many things , Its bit critical but interesting, following links may help you:
To Run your cooked Rom on Emulator
这篇关于在Android模拟器运行的自定义ROM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!