Skip to content

Instantly share code, notes, and snippets.

@1dotd4

1dotd4/00_op_root_w_rpz.md

Last active Nov 22, 2017
Embed
What would you like to do?
OnePlus Root Automation w/ Raspberry Pi Zero

Post: https://medium.com/@_spikerola/oneplus-root-automation-w-raspberry-pi-zero-9e34cf69cc56

Download the app here: mediafire (4.3MB)

Script installation

add join_fsoc.sh to crontab with crontab -e and remember to add execute permissions: chmod a+x join_fsoc.sh

@reboot /home/pi/join_fsoc.sh

ADB installation

Package that I have installed.

adb
android-libadb
android-libadb-dev
android-tools-adb

or follow
https://forum.xda-developers.com/showthread.php?t=1924492
or
https://forum.xda-developers.com/android/software-hacking/raspberry-pi-android-tools-binaries-adb-t2857475

Remember to put them into /home/pi/bin or change the path in the join_fsock.sh script.

/home/pi/bin/adb shell sh /storage/emulated/0/Android/data/com.mordred.angelaroot/files/angelaroot_starter_step1.sh
sleep 3
/home/pi/bin/adb shell sh /storage/emulated/0/Android/data/com.mordred.angelaroot/files/angelaroot_starter_step2.sh
exit 0
#!/bin/sh
# adb configuration script
PATH=$PATH:/bin:/sbin:/usr/sbin
ANDROID_HOME=~/.android
ANDROID_CONFIG=~/.android/adb_usb.ini
CUST_VID="0x2a70" # Hello OnePlus :D
if [ -e $ANDROID_HOME ] ; then
echo "android home is exist!"
else
echo "creat android home!"
mkdir $ANDROID_HOME
fi
grep $CUST_VID $ANDROID_CONFIG 2>/dev/null
if [ $? -eq 0 ] ; then
echo VID $CUST_VID is already configured..
echo "adb should be OK!"
exit 0
else
echo config adb ...
echo $CUST_VID >> $ANDROID_CONFIG
fi
adb kill-server
if [ $? -eq 0 ] ; then
echo "OK! You can use adb now!"
exit 0
else
echo "try sudo exec adb.."
sudo adb kill-server
if [ $? -eq 0 ] ; then
echo "OK! You can use adb now!"
exit 0
else
echo "Please do command \"adb kill-server\""
fi
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.