adb

Activity class {****} does not exist

蹲街弑〆低调 提交于 2020-01-14 19:12:32
在编译运行apk时这种错误 1、首先是检查这个MainActivity.java是不是真的存在,且包名和路径无误; 2. 如果文件存在,且包名和路径没有问题,那么就打开你项目所在的/android/app/build.gradle文件,删除defaultConfig下的applicationId,或者将applicationId的值改成manifest文件里指定的package。 出现这个问题的原因是你的package和applicationId不一致。如果你没有在你的 build.gradle 文件中定义 applicationId,这个applicationId 将默认为 AndroidManifest.xml 中所指定的与package相同的值。 3、如果以上都不行 或者出现在这个手机上运行出现这个错误 在另一个手机上运行没有这个错误的话 可以定位问题为手机卸载残留缓存,解决方法是 手机连上电脑 用adb指令 adb uninstall xxx.xxx.xxx (包名) 如果出现Success 就说明成功了 可以继续运行了。部分手机会出现这种卸载残留问题 来源: https://www.cnblogs.com/vampire-diaries/p/12193530.html

How to use Runtime.getRuntime().exec(“cmd”)

左心房为你撑大大i 提交于 2020-01-14 09:15:26
问题 In my application I'm trying to execute a native code which is present on my SD card. File sdCard = getExternalFilesDir(null); // directory where native file is placed String nativeFile = "nativeFile"; String cmd = "shell /system/bin/chmod 0777 " + sdCard.getAbsolutePath() + "/" + nativeFile; Process proc = Runtime.getRuntime().exec(cmd); But as soon as Runtime.getRuntime().exec(cmd) is executed, it throws error: java.io.IOException: Error running exec(). Command: [shell, /system/bin/chmod,

Android ADB Not connecting to Droid 2

断了今生、忘了曾经 提交于 2020-01-14 06:50:08
问题 I am finding ADB extremely fuckle for my Droid 2. My computer is Windows 7 64bit and my Droid2 version is 2.3.4. I have googled and searched Stack Overflow and found many people have a similar problem. But mine is a weird twist on it. I can in fact connect my phone to my computer after a fresh install of ADB, however after I connect and run an app on it, the ADB connection dies and I cannot get it back. I have tried the following: Reinstalling the Android USB driver, editing the .INI file to

Android: getDeviceId() returns an IMEI, adb shell dumpsys iphonesubinfo returns Device ID=NULL

被刻印的时光 ゝ 提交于 2020-01-14 03:17:27
问题 Different results for my low cost chinese tablet. It's not a phone so why getDeviceId() returns a number that seems to be a valid IMEI? C:\>adb shell dumpsys iphonesubinfo Phone Subscriber Info: Phone Type = GSM Device ID = null but using TelephonyManager tManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String uid = tManager.getDeviceId(); uid = 35881700... (I'm not showing the whole IMEI number for privacy) 来源: https://stackoverflow.com/questions/11518113/android

adb命令依赖包下载及使用常用操作

梦想与她 提交于 2020-01-13 19:34:10
adb命令下载地址:链接: https://pan.baidu.com/s/1f7nqMzgA89Oc7iL73sHzaw 提取码: e3tw 一.logcat抓log方法:adb logcat命令,可以加条件过滤 1.安装SDK(参考android sdk环境安装) 2.使用数据线链接手机,在手机助手的sdcard中建立一个1.log的文件或在抓日志时直接导出到电脑位置 3.程序运行cmd,进入到含有adb.exe目录 4.输入adb devices 查看设备是否连上 5.输入抓取命令: 存放到手机 adb logcat -s *:E > /mmt/sdcard/1.log 存放到PC adb logcat -s '*:E' > d:/1.log 6.使用手机打开app操作崩溃一次(如果想中途停止按下ctrl+c) 7.查看日志抓取文件,分不清楚是那个时间段所造成的后果 8.加入命令:-v time 就会显示出时间 9.输入命令 adb logcat -v time -s *:E > /mmt/sdcard/1.log(eg:adb logcat -v time -s appname:E>d:/1.log) 过滤日志级别 优先级是下面的字符,顺序是从低到高: V — 明细 verbose(最低优先级) D — 调试 debug I — 信息 info W — 警告 warn E

