scripts/apps/ws-scrcpy/README.md

64 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

2022-02-02 07:19:12 +00:00
# ws-scrcpy scripts
2022-02-02 07:19:12 +00:00
## ws-scrcpy-launcher.py for Termux
### Notes
2024-07-01 13:36:33 +00:00
- **YOU NEED TO HAVE WS-SCRCPY INSTALLED, ALONG WITH DEPENDENCIES**
2023-08-21 18:28:47 +00:00
- ~~YOU ALSO NEED TO OPEN ADB WIRELESS IN DEVELOPER SETTINGS FOR THIS TO WORK~~ (The script can use `su` to start ADB wireless now)
- You need to grant Termux:API full Location permission and set to "Always" (Foreground mode will not work correctly)
2024-07-01 13:36:33 +00:00
- Rootless mode is available, although you'll have to start the ADB server yourself.
2023-08-21 18:28:47 +00:00
- Dependencies: `root-repo` `tsu` `moreutils` `build-essential` `nodejs` `python3` `android-tools` `git` `termux-api`
> Or execute `pkg install root-repo tsu moreutils build-essential nodejs python3 android-tools git termux-api`
2024-07-01 13:36:33 +00:00
### Installation
2024-07-01 13:36:33 +00:00
0. Install ws-scrcpy:
2024-07-01 13:36:33 +00:00
```shell
git clone https://github.com/NetrisTV/ws-scrcpy
cd ./ws-scrcpy
export GYP_DEFINES="android_ndk_path=''"
npm install
```
2024-07-01 13:36:33 +00:00
1. Download ws-scrcpy-launcher.py:
```shell
curl -OL https://git.tretrauit.me/tretrauit/scripts/raw/branch/main/apps/ws-scrcpy/ws-scrcpy-launcher.py
2022-02-02 07:19:12 +00:00
chmod +x ws-scrcpy-launcher.py
```
2024-07-01 13:36:33 +00:00
2. Execute `./ws-scrcpy-launcher.py` to launch ws-scrcpy with scrcpy server for local device.
2024-07-01 13:36:33 +00:00
> The script will tell you to wait for ws-scrcpy to start, and when it starts it'll show the started message with the ip address and the port to access using browsers
2024-07-01 13:36:33 +00:00
#### Android 11 and above (where true wireless debugging is available)
You need to use `adb pair` to pair termux with your device adb server, then you can launch ws-scrcpy as explained above.
2024-07-01 13:36:33 +00:00
#### Below Android 11
You'll have to use your PC to restart ADB in TCP mode with:
```shell
adb tcpip 5555
```
Then after that you can launch ws-scrcpy as explained above.
2024-07-01 13:36:33 +00:00
> Full script for lazy people (including install ws-scrcpy steps):
>
> ```shell
> pkg update
> pkg install root-repo moreutils build-essential nodejs python3 android-tools git termux-api
> pkg install tsu
> cd ~
> git clone https://github.com/NetrisTV/ws-scrcpy
> cd ./ws-scrcpy
> export GYP_DEFINES="android_ndk_path=''"
> npm install
> cd ..
> curl -OL https://git.tretrauit.me/tretrauit/scripts/raw/branch/main/apps/ws-scrcpy/ws-scrcpy-launcher.py
> chmod +x ws-scrcpy-launcher.py
> ```