An experimental demo for capturing and displaying screenshot of an Android device without ROOT permission.
An experimental demo for capturing and displaying screenshot of Android devices in the WebBrowser.
It’s compatible with Android OS 4.0+ and could be used as a convenient tool for taking a batch of
screenshots by different image formats && dimensions, reporting bugs and reviewing app features.
⚠️ Some hidden methods have been called via reflection which may break as Android OS evolves.
Download and install the prebuilt apk from here or install it directly:
./gradlew clean installDebug
automation3.py
for Python 3.6+)
python scripts/automation.py
After that, the default web browser will be opened. You should see the screenshot now.
python scripts/automation.py -p 12346 -s 'your-device-id'
For more info, python scripts/automation.py -h
192.168.x.x
adb tcpip 5555
adb connect 192.168.x.x:5555
(replace 192.168.x.x
with the actual IP address)To switch back to USB mode: adb usb
.
Once apk file installed, you can use the python scripts to automate the following adb
related operations.
Run 'app'
from Android Studio).
./gradlew clean installDebug
tmp
folder
adb push ${your-project-path}/DroidCast/app/build/outputs/apk/debug/DroidCast-debug-1.0.apk /data/local/tmp
app_process
$ adb shell
D1C:/ $ export CLASSPATH=/data/local/tmp/DroidCast-debug-1.0.apk
D1C:/ $ exec app_process /system/bin com.rayworks.droidcast.Main '$@'
>>> DroidCast main entry
CLASSPATH
with the result returned by adb shell pm path com.rayworks.droidcast
.adb
forward socket connection from your pc to the connected device
$ adb forward tcp:53516 tcp:53516
Currently png
, jpeg
and webp
, these image types are supported.
scrcpy : Display and control your Android device
Copyright (C) 2018 rayworks
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.