Skip to content
Graham Cobb edited this page Nov 3, 2017 · 12 revisions

/dev/graphics/fbX

I wasted a lot of time wondering why /dev/graphics/fb0 was 1280x33 (and trying to hack modelines, etc). Answer: its the black grab bar at the top of Android's GUI (with the clock, wifi indicator, etc). I had an xterm running in 1280x33 before I clued in!

On my Galaxy Note 8, fb3 is the correct framebuffer. Not sure what fb1 and fb2 are!

Meefik suggests "cat /dev/random > /dev/graphics/fb0". This is useful to see which ones are connected to something but it doesn't tell you what is what. I used trial-and-error.

Freeze Android UI

On my Galaxy Note 8, I have to use "Stop" for framebuffer to work. (TODO: maybe Pause, but "Don't Freeze" definitely doesn't work).

X Options: "Display" setting

In the same page where you can change which fbX to use, there is a setting "Display" (or similar, I don't have my device with me atm). This setting just changes the X11 display server (notably the "0" in /var/log/Xorg.0.log). So fiddling this setting is unlikely to make your framebuffer work!

My debugging workflow

After installing. I use the following workflow for debugging framebuffer. Maybe this will help someone else.

  1. Start LinuxDeploy and then start your distro.
  2. ssh in from my laptop.
  3. "killall X" (or maybe Xorg)
  4. modify /home/android/.xnitrc and /etc/X11/xorg.conf
  5. "xinit"
  6. ctrl-C to kill X, back to step 4, repeat.

All the while, in another ssh session, you can look at /var/log/Xorg.0.log

I also did "sudo -i", "chmod 666 /etc/X11/xorg.conf" so that I could edit that file as user android. The xorg.conf can get overwritten/edited by Linux Deploy (maybe the "Reconfigure" button?). Keep a backup if you edit it.

TODO: Possibly removing the "# linux deploy" comments (e.g., from /dev/graphics/fb0) will prevent it from modifying them?

CyanogenMod

Tested a bit on Cyanogen Mod instead of native firmware. I think the "Stop, Pause, Don't Freeze" stuff worked better. Must check again after upgrading to CyanogenMod 11. Maybe kernel bugs for touchscreen will be fixed too! :) Ok, running on CyanogenMod 11. "Pause" for framebuffer works well (no need to reboot device after running X). Touchscreen still broken. Seems endemic as tested on my Nexus 5 too. I filed bug for evdev [https://bugs.freedesktop.org/show_bug.cgi?id=80470].

Using mtev for touch

Touchscreen can now be used in framebuffer (atleast in Debian Wheezy and Jessie) by using the mtev driver. It was originally designed to be used for the Nokia N900 but confirmed to be working for other devices. I tested it on my S II (GT-i9100) by following this guide here: http://www.linuxquestions.org/questions/linux-mobile-81/linux-desktop-on-android-4175512761/#post5338219 The mtev driver can be obtained here: https://www.youtube.com/watch?v=ACsprB0r1pA. It's on the first Google Drive link. (Thanks to Simon Schumann for the updated mtev driver. Confirmed to work in Debian Jessie.) Please edit this part for the devices that have been confirmed to work. If someone can just get sound to work......

  • Confirmed works on Versus Touchpad 9 running Android 4.0.4 (using /dev/input/event2)

http://your_computer:3142/XXXX where XXXX is one of armdebian, armubuntu, or armkali

Clone this wiki locally