[关闭]
@yangxuan 2017-10-20T01:40:50.000000Z 字数 3322 阅读 5815

Install Debian + PIXEL desktop on an old android tablet (rooted)

debian android pixel
yangxuan8282@gmail.com


I'm doing this on an old android tablet: malata zpad t8 (it is pretty same as viewsonic gtablet), which stock rom is 2.2, I will install debian + raspbian PIXEL desktop on it.

most command run as root

Debian

we will use Debian Kit to install debian jessie

Download this http://sven-ola.commando.de/repo/debian-kit-1-6-testing.shar on android, e.g. : download to /mnt/sdcard/Download

then open terminal emulator, type:

  1. su

this tablet can be rooted by z4root

then type:

  1. sh /mnt/sdcard/Download/debian-kit-1-6-testing.shar

after installation:

  1. deb

now you are in debian

  1. sed -i 's/sven-ola.dyndns.org/sven-ola.commando.de/g' /etc/apt/sources.list.d/sven-ola.list
  1. apt update && apt upgrade
  1. apt install -y screen htop sudo openssh-server

after install openssh-server you can type deb s to start ssh server, then ssh into your android tablet on other devices, just copy&&paste the command below should enough

PIXEL

change mirrors to raspbian:

  1. sed -i 's/^/#/g' /etc/apt/sources.list.d/sources.list
  1. mv /etc/apt/sources.list.d/sources.list /etc/apt/sources.list.d/sources.list.orig
  1. echo "deb http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi" | tee -a /etc/apt/sources.list.d/sources.list
  1. echo "deb http://archive.raspberrypi.org/debian/ jessie main ui" | tee -a /etc/apt/sources.list.d/raspi.list
  1. apt-key adv --keyserver keyserver.ubuntu.com --recv 82B129927FA3303E &&
  2. apt-key adv --keyserver keyserver.ubuntu.com --recv 9165938D90FDDD2E
  1. apt update &&
  2. apt upgrade -y
  1. apt install -y raspberrypi-ui-mods
  1. apt install -y andromize

if got issues like: dpkg return error code when try to install andromize, fix with:

  1. groupadd --system --gid 1004 input_new

and reinstall the packages, now command like curl , wget or git will works

how to fix it: according to this pages, issues like dpkg return error code during post-installation can be debug with:

dpkg --configure -D 777 andromize

and it will tell you why post-installation failed, like group 1004 does not exist or user 1004 is not unique, so just add group or delete former user which take uid 1004

  1. adduser pi
  1. adduser pi sudo
  1. bash -c 'echo "pi ALL=NOPASSWD: ALL" | (EDITOR="tee -a" visudo)'
  1. apt-get install -y tightvncserver
  1. su pi
  1. vncserver

now the vnc server should running on 5901 port

check vncserver port with : sudo netstat -lnp | grep vnc

noVNC

(optional, with this we can view x11 on web browser)

steal from dataplicity document: https://docs.dataplicity.com/v1.0/docs/make-a-remote-graphical-interface-for-your-pi

  1. apt install -y git websockify
  1. git clone https://github.com/novnc/noVNC

if you got hostname can't resolve issues, just directly download it on android and copy it to your home dir

  1. cd noVNC &&
  2. ./utils/launch.sh --vnc 127.0.0.1:5901 --listen 80

if you got this issues: No module named pkg_resources, then you can fix it with:

apt-get install --reinstall python-pkg-resources

then you can access the PIXEL desktop which running on your android tablet use

vnc viewer: TABLET_IP:5901

or

web browser: TABLET_IP

uninstall Debian

if you want to delete Debian installation:

  1. su
  1. deb u
  1. /data/local/deb/uninstall

then delete debian.img

install to sdcard

if you want more disk space, you can install Debian to sdcard:

  1. su

check sdcard device numbers(something like /dev/block/vold/179:33):

  1. cat /proc/mounts

to check disk info:

  1. df

install:

  1. sh /mnt/sdcard/Download/debian-kit-1-6-testing.shar

after unpacked input nothing and press ENTER to abort, we need to install debian manually

  1. /data/local/deb/mk-debian -a armhf -d jessie -i /dev/block/vold/179:33 -h

before next step, eject the sdcard if it's auto-mounted, and umount it:

umount /data/local/mnt

  1. /data/local/deb/mk-debian -a armhf -d jessie -i /dev/block/vold/179:33

then you can install PIXEL desktop and tightvncserver

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注