89 lines
2.0 KiB
Markdown
89 lines
2.0 KiB
Markdown
## 打造1台云手机
|
|
|
|
> 使用arm开发板
|
|
|
|
手机挂机有一个最核心的问题:`电池`
|
|
|
|
而使用`arm`芯片的开发板,就无需屏幕,随时随地使用安卓系统,远程控制
|
|
|
|
目前性能比较强悍的ARM芯片是RK3588
|
|
|
|
例如`香橙派`5/5B/以及5 PLUS
|
|
|
|
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202310141546264.png" title="" alt="" width="266">
|
|
|
|
如果使用x86的主机,因为架构兼容性问题,某些app可能无法使用
|
|
|
|
---
|
|
|
|
## 2种云手机方案
|
|
|
|
> 单板安装android系统,usb无线调试
|
|
|
|
rk3588芯片有提供`Android12`系统,通过`TF卡`或者emmc刷入
|
|
|
|
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202310141546066.png" title="" alt="" width="342">
|
|
|
|
单个android系统
|
|
|
|
<img title="" src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202310141546217.png" alt="" width="252">
|
|
|
|
> 在ubuntu安装`redroid`
|
|
|
|
redroid是基于docker容器化方案
|
|
|
|
就可以同时运行`多个实例`,以及不同的`安卓版本`:android8-13
|
|
|
|
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202310141547553.png" title="" alt="" width="410">
|
|
|
|
---
|
|
|
|
## 本地电脑scrcpy控制手机
|
|
|
|
启用`usb调试`,以及`usb无线调试`
|
|
|
|
通过路由器的后台,可以看到开发板的ip地址
|
|
|
|
在电脑中安装2个辅助软件
|
|
|
|
- adb
|
|
|
|
- scrcpy
|
|
|
|
> 连接手机
|
|
|
|
```shell
|
|
adb connect 192.168.31.159:5555
|
|
```
|
|
|
|
远程手机画面
|
|
|
|
```shell
|
|
scrcpy -s 192.168.31.159:5555
|
|
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
|
|
/opt/homebrew/Cellar/scrcpy/2.0/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 39.2 MB/s (52867 bytes in 0.001s)
|
|
[server] INFO: Device: redroid redroid11_arm64 (Android 11)
|
|
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
|
|
```
|
|
|
|
---
|
|
|
|
## 云控手机
|
|
|
|
> 使用frp内网穿透
|
|
|
|
客户端配置如下,将tcp代理
|
|
|
|
```shell
|
|
[adb]
|
|
type = tcp
|
|
privilege_mode = true
|
|
local_ip = 192.168.31.159
|
|
# Android default adbd port
|
|
local_port = 5555
|
|
# VPS port
|
|
remote_port = 53395
|
|
use_encryption = true
|
|
use_compression = true
|
|
```
|