6/28/2016

Fail to remount user/userdebug device after Andriod M

  After Android M, by default, Android OS will turn on system verified boot for user or userdebug build. It means it will fail to change or push any files under system partition.

  If your ROM is userdebug, you can use the below commands to remount system partition which will be able to read/write.
  $ adb root 
  $ adb disable-verity 
  $ adb reboot 
  $ adb wait-for-device 
  $ adb remount
adb disable-verity/enable-verit can only be executed if your ROM is userdebug, and you cannot remount system partition if your image is user build.

  If you can flash the image by yourself, you can build eng ROM which eng build will disable verified boot. Alternatively, you can disable verified boot by setting ro.secure to be 0 even if it is userdebug build. You can change the value of ro.secure in [AOSP]/build/core/main.mk, you can refer to the below screenshot.

No comments:

Post a Comment