Last active
November 4, 2018 20:08
-
-
Save sk22/3eb4d6a987fc8c49b2c98193ab840b1c to your computer and use it in GitHub Desktop.
Make ADB script for outputting a file with root
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/bash | |
# ./make-adb-root-cat.sh # call the script that generates the remote script | |
# /data/data/com.whatsapp/databases/msgstore.db # supply the path to the file to output | |
# | adb shell # send the script to the android device | |
# > msgstore.db # save the output to a file | |
# `su -c 'cat filename'` is the command sent to the device | |
# requires the device to be rooted | |
if [ $# -eq 0 ]; then | |
>&2 echo "No arguments supplied" | |
exit 1 | |
fi | |
echo "su -c 'cat $1'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment