ADB个人用法

来源:互联网 发布:nginx配置stream 编辑:程序博客网 时间:2024/06/06 09:47
/*启动app*/
adb shell monkey com.android.contacts -c android.intent.category.LAUNCHER 1


/*调用浏览器*/
am start -a android.intent.action.VIEW -d http://www.china.com  


/*图库扫描文件*/
am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/1.mp4 




/*查看前台activity*/
adb shell dumpsys activity activities | grep mFocusedActivity     
dumpsys activity | grep "Running activities" -A 7




/*调用微信浏览器*/
 am start -a android.intent.action.VIEW -d http://www.baidu.com -n com.tencent.mm/.plugin.webview.ui.tools.WebViewUI


/*打开指定的activity*/
am start -n com.tencent.mm/com.tencent.mm.plugin.sns.ui.SnsTimeLineUI  


/*不显示某页面*/
su -c "pm disable com.google.android.apps.docs"   






/*设置输入法*/
1. ime list -a
2. ime enable 【你看到的mId】
3. ime set 【你看到的mId】
原创粉丝点击