I know this is a recurrent question when working with the Android emulator, but is there a way to force the emulator to accept persistent changes to
Yury's answer is the common one, but if you want to be able to script things (which is what I want in the end), you need to be able to find the emulator image in the
I discovered that you can override QEMU's behavior. This is a bit hackish, but it works, so I ended up doing this :
system.imgfrom the platform directory to your AVD directory.
Run the emulator in read-write mode :
emulator -avd Galaxy_Nexus -qemu -nand system,size=0x1f400000,file=/home/fx/.android/avd/Galaxy_Nexus/system.img
(If you put the emulator in verbose mode, you'll notice that it will, by default, use
initfile= instead of just
Make your changes, they are immediately saved to the local
emulator -avd Galaxy_Nexus, and it'll use your changes
Update: If scripting, QEMU does not sync changes immediately to the image, so if you're rebooting immediately after changing something, chances are you will lose data. I'm looking for a way around this...
Next update: Use
adb -e emu kill to stop the emulator.
reboot will just do bad things.