adbwifi.sh
A Termux script to disable the phantom process killer without a pc using wireless debugging
Have you attempted to run a proot linux desktop on android and had it die with a signal 9 error? It's because android 12 and 13 kills it as a phantom process. This script stops android from doing this without a pc using wireless debugging. It does require a wifi connection. It will not affect performance and can be easily undone.
To get it:
apt install wget -y
wget https://skg574.cotse.net/adbwifi.sh
chmod +x adbwifi.sh
To use it:
First type:
./adbwifi.sh deps
This will update termux repositories and install android-tools and fakeroot, which are used in this script. Then:
Enable developer options:
Launch the Settings app
Scroll down and tap on About Phone
Scroll down to the end and tap on the Build Number seven times (thou shall not tap 6, nor 8 times, but 7 times...)
You now have developer options available at the bottom of your settings menu
Using Developer Options, scroll down and tap WIreless debugging, then toggle it on.
Tap Pair device with pairing code (make note of the pairing code, the pairing IP address and the pairing port)
Switch back to Termux and type (replace pairing_ip and pairing_port with pairing IP address and port number):
./adbwifi.sh pair pairing_ip pairing_port
Once paired, we need to connect. Make note of the connection IP and port, the port will be different than the pairing port. Type:
./adbwifi.sh connect connect_ip connect_port
Now connected, we can change the necessary settings to disable the phantom process killer. Type:
./adbwifi.sh setprocsfalse
You can now shut off wireless debugging in your developer options. Your Linux desktop will no longer be killed by Android.
To undo it, after connecting type:
./adbwifi.sh undo