Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shell]

The shell is a piece of software that provides a command-line interface to the operating system. Use this tag for shell-specific issues; general command-line issues should use the 'command-line' tag instead. See the full tag wiki for other related tags.

-1
votes
1answer
38 views

How to backup the entire device from a computer and mount any of the bakup partitions in Linux?

I am looking for some tutorial or help to be able to make a backup of all Android partitions directly on my computer and be able to mount each of them from Linux to view them.
1
vote
0answers
25 views

ADB shell input keypress play/pause doesn't work in Netflix/Hulu Android apps?

I'm trying to control my Android Box (running Android 6.0, my guess is a modified version of a phone's os, definitely not the official android tv os) via adb for a home automation project & I'm ...
0
votes
0answers
24 views

Compiled binary does not run properly in Android shell

I build a binary file from C code in my Ubuntu machine, which contains these lines of code: int result = system("touch /storage/sdcard0/just_a_file.txt"); printf("result = %d \n", result); The ...
0
votes
0answers
11 views

Shell command to change WiFi parameters [duplicate]

Is there an ADB shell command to quickly change WiFi parameters, such as proxy settings? I want to toggle proxy settings on and off, and don't want to have to go through the settings page everything I ...
0
votes
0answers
44 views

Permission Denied on injected /sbin Scripts

I have an android device.. and Honor View 10... L04 version (US). I have a set of tweaks I am injecting into my kernels ramdisk, that all fire off without issue when I adb shell in and manually run ...
2
votes
1answer
101 views

How to correctly quote `adb shell su -c`

adb shell su -c is a commonly used adb command. Normally you just need to append arguments to the command line like this: adb shell su -c echo ab However, things can be tricky if you want to add ...
0
votes
1answer
192 views

chmod : operation not permitted

I try to install a file .sh with Termux thanks to chmod but Termux sends back to me an error which I do not manage to solve. I specify that my telephone is not root. If you can help me I would be most ...
0
votes
1answer
145 views

How to gain access to /data directory through ADB shell

Despite the fact that I have root access, nevertheless I can not work with this directory. But why? Info about my phone: Android version - 6.0.1 Android security patch level - 2016-11-01 Kernel ...
0
votes
1answer
768 views

Is there a way to grant myself MANAGE_USERS permission while inside the adb shell?

The thing is that I'm fed up of some stock adware apps on my Micromax phone and want to disable them for good. So, as per this answer, I used adb shell to disable the app, but I'm getting the ...
1
vote
0answers
44 views

L2TP VPN connection on Android via shell

Is there a way to open a predefined vpn (inbuilt vpn managment) connection on Android 8< via shell (on a rooted device), so it can be put in an init script? Thanks
0
votes
1answer
157 views

How to grant permissions to ADB?

I can use ADB while in recovery mode (TWRP) so to use it normally, I followed Android - Enable ADB from recovery to enable USB debugging. There is always an error while switching users, granting ...
1
vote
1answer
922 views

Is there a way to run adb as host on android without root?

I have an android phone and an android tablet. Both not rooted. I want to use adb as host on the tablet and as client on the phone, using an USB-OTG adapter. I downloaded connectbot as terminal ...
0
votes
2answers
74 views

Tool to find duplicate files and hardlink them

Where might there be a small program (possibly statically-linked binary) like fdupes or rdfind, to help me find duplicate files within the same partition/mount--checking only specified directories--...
0
votes
2answers
411 views

adb shell error: device not found (Ubuntu)

I am complete novice on adb. When it comes to Android I could be classified as "dumb user" - trying however to get one level up, hence playing with adb: $ ./adb shell error: device not found $ ./adb ...
0
votes
1answer
113 views

How to use GNU Root Debian from android terminal emulator?

I install GNU Root Debian on my android. Also i install jdk8. I can compile java programs. For example i can get java version. cd /data/data/com.gnuroot.debian/debian/usr/java/jdk1.8.0_181/bin ./java ...
1
vote
0answers
431 views

NOTE: 'pm list' commands have moved! Run 'adb shell cmd package'

When I tried: adb shell 'pm list packages -f' I got long list of options with: NOTE: 'pm list' commands have moved! Run 'adb shell cmd package' What is cmd and is it new place for Android's ...
2
votes
1answer
71 views

Unable to copy files from one /data/data/ directory to another (Root)

