#安装应用
adb install xxx.apk 例:adb install studyDemo.apk
#卸载应用
adb uninstall <应用包名> 例:adb uninstall com.study.demo
#卸载应用遇到权限问题,参考:
adb shell
su
mount -o rw,remount /system
pm uninstall -k --user 0 com.byd.launchermap
#根据设备名查看ip地址
adb devices
#其中 device_id 是你设备的名称或序列号
adb -s device_id shell ip -f inet addr show wlan0
#上一步
adb shell input keyevent KEYCODE_BACK
#主页
adb shell input keyevent KEYCODE_HOME
#系统设置
adb shell am start com.android.settings/.Settings
#截图
cd path/to/your/Android/Sdk/platform-tools
adb shell screencap -p /sdcard/save_screen/screenshot.png
#拉文件,将/sdcard/save_screen/screenshot.png文件,拉到C:\mqq\screen_path\Floder下
adb pull /sdcard/save_screen/screenshot.png C:\mqq\screen_path\Floder
#推文件,将C:\mqq\screen_path/screenshot.png文件,推到C:\mqq\screen_path/Floder
adb push C:\mqq\screen_path/screenshot.png C:\mqq\screen_path/Floder
#启动某应用
adb shell am start -n com.aispeech.wordcatchtest/com.aispeech.wordcatchtest.MainActivity
#终止某应用
adb shell am force-stop com.study.demo
# 获取当前设备时间
adb shell date
# 设置新的系统时间
adb shell date MMddHHmm[[CC]YY][.ss]
# 例如,将时间设置为2023年1月1日12:34:56
adb shell date 010112342023.56
#查看当前设备cpu架构,确认设备的架构是 x86、armv7、arm64 还是其他
adb shell getprop ro.product.cpu.abi
#log清空
adb logcat -c
#log保存
adb logcat > 1.log
#查看所有进程
adb shell ps
#查看指定包名的应用,存在的具体信息,例如找启动页的具体信息,然后再用
adb shell dumpsys package com.aispeech.nativedemo
#启动指定界面
adb shell am start -n <包名><界面>
adb shell am start -n com.aispeech.nativedemo/.ui.LauncherActivity
#查看包名为 com.example.package 的进程
#adb shell ps | grep com.example.package
#终止指定进程(使用 PID)
adb shell kill <PID>
#终止指定包名的所有进程
adb shell am force-stop com.example.package
#开启辅助服务命令
adb root
adb remount
adb shell
settings put secure accessibility_enabled 1
settings put secure enabled_accessibility_services com.aispeech.lyra.daemon/com.aispeech.unit.smartapp.model.AccessibilityActionService
#可以用上面的命令来开启辅助服务权限
#ssh key生成
ssh-keygen -t rsa -C "email@email.com"
#打开id_rsa.pub文件,复制内容,在需要的服务器上
#生成秘钥步骤
1.cd进入项目秘钥路径下: 例如路径为: ../../lib-solution/keystore/platform.keystore
2.keytool -v -list -keystore platform.keystore
SHA256正式秘钥:14:B4:93:F3:D7:C4:05:3E:67:44:34:F1:1D:54:51:B3:22:C1:4D:F0:BD:71:AA:93:98:1D:1C:90:C0:63:CE:3D
#执行终端命令,打包release版本的apk
gradlew lyra-daemon:assembleautoRelease 表示打daemon的release包
4万+

被折叠的 条评论
为什么被折叠?