adb shell auto-complete under Windows 7?

隐身守侯 提交于 2020-01-13 18:23:06
问题 I tried on linux and ash from busybox does auto-complete command line... But under Windows 7 when I press Tab it doesn't work. Any idea to make Windows 7 smart? :) Thanks! Looks like auto-complete is done, but nothing echoes back after when tab is pressed... An example: adb shell ls m[press tab] after tab is pressed, some space characters are shown, but characters that are generated by auto-complete doesn't echo back, then if I press enter, directory mnt is listed which means auto-complete

高通快速调试命令集合---持续更新

泪湿孤枕 提交于 2020-01-13 08:51:42
1、去掉B34命令 AT+CNVW=6828,0,"95000000E00100000000000000000000" AT+CNVW=6829,0,"95000000E00100000000000000000000" 2、查看去掉B34是否成功,主要对比上面的数字是否一致 AT+CNVR=6828,0 AT+CNVR=6829,0 3、查看单双卡 persist.radio.multisim.config 4、adb 进入dump log模式 echo 1 > /sys/module/msm_poweroff/parameters/download_mode //enable ramdump echo c > /proc/sysrq-trigger //trigger ramdump 5、sensor 配置调试 adb root adb disable-verity adb reboot adb root adb remount adb shell rm /mnt/vendor/persist/sensors/sns.reg adb push qcom_def文件 /vendor/etc/sensors/ adb shell chmod 644 /vendor/etc/sensors/sensor_def_qcomdev.conf adb reboot 来源: CSDN 作者:

appium启动app

天涯浪子 提交于 2020-01-13 04:38:51
前面一篇已经搭建好了环境,接下来我们就启动app,如何启动呢,首先我们要获取到包名,还要获取到launcherActivity 一、获取apk包名、launcherActivity名 1、清除logcat内容,使用命令adb logcat -c 2、启动logcat,使用命令adb logcat ActivityManager:I *: s 3、打开被测试的app 包名:com.sina.weibo launcherActivity名:com.sina.weibo.VisitorMainTabActivity 二、编写脚本 1platformName:这里是android的apk 2.deviceName:手机设备名称,通过adb devices查看 3.platformVersion:android系统的版本号 4.appPackage:apk包名 5.appActivity:apk的launcherActivity # coding=utf-8 from appium import webdriver desired_caps = { 'platformName' : 'Android' , 'deviceName' : '127.0.0.1:62001' , 'platformVersion' : '5.1.1' , # apk包名 'appPackage' : 'com

getting error while using “su” command

大城市里の小女人 提交于 2020-01-12 18:45:28
问题 I try to make batch file to run adb commands. I want to use su -c , but I get the error: su: invalid uid/gid '-c'. I saw somewhere that my su version doesn't support -c , how can I enable this? 回答1: In batch file it should be like this: adb shell "su 0 <command args>" For example: adb shell "su 0 mount -o rw,remount /system" 回答2: The standard Android su is much simpler than its regular linux counterpart. It does not support any commands other than -c - so it's become redundant. usage: su [UID

Cannot adb pull database even after chmod 777 on my device

懵懂的女人 提交于 2020-01-12 18:44:11
问题 I am unable to pull a the database from the device even after changing the permission. I have a rooted phone. It used to work. I could pull before. For some unknown reason now I cannot. The error I receive is remote object '/data/data/com.thuptencho.transitbus/databases/ttc.db' does not exist Does anybody know why this is happening? Below is what I did in command window. C:\users\thupten>adb shell shell@android:/ $ su su root@android:/ # cd /data/data/com.thuptencho.transitbus/databases/ cd