Stack Exchange Network

Stack Exchange network consists of 175 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
2answers
44 views

How can I get all my files off my phone without USB

I have an "Essential" android phone that is rooted, has terminal and supersu installed, but will not acknowledge that it is plugged into a computer rather than an AC charging station. lsusb on the ...
0
votes
0answers
16 views

pm clear not logout apps like twitter

I'm doing: pm clear com.twitter.android And expecting to be log out from twitter app. But it is not working. I also tried to clear every app package with pm list packages -f, in case twitter store ...
0
votes
0answers
17 views

adb shell push image to recent or downloads folders not on sdcard

I want to push images to one of this folders: with shell command. But file only appears on sdcard folder My last tries was: adb push C:\Users\User\Pictures\girl.jpg /data/media/0/Pictures/ adb push ...
2
votes
1answer
47 views

Running “tcpdump” on Android shell gives error: “not executable: 32-bit ELF file”

I'm trying to install tcpdump to monitor network traffic. I've tried multiple versions from link1 and link2. Whenever I try to execute I get an error: ~$ adb connect 192.168.1.10:5555 ~$ adb root ~$ ...
-2
votes
1answer
19 views

How does game guardian collects data from? [closed]

I have a rooted android phone, I just only wanted to know how to get apps Variable values by using the android shell.
1
vote
0answers
18 views

Pushing a directory of code to GitHub from Android

I have a directory structure containing code on my Android phone. I would like to push the code to GitHub. I have downloaded the FastHub app and tried the mobile and desktop versions of my GitHub ...
0
votes
1answer
50 views

How to create a copy of a file immediately when it's created? [duplicate]

I have an Android app that will create a file in /data/ and immediately delete it. I want to know how can I catch this file or create a copy or even disable user permissions to delete a file? I have ...
2
votes
1answer
16 views

How to create a copy of a file immediately when it's created?

I have an Android app that will create a file and immediately delete it. I want to know how can I catch this file or create a copy or even disable user permissions to delete a file. I have root access ...
2
votes
1answer
34 views

find: multiple “-exec” for list of files not working?

I am trying to figure this out on an Android phone running Oreo / 8.0, with toybox 0.7.3-android. I am trying to get a list of files inside a folder and their respective mtime. I am running this ...
0
votes
0answers
35 views

Phone stuck in bootloop after renaming system APK

I have an xiaomi redmi note 5 rooted: to get rid of the notification system about new updates I've renamed the " Updater.apk " file on root /system/data/Updater , but now the phone in in bootloop. I'...
1
vote
0answers
25 views

adb shell input text ignore characters

In android emulator adb shell I send the following command: input text \!\$\#\?\%shelllllllooo And result: All same characters(exclude special like !?#$) been ignored.
0
votes
1answer
43 views

How can run native executables compiled for ARM on unrooted Android devices? [duplicate]

Following this tutorial I have compiled a Hello World! ARM binary from C source using gcc. I want to run this program on my unrooted Android phone but I can't figure out an easy way to do it. What I'...
3
votes
1answer
124 views

How to set up a socks5 with Android cli?

I found articles how to set up a http-proxy. But can't find any info, how to set up a socks5 proxy. My goal is to route all traffic from apps, etc throught this proxy. Is this possible? How then ...
1
vote
1answer
32 views

Termux:Widget and Emacs: can't start subprocesses

I have some tasks that I like to do using Emacs on several different operating systems. I have been using Termux so that I can access these tasks on my Android phone. To reduce setting-up typing in ...
0
votes
0answers
80 views

Android sendevent command not work until finger touch once

I want to use sendevent command to simulate touch event, I followed this link, and it works. Use getevent to record, then use sendevent to repeat them, code like below, it can tap position 540 1802. ...
2
votes
1answer
106 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> <...
2
votes
1answer
84 views

Why Package Manger (pm) gives error “java.lang.IllegalArgumentException: Unknown permission:” in shell script?

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
18 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
103 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 ...
2
votes
1answer
89 views

How to find UID of an app installed on Android and use it as a shell user?

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
55 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
40 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
103 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
53 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
76 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.
2
votes
0answers
73 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
132 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
357 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
928 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
239 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
70 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
347 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
3k 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
109 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
986 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
232 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 ...
2
votes
0answers
820 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
81 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
132 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
5k 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
165 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
331 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
685 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
682 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
301 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
97 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
55 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 ...