### 下载文件到云手机 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用wget命令从指定的URL下载文件到云手机的/sdcard/目录。下载过程会在后台执行,并将输出重定向到/dev/null以避免干扰。 ```shell wget --no-check-certificate -O /sdcard/test.apk https://YOUR_APK_URL/test.apk > /dev/null 2>&1 & ``` -------------------------------- ### 启动应用 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用am start命令启动应用,通过dumpsys package和sed命令获取应用的主Activity。注意:包名需要替换为实际的应用包名。 ```shell am start -n $(dumpsys package 包名 | grep -A 1 'MAIN' | grep '包名' | sed -n 's/.*\(包名\/[^ ]*\).*/\1/p') ``` -------------------------------- ### 推送文件到云手机 (ADB) Source: https://help.duoplus.cn/docs/adb-command-intro 使用adb push命令将本地电脑的文件复制到云手机的指定路径。 ```shell adb push [本地电脑文件位置] [云手机文件位置] # 例如 adb push C:\Users\YourUsername\Documents\example.txt /sdcard/example.txt ``` -------------------------------- ### 截图手机屏幕 (ADB) Source: https://help.duoplus.cn/docs/adb-command-intro 使用adb exec-out screencap -p命令将手机屏幕截图并保存为png文件。 ```shell adb exec-out screencap -p > screenshot.png ``` -------------------------------- ### 上传文件到中转站 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用curl命令将云手机上的文件上传到指定的http://temp.sh服务。上传过程会在后台执行,并将进度记录到/sdcard/upload.log文件中。 ```shell curl -F "file=@/sdcard/test.apk" https://temp.sh/upload > /sdcard/upload.log 2>&1 & ``` -------------------------------- ### 查看文件上传进度 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 读取/sdcard/upload.log文件的内容,以查看文件上传的进度。如果上传成功,日志文件中会包含文件下载的URL。 ```shell cat /sdcard/upload.log ``` -------------------------------- ### 安装应用 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用pm install命令在云手机上安装指定的APK文件。 ```shell pm install /sdcard/test.apk ``` -------------------------------- ### 上传系统日志 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 将系统日志通过管道传递给nc命令,上传到termbin.com的9999端口。返回的URL将包含日志内容。 ```shell cat logcat | nc termbin.com 9999 ``` -------------------------------- ### 从云手机下载文件 (ADB) Source: https://help.duoplus.cn/docs/adb-command-intro 使用adb pull命令将云手机上的文件复制到本地电脑的指定路径。 ```shell adb pull [云手机文件位置] [本地电脑文件位置] # 例如 adb pull /sdcard/example.txt C:\Users\YourUsername\Documents\ ``` -------------------------------- ### 授予应用权限 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用pm grant命令授予应用指定的权限。权限名称列表可在Android开发者文档中找到。 ```shell pm grant 包名 android.permission.权限名称 ``` -------------------------------- ### 模拟通用按键 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用input keyevent命令模拟按下设备上的通用按键,如返回、方向键、回车、Home键等。提供了部分常用KeyEvent代码的示例。 ```shell input keyevent 19 # 上方向键 input keyevent 66 # 回车键 input keyevent 3 # Home 键 ``` -------------------------------- ### 模拟点击和滑动坐标 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用input tap命令模拟点击指定的屏幕坐标。使用input swipe命令模拟从一个坐标滑动到另一个坐标,可用于模拟拖拽或滑动操作。 ```shell # 点击坐标(500,300) input tap 500 300 # 点击坐标(500,300)并保持200ms input swipe 500 300 500 300 200 # 从坐标(500,500)滑动到(500,100)总耗时200ms(即向上滑动400) input swipe 500 500 500 100 200 ``` -------------------------------- ### 卸载应用 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用pm uninstall命令卸载指定的应用。 ```shell pm uninstall 包名 ``` -------------------------------- ### 关闭应用 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用am force-stop命令强制停止指定的应用。 ```shell am force-stop 包名 ``` -------------------------------- ### 获取已安装包名列表 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用pm list packages -3命令列出所有已安装的第三方应用包名,并通过cut命令提取包名。 ```shell pm list packages -3 | cut -d ":" -f 2 ``` -------------------------------- ### IPIDEA账密认证提取代理示例 (curl) Source: https://help.duoplus.cn/docs/IPIDEA-Proxy-Configuration 展示了如何使用curl命令通过账密认证从IPIDEA提取代理信息。该命令包含了代理服务器地址、端口、用户名和密码。 ```bash curl -x na.ipidea.io:2336 -U "test12345-zone-custom-region-us:123456" ipinfo.ipidea.io ``` -------------------------------- ### Upload keybox.xml using ADB Source: https://help.duoplus.cn/docs/ru-he-tong-guo-gu-ge-san-ji-ren-zheng This snippet demonstrates how to upload the keybox.xml file to the designated directory on an Android device using the ADB command-line tool. Ensure the device is connected and ADB is authorized. The file is placed in `/data/misc/google/` for the system to recognize. ```shell adb connect xx.xx.xx.xx adb push '~/tools/android/google/keybox.xml' /data/misc/google/ ``` -------------------------------- ### 清除系统日志 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用logcat -c命令清除设备上的所有系统日志,以便于观察新的日志信息。 ```shell logcat -c ``` -------------------------------- ### 清理应用数据 (Shell) Source: https://help.duoplus.cn/docs/adb-command-intro 使用pm clear命令清除指定应用的缓存和用户数据。 ```shell pm clear 包名 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.