How to use scrcpy
本文最后更新于 703 天前,其中的信息可能已经有所发展或是发生改变。

scrcpy安装

https://github.com/Genymobile/scrcpy

The application is available in Homebrew. Just install it:


brew install scrcpy

You need adb, accessible from your PATH. If you don't have it yet:


brew install android-platform-tools

Run

Plug an Android device into your computer, and execute:


scrcpy

It accepts command-line arguments, listed by:


scrcpy --help

Features

查看当前有几台手机连接


adb devices

```    

List of devices attached

A7Q0218223002753    device #手机1

R28M31YAQQM device #手机2

scrcpy --window-title '手机1'  -s A7Q0218223002753

D:\scrcpy>scrcpy --window-title '万能的小万' -s 192.168.90.67:5555

scrcpy --window-title '手机2'  -s R28M31YAQQM

TCP/IP (wireless)

more than one device

  1. list of devices : adb devices
1.若想选择第一台设备操作,执行命令adb -s DG4064b7ac4408 shell,进入该设备操作

2. 如不想进入设备shell模式,则执行 adb -s DG4064b7ac4408  指令(如 adb -s DG4064b7ac4408 shell input keyevent 3)

3.如果只有一个模拟器和一个手机连着电脑; 可以用adb -e 来指明是操作模拟器(Emulator); 可以用adb -d 来指明是操作设备(Device)

解决ADB错误“more than one device and emulator”的方法
https://blog.51cto.com/u_15328720/3382916

1.  adb -s 119daa41 tcpip 5555 `开启tcpip,开启后就可拔掉usb线`
2.  adb -s 119daa41 connect 192.168.70.19:5555 `无线模式下连接指定设备`
3.  scrcpy --tcpip=192.168.70.19:5555 `starts mirroring`

*Manual*

Alternatively, it is possible to enable the TCP/IP connection manually using `adb`:

1. Plug the device into a USB port on your computer.   
2. Connect the device to the same Wi-Fi network as your computer. 
3. Get your device IP address, in Settings → About phone → Status
4.  Enable `adb` over TCP/IP on your device: `adb tcpip 5555`. 
5. Unplug your device.
6. Connect to your device: `adb connect DEVICE_IP:5555` _(replace `DEVICE_IP` with the device IP address you found)_.
7. Run `scrcpy` as usual.
8. Run `adb disconnect` once you're done.

# issues

启动时报错

dyld[46627]: Library not loaded: /opt/homebrew/opt/rav1e/lib/librav1e.0.5.dylib

解决方法


brew reinstall rav1e

参考:https://github.com/Genymobile/scrcpy/issues/3578

https://blog.0001024.xyz/how-to-use-scrcpy/
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