DONE: I backed up all my contents of my old emulator, created a fresh emulator using
android create avd -t <TargetID> -n <EmulatorName> -a --abi <CPU/ABI-Used>
To aid finding out the correct value of <TargetID>
and the admissible values <CPU/ABI-Used>
corresponding the same as per your choice of the API level, I used
android list targets
You will then find that the Snapshot option is available, when you edit the same AVD from the Android Virtual Device Manager. So check the snapshot. And when you launch, be sure you have checked "Launch from Snapshot" and "Save to Snapshot" options. Now use the rm
commands in the adb shell
to remove the IMEs. (I will make it clear soon how one does that) You close and next time you open it through emulator
command, it loads from snapshot and the permanence of the IME settings (or for that matter any system settings) is achieved!
(P.S.: Only when you change the hardware configuration will you need to actually reboot, in which case you cannot launch from snapshot as it was saved for a different hardware configuration!)
As the question indicates, all I want is that my hardware keyboard is active and I really don't care about the 4 input methods there. It never occurred to me that I could simply remove all IMEs: Here's how:
Mount the /system
folder. Retrieve the apk names of the IMEs by going into /system/app
and displaying its contents:
aneesh@nb-14:~$ adb shell mount -rw -o remount /dev/block/mtdblock0 /system
aneesh@nb-14:~$ adb shell
# cd /system/app
# ls
Phone.apk
Development.apk
Email.apk
Calculator.apk
...
..
etc.
Next just do
rm <IMEapkname>.apk
For instance in case of the Japanese IME one executes
rm /system/app/PinyinIME.apk
Since this trick, for me, didn't work thus far for the sample soft keyboard:
I came out of the adb shell and did:
adb uninstall com.example.android.softkeyboard
UPDATE: Once you ensure that the snapshot has saved properly (try launching from snapshot via terminal/AVD manager, it must not produce errors) and don't want to make further changes to the system applications or hardware configurations, do launch the emulator with the -no-snapshot-save
option:
emulator -no-snapshot-save -avd Andreud
so that you can launch from snapshot like before and avoid aberrations that occur while saving to snapshot (lest it should produce error saying it was saved for a different hardware configuration). Moreover you can save some valuable seconds it takes to save the snapshot. So this way your overall android emulator experience improves!