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 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 failure
sh

2. Attempt Standard Remount

Typically, you attempt to remount after gaining root privileges.
If it fails here, you should suspect dm-verity.
Standard remount attempt
sh

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.
Disable dm-verity and reboot
sh

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.
Successful remount and verification
sh
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.
Jooojub
System S/W engineer
Explore Tags
Series
    Recent Post
    © 2026. jooojub. All right reserved.