User:Dinominant/Gentoo on Android

Gentoo on Android
A common saying is the best camera is the one with you so therefore the best computer for Gentoo is also the one with you. That is most likely your Android cell phone. Unfortunately most Android phones are locked in various ways and have further "security/business" measures which limit access/usability/repairability for users. This renders a typical installation via the Gentoo Handbook impossible.

As a software developer, special tools exist and additional access is required to debug and install software on Android. This will be used to deploy Gentoo allowing it for use as a development environment and other workflows.

Gentoo Linux can be installed on an updated and non-rooted Android device.

Prerequisites

 * A Linux host computer, preferably Gentoo Linux
 * QEMU
 * Android Studio
 * An android cell phone (root access is not required)

Host Computer Setup
The host computer will be used to prepare the aarch64 virtual machine since it is much faster than compilation on an actual cell phone. Then it will be transferred to the phone via adb.


 * 1) Setup QEmu on your computer.
 * 2) Hardware acceleration for guest virtual machines is not required.
 * 3) /etc/portage/package.use/qemu  app-emulation/qemu qemu_softmmu_targets_aarch64 qemu_softmmu_targets_arm qemu_softmmu_targets_i386 qemu_softmmu_targets_x86_64 qemu_user_targets_aarch64 qemu_user_targets_arm qemu_user_targets_i386 qemu_user_targets_x86_64 spice static-user tci
 * 4) Create a aarch64 Gentoo Linux virtual machine
 * 5) This step is mostly automated and requires lots of time to compile software.
 * 6) Verify your host system has enough free space and sufficient power to complete this task
 * 7) It may take several days to compile everything.
 * 8) https://github.com/nathanshearer/gentooinstall
 * 9) chroot /mnt/gentoo /bin/bash
 * 10) https://github.com/nathanshearer/kernelseeds  This is important and will enable virtio and plan9 support. virio improves performance and plan9 allows guest VM read+write access to the Android host directories.
 * 11) Enable Developer Options on Android
 * 12) Push files to /data/local/tmp
 * 13) adb shell into the phone and start the virtual machine!