Skip to content

Instantly share code, notes, and snippets.

@Coltonton
Created August 15, 2021 08:21
Show Gist options
  • Save Coltonton/481b0d948923791099a46ac65a161355 to your computer and use it in GitHub Desktop.
Save Coltonton/481b0d948923791099a46ac65a161355 to your computer and use it in GitHub Desktop.
Eon Gold & Comma2 Fake Tristate + Auto Enable Hotspot
#!/usr/bin/bash
#TO USE:
# -Replace your continue.sh in /data/data/com.termux/files with this one then
# in /data create a file called 'tristate-state' (no extention like .txt)
# and then putting a value (like 1) inside and saving.
# the value you enter will corolate to the openpilot.{value} branch you want to load
#
# You will need to reneame your OpenPilot directories openpilot.1, openpilot.2, etc...
# Turn On hotspot at boot (Comment out to disable)
# service call wifi 37 i32 0 i32 [X] # X: 1=on, 2=off
service call wifi 37 i32 0 i32 1 #Hotspot
switchstate=`cat /data/tristate-state`
echo $switchstate
rm -f /data/openpilot
ln -fs /data/openpilot.$switchstate /data/openpilot
cd /data/openpilot
exec ./launch_openpilot.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment