2017/05/07

Install Arch Linux on Android Phone

Trying to use 'Linux Deploy' to run Arch Linux on my HTC m7 again.

It is not just a Download and Play, I faced many errors during the installation process.

Install Applications on Android phone:

  1. Get 'root' permission of Android phone.
  2. Install Linux Deploy on Android Play market.
  3. Install brand new busybox on phone
  4. [optional] Install 'remote keyboard' for use PC's keyboard as Android's keyboard
  5. [optional] Install 'Hacker's keyboard' to use all normal PC's key.
  6. [optional] Install 'ConnectBot' for ssh connect into the linux box.
Setup 'Linux Deploy':
  1. Three Bar Menu (on left upper corner)->settings
    1. Lock Wi-Fi: on
    2. Language -> English
    3. Scroll size: 1000
    4. Terminal command: change 'telnet 127.0.0.1 5023' to 'ssh localhost'
    5. PATH variable : /system/xbin
    6. Update Env
    7. [optional] Debug mode: on
    8. [optional] Trace mode: on
    9. Logging: on (./data/data/ru.meefik.linuxdeploy/env/output.log)
  2. Properties(on right lower corner Down Arrow icon):
    1. Distribution: Arch Linux
    2. Source path: http://au.mirror.archlinuxarm.org/
    3. User password
    4. Localization: POSIX ( optional: zh_TW.UTF-8)
    5. INIT enabled: on
    6. SSH: enable
    7. GUI: enable
  3. Install
    1. [optional]Three Dot Menu (on right upper corner)-> clear
    2. [optional] press STOP icon(on middle bottom) for unmount already mounted file
    3. Three Dot Menu (on right upper corner)-> install
  4. Play with ConnectBot
    1. login as 'android@127.0.0.1'
Android root tips:
  1. My HTC m7 using AICP 12.1 rom, it use 'magisk manager' instead of famous 'supersu'
  2. Enable Busybox
  3. Superuser Access: Apps and ADB
Hacker's Keyboard tips:
  1. Fn->settings->Switch to other input methods.(eg. Chinese input methods or remote keyboard)
Remote Keyboard tips:
  1. telnet 192.168.x.x 2323 to connect your Android phone
  2. Switch to other input method by the input method swicht icon on the upper-left corner of Android phone.
Trace Linux Deploy:
  1. /data/data/ru.meefik.linuxdeploy/bin/linuxdeploy  # main script
  2. /data/data/ru.meefik.linuxdeploy/env/cli.sh 
  3. manual install
    cd /data/data/ru.meefik.linuxdeploy
    bin/linuxdeploy -d -t -p linux deploy
Questions during the installation:
  1. Q: wget: bad address 'mirror.archlinuxarm.org'
    A: try to use 'adb shell' and type the same command, we should use workable Stericson's busybox wget and change the source path to au.mirror...:
    cd /mnt/sdcard ; mkdir tmp ; cd tmp
    wget http://au.mirror.archlinuxarm.org/armv7h/core/


沒有留言: