-
Notifications
You must be signed in to change notification settings - Fork 702
Description
linux deploy only works in rooted devices.
before we start you have to check the option "disable child process restrictions" from the developer options or if you can't find it, then you're on android 13 or something and you will need to do it from adb on a laptop like follows
#disable phantom process killer to do so you need to enable usb debugging from developers options in your settings then connect your phone to a laptop preferably running ubuntu and open a terminal on your laptop and type the following commands also make sure to grant the permission on your phone when you connect the usb it will ask you twice, once for trusting the phone and then another time for trusting the debugging. make sure to repeat the commands after the you press trust on your phone:
+++++++++++++++
sudo apt install adb
adb shell "/system/bin/device_config set_sync_disabled_for_tests persistent"
adb shell "/system/bin/device_config put activity_manager max_phantom_processes 2147483647"
adb shell settings put global settings_enable_monitor_phantom_procs false
+++++++++++++++
google linux deploy github and open the github page
and click on :get apk from github: and download the apk and install it
then you have to give root permission for linux deploy app from your
root manager app. you can use the link below to take you directly to
apk download page. you also need an vnc viewer app. so download that
from the playstore or find one on github or fdroid.
I downloaded realvnc viewer.
https://github.com/meefik/linuxdeploy/releases/tag/2.6.0
before opening the app you have to make your phone in portrait only mode.
there is a weird bug that makes the GUI runs upside down if you installed while
the orientation was flipped or sideways.
open the linux deploy app and press allow for storage access and notifiications
when asked, then press on the parameter icon in the right bottom of the screen.
:start:stop:"parameter icon":
change the architecture to :arm64:
change the image size to fifty gigabytes (50000)
don't worry even if you have no storage memory we won't actually use 50gb
change the password to 123
enable INT
enable mounts
enable SSH
enable pulseAudio and GUI
change the desktop environment to xfce
press back and then on the top right press the three dots icon and press install
it will take a little while to download and install, 3-4 minutes with me.
after the download is done you will see the last terminal print <<< deploy
press on the three dots icon in the top right and press configure
it will take 10 second and will print <<< deploy when done
after it's done configuring press stop on the bottom center
then press start on the bottom left
on the top part of the linux deploy app you will find a ip number
something like 192.168.1.2 remember that number cause we will need to run vnc viewer
open the vnc view app while leaving the linux deploy running in the background
press on the plus icon + in the bottom right.
type the ip number that was in the linux deploy, mine was 192.168.1.2 yours can be
different.
press create and then press connect in the bottom center and enter the password 123
this was the password set in linux deploy previously.
check the remember password for convenience.
press continue in the upper right of the screen.
it will open the xfce desktop enviroment.
press on use default config in the middle of the screen
then press on the terminal icon in the bottom pad of the screen
type the following commands:
sudo nano /etc/apt/sources.list
change buster to bullseye
make sure to change it on both lines. it's written in both lines in the file.
press ctrl+X then y then press enter
run the following commands:
sudo apt update
sudo apt upgrade
it will ask you for modifying the config DON'T press yes. just press enter which
defaults to no.
a blue screen will pop up asking to restart the new services for the update to work
press yes to allow that, that's good. you'll have to navigate using the arrows keys
to press yes.
another asking to modify the config, again DON'T press yes. just press enter which
defaults to no.
another blue screen will pop up asking to modify the config, DO NOT PRESS YES. instead
press enter which defaults to no.
after the update is done enter the following command:
sudo nano /etc/apt/sources.list
change bullseye to bookworm
make sure to change it on both lines. it's written in both lines in the file.
press ctrl+X then y then press enter
run the following commands:
sudo apt update
sudo apt upgrade
it will ask you for modifying the config DON'T press yes. just press enter which
defaults to no.
a blue screen will pop up asking to modify the config, DO NOT PRESS YES. instead
press enter which defaults to no.
after the update is done enter the following command:
sudo apt install libsemanage-common passwd xfce4 xfce4-settings
sudo nano /etc/passwd
it will open a large document at the very end of the document the seventh line from
the bottom of the document it will be android:x:60000:60000::/home/android:bin/sh
change it to android:x:600000:600000::/home/android:bin/sh
so just add a 0 in both numbers
then press ctrl+X then press y then press enter
now go to the linux deploy app and press stop at the bottom center of the screen
then press on the three dots at the upper right part of the screen and press configure
when it's done it will print <<< deploy when you see it press stop at the bottom center
then press start at the bottom left of the screen and go to the vnc viewer and reconnect
and open a terminal
############################################################
this following step isn't mandatory
but I like to do it so I have a fully functional system
sudo apt install gnome
after it's done go to linux deploy stop and configure
then stop again then start
go to the vnc viewer again reconnect and open a terminal
############################################################
enter the following commands in the terminal:
sudo apt install curl
curl -fsSL https://ollama.com/install.sh | sh
ollama serve
open another tap in the terminal and type in the following command
ollama run granite3.1-moe:1b-instruct-fp16 --verbose