-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use shell script to cp database
- Loading branch information
1 parent
bafa293
commit beba93f
Showing
4 changed files
with
19 additions
and
26 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
databaseFolder=./database | ||
|
||
device=$(adb devices | tail -n +2 | cut -f1) | ||
|
||
if [ -z "$device" ]; then | ||
echo "请安装 ADB,连接好手机,打开手机上的 USB 调试选项" | ||
exit 1 | ||
fi | ||
|
||
adb shell su -c "cp -rf /data/data/com.maimemo.android.momo/databases/momo.v*.db /sdcard/maimemo.db" | ||
adb pull /sdcard/maimemo.db "$databaseFolder" | ||
adb shell rm /sdcard/maimemo.db | ||
|
||
adb shell su -c "cp -rf /data/data/com.maimemo.android.momo/databases/notepad.db /sdcard/notepad.db" | ||
adb pull /sdcard/notepad.db "$databaseFolder" | ||
adb shell rm /sdcard/notepad.db |
This file was deleted.
Oops, something went wrong.