Resolving adb Remount Issues on Android API 29 Emulator

Resolving adb Remount Issues on Android API 29 Emulator

30 November 2024 Stephan Petzl Leave a comment Tech-Help

Developers often encounter issues when using adb remount on Android API 29 emulators. While this command functions correctly on earlier APIs, it appears to exhibit problems specifically with API 29. This article provides a step-by-step guide to address these issues effectively.

Understanding the Problem

The primary issue arises when attempting to remount partitions on the Android API 29 emulator, where the command skips mounting certain partitions and ultimately fails, resulting in the following error:

    system/bin/remount exited with status 7
remount failed
  

Such errors can disrupt the development flow, especially when modifications to the system directory are necessary.

Effective Solution to the Remount Problem

To resolve this issue, follow these steps:

  1. Start the emulator with the following command:
            emulator -avd Pixel_3a_XL_API_29 -writable-system -no-snapshot-load
          
  2. Execute the following commands to disable verification without freezing the emulator:
            adb root
    adb shell avbctl disable-verification
    adb reboot
          
  3. Once the emulator restarts, remount the system:
            adb root
    adb remount
          
  4. You can now use adb push to write on the system directory.

This approach avoids the common emulator freeze encountered with other methods, allowing for a smooth remounting process.

Additional Considerations

It’s important to note that the issue persists even with API 30. The provided solution should be adaptable for similar remount issues. However, if you continue to face challenges, consider exploring alternative emulator configurations or consulting Google’s issue tracker for updates.

Streamline Testing with Repeato

For developers looking to automate testing on Android devices, Repeato offers a powerful solution. As a no-code test automation tool, Repeato simplifies the process of creating, running, and maintaining automated tests for iOS and Android. Its integration with ADB, including executing ADB commands via script steps, provides a seamless testing experience, ensuring efficient and accurate test executions. For more information on setting up virtual test devices, visit our documentation.

Like this article? there’s more where that came from!