有些问题需要在user root remount下调试。
Android R上,user版本没有remount文件,因此做了一些修改,参考如下:
1.先拿到userdebug版本的remount二进制文件。在userdebug版本导出,adb pull /system/bin/remount
2.编译的时候复制到system/bin下:
将remount放置到alps/device/qcom/项目的目录下。
在alps/device/qcom/项目/device.mk或者项目.mk
+PRODUCT_COPY_FILES += device/qcom/项目/remount:/system/bin/remount
3.boot.image换成boot_debug.image
修改alps/device/qcom/项目/package_xx.txt
-alps/out/target/product/项目/boot.img ./software/images/
+alps/out/target/product/项目/boot-debug.img ./software/images/
4.修改adb
文件system/core/adb/Android.bp
+ required: ["remount",],
target: {
android: {
srcs: [
"daemon/abb_service.cpp",
"daemon/framebuffer_service.cpp",
"daemon/mdns.cpp",
"daemon/restart_service.cpp",
文件system/core/fs_mgr/Android.bp
cppflags: [
"-DALLOW_ADBD_DISABLE_VERITY=0",
],
修改成
cppflags: [
"-UALLOW_ADBD_DISABLE_VERITY",
"-DALLOW_ADBD_DISABLE_VERITY=1",
],
以上修改后,直接编译user版本即可。MTK与高通均适用。