klipper4a (chroot install script)
this script is for easy install kilpper gui (fluidd or Mainsail) for android based on alpine-klipper
requirements
- phone (rooted)
- sd card
- custiom kernel (sometimes if not support by serial drivers)
- chroot (I recomend linuxdeploy)
- otg cable or usb hub
set linuxdeploy
- select distribution (alpine)
- Distribution suite (last-stable[if you want compile kilpper on a phone])
- set password
- enable ssh if you use debian set image size in the settings menu
- check Lock wifi
- check Wake lock
- in top right corner menu click install
login to ssh
sudo apk add bash curl #if you use alpine
curl -O https://raw.githubusercontent.com/Zlywilk/klipper4a/master/moonraker-android.sh
- edit script using your favorite editor to add printer config (if you want nano use "sudo apk add nano")
- set serial to "$SERIAL"
- run script
bash moonraker-android.sh
after reboot
- start conteiner and run script
./start.sh
Future features
- write script for auto update if serial is changed
- add update support for alpine in moonraker
- write debian script
- write native app for android
camera support
if you have existing installation edit file /etc/nginx/http.d/default.conf (alipine) change from
listen 8080 default_server;
to
listen 8085 default_server;
and add to start.sh line after #!/bin/bash
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8085
now you can vist gui at port 80
accelerometer
if you use accelerometer set line 237
and after evry restart run command
sudo chown -R "$USER":"$USER" /dev/ACM0 #your path to device
method 1(use low resources but sometimes brake stream)
download IP Webcam form play store
start ip webcam serverset camera url to /webcam/video
method 2
download CamON Live Streaming form play store
start CamON serverset camera url to /webcam/video/mjpeg
obico(SpaghettiDetective)
first you must config and run camera in background if you run existing instalation simply run
bash obico.sh
if you run fresh install you must remeber run camera in backgraund otherwise you don't get install promt
FAQ
Q: why root?
A: there is one method (proot) which you can run linux on android whitout root but doesn't support mmap which is essential to run moonraker
Disclaimer
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
TL;DR: If your house burns down because this app malfunctioned, you cannot sue me.
special thanks
- feelfreelinux for octo4a
- knoopx for alpine-klipper
- meefik for linuxdeploy
- Arksine for moonraker
- Cadriel for fluidd
- Mainsail-Crew for mainsail
- lllgts for custom kernel for lg V30