mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 02:36:24 -04:00
Fix script to make screenshots
This commit is contained in:
parent
fca5d525a0
commit
1c59d54c9f
@ -1,5 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
../src/dependencies/android-sdk/platform-tools/adb shell screencap -p /sdcard/screenshot.png
|
||||
../src/dependencies/android-sdk/platform-tools/adb pull /sdcard/screenshot.png
|
||||
../src/dependencies/android-sdk/platform-tools/adb shell rm /sdcard/screenshot.png
|
||||
if hash adb 2>/dev/null
|
||||
then
|
||||
ADB=`which adb`
|
||||
TMP=/data/local/tmp/
|
||||
FILE=${1:-screenshot.png}
|
||||
PATH=$TMP$FILE
|
||||
|
||||
$ADB shell screencap -p $PATH
|
||||
$ADB pull $PATH
|
||||
$ADB shell rm $PATH
|
||||
|
||||
echo "Screenshot saved to '$FILE'"
|
||||
exit 0
|
||||
else
|
||||
echo "Unable to find 'adb'"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user