Fixing Read-only File System and ADB Remount Failure
How to resolve 'read-only file system' errors by disabling dm-verity and remounting partitions via ADB.
March 24, 2026
Fixing Read-only File System and ADB Remount Failure
While developing for Android, you may encounter a
Usually, this is resolved with the adb remount command, but on devices with the
Read-only file system error when trying to modify files in system partitions like /system or /vendor.Usually, this is resolved with the adb remount command, but on devices with the
dm-verity security feature enabled (userdebug/eng builds), even this might fail.1. Identify the Problem
First, check the error that occurs when trying to create a file in the system partition.
Touch command failuresh
2. Attempt Standard Remount
Typically, you attempt to remount after gaining root privileges.
If it fails here, you should suspect dm-verity.
If it fails here, you should suspect dm-verity.
Standard remount attemptsh
3. Disable dm-verity
You must disable dm-verity, which verifies the integrity of the system partition, to enable modifications.
This command takes effect only after rebooting the device.
This command takes effect only after rebooting the device.
Disable dm-verity and rebootsh
4. Remount and Verify
Once the reboot is complete, gain root privileges again and attempt the remount.
It will now be performed successfully, allowing file creation.
It will now be performed successfully, allowing file creation.
Successful remount and verificationsh
The system partition is now in a state where it can be freely modified.
Since disabling dm-verity weakens system security, it is recommended to use it only for testing purposes.
Since disabling dm-verity weakens system security, it is recommended to use it only for testing purposes.