Questions tagged [android-shell]

Android devices provide a Unix shell that you can use to run a variety of commands on the device. The command binaries are stored in the file system the device.

36 questions
29
votes
3 answers

Query Android content provider from command line (adb shell)

There is a command to start an activity based on intent: am start. Also to send a broadcast: am broadcast. I think probably there should be a shell command to query a content provider, probably something like: query…
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228
9
votes
5 answers

Clear Edit Text - adb

How to clear focused Edit text using shell command. I tried adb shell input keyevent KEYCODE_CLEAR // Not worked adb shell input keyevent KEYCODE_DEL // Delete only one char adb shell input keyevent KEYCODE_FORWARD_DEL // Not worked With this I am…
Krishnakant
  • 1,453
  • 3
  • 18
  • 30
8
votes
2 answers

adb shell dumpsys window windows output describing

I'm using appium for interaction between my Android device and java code. And I faced with problem that on some kind of devices(including emulators) after pressing on Home button, appium return incorrect current activity (it returns previous…
t3ft3l--i
  • 1,372
  • 1
  • 14
  • 21
5
votes
1 answer

Android tmpfs writable by user

On a rooted Android 6.0.1 device, I would like to have a tmpfs writable by the user. I do: mkdir /sdcard/test su mount -t tmpfs -o size=512m tmpfs /sdcard/test #Note that the permissions of /sdcard/test have changed chmod 0771 /sdcard/test chown…
gregoiregentil
  • 1,793
  • 1
  • 26
  • 56
5
votes
0 answers

How to modify/edit manifest file or application icon after installation by using other application or run-time by getting response from api

I'm curious about to know that how to add other flags to activity and broadcast receiver by editing manifest file of application. Change application's launcher icon & short-cut icon. And generate new apk to install with this changes or done this…
Kirankumar Zinzuvadia
  • 1,249
  • 10
  • 17
4
votes
1 answer

Android: Execute binary from application

As the title suggests I want to execute a binary from my android application. I created a binary with the NDK and can run it with the adb shell. I then tried to run it with Runtime exec, but the permission is denied. I tried different directories…
JANO
  • 2,995
  • 2
  • 14
  • 29
4
votes
2 answers

Android get GPU model

When running the following command from termial: adb shell dumpsys | grep GLES The output is: GLES: Qualcomm, Adreno (TM) 330, OpenGL ES 3.0 V@53.0 AU@ (CL@) However I am unable to get the output when running programatically. String GPUModel =…
JY2k
  • 2,879
  • 1
  • 31
  • 60
3
votes
1 answer

Android file permissions on Android 6.0

I want to list files and directories under "/proc" in Android. When running as my application process, many files are not readable. If I list the directory as the shell user I get the following output: shell@flounder:/ $…
Jared Rummler
  • 37,824
  • 19
  • 133
  • 148
2
votes
2 answers

Android 10 - netstat execution not working properly

I'm trying to run a shell command in my Android app in order to check if a give tcp port is opened or not: Runtime.getRuntime().exec(arrayOf("/system/bin/sh", "-c", "netstat -tulpn | grep :8080")) Running this command in Android version < 10, works…
user677767
  • 203
  • 3
  • 10
2
votes
1 answer

Is there a generalized man page or documentation for the Android `adb shell dumpsys [service]` command?

Question Is there a generalized man page or documentation for the Android adb shell dumpsys [service] command? I do not mean this as this does not seem to give specifics about the output of specific services, e.g. adb shell dumpsys…
topher217
  • 1,188
  • 12
  • 35
2
votes
1 answer

Why passing loop into adb shell not working when running it inside shell do?

This construction failing adb shell "for i in `seq 10`; do command; done" But if run it separately it just fine adb shell root@vbox86p:/ # for i in `seq 10`; do command; done Am I missing something? Update: Max OSX with zsh
ar-g
  • 3,417
  • 2
  • 28
  • 39
2
votes
0 answers

Android Studio Upload APK progress

Is it possible to view the upload progress of your apk to the device in Android Studio? Uploading file to: /data/local/tmp/com.mycompany.myapp I know it is possible using the command line adb push -p
georgeok
  • 5,321
  • 2
  • 39
  • 61
2
votes
3 answers

Android adb command for triggering custom receiver

I have the following receiver which works perfectly well when the server initiates a push notification. I would like to be able to test it locally using the ADB. This is the command I'm using: adb shell am broadcast -a com.parse.push.intent.RECEIVE…
JY2k
  • 2,879
  • 1
  • 31
  • 60
2
votes
1 answer

Using a prebuilt native binary in android app

this question has been raised in different places but none seem to give a simple detailed explanation of what is required. So far I have built a native binary ffmpeg to be used in android, the build is ok. I have put the binary in my project…
1
vote
1 answer

How to use /system/bin/linker64?

I want to make a code compiler/executor for Android but I don't know how to link libraries in command line, I saw that they use /system/bin/linker64 in some places but I don't know how to use this program. In short, can anyone tell me how to use…
lahit1
  • 11
  • 2
1
2 3