How To Remove Readonly Status From Android Emulator File System?
I`m trying to edit my android emulator (AVD) hosts file, so it can acess a virtual host i have in my Mac OS host machine. I try following the instructions on this link: http://bor
Solution 1:
To update the hosts file in the emulator, save the following script in the same directory as your updated "hosts" file:
#!/bin/bash## While the emulator is starting up, run this script to upload a custom hosts file#
adb remount
while [ $? -ne 0 ]
dosleep 1
echo"Retrying adb remount"
adb remount
done
adb push hosts /etc/hosts
if [ $? -ne 0 ]
thenecho"Failed to push hosts file to android device"elseecho"Hosts file pushed successfully"fi############################################################################
Run this script when the emulator is starting up.
Verification: adb shell cat /etc/hosts
Please note: you can it only run once! If you re-run it more than once, you'll get a read-only filesystem error. If you have to re-run it again: restart the emulator beforehand.
Kudos to my colleague.
Post a Comment for "How To Remove Readonly Status From Android Emulator File System?"