adb

Launching OSGI Felix on android gives error: “java.lang.UnsupportedOperationException: can't load this type of class file”

巧了我就是萌 提交于 2020-01-24 19:57:45
问题 I am trying to launch OSGI Felix framework on android. I followed this link and things were going fine. In the bundle directory, I added a bundle that was an eclipse plugin project that I created earlier in order to launch it on android. It has only one activator class with a "Hello" Message in the start() method. Now, when I launched Felix on android shell, I noticed that the bundle I added is causing a problem and can't be launched on android. Here's the errors I get when I launch Felix:

How to log hard finding crash in Android?

こ雲淡風輕ζ 提交于 2020-01-24 15:48:08
问题 I've an app which crash almost once a day, and I've used the default uncaught exception handler in order to save the crash log e.g. Thread.setDefaultUncaughtExceptionHandler(new CustomExceptionHandler("/sdcard/crash")); However, for normal crash such as stackoverflow (intentional) it can be logged, but for my bug it never get logged. I guess it is because the crash is raised outside the scope of a normal activity. (yes, the crash happen when the app is in the background) I've also tried to

monkey命令

余生颓废 提交于 2020-01-24 10:08:38
1.$ adb shell monkey <event-count> <event-count>是随机发送事件数 例:adb shell monkeyn 1000 发送1000个随机事件 2.$ adb shell monkey [options] <event-count> [options]是monkey可传入的参数 Monkey的option主要分为:常规类、事件类、约束类和调试类4种 2.1 常规类命令: adb shell monkey -v <event-count> -v:打印出日志信息,每个-v将增加反馈信息的级别。-v越多日志信息越详情,最多支持3个-v 2.2 事件类命令: $ adb shell monkey -f <scriptfile> <event-count> -f:后接测试脚本名,表示要使用monkey运行指定的monkey脚本, 如:$ adb shell monkey -f /mnt/sdcard/test01 3 注:这里的3是指循环次数,不是事件数 如果希望重复执行之前的随机操作,需要加-s命令,可指定随机数生成器seed值 $ adb shell monkey -s <seed> <event-count> -s:后接随机数生成器的seed值,如果使用相同的seed值再次运行monkey,将生成相同的事件序列(也就是说

Android Debug Bridge (adb)

a 夏天 提交于 2020-01-24 08:32:24
adb ( Android Debug Bridge)是 Android 提供的一个通用的调试工具,借助这个工具,我们可以管理设备或 手机 模拟器 的 状态 。还可以进行以下的操作: 1、快速更新设备或手机模拟器中的代码,如应用或Android系统升级; 2、在设备上运行 shell 命令; 3、管理设备或手机模拟器上的预定端口; 4、在设备或手机模拟器上复制或粘贴文件; 以下为一些常用的操作: 1、 安装 应用到模拟器: adb install 比较遗憾的是,Android并没有提供一个 卸载 应用的命令,只能自己手动 删除 : adb shell cd /data/app rm app.apk 2、进入设备或模拟器的 shell : adb shell 通过上面的命令,就可以进入设备或模拟器的 shell 环境中,在这个 Linux Shell 中,你可以执行各种 Linux 的命令,另外如果只想执行一条 shell 命令,可以采用以下的方式: adb shell [command] 如: adb shell dmesg会打印出内核的调试信息。 3、发布端口: 可以设置任意的端口号,做为 主机 向模拟器或设备的请求端口。如: adb forward tcp:5555 tcp:8000 4、复制文件 : 可向一个设备或从一个设备中复制文件, 复制一个文件或目录到设备或模拟器上:

在Mac OS X上设置ADB

你说的曾经没有我的故事 提交于 2020-01-24 01:38:08
原文链接: http://findmybug.cn/article/set-up-adb-on-mac-os-x 遇到的问题: 我花了很多时间弄清楚如何在Mac上设置adb,因此我想写如何设置它对某些人可能有用。 adb是用于在手机/模拟器上安装和运行android应用的命令行工具 解决方案: 解决方案一 选项1-使用自制程序 这是最简单的方法,它将提供自动更新。 安装自制软件 ruby -e " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install ) " 安装adb brew cask install android-platform-tools 开始使用adb adb devices 选项2-手动(仅平台工具) 这是手动安装ADB和Fastboot的最简单方法。 删除旧安装(可选) rm -rf ~/.android-sdk-macosx/ 导航到 https://developer.android.com/studio/releases/platform-tools.html ,然后单击 SDK Platform-Tools for Mac 链接。 转到您的下载文件夹 cd ~/Downloads/ 解压下载的工具 unzip platform-tools-latest

Chrome ARC Welder Logcat

ε祈祈猫儿з 提交于 2020-01-23 17:35:23
问题 I am trying to get logcat working for Chrome ARC Welder. I run the command plugin.shell('adbd') and it starts successfully. My question is when I run the 'adb logcat' command. I am supposed to run that in the JavaScript console or adb when working with any android application. When I run it in the JavaScript Console I get: Uncaught SyntaxError: Unexpected identifierVM268:847 InjectedScript._evaluateOnVM268:780 InjectedScript._evaluateAndWrapVM268:646 InjectedScript.evaluate And when from adb

How to accept debugging dialog for Android Emulator via command line

岁酱吖の 提交于 2020-01-23 13:15:31
问题 I'm writing an automated emulator script that will create and launch an Android emulator so I can run my UI tests from any machine and guarantee that it'll run on a device. My current script creates an android-27;google_apis;x86 device which works fine, but lacks google services so the maps in my app do not show. I tried creating an emulator using google_apis_playstore , but when the device boots, it prompts with an ADB debugging prompt. Normally tapping this would be fine, but Im expecting

Android: run a script on non-rooted device

为君一笑 提交于 2020-01-23 12:46:12
问题 Can I run my binary executable file or script bash file on a non-rooted device? I have a small script like this: #helloworld.sh echo "hello world" I saved it in /sdcard and try to run, but i got "Permission denied" . I have researched, the reason is Execute permissions on the SDCard is blocked. Is it possible to run? How can I do that without SU command? I think it is very helpful if somehow can execute any script file. 回答1: On non-rooted device you can run a script on SDcard with sh command:

AndroidStudio运行App到模拟器

情到浓时终转凉″ 提交于 2020-01-23 08:30:55
Adroid项目有时候想运行在真机上查看效果,最好的效果就是运行电脑的Adroid模拟器上了。下面以夜神模拟器为例: 在模拟器的安装目录下找到adb 夜神模拟器的adb在如下目录下: 注意:其它模拟器的adb有的名字为其它名字 cmd进入adb目录 运行如下命令 adb connect 127.0.0.1:62001 在Android Studio中点击 运行会出现模拟器设备 点击OK,去模拟查看即可。 来源: CSDN 作者: 游荡人生 链接: https://blog.csdn.net/jiang18238032891/article/details/104043919

adb logcat介绍

大憨熊 提交于 2020-01-23 02:37:08
logcat命令语法: [adb] logcat [<option>] ... [<filter-spec>] ... adb logcat -c 清除所有以前的日志 adb logcat -d 打印日志,且自动退出log模式 adb logcat -f 将日志输出到文件中。注意,这个文件保存在设备上,所以需要将日志创建在可写入的地方。比如/sdcard/logs.txt adb logcat -s 设置默认的过滤器, 如 我们想要输出 "System.out" 标签的信息, 就可以使用adb logcat -s System.out adb logcat -t N 查看最后的N条日志 adb logcat | grep XXX 管道命令,同Linux 也可以进入adb shell后,运行logcat。与adb logcat 参数一样。 1 日志过滤 每一个输出的Android日志信息都有一个标签和它的优先级。 日志的标签是系统部件原始信息的一个简要的标志。(比如:“View”就 是查看系统的标签). 优先级有下列集中,是按照从低到高顺利排列的: V — Verbose (lowest priority) D — Debug I — Info W — Warning E — Error F — Fatal S — Silent (highest priority, on which