37 questions
0
votes
0
answers
87
views
MIUI 12 Android 11 Rooted How to avoid/modify auto chmod 0700 /data_mirror after reboot?
My system are MIUI 12.5, Android 11 and Rooted with magisk.
I chmod 711 /data_mirror and /data_mirror/data_ce
After reboot, they changed back to 0700
Is there a way to edit policy or some.rc ?
I would ...
0
votes
0
answers
103
views
Android: unable to run shell script in my android app programmatically
My script is located in the Download folder of the device and it's path is /storage/emulated/0/Download/
My shell script contains: testSharath.sh
#!/bin/sh
#!/system/bib/sh
echo "Hello from ...
1
vote
0
answers
2k
views
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 ...
0
votes
1
answer
1k
views
how to make sms sent with adb show in messages app
I'm using a Samsung phone with Android 10
I found this adb command online
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "${phone}" s16 "null" s16 &...
1
vote
1
answer
5k
views
How to read current immersive mode status via shell/ADB?
Is there an Android shell command that can get the current status of Immersive Mode (i.e. immersive.full, immersive.status, immersive.navigation, or immersive.off)?
Immersive mode can be set via the ...
4
votes
1
answer
4k
views
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 ...
0
votes
1
answer
1k
views
How to use adb shell command to launch the app with same package id but different application id
I have 2 variants of the same app installed on my Android device which have the same package id but different application id. I am not able to launch the application using the shell command whose ...
0
votes
1
answer
3k
views
How to interact with android device through a script?
I need a bump in the right direction here.
I want to write a script that will scroll up or down, maybe unlock the screen ( no lockscreen security set ) every 30 minutes or so. Also if possible I'd ...
2
votes
2
answers
3k
views
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 -...
1
vote
0
answers
690
views
Is there any command to launch directory in file manager of android using adb?
I want to open Download folder in my android phone using adb. I have example:
start . /path/to/that/folder command for command-prompt and nautilus /path/to/that/folder for ubuntu terminal.
3
votes
1
answer
988
views
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 ...
0
votes
0
answers
383
views
run executable file "Permission denied" on Android 4.2.2
I tried run ssserver on Nexus4 with Android 4.2.2 but can't. The result is "Permission denied". File permissions appear to be normal:
shell@mako:/data/local/tmp $ ls -al ssserver ...
1
vote
0
answers
121
views
Signing an Apk with a System certificate
I am developing for a specific device, and I have the system certificate installed on this device.
my task is to download another app and install it without user interaction
I've tried to sign my ...
0
votes
1
answer
797
views
ADB Shell Android how to delete group of contacts?
I am using adb shell to delete contacts from phone. For example if I have 50 contacts, how to delete first 10?
I use this to delete one by one, is there a way to delete more contacts at once, by one ...
0
votes
3
answers
3k
views
Detecting if device is rooted systemlessly
As systemless root is avaible for few years it became "harder" to detect if a device is rooted or not. I started looking for a possible solution to detect if a device is rooted systemlessly or not and ...
1
vote
1
answer
7k
views
ADB: How to automate complete BT Scan, pair and connect
I am looking for Automating the below activities using ADB.
Bluetooth settings -> TunrnOn BT -> Pairing (To a BT mac address which i can set) -> Connect to the BT Device on certain profiles like ...
0
votes
2
answers
2k
views
Cannot run executable using a prebuilt shared library using android ndk
Im trying to build an executable which depends on a shared library in C for android. I want to run the executable on android shell.
I first built the executable using android ndk (I'm using android-...
0
votes
1
answer
91
views
Empty InputStream for Android Porcess with "su"
I have Android 7 device with root (it works)
I want to execute root commands via OutputStream and get messages about results via InputStream.
private void getSu() {
if (mProcess != null) ...
1
vote
1
answer
2k
views
How to get Saved WIFI SSID information (not saved wifi Password) by using adb shell command - on Non-rooted devices? [duplicate]
I am trying to find a way by which I can get a list of the remembered networks' SSID on an Android device.
I have seen a few threads asking similar questions. However, the few questions that I have ...
8
votes
2
answers
23k
views
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 ...
2
votes
1
answer
7k
views
Android shell chown u0_49
I'm having some trouble with changing owner in the shell on my android. I'm trying to change the owner and group of a file to match another file in the directory. When I ls -l the other files have an ...
-1
votes
2
answers
492
views
Error in checking string is null in shell script?
I am new to Shell Scripts and not aware of the syntax.
I have a shell script that I am pushing to my android device, and then converting it with 'busybox dos2unix' :
adb shell busybox dos2unix /data/...
5
votes
1
answer
6k
views
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/...
2
votes
1
answer
3k
views
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?
...
0
votes
1
answer
4k
views
adb broadcast with user ID
I'm trying to broadcast an adb-command to a broadcast-receiver. This would be a very simple task, but the braodcast-receiver has:
android:exported="false"
On the offical android.developer website, ...
2
votes
0
answers
86
views
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 -...
2
votes
3
answers
3k
views
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 ...
3
votes
1
answer
3k
views
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 ...
11
votes
5
answers
18k
views
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 ...
5
votes
0
answers
2k
views
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 ...
5
votes
2
answers
6k
views
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 [email protected] AU@ (CL@)
However I am unable to get the ...
0
votes
1
answer
2k
views
Android uptime in hour
I connect all our android devices through adb with WiFi. I am trying to get the uptime in hour. what i got now is in seconds.
adb connect 172.16.100.2
adb shell cat /proc/uptime > "C:\TimeLog.txt"
...
1
vote
1
answer
7k
views
whats does am start -n command do in android shell
I am trying to know, what does this command do when I write it in the terminal for android?
and here is an example
am start -n com.whatsapp/com.whatsapp.HomeActivity
Thanks
30
votes
3
answers
53k
views
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 ...
0
votes
1
answer
1k
views
How to execute shell commands through su?
I tried following way but its not working for me :
public void RunAsRoot(String cmnd){
Process p = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(p....
2
votes
1
answer
3k
views
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 ...
-3
votes
2
answers
2k
views
Source code for shell command "find" in Android [closed]
I tried to find in Android source code on github, but I didn't find the implementation of the find command any where.
Can some one tell me where it is.
Thanks.
EDIT: An out-of-box Android provides ...