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.

0
votes
0answers
7 views

ADB Shell command not applied - “am set-standby-bucket” - Android 9

Currently trying to observe the behaviour of my app in different adaptive battery buckets on Android Pie. I was testing it with the command : adb shell am set-standby-bucket <packagename> <...
1
vote
0answers
15 views

ADB unknown permissions

I created a .sh script which sets app permissions on android devices. If I push the script on /sdcard and run it through adb shell with command sh ./test.sh. The following error occurs on each ...
0
votes
0answers
11 views

Why can't I kill most processes right now

It all started when mr.douche hacked my phone, I used netstat plus app to monitor his activity and after rooting my android I started killing everything he threw at me. After mr. D failed attempt to ...
0
votes
0answers
63 views

Hacked. How to factory reset no access factory reset

My phone and tablet has been hacked. Neither Samsung device is rooted. I think the rom has been changed and I am on a virtual network in a shell and unable to access factory reset. I don't know if the ...
1
vote
0answers
52 views

User names in an android shell

I am trying to find a way to determine the user name of the current shell user from within a shell / terminal on an android device. The android environment that I have in /system/bin and /system/xbin ...
0
votes
0answers
24 views

How to access files from shell on Windows? [duplicate]

In Windows File Explorer, my phone is listed along side C, D, and E drives. However, cmd and PowerShell start in C:\. This is the closest thing to what I want, but the command doesn't output anything ...
1
vote
0answers
23 views

How to enable/disable lock screen from shell script when a special wifi SSID is present?

My Java skills are low, but I'm mastering shell. Is use LineageOS 14.1 (forked from cyanogenmod). I would like to create a shell script on a rooted devive to enable/disable lockscreen (PIN). I ...
0
votes
1answer
22 views

Phone stuck in Safe Mode (Volume Keys not functioning)

Recently my Samsung Galaxy E7 entered into Safe Mode. My volume keys are non functional. Can someone please suggest a way to get out of Safe Mode using ADB.
0
votes
1answer
37 views

Where to find information about WiFi connectivity of the device?

is there a way I can find information about my device's connectivity to WiFi network? I need information like: what network I'm connected too, what is the mac address of the router, how long have I ...
-1
votes
1answer
48 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
50 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
12 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
89 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
212 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
2answers
470 views

Why chmod gives “Operation not permitted” error?

I try to execute chmod on a file with Termux, but it sends back an error which I'm unable to solve. My phone is not rooted. If you can help me I would be most grateful to you for this! Here is the ...
0
votes
1answer
187 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 ...
1
vote
1answer
2k 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
61 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
257 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 ...
2
votes
1answer
2k 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
90 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
726 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
181 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
625 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
78 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
113 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
4k 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 ...
-1
votes
0answers
32 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
88 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
143 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
294 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
501 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
570 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
272 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
87 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
51 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
2k 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
27 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
122 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
171 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
1k 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.
3
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.
2
votes
0answers
542 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
2k 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
2k 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
256 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
113 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
52 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-...