Is there a way to set ro.kernel.qemu to 0 in a emulator?

十年热恋 提交于 2019-12-08 21:41:00

问题


I replaced a modified build.prop which contains ro.kernel.qemu=0 to the system.img with yaffey, but it did not work. When the emulator restarted, ro.kernel.qemu=1 still exists in the output of adb shell getprop .

EDIT:

I also tried:

  1. add ro.kernel.qemu=0 in default.prop in ramdisk.img
  2. add setprop ro.kernel.qemu 0 in init.goldfish.rc in ramdisk.img

But all these did not work. When I start the emulator with modified ramdisk.img, ro.kernel.qemu is still 1 in the output of adb shell getprop.

I am now trying to rebuild the kernel to set it to 0, but I did not find where ro.kernel.qemu is set in the kernel source code.

Appreciated for any advices.


回答1:


You need to modify ramdisk.img which contains /init and the initial property files. system.img is mounted later, so any changes there will not affect the boot.

Also, init might need to be modified, because it might set the ro.kernel.xxxxx variables from the kernel command-line before parsing the boot property config file.



来源:https://stackoverflow.com/questions/27943222/is-there-a-way-to-set-ro-kernel-qemu-to-0-in-a-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!