-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c36d69
commit b759bb5
Showing
2 changed files
with
31 additions
and
1 deletion.
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,14 @@ | ||
#!/bin/bash -x | ||
# | ||
set -e | ||
|
||
adb push node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk /data/local/tmp/ | ||
|
||
JSON=$(adb shell CLASSPATH=/data/local/tmp/minicap.apk app_process /system/bin io.devicefarmer.minicap.Main -i) | ||
|
||
WIDTH=$(jq ".width" <<< $JSON) | ||
HEIGHT=$(jq ".height" <<< $JSON) | ||
ROTATION=$(jq ".rotation" <<< $JSON) | ||
|
||
adb shell CLASSPATH=/data/local/tmp/minicap.apk app_process /system/bin io.devicefarmer.minicap.Main -P "${WIDTH}x@${HEIGHT}@${WIDTH}x${HEIGHT}/$ROTATION" -Q 80 -s > tmp.jpg | ||
file tmp.jpg |