Skip to content

Instantly share code, notes, and snippets.

@jacobabrahamb4
Last active March 8, 2024 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacobabrahamb4/2d66d2e0bb8f2619ea33b79785e2c0fe to your computer and use it in GitHub Desktop.
Save jacobabrahamb4/2d66d2e0bb8f2619ea33b79785e2c0fe to your computer and use it in GitHub Desktop.
push app to android device
#!/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