I managed to run pure Debian (debootstraped) ON my Android-based device. That means that my Nexus 5 runs a perfectly normal GNU/Linux system but with the CyanogenMod 11 Linux kernel (has some model-specific patches).

I have serial connection to the phone (through 4-pin modded headphone jack) and I can see the full kernel log.

The problem is that although the system DOES boot and work I can't find a way to interface with it, as I can't find the correct tty settings I need to use.

First of all the system is for sure alive, as I put something like /sbin/ls /dev > /hello in the inittab (where the getty should be) and I got the directory listing.

The serial port is on /dev/ttyHSL0 and I've tried a lot with getty and the last is /sbin/getty -8 -L -m -w 115200 ttyHSL0 with no luck at all. I've tried the other 2 ports that the listing reported (tty1 & ttyS0) without any luck as well...

Note: I tried to initiate WiFi on boot so I can get SSH but it did not work, it would not connect to the network and I don't know why. When I have a bash prompt, I'll be able to debug it...

Note 2: This is NOT a chroot system, it's Debian running on the device purely. This has nothing to do with Android.

  • seems like you might want to look at a netconsole kernel parameter config and eschew the jtagged headphone jack thing - at least for dmesg. – mikeserv Jan 20 '16 at 10:46
  • with an android device? How am I going to set up a receiver? – dzervas Jan 20 '16 at 14:14
  • I'm not sure I follow - you mean because you are mobile or because the WiFi if is not up in time? I think the second problem is only a matter of which modules get compiled in. – mikeserv Jan 20 '16 at 14:16
  • The wifi is not functional and I can't debug it. Also there is no "ethernet" interface. I solved the problem though, thank you – dzervas Jan 20 '16 at 15:53

Well after a lot of debugging (and head banging against the wall) in the init script that I was using to switch_root to the directory where debian is, I did not mount /dev, /proc and /sys...

The correct tty was actually 1:2345:respawn:/sbin/getty ttyHSL0 115200

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.