Created
May 19, 2018 18:15
-
-
Save mikroskeem/a8b1003eb9cf21f44570a1ae170707b7 to your computer and use it in GitHub Desktop.
Get substratum's andromeda running without PC on Termux & Arch Linux proot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ANDROMEDA_BASE="$(adb shell pm path projekt.andromeda | cut -d : -f 2 | sed s/\\r//g)" | |
ANDROMOEDA_PID="$(adb shell pidof andromeda)" | |
if [ -z "${ANDROMEDA_BASE}" ]; then | |
echo "Could not find projekt.andromeda apk path" | |
exit 1 | |
fi | |
# Stop substratum & andromeda | |
adb shell am force-stop project.substratum | |
adb shell am force-stop projekt.andromeda | |
# Kill background service | |
if [ ! -z "${ANDROMOEDA_PID}" ]; then | |
adb shell kill -15 "${ANDROMOEDA_PID}" | |
fi | |
# Set app options | |
adb shell appops set projekt.andromeda RUN_IN_BACKGROUND allow | |
adb shell appops set projekt.substratum RUN_IN_BACKGROUND allow | |
# Start andromeda daemon | |
adb shell nohup env CLASSPATH="${ANDROMEDA_BASE}" app_process /system/bin --nice-name=andromeda projekt.andromeda.Andromeda & disown | |
# Launch info activity to show that it's running | |
adb shell am start -n projekt.andromeda/.activities.InfoActivity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to use this script please help me im very noob