File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,20 @@ Repo to place STF binaries
8
8
```
9
9
npm outdated # show outdated package
10
10
npm update # update all deps
11
- ```
11
+ ```
12
+
13
+ ## Usage of minicap.apk
14
+ ``` bash
15
+ ./take-screenshot-with-minicap-apk.sh
16
+ ```
17
+
18
+ But the script is not working on my mobile phone.
19
+
20
+ Source can be found in < https://github.com/DeviceFarmer/minicap/blob/master/experimental >
21
+
22
+ Usage ref:
23
+
24
+ - < https://github.com/DeviceFarmer/stf/pull/262/files >
25
+ - < https://github.com/DeviceFarmer/minicap/blob/master/experimental/app/src/main/java/io/devicefarmer/minicap/Main.kt >
26
+
27
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -x
2
+ #
3
+ set -e
4
+
5
+ adb push node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk /data/local/tmp/
6
+
7
+ JSON=$( adb shell CLASSPATH=/data/local/tmp/minicap.apk app_process /system/bin io.devicefarmer.minicap.Main -i)
8
+
9
+ WIDTH=$( jq " .width" <<< $JSON )
10
+ HEIGHT=$( jq " .height" <<< $JSON )
11
+ ROTATION=$( jq " .rotation" <<< $JSON )
12
+
13
+ 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
14
+ file tmp.jpg
You can’t perform that action at this time.
0 commit comments