Whether an app is enabled or disabled is stored in a single file /data/system/users/0/package-restrictions.xml
.
I took the following steps to re-enable the Google App and solve my bootloop problem:
Boot the Android-x86 virtual machine in debug mode (i.e. append DEBUG=2
to the GRUB entry)
mount the filesystem:
su
cd /dev
# these are necessary to "refresh" the environment
cd ..
# otherwise the following commands wouldn't work
mkdir temp
mount /dev/block/sda1 temp
Edit the package-restrictions.xml
file with vi:
vi /temp/android-6.0-rc1/data/system/users/0/package-restrictions.xml
Find the entry containing <pkg name="com.google.android.googlequicksearchbox" enabled="3" enabledCaller="com.android.settings">
Move the cursor to the end of that line (Line 13 in my case) and press a
to begin editing (see Basic vi commands)
Remove the enabled
and enabledCaller
attributes. The resulting line should be <pkg name="com.google.android.googlequicksearchbox">
Press Esc and type :wq
and press Enter to save and exit vi
Type exit
and hit Enter (twice) to boot to Android normally.