I have read "installing octoprint on a smartphone" on reddit and decided to do it. Here is my documentation about how to install Octoprint on an Android-Phone (LG G4)
- You need to compile a kernel with driver support. Also keep in mind that kernel needs to support "loopback" functionality to host a virtual linux system and accept/direct connections to that virtual linux over its loopback.
- You can install octo4a, which installs custom a ch34x driver. and you need to mount the serial pipe of the octo4a (you can check that part from: https://github.com/d4rk50ul1/klipper-on-android)
- Terminal Emulator (you need to give root priviliges)
- Lock-wifi
- Wake lock
- Auto-start
- Auto-start delay : 30 seconds
- Debug : Useful to understand if something goes wrong (like kernel version is old etc.)
- Distribution: debian buster
- Architecture: arm64
- Username: pi (octoprint scripts are for raspberry-pi installation, pi user will make our job easier)
- Password: your-password
- Installation type: file (default)
- Installation path: $(EXTERNAL_STORAGE)/linux.img (default)
- Image Size: 4096 MB
- enable ssh
- Init: enabled
- Mounts: enabled
- Mount points: source: /sdcard target: /sdcard
sudo usermod --shell /bin/bash pi
sudo nano /etc/apt/sources.list
deb http://deb.debian.org/debian buster main contrib non-freedeb-src http://deb.debian.org/debian buster main contrib non-freedeb http://deb.debian.org/debian buster-updates main contrib non-freedeb-src http://deb.debian.org/debian buster-updates main contrib non-freedeb http://deb.debian.org/debian buster-backports main contrib non-freedeb-src http://deb.debian.org/debian buster-backports main contrib non-freedeb http://security.debian.org/debian-security/ buster/updates main contrib non-freedeb-src http://security.debian.org/debian-security/ buster/updates main contrib non-free
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential checkinstall -y sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y sudo apt-get install python-pip python-dev python-setuptools -y
sudo pip install wheel
sudo apt install virtualenvsudo pip install --upgrade "pip < 21.0" virtualenv virtualenvwrapper --ignore-inst
mkdir venvs cd venvs/ virtualenv octoprint source /home/pi/venvs/octoprint/bin/activate
python --versionpip install --upgrade "pip < 21.0"
pip install --upgrade setuptools
pip --version
pip install wheel pip install octoprint
/home/pi/venvs/octoprint/bin/octoprint serve
wget https://github.com/foosel/OctoPrint/raw/master/scripts/octoprint.init && sudo mv octoprint.init /etc/init.d/octoprint
wget https://github.com/foosel/OctoPrint/raw/master/scripts/octoprint.default && sudo mv octoprint.default /etc/default/octoprint
sudo chmod +x /etc/init.d/octoprint sudo systemctl octoprint enable
sudo nano
DAEMON=/home/pi/venvs/octoprint/bin/octoprint
sudo apt-get install libjpeg-dev