有没有办法在模拟器中将ro.kernel.qemu设置为0? [英] Is there a way to set ro.kernel.qemu to 0 in a emulator?

查看:443
本文介绍了有没有办法在模拟器中将ro.kernel.qemu设置为0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用yaffey将修改后的build.prop包含了ro.kernel.qemu=0替换为system.img,但没有用.模拟器重新启动后,ro.kernel.qemu=1仍然存在于adb shell getprop的输出中.

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 .

我也尝试过:

  1. 在ramdisk.img中默认添加ro.kernel.qemu=0 .prop
  2. 在ramdisk.img的init.goldfish.rc中添加setprop ro.kernel.qemu 0
  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

但是所有这些都不起作用.当我使用修改后的ramdisk.img启动模拟器时,在adb shell getprop的输出中ro.kernel.qemu仍为1.

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.

我现在正在尝试重建内核以将其设置为0,但是我没有找到在内核源代码中设置ro.kernel.qemu的位置.

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.

感谢任何建议.

推荐答案

您需要修改ramdisk.img,其中包含/init和初始属性文件. system.img将在以后安装,因此在那里进行的任何更改都不会影响启动.

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.

此外,可能需要修改init,因为它可能会在解析启动属性配置文件之前,从内核命令行 设置ro.kernel.xxxxx变量.

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.

这篇关于有没有办法在模拟器中将ro.kernel.qemu设置为0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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