mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
20 lines
317 B
Bash
Executable File
20 lines
317 B
Bash
Executable File
#!/bin/bash
|
|
|
|
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
|