Ubuntu touch port: It doesn't boot!

Why doesn’t it just boot! that’s something I have asked myself many times… I have sat for hours and hours just try to find out why it doesn’t boot, it’s kinda like a guessing game since you have very little or sometimes not any logs to get somewhat pointed in the right direction. but as stubborn as I am, I never give up so i got it work at the end. so here is some tips that you can try if you’re in the same situation.

last_kmsg

last_kmsg is a good place to look for “early boot” logs, to find this (if it exist) reboot to recovery then

1
2
adb shell
cat /proc/last_kmsg

check kernel configs

Use this tool https://github.com/janimo/phablet-porting-scripts/blob/master/kernel/check-config to check the kernel config is correct for ubuntu_touch

usage:

1
./check-config \[kernel config\]

use -w to automatically fix errors

Enable adb (shell) from boot

Download the unlocked adb and adbd.conf upstart file

http://people.ubuntu.com/~ogra/adbd
http://people.ubuntu.com/~mariogrip/Ubuntu-touch/adbd.conf

Then reboot to recovery and mount /data/system.img and push the files

1
2
3
4
5
6
7
adb shell
mount /data
mkdir /a
mount -o loop /data/system.img /a
adb push adbd.conf /a/etc/init/
adb push adbd /a/sbin/
chmod +x /a/sbin/adbd

Try tty0

Try setting console= to tty0 at BOARD_KERNEL_CMDLINE in BoardConfig.mk

1
BOARD_KERNEL_CMDLINE := console=tty0

syslog

if you have got adb shell to work, then you can try to read syslogs

1
cat /var/log/syslog

logcat

if you have got adb shell to work, then you can try to read logcat logs

/system/bin/logcat