Ubuntu – Boot problems after installing package `android`. How to fix it

14.04androidbootlxc

I was thinking to play with my android phone through usb, so I did an apt-get install android* on my laptop. This this broke my boot. I can not boot it normally, but if I go into recovery and then resume, it boots OK (though graphics are running slower).

I then removed the android packages with apt-get remove android*, but this didn't fix it. The boot hangs as pictured below.

boot screen

The logs for the boot are nowhere to found. But I found this in /var/log/dmesg

[   21.073633] init: Failed to spawn lxc-android-config main process: unable to execute: No such file or directory
[   21.081249] init: adbd-emergency-shell pre-start process (894) terminated with status 2
[   21.785001] init: udev-fallback-graphics main process (917) terminated with status 1
[   23.425461] init: ureadahead-touch main process (664) terminated with status 1
[   23.456583] init: lxc-android-boot main process (1012) terminated with status 127
[   23.546875] init: friendly-recovery post-stop process (658) terminated with status 1
[   23.547479] init: failsafe main process (1010) killed by TERM signal
[   24.375532] init: set.pretty-hostname main process (1157) terminated with status 127

What did I do and how to fix this. Any suggestions?

Best Answer

I experienced this recently whilst playing around with Ubuntu Touch and Android linux containers (lxc). the symptom was my system would hang on the boot-up splash screen (after entering my LUKS passphrase).

I fixed this by going into recovery mode and deleting /etc/ureadahead-touch.conf and doing a complete removal in Synaptic of android-tools-adb, android-tools-fastboot lxc-android-config and ubuntu-device-flash.

From the command line the following should work:

sudo rm  /etc/ureadahead-touch.conf
sudo apt-get purge android-tools-adb android-tools-fastboot lxc-android-config ubuntu-device-flash

I'm not sure which of these was causing the problem, but they were all putting stuff in /etc which may have been causing the problem. After this my system booted up normally. Most likely it was the lxc-android-config stuff causing problems.

Hopefully this will save other people from the same issue in the future. It was also helpful to disable the Ubuntu splash screen, by disabling plymouth.