I'm trying to copy one file from /data/data/com.application1/myfile to /data/data/com.application2/myfile The file arrives with owner and group set to the app that it came from. I then changed the ...
1
vote
0answers
97 views

ADB shell change camera mode

I am playing around with the ADB shell to control a Samsung Galaxy S9 remotely. I can do most of the things I wanted to but I struggle finding a way to switch / toggle the camera modes. I searched ...
1
vote
3answers
3k views

How to type “Control” on Termux?

There is a good App "Termux" which can provide a powerful shell environment without gain root permission. However, the touch-screen keyboard doesn't include "Control" and "Alt" button. But some ...
0
votes
0answers
28 views

ADB cmd to Disable Turn Panel of android device

Looking for an ADB cmd to disable touchpanel so that while running appium script, External Human Touch events donot disturb the running activity. Device_Type: Rooted Build: USER_DEBUG_BUILD
0
votes
0answers
48 views

Take a screenshot and get it from a remoted not rooted android

I have the Cerberus application installed on a smartphone with Android 7 (not rooted). Using it, I can open a shell inside the phone with a limited set of functions available. Furthermore, I can ...
0
votes
0answers
106 views

Mounting *.img file

I tried mount *.img file on my Android device using this command : busybox mknod /dev/block/loop250 b 7 250 busybox losetup /dev/block/loop250 /sdcard/ubuntu.img busybox mount -t ext4 /dev/block/...
0
votes
1answer
251 views

permission denied error trying to run custom script, but works in SSHDroid

I wrote this script to reset a USB controller: echo -n '1-2' | tee /sys/bus/usb/drivers/usb/unbind sleep 0.5 echo -n '1-2' | tee /sys/bus/usb/drivers/usb/bind I can then run it like so: q201:/data #...
0
votes
1answer
314 views

Bind mounts not visible in apps

I mounted a directory into another directory with: mount --bind "/storage/sdcard/dir1" "/storage/sdcard/dir2" I do this at boot completion with Tasker. I can see the mounted files in adb shell and ...
1
vote
1answer
477 views

How to pass commands to ADB shell?

I am trying to create a script to automatize a few repeated things I need to do with adb. I can run most of the commands on my local bash. But at one step, I need to find the list of some files. I ...
0
votes
0answers
3k views

Notifications keeps reporting a “medium level security threat” to Shell Version 4.4.4-5

Screenshot (click to enlarge) I've tried disabling the app but it cannot be disabled and the notification keeps appearing.
1
vote
1answer
229 views

How to Check if Script is run once device is booted?

I have a script I need to run once, and only once the phone is booted. I have attempted init.qcom.post_boot.sh, init.sec.boot.sh, debuggerd, and finally mkshrc While my script ran with debuggerd, I ...
3
votes
1answer
77 views

Is it possible to get a part of the screen by adb or anything else?

I know how to use adb screencap to capture and fetch the file with adb pull, but if I'm only interested in a 16x16 part of the screen, it would be very inefficient to capture and transfer the whole ...
1
vote
0answers
47 views

Serial console user belongs to less groups than adb shell

Even though the user is the same uid=2000(shell), still the output of group is very different when run on adb shell (rooted device) than on serial console. So it seems that through adb shell the user ...
1
vote
1answer
1k views

Cannot mount /system as rw

I am rooted with magisk and while trying to mount /system as rw by using this command: mount -o remount, rw /system There is an error '/system' not in /proc/mounts Cat /proc/mounts returns: ...
2
votes
0answers
26 views

is it possable to install a linux distro ie:- nethunter on a android device

I have been trying to work out how to use my old Android tablet as a stand alone Linux tool for pen-testing and network monitoring and logging. I have it boot straight into the OS without having to ...
0
votes
1answer
112 views

Browsing pc through phone with adb shell

I am connected to my phone from the laptop using wireless adb. After that, I connect my phone to laptop physically with a usb-wire. Now with the wireless adb-shell open, I want to find the wired "...
1
vote
1answer
146 views

Is there an Android equivalent of Linux command “xinput --list”?

I'd like to disable the physical keyboard and touchpad of my 2-in-1 touchscreen laptop when I use it as a tablet running on Android-x86, and so far I've managed to disable the keyboard by naming it in ...
0
votes
1answer
929 views

How to perform double tap to zoom on android device with adb shell

