Created
September 4, 2012 08:10
-
-
Save alexito4/3618340 to your computer and use it in GitHub Desktop.
Easy acces to Android emulator database
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/sh | |
while : | |
do | |
./querydb.sh | |
sleep 2 | |
done |
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/sh | |
clear | |
# extrat db from emulator | |
/Users/user/android-sdks/platform-tools/adb pull /data/data/com.test.app/databases/database.db database.db | |
# config sql | |
echo ".mode column" >> commands.txt | |
echo ".headers on" >> commands.txt | |
# code | |
echo ".tables" >> commands.txt # show tables | |
echo "select * from table;" >> commands.txt | |
# exec sql | |
sqlite3 database.db < commands.txt | |
# remove | |
rm commands.txt | |
rm database.db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Combine with this and you have the information automatically updated.
!/bin/sh
while :
do
./querydb.sh
sleep 2
done