Can an Android tablet be used as a Linux Console?

1

Can an Android tablet be used as a Linux Console (e.g., by connecting to one of the Linux machine's USB ports)?

I manage a small startup server room (CentOS/Ubuntu) which does not have dedicated consoles for the servers. This means that if I need to gain access to a misbehaving machine, I need to connect keyboard/mouse/screen to the machine.

Connecting a tablet running some sort of VT100/xterm emulation would be ideal.

Any ideas if the above is possible?

boardrider

Posted 2019-03-30T17:55:48.613

Reputation: 615

Answers

-1

The question doesn't specify that networking isn't working, or SSH not available, or that only a physical device connected to the computer is required, but in case you do need a hardware-only solution there are some options.

By far the quickest & easiest would be to just have an old USB keyboard & small monitor, and keep them tucked away somewhere for emergencies.

But the first android solution would work to turn your tablet into a USB keyboard/touchpad with any OS, or even if the computer can only get to it's BIOS or boot loader. It uses the USB Keyboard app:

enter image description here

You will need to install custom kernel to your Android device, that will add keyboard+mouse functions to it's USB port, this app is used to send key and mouse events. You will also need root.

Other devices: you will have to compile the kernel yourself, using this patch: https://github.com/pelya/android-keyboard-gadget/blob/master/kernel-3.4.patch

This link has a nice description

This is a free app that isn’t requiring any driver on your computer – as you will see, the apps from below can work only if on your computer you first configure a server client. So, unlike most of the other similar platforms, USB keyboard will work inside BIOS, inside bootloader, with any OS, and with any hardware that has an USB socket enabled and available.

On your Android device, the app will have to add keyboard and mouse functions to the USB port. Unfortunately, that process cannot be completed by the app itself unless you first prepare a few additional things. In that respect, you will have to use a rooted smartphone (there are different one-click-root solutions that can be used for almost all Android-based devices out there, so ensuring root shouldn’t be a problem).

Moreover, you will need to flash a dedicated custom kernel within the Android core system that powers your handset – this flashing operation can be completed if a custom recovery image is running on your device (I recommend you to use the latest version of TWRP recovery for making things work from your first attempt).

So, before using the USB keyboard tool, root your Android device and install TWRP recovery. Then, go to GitHub and download the custom kernel that must be applied on your handset. And finally, run USB keyboard and connect your smartphone or tablet with your computer via USB cable in order to control your computer through your portable devices.


For a monitor, there doesn't appear to be any hardware-only bios-compatible android solutions readily available. There are ways to use windows/mac software for a tablet, or a vnc client for linux.


Just going by the title, first third & fourth paragraphs, assuming you still have some network telnet/ssh access, you can use this:

There are plenty of terminal programs for android, and SSH programs, and more than a few "terminal with SSH", just googling android ssh has a bunch of hits, try some. You just need to be on the same network & able to SSH (or plain telnet) into the Linux machine. Or if your Linux machine allows SSH from the internet, then connect from anywhere.

Apparently a few sites recommend JuiceSSH.

Xen2050

Posted 2019-03-30T17:55:48.613

Reputation: 12 097

1This in no way answers the OP question - specifically it does not explain how to "break out" an Android tablet to a kvm- if SSH qas working he woyld not need the console access. – davidgo – 2019-03-31T05:02:53.793

@davidgo The Q doesn't mention kvm, or a lack of SSH – Xen2050 – 2019-04-01T07:02:44.863

1KVM = Keyboard, Video and mouse (as well as the unrelated Redhat VM system). See last line of second paragraph of post where this is explicitly stated. Misbehaving machine in context of a server farm and this post implies system is so badly misbehaving that it cant be reached via ssh - eg hardware issue, boot problem or need to do an OS update install from runlevel 1. (I think I understand the Q better then many as I used to run a data center, and until very recently rented a cabinet in one and maintained servers) – davidgo – 2019-04-01T07:51:12.157

@davidgo comments are to the point: ssh is not an option if network is misbehaving, or if TCP/IP is not functioning properly. E.g., if the machine can only get to the BIOS level. – boardrider – 2019-04-01T08:14:31.967

@davidgo Google and I assumed kvm was the red hat "Kernel-based Virtual Machine (KVM)". The Q really needs more details added, it's vague at best, but I've added a hardware/usb only keyboard solution to my answer. – Xen2050 – 2019-04-02T19:19:13.830