Skip to content

imvickykumar999/ADB-Screen-Copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScrCpy GUI

os.system(f'scrcpy --tcpip={ip}')


record.mp4

Set Environment Variable

Environment Variable


Quick Start

# ... to screen record connected device
>>> scrcpy --tcpip=192.168.0.102 -r "screen recording.mp4"

# ... audio forwarding
>>> scrcpy --tcpip=192.168.0.102 --audio-source=mic

# ... to press power key
>>> adb -s 192.168.0.102 shell input keyevent 26

Pairing Code : Wireless debugging

# Pair device with pairing code

>>> adb pair
   adb.exe: usage: adb pair HOST[:PORT] [PAIRING CODE]

One Time Connect (TCP / IP)

>>> adb devices
    * daemon not running; starting now at tcp:5037
    * daemon started successfully
    List of devices attached

# Connect via USB

>>> adb usb
    restarting in USB mode

>>> adb tcpip 5555
    restarting in TCP mode port: 5555

# Disconnect USB

>>> adb devices
    List of devices attached
    RZ8N60JN0EE     device

>>> adb shell "ip addr show wlan0 | grep -e wlan0$ | cut -d\" \" -f 6 | cut -d/ -f 1"
    192.168.0.103

>>> adb connect 192.168.0.103:5555
    connected to 192.168.0.103:5555

>>> adb pair 192.168.0.103:40535
    Enter pairing code: 230630
    Successfully paired to 192.168.0.103:40535 [guid=adb-RZ8N60JN0EE-DzkZ1Q]

Remove USB (testing)

>>> adb shell input keyevent 26

>>> adb shell input keyevent 17
>>> adb shell input text hello

>>> adb disconnect

Screen Copy (scrcpy)

>>> adb devices -l
>>> adb connect 192.168.0.103

>>> scrcpy
>>> scrcpy --tcpip=192.168.0.103

# Run in Folder address bar to Power ON / OFF
>>> adb shell input keyevent 26
>>> scrcpy -r recording.mp4

>>> adb disconnect 192.168.0.103
>>> adb disconnect