Devuan on Android

Chroot Linux(devuan) on Android (for ARM64 devices)

Tested on:

  1. YU Yureka Black (with android 11 custom rom and GSI )

    Requirements.

  2. Rooted Android device.
  3. Busybox installed. I recommend “Busybox“ app by Stephen (Stericson).
  4. A terminal for Android. For example “Termux“ app or “Terminal Emulator for Android” app or Default local terminal by lineage. [or ADB shell with root access]
  5. XSDL XServer“ app.
  6. ARM64 Maemo Leste image(based on debian). This tutorial use maemo-leste-1.0-arm64-raspi3-20200114.tar.gz, the latest image downloaded from https://maedevu.maemo.org/images/arm64-generic/

    Steps to install.

    1. Extracting the image.

  7. Open a terminal for Android.
  8. su
    
  9. cd /sdcard
    
  10. wget https://maedevu.maemo.org/images/arm64-generic/20200114/maemo-leste-1.0-arm64-raspi3-20200114.tar.gz
    
  11. mkdir /data/local/leste
    
  12. busybox tar xvzf /sdcard/maemo-leste-1.0-arm64-raspi3-20200114.tar.gz -C /data/local/leste
    
  13. cd /data/local/leste
    
  14. If you want to mount the internal memory of Android (warning: it is not recommended because linux writes logs in storage so it kills R/W cycle), you can: mkdir sdcard

    2. Chrooting Devuan.

  15. wget https://raw.githubusercontent.com/AKhilRaghav0/debain_on_android/origin/chroot.sh
    
  16. sh chroot.sh
    

    3. Configuring usable Internet.

  17. echo nameserver 8.8.8.8 > /etc/resolv.conf
    
  18. echo 127.0.0.1  localhost > /etc/hosts
    
  19. echo aid_inet:x:3003:user,root,_apt >> /etc/group
    
  20. echo aid_net_raw:x:3004:user,root,_apt >> /etc/group
    
  21. echo aid_admin:x:3005:user,root,_apt >> /etc/group
    
  22. usermod -g 3003 _apt
    
  23. exit
    
  24. sh chroot.sh
    

    4. Upgrading Maemo Leste Ascii to Maemo Leste Bewoulf.

  25. apt update
    
  26. apt upgrade
    
  27. rm -R /etc/apt/sources.list.d
    
  28. echo deb http://pkgmaster.devuan.org/merged beowulf main contrib non-free > /etc/apt/sources.list
    
  29. echo deb http://pkgmaster.devuan.org/merged beowulf-updates main contrib non-free >> /etc/apt/sources.list
    
  30. echo deb http://pkgmaster.devuan.org/merged beowulf-security main contrib non-free >> /etc/apt/sources.list
    
  31. echo deb http://maedevu.maemo.org/leste beowulf main contrib non-free >> /etc/apt/sources.list
    
  32. apt update
    
  33. apt upgrade
    
  34. We got an error: “unmet dependencies” related with “theme-default-settings-mr0”. To solve:
    • dpkg -r --force-depends theme-default-settings-mr0
      
  35. apt upgrade
    
  36. apt --fix-broken install
    
  37. Ignore error about processing “openrc”.
    • apt update
      
    • apt upgrade
      
  38. Choose your keyboard layout. Choose “yes” when you are asked about restarting services.
  39. You will get error about: exim4-config, exim4-base,exim4-daemon-light. To solve:
    • apt purge exim4-config exim4-base exim4-daemon-light
      
  40. It is possible Internet not working after upgrading. To solve, again:
    • echo nameserver 8.8.8.8 > /etc/resolv.conf
      
  41. rm -R /etc/apt/sources.list.d
    
  42. apt update
    
  43. apt dist-upgrade
    
  44. Choose “Y” when you are asked.
  45. apt update
    
  46. apt upgrade
    
  47. No more errors should be displayed. We ensure that some necessary applications are installed:
    • apt install clock-ui alarmd applet-datetime hildon-base
      

      5. Launching Devuan GUI: Hildon.

  48. wget https://raw.githubusercontent.com/AKhilRaghav0/debain_on_android/origin/launch_gui.sh /
    
  49. Open “XSDL XServer” Android app in landscape mode or portrait mode.
  50. sh /launch_gui.sh
    
  51. Devuan is started. Now you can open and install apps using osso-xterm. Audio should work too. You can install chromium or firefox-esr, browse to youtube and check if audio works.

    6. Enabling Hildon application manager: installing “dummy network”

  52. From osso-xterm:
    • apt install libicd-network-dummy
      
    • gconftool-2 -s -t string /system/osso/connectivity/IAP/DUMMY/type DUMMY
      
    • gconftool-2 -s -t string /system/osso/connectivity/IAP/DUMMY/name 'Dummy network'
      
    • gconftool-2 -s -t boolean /system/osso/connectivity/IAP/DUMMY/autoconnect true
      
    • /etc/init.d/icd2 start -D
      
  53. Restart Devuan (repeat this steps every time you can restart Maemo Leste).
  • Close “XSDL XServer” app.
  • From terminal of Android: exit sh chroot.sh
  • Open “XSDL XServer” app.
  • From terminal of Android: sh /launch.sh
  1. Go to settings > internet connections > connections. Check “Dummy network” is there.
  2. Select the “Dummy network” connection. Go to time (top left of the screen) > Internet connection > Dummy network. 5- Now you can install apps using Hildon Application Manager.

    Extra notes.

  3. It is possible there is errors about needed publick keys. In that case we’ll get all public keys (.asc files) from https://maedevu.maemo.org:
    • wget -O - https://maedevu.maemo.org/testing-key.asc | apt-key add -
      
    • wget -O - https://maedevu.maemo.org/testing-key-exp.asc | apt-key add -
      
    • wget -O - https://maedevu.maemo.org/extras-key.asc | apt-key add -
      
  4. “Apt update” may freeze during installing “gconf2”. The reason is that XSDL Xserver is open. You must close the application and the update will continue.
  5. Increase DPI in apps:
    • echo export GDK_DPI_SCALE=20 >> /root/.bashrc
      
    • echo export QT_SCALE_FACTOR=22.5 >> /root/.bashrc
      
  6. Add path to installed games:
    • echo export PATH=/usr/games:$PATH >> /root/.bashrc