I want to perform a double tap on the screen or mouse with adb shell. Is this possible? I'm not interested in waking or turning off the screen, but to increase the zoom on a picture.
2
votes
1answer
3k views

Set Static Ip on Android Nougat in command line or adb shell

I can't seem to use netcfg on nougat. If I use ifconfig ip is not updating.If there is another method to change IP on command line or adb shell, I am all ears.
0
votes
0answers
235 views

How to check whether a virtual keyboard is open in emulators using adb command?

I am running a script on my android emulators, I want to check whether the virtual keyboard is open or not and close it using adb shell input keyevent KEYCODE_BACK. Is it possible to detect it using ...
1
vote
0answers
479 views

Tasker to programmatically uninstall apps

I would like to setup a tasker profile to check every predetermined time for any apps not on my approved list (BaselineApps.txt) and uninstall them. I am a noob to shell scripting and tasker. This is ...
0
votes
1answer
1k views

can't connect to wifi using lineage os LG g3s (jagnm)

i recently updated lineage os to 14.1-20171206 on my LG g3s (jagnm) and there are several issues: 1) can't connect to wifi. Apparently it's because wifi mac address got switched to all zeroes (00:00:...
0
votes
1answer
1k views

adb shell returns with error: closed

I somehow bricked my oneplus one phone badly. It only loads directly to the recovery. Pressing vol up + power button or rebooting it with adb reboot bootloader doesn't get me to the bootloader. I ...
0
votes
0answers
229 views

Android Phone Shell Command Silent Mode?

What is the shell command to enable/toggle silent mode on an Android phone? I ask because the Tasker app can run shell commands but only can enable vibration for my specific phone model.
0
votes
0answers
105 views

Android phone in boot loop, have access via adb, options to fix it or at least export data from contacts, sms, Signal?

My phone: Samsung Galaxy S4 mini (i9195, serranoltexx) running an older version of Cyanogenmod and using the standard recovery system. It is in boot loop, keeps optimizing apps during boot, shows ...
0
votes
0answers
47 views

Change File Value in CPU Folder

i want to change value in sched_mc_power_savings file, using this code : #!/system/bin/sh mount -o remount,rw / mount -o remount,rw /system busybox echo "4" > /sys/device/system/cpu/...
0
votes
1answer
1k views

What is system/bin and system/xbin in android M?

I have few noob questions about the system/bin and system/xbin directory in Android M. First, what is the file inside this two directories? Next, in system/bin, the is some file looks like -rwxr-xr-...
0
votes
0answers
645 views

Native Android Device > turn off/on NFC with ADB

Is it possible to turn off/on (disable/enable) NFC with ADB for non-rooted Android device with v 6.0.1 version or higher? i tried many stuff but it wont work for me. Stuff i tried are: Via ADB: adb ...
9
votes
2answers
2k views

What is this `adb` utility I keep getting advice to use?

In a bunch of questions on this site I see answers telling us to execute adb shell or adb logcat and so on. Now, I'm not an entirely clueless user, so I downloaded and installed Termux and have a ...
0
votes
1answer
339 views

How to reset location_provider_allowed

as the first, my environment: Samsung S7, LineageOS 14.1, which is Android 7.2.1. I'm using tasker to set GPS On and Off in this way: GPS On: settings put secure location_providers_allowed +gps,...
0
votes
1answer
342 views

Can I run a Linux executable on Android?

I wondered if it is possible to run a Linux executable on Android so I made a simple console application in Code::Blocks in C++ (I am using Ubuntu Linux), built it in release mode and copied it into a ...
0
votes
0answers
1k views

Reboot to TWRP recovery and flash ZIPs from Shell script

I intend to do exactly what is done here: Reboot to TWRP from a shell command and let it flash my zips. Despite replicating the answer from this question, when TWRP starts, nothing happens. Isn't it ...
1
vote
1answer
3k views

SELinux prevents my init.rc exec command to execute

I've added a exec command at the end of init.rc file. on property:dev.bootcomplete=1 exec u:r:shell:s0 shell shell -- /system/bin/am start -n com.example.package/com.example.package.MainActivity ...
0
votes
0answers
144 views

mkdir based on arguments then copy files to that directory

I'm trying to create a simple script that I can run through the Android adb shell to move two specific files to a directory that is named based on the argument provided but haven't been having any ...