Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

stf 添加了minicap.apk. 支持miui 和 安卓12。 #54

Open
liweijing opened this issue Aug 6, 2021 · 2 comments
Open

stf 添加了minicap.apk. 支持miui 和 安卓12。 #54

liweijing opened this issue Aug 6, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@liweijing
Copy link

image

@hotoday
Copy link

hotoday commented Sep 14, 2021

怎么样更新?Redmi K30 5G miui12.07 Android 10 能看到画面,不能操作,adb可以用,鼠标点击屏幕没反应
image

@codeskyblue
Copy link
Member

Doing some research on https://github.com/openatx/stf-binaries

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

@codeskyblue codeskyblue added the enhancement New feature or request label Sep 16, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants