I'm using Android Studio. I was trying to set up a dev environment and it requires modifying the hosts
file. So,
- I created new devices in ADM (Nexus 4, Android 10 x86_64 without Google API and without Google Play).
- I launched the emulator
- Then I tried following instructions from Stack Overflow. I'm using Linux Mint so:
$ ~/Android/Sdk/platform-tools/.adb root
output:
restarting adbd as root
Okay, I got root:
$ ~/Android/Sdk/platform-tools/.adb shell whoami
output:
root
Then I was supposed to remount and this is where I stuck:
~/Android/Sdk/platform-tools/.adb remount
output:
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
avb_ops_user.cpp:217: ERROR: Error writing data.
avb_user_verity.c:205: ERROR: Error writing to partition 'vbmeta'
E Skipping /system
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
W DM_DEV_STATUS failed for scratch: No such device or address
E [liblp]No device named scratch
[liblp]Partition scratch will resize from 0 bytes to 814587904 bytes
E [liblp]bool android::fs_mgr::WritePrimaryMetadata(int, const android::fs_mgr::LpMetadata &, uint32_t, const std::string &, const std::function<bool (int, const std::string &)> &) write 540 bytes failed: Operation not permitted
E [libfs_mgr]add partition scratch
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
W DM_DEV_STATUS failed for scratch: No such device or address
E Can not mount overlayfs for partitions: No such file or directory
Skip mounting partition: /product
Skip mounting partition: /product_services
E failed to remount partition dev:/dev/block/dm-1 mnt:/vendor: Read-only file system
E Consider providing all the dependencies to enable overlayfs
/system/bin/remount exited with status 10
remount failed
I don't know if remount
is the critical issue, but I guess so. At the moment I don't have permission to modify /etc/
. For example:
$ ~/Android/Sdk/platform-tools./adb shell "cp /etc/hosts /etc/hosts.bak"
output:
cp: /etc/hosts.bak: Read-only file system