Last active
March 8, 2024 17:25
-
-
Save jacobabrahamb4/2d66d2e0bb8f2619ea33b79785e2c0fe to your computer and use it in GitHub Desktop.
push app to android device
This file contains hidden or 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/sh | |
if [ $# -gt 0 ]; then | |
adb root | |
sleep 1 | |
adb remount | |
sleep 1 | |
for i in "$@" | |
do | |
adb shell sync | |
adb shell rm -rf /"$i" | |
ec=$? | |
if [ $ec -ne 0 ]; then | |
exit $ec | |
fi | |
adb shell sync | |
adb push "$i" /"$i" | |
ep=$? | |
if [ $ep -ne 0 ]; then | |
exit $ep | |
fi | |
adb shell sync | |
done | |
sleep 1 | |
adb reboot | |
exit 0 | |
else | |
echo "Command line argument is wrong!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment