adb

Ubuntu下正确姿势使用adb调试真机

ⅰ亾dé卋堺 提交于 2020-01-16 01:17:31
        Ubuntu下正确姿势使用adb调试真机 前言   虽然本人绝大部分情况下但都是在Windows下面进行Android开发或者调试,但是Android的妈咪谷歌有许多的工具只有Linux版本没有Windows版本的(譬如GDB等等),所以本人有时候也会在Ubuntu上撸一把Android调试。但是吗,Ubuntu下面并不是你安装好了adb你就可以连接上了,当终端开启USB Debug模式,插入Ubuntu系统后,默认状态下系统是不认的,需要对系统进行配置,让其正确识别终端。那么本篇将带领读者开启Ubuntu下使用adb调试真机篇章,内容不多,最好是边看文章边上手,上下其手,不亦乐乎。 1.1 前期准备 在正式开启adb真机调试前,有如下几个步骤是必须准备的,不然巧妇也难无米之炊啊。 当前首先你得安装了Ubuntu的操作系统,这个至于是用虚拟机安装或是其它方式,就不是本篇的讨论重点了。我这边的Ubuntu版本的信息如下,可以看到我当期的ubuntu版本信息是14.04,这里不做过多的讲解。 tangkw@ubuntu:~/.android$ cat /proc/version Linux version 3.19.0-25-generic ( buildd@lgw01-20 ) ( gcc version 4.8.2 ( Ubuntu 4.8.2-19ubuntu1

Java Application to install APK on android

独自空忆成欢 提交于 2020-01-16 01:02:36
问题 I am trying to make a simple application in Java to install an APK on android devices connected via USB. Using ABD manually then everything works fine, but I wanted to give a simple single button click install option within my application, but for some reason the code isnt working: try { abdsourcesync = apkpath; progress.setString("sync in progress"); System.out.println("Starting Sync via adb with command " + "adb" + " install -r " + apkpath); Process process = Runtime.getRuntime().exec( "adb

ADB is not starting no any error message

非 Y 不嫁゛ 提交于 2020-01-16 00:58:10
问题 Have searched about this issue, but nothing helped. When i want to run my application in Android Studio(v1.2.2), window with text "Waiting for adb" appears. In 30 seconds opens another window with error "ADB is not responding,if you want to retry please kill adb manually and click Restart". It doesn't helps. When i want to run adb start-server manually it doesn't show any message "./adb start-server " It is output in my terminal. What i'm doing wrong? output of adb: "ddms: Unable to run 'adb'

How do you turn on device speakers for Android using adb shell

回眸只為那壹抹淺笑 提交于 2020-01-15 12:44:49
问题 Have not seen any commands regarding turning the Android device speakers on using "adb shell", curious if there is a way? #call phone adb shell am start -a android.intent.action.CALL -d tel:X-XXX-XXXX # ******* put speaker on here ******* sleep X #end call adb shell input keyevent KEYCODE_ENDCALL 回答1: To set Speakerphone on from adb shell use: in Android 4.4.4: adb shell service call audio 35 i32 1 in Android 5.1.0: adb shell service call audio 36 i32 1 in Android 6.0.1: adb shell service

How do you turn on device speakers for Android using adb shell

折月煮酒 提交于 2020-01-15 12:44:19
问题 Have not seen any commands regarding turning the Android device speakers on using "adb shell", curious if there is a way? #call phone adb shell am start -a android.intent.action.CALL -d tel:X-XXX-XXXX # ******* put speaker on here ******* sleep X #end call adb shell input keyevent KEYCODE_ENDCALL 回答1: To set Speakerphone on from adb shell use: in Android 4.4.4: adb shell service call audio 35 i32 1 in Android 5.1.0: adb shell service call audio 36 i32 1 in Android 6.0.1: adb shell service

How do you turn on device speakers for Android using adb shell

爱⌒轻易说出口 提交于 2020-01-15 12:43:51
问题 Have not seen any commands regarding turning the Android device speakers on using "adb shell", curious if there is a way? #call phone adb shell am start -a android.intent.action.CALL -d tel:X-XXX-XXXX # ******* put speaker on here ******* sleep X #end call adb shell input keyevent KEYCODE_ENDCALL 回答1: To set Speakerphone on from adb shell use: in Android 4.4.4: adb shell service call audio 35 i32 1 in Android 5.1.0: adb shell service call audio 36 i32 1 in Android 6.0.1: adb shell service

where are logcat filters applied?

不羁岁月 提交于 2020-01-15 07:10:05
问题 I have a single android device attached to the pc and have opened multiple shells which show logcat information. Everyone running with its specific filter. So my question is now, where are those filters applied? Already on the phone so only the filtered messages are sent over usb. Or are they applied on the pc on the adb server or client? I just want to prevent having multiple unfiltered logcat streams running simultaneous over the usb since I have limited bandwitdh. Thanks 回答1: The data is

where are logcat filters applied?

霸气de小男生 提交于 2020-01-15 07:09:07
问题 I have a single android device attached to the pc and have opened multiple shells which show logcat information. Everyone running with its specific filter. So my question is now, where are those filters applied? Already on the phone so only the filtered messages are sent over usb. Or are they applied on the pc on the adb server or client? I just want to prevent having multiple unfiltered logcat streams running simultaneous over the usb since I have limited bandwitdh. Thanks 回答1: The data is

Python实现一个简单的微信跳一跳辅助

自闭症网瘾萝莉.ら 提交于 2020-01-15 05:41:45
1. 前言 微信的跳一跳相信大家都很熟悉了,而且现在各种外挂、辅助也是满天飞,反正本人的好友排行榜中已经是八九百都不足为奇了。某宝上一搜一堆结果,最低的居然只要3块多,想刷多少分就刷多少分,真是离谱。 作为一枚程序猿,我决心也自己搞一下,不为别的,一来为了磨练一下自己的解决问题的能力,而来也为了娱乐一下。像这种任务,最适合的当然是Python,丰富的第三方库,而且具有胶水语言的特点。 本程序的主要设计思路就是,PC端adb连接手机→截屏→在PC端展示→用户鼠标选取起点和终点→计算距离、时长→adb发送指令模拟按压→截屏循环。 2. ADB adb,Android Debug Bridge,即安卓调试桥,包含如下几个部分: Client端, 运行在开发机器中,即你的开发PC机,用来发送adb命令 Deamon守护进程,运行在调试设备中,即的调试手机或模拟器 Server端,作为一个后台进程运行在开发机器中,即你的开发PC机,用来管理PC中的Client端和手机的Deamon之间的通信 我们通常用的adb命令指的就是Client端程序。Server端实际上在本机侦听端口5037,将指令通过usb线/wifi转发给移动设备的Deamon进程。 adb命令读者可以去官方网站查看文档(http://adbshell.com/commands),这里只介绍用到的几个命令。 (1) adb

adb shell实现亮屏上划待机界面息屏1000次

久未见 提交于 2020-01-15 01:39:39
编写脚本实现亮屏实现亮屏上划待机界面息屏1000次,脚本内容如下: #!/bin/bash CUR_DIR=$(dirname "${BASH_SOURCE[0]}") function MAIN(){ chmod a+x ${CUR_DIR}/* for ((i=1;i<=1000;i++)) do adb shell input keyevent 26 ; adb shell input swipe 250 650 250 50 sleep 1; adb shell input keyevent 26 ; sleep 1; done } MAIN 新建sh文件,名称为shell.执行 sudo shell.sh 1.如何获取android的坐标的键值 首先打开debug模式,在设置-->开发者选项--->指针位置打开,然后点击界面,屏幕上方显示 “P:0/0 X:0/0 Y:0/0 Xv:0:0 Yv:0:0 Prs:0:0 Size:0:0”。x,y 即坐标。 2.java代码间隔执行adb shell 命令。 Timer mTimer = new Timer(); mBuilder = new ProcessBuilder(); // 周期执行点击(200ms) mTimer.schedule(new TimerTask() { @Override public void