adb-shell

Stop buffering of adb shell output

99封情书 提交于 2021-02-04 19:47:25
问题 I observed this new behavior in adb v1.0.39. The command: adb shell getevent -l gives the output below: Observe that the last line is incomplete. This happens on many different devices. The same command is working without buffering in adb v1.0.32. How do I stop adb shell output buffering in adb v1.0.39? 回答1: Use adb exec-out instead of adb shell command to force the new adb to use the raw mode and avoid stdout buffering. For more info read comments in adb/daemon/shell_service.cpp 回答2: I don't

ADB screenrecord command not found

自闭症网瘾萝莉.ら 提交于 2020-05-25 07:07:05
问题 I am unable to run adb shell screenrecord /sdcard/my.mp4 Device specification that i am trying to run this command: Honor 5C Android 6.0 whenever i run the screenrecord command it shows command not found. D:\adb>adb shell screenrecord /systerm/bin/sh:screenrecord not found Also i have builtin screen record application is this reason for my issue? Is there any other way to capture screen except screencap? Or can i tap into builtin screen record application? Any suggestions or idea are

android emulator renaming from emulator-5554 to a unique string

ε祈祈猫儿з 提交于 2019-12-13 08:07:24
问题 So when on starting up an emulator , adb devices give me emulator-5554 device All dandy till here. What i am envisioning is to create an emulator farm with multiple emulators spawned up on multiple devices. In order to uniquely differentiate from an emulator-5554 running on machine A from emulator-5554 running on machine B ,I would like to rename emulator-5554(s) to something like machineA-emulator-5554 and machineB-emulator-5554. Searching around did not find me much help ( as a majority of

How to patch an application in emulator/device similar to how Google Play is doing with “Smart app updates”?

送分小仙女□ 提交于 2019-12-12 02:39:27
问题 Is it possible to achieve locally (using adb or other ways) what Google Play is doing in "Smart app updates" ? What I want to do is to create a binary diff on the PC (using some command line tools) and then deploy the diff to simulator/device using Android tools (adb, shell, etc). I am aware of https://android.stackexchange.com/questions/36421/what-is-the-applypatch-tool-and-how-does-one-use-it which doesn't provide any info about HOW to actually create and apply patches, just WHAT adb shell

adb shell input text with space

99封情书 提交于 2019-12-10 09:47:18
问题 How to send text with spaces like "some text" using adb shell input text ? Found following solution adb shell input text "some%stext" is working fine. But any easy way to replace space with %s? Example: $ adb shell input text "some text" Error: Invalid arguments for command: text Usage: input [<source>] <command> [<arg>...] The sources are: keyboard mouse joystick touchnavigation touchpad trackball dpad stylus gamepad touchscreen The commands and default sources are: text <string> (Default:

Understanding command through adb shell and through code - Android

℡╲_俬逩灬. 提交于 2019-11-26 03:45:29
问题 I am trying to give BATTERSTATS permission to an app. When I run the command from a PC - it works just fine: adb shell pm grant com.example.sample.myapplication android.permission.BATTERY_STATS But the same pm grant command does not work when run from Android app: java.lang.Process process = Runtime.getRuntime().exec(\"pm grant com.example.sample.myapplication android.permission.BATTERY_STATS\"); Does it require root permission to give this permission? If it is so, why it does not require the