Troubleshooting ADB Remount on Android API 29

Troubleshooting ADB Remount on Android API 29

22 April 2024 Stephan Petzl Leave a comment Tech-Help

Android developers often use the Android Debug Bridge (ADB) to modify system files on their emulators and devices. However, some may encounter issues with the adb remount command, particularly when working with Android API 29 on an emulator. This guide aims to help you resolve such issues and restore functionality.

Understanding the ADB Remount Issue

When attempting to run adb remount on Android API 29, developers may receive error messages indicating skipped mounting partitions and a failed remount operation. This issue can hinder the process of pushing changes to the system directory.

Common Error Output:

    Skip mounting partition: /product_services
    Skip mounting partition: /product
    ...
    /system/bin/remount exited with status 7
    remount failed
  

Steps to Resolve the Remount Issue

To address this challenge, follow the steps outlined below:

  1. Start the emulator with the following command to allow the system partition to be writable:
  2. emulator -avd Pixel_3a_XL_API_29 -writable-system -no-snapshot-load
  3. Once the emulator is running, execute the following commands:
  4.       
          $ adb root
          $ adb shell avbctl disable-verification
          $ adb reboot
          
        
  5. After the emulator has restarted, proceed with remounting the system:
  6.       
          $ adb root
          $ adb remount
          
        
  7. With remount successful, you can now push files to the system directory:
  8. adb push [source] [destination]

Note: This solution is designed to prevent the emulator from freezing, which is a common issue when using adb disable-verity followed by adb reboot.

Repeato: Streamlining Your Testing Workflow

While dealing with ADB and emulator issues can be time-consuming, using the right tools can significantly enhance your testing workflow. Our product, Repeato, is a no-code test automation tool that simplifies creating, running, and maintaining automated tests for iOS and Android apps. With its computer vision and AI capabilities, Repeato accelerates test editing and execution, making it an invaluable asset for developers and testers alike.

Repeato is compatible with a variety of app frameworks, including React Native, Flutter, and Unity. It also integrates ADB, allowing you to perform ADB commands directly within your tests. This feature can be particularly useful when automating tasks that involve interacting with the Android system or when troubleshooting ADB-related issues.

To learn more about how Repeato can complement your testing strategy and assist with challenges like ADB remount issues, visit our product page at Repeato vs. Appium.

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