Skip to main content

Questions tagged [adb]

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

adbd daemon did NOT work after system wakeup

I am working on an embedded Linux system (kernel5.19.10), and adbd is running in the device in background. I can run adb shell and adb push adb pull command from PC to the device. Now I found when the ...
wangt13's user avatar
  • 473
-1 votes
1 answer
107 views

What is this permission problem with adb?

I would like to transfer files between a phone (Harmony 2.0.0) and a Linux laptop with USB connection between them. I try to use adb by following https://www.reddit.com/r/linuxquestions/comments/...
Tim's user avatar
  • 104k
0 votes
1 answer
38 views

Displays a user input pop-up on the Android screen

Currently I'm interested in Bash and also the Android phone I have... I'm wondering if there is a way to display popup as text input on the android screen and then receive data from that user-...
TuanHaxor's user avatar
0 votes
0 answers
309 views

usbip does not work with USB Debugging in Android phone

I want to connect a Samsung Android phone to a remote server over usbip and then build an Android application located on the server device to the phone to do some testing. I came accross the usbip ...
aebosnak's user avatar
0 votes
1 answer
404 views

How to create ADB Gadget configuration?

I am reading the Gadget Configuration Documentation. I am also using a working Android device to reference and copy configurations in /config/usb_gadget/g1. I am now booting an initramfs and trying to ...
Bret Joseph's user avatar
0 votes
3 answers
289 views

How to make 'adb shell' to read /etc/profile or other configuration files?

I am working on an embedded Linux system (kernel-5.10.24), and it uses ash from busybox as /bin/sh. The system support login from serial console and adb shell from PC. Now I found the shell started ...
wangt13's user avatar
  • 473
-1 votes
1 answer
865 views

xxx.sh: : not found

I'm debugging a shell script and coming across this error. I have no idea what's going on with my script. #!/system/bin/sh function SetEQ(){ prefFile='/mnt/media_rw/6633-3539/tmpFiles/com.smp....
preachers's user avatar
  • 151
0 votes
0 answers
185 views

Can't enable IPv4 forwarding via adb shell

I've got a rooted Android phone and am trying to enable IPv4 forwarding via adb shell. If I do host$ adb shell phone$ su -c "echo 1 > /proc/sys/net/ipv4/ip_forward" then it works just ...
August Vrubel's user avatar
0 votes
1 answer
1k views

Using grep to extract IP through adb shell

I'm trying to create a one-line, platform-independent solution for finding the local IP address of a Android device with adb shell and grep (the internal grep on my android device). I have a solution ...
Xevion's user avatar
  • 103
1 vote
1 answer
52 views

HISTTIMEFORMAT messed up adb

I set up earlier this month HISTTIMEFORMAT cause I needed to see the time on some of the commands I previously used. However, I most likely messed something up with those commands, because every time ...
G. Rann's user avatar
  • 113
0 votes
1 answer
580 views

Service takes more than a minute to close

I have a Linux based device which is running certain services on boot-up, however one of them seems to be taking over a minute to close as I run adb shell shutdown -h now command. Is there a way to ...
xyf's user avatar
  • 141
3 votes
3 answers
4k views

Fastboot recognizes device but unable to flash (stuck with no output) on Ubuntu based systems

I'm trying to flash a custom ROM on my Android smartphone using fastboot on the Ubuntu based Pop!_OS. When trying to flash the recovery, the command does not output anything and is stuck. However I ...
Syed Adil's user avatar
0 votes
1 answer
176 views

Is there any way to delete this garbled folder on a Android device?

*****************The main content of the question A few months ago, I accidentally disconnected the device during the execution of the adb push instruction and left a folder with more than 30 GB of ...
Xinge's user avatar
  • 1
0 votes
0 answers
959 views

How to scan for the Pegasus spyware with Debian/KDE & Android: getting " [mvt.android.modules.adb.base] Unable to connect to the device over USB."

On my Debian11/KDE machine I ran pip3 install mvt --user then I enabled developer options on my Android smartphone (via tapping on the build-number a few times), enabled USB debugging on it, connected ...
mYnDstrEAm's user avatar
  • 4,458
0 votes
1 answer
6k views

./shell.sh: line 6: [: =~: binary operator expected

I'm trying to execute the following shell script, where I'm trying to keep executing a command in an infinite loop and until the output is not equal to a certain substring checkDeviceStatus=$(adb ...
Amr Kamel's user avatar
  • 121
0 votes
1 answer
159 views

unable to satisfy if condition in shell script

I was trying to execute the following shell script below function Check_Status () { if [[ "$(adb shell getprop sys.boot_completed)" =~ "adb: no devices/emulators found" ]]; ...
Amr Kamel's user avatar
  • 121
0 votes
0 answers
382 views

Use adb (android debug bridge) in systemd-nspawn container

I would like to use adb inside an systemd-nspawn container. Unfortunately I cannot access the phone inside the container (connected via USB). pi@debian-buster-64:~ $ export ADB_TRACE=usb pi@debian-...
alex1452's user avatar
1 vote
0 answers
324 views

Resource temporarily available while accessing the device over adb

I have been seeing the following messages quite often while I'm trying to access the embedded device over adb. sh: write error: Resource temporarily unavailable [1]+ Done(1) cat /...
Jazzy's user avatar
  • 141
2 votes
1 answer
2k views

Keep pipe open (stdin in connected to terminal) after pipe

Motivation: I often open a remote shell on android devices (using adb/ Android debug bridge), and want to write scripts on my machine (not android devices, because I have multiple) to help me when i ...
Ben Butterworth's user avatar
0 votes
1 answer
316 views

Piping adb output to less behaves unpredictably

Using less to view the output of some adb commands often does not work as expected. For example hitting the spacebar to advance to the next screen often does nothing, but hitting the spacebar a second ...
mjs's user avatar
  • 309
2 votes
1 answer
2k views

Error while executing adb shell command

adb shell am broadcast -a com.test.app --es command "STOP" --es filename "sample 1.01.49 7-09-1380(01).apk" I am trying to broadcast intent using the above adb command, where ...
Anonymous's user avatar
3 votes
2 answers
250 views

Why can't install the weixin apk in my debian?

I have installed anbox. anbox version anbox 0.0~git20181014-1~bpo9+1-Debian Have a try to install an apk after downloading weixin7013android1640.apk. adb install weixin7013android1640.apk * daemon ...
showkey's user avatar
  • 461
3 votes
1 answer
846 views

Remove extra blank lines from CMD adb shell, when redirected to file

I am outputting results from an android shell command to a file, with MS-windows cmd via ADB.exe. It outputs the correct results, but I am getting an extra line between each result. It looks ...
PadreD727's user avatar
1 vote
0 answers
4k views

Format Data using mkfs.f2fs Android

How to format android data using mkfs.f2fs I rebooted to twrp and ran the following command in cmd adb shell mkfs.f2fs /dev/block/mmcblk0p87 and i got the following output F2FS-tools: mkfs....
Rangwa's user avatar
  • 11
0 votes
0 answers
50 views

save input and output data has passed in adb

i want save all input and output commands has executed in adbd I tried to pull adbd file in sbin folder and extract it to modify and Implement of the idea to write a few lines for create file and do ...
Sy4tech's user avatar
1 vote
1 answer
899 views

Why can't I see my mobile device on DevTools while running adb on a Docker container?

I'm trying to debug an app (or simply inspect pages in the Chrome browser) on my mobile device and I'm trying to use docker containers for housing adb. Everything goes well while starting up the adb ...
Neto Carrer's user avatar
0 votes
2 answers
3k views

Use awk on an Android command

I have an Android command whose output is as follows: $adb shell "head -20 /d/dma_buf/bufinfo" Dma-buf Objects: size flags mode count exp_name buf ...
Zoso's user avatar
  • 165
2 votes
0 answers
198 views

How to run adb in initramfs?

Seem my hook is work(sometime first run is failed but again run is seem no any library problem), Seem lack socket support in initramfs?my system is debian 9.Seem normal debian system provide socket ...
illiterate's user avatar
  • 1,003
0 votes
2 answers
468 views

Dealing with adb devices

I recently started using the adb command line utility tool and what I'm trying to do is to extract all of the images from a folder on my android device. I've tried the command below with no success. ...
user avatar
2 votes
2 answers
894 views

run command on script in alphabetical order

I am trying to set the timestamp of a bunch of files on my android device using adb shell. For one reason or another running touch with a specific provided timestamp does not work. In addition file ...
Scorb's user avatar
  • 614
2 votes
2 answers
13k views

How can I evaluate the result of an adb shell command?

For example, I want to check if a directory exists on the phone. R=$(adb shell 'ls /mnt/; echo $?' | tail -1); $ echo $R 0 $ if [ "$R" -ne 0 ]; then echo "Path doesn't exist"; else echo "Path ...
ka3ak's user avatar
  • 1,265
2 votes
2 answers
5k views

How to install adb on Ubuntu from download

I have a desktop computer running Ubuntu 16.04. This computer does not have an internet connection (I am at work and this is not a work computer). I have been able to use a Wifi tether app using my ...
GBG's user avatar
  • 121
0 votes
1 answer
5k views

Android Studio: Running application in emulator not working

Yesterday I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application (just a blank activity) but weren't able to run it. With adb I can install it without ...
tavkomann's user avatar
  • 103
1 vote
1 answer
5k views

Uninstall Android Studio + SDK

I am using linux arch. I installed android according to ArchWiki. I uninstalled every skd component and android studio using pacman -Rs. Also, I removed every hidden folder in the home directory that ...
user avatar
1 vote
3 answers
10k views

how to debug adb insufficient permission case

a long time ago, i wrote a udev rule for adb with my phone (device) by setting a group. Everything was OK until some things changed recently: device rom udev packet adb packet now i get under ...
ceph3us's user avatar
  • 591
8 votes
2 answers
6k views

Android studio on FreeBSD

I would like to know that is it possible to use Android studio in FreeBSD ? I tried to run it but I couldn't.I installed IntelliJ from ports but there was no option to select the Android SDK.
abc's user avatar
  • 83
1 vote
2 answers
1k views

Linux mint freezes after clicking on run button in android studio

I have installed android studio in linux mint 18.1. Every thing is working file but whenever I'm clicking on run app button it freezes completely after that I need to restart laptop. My spec is ...
Shivashish Singh's user avatar
2 votes
1 answer
2k views

Connect ZTE Android Phone to Linux (Fedora) for USB debugging and file transfer

I just got a new ZTE Phone and I'm trying to connect it to my PC via USB. I'm running Fedora 24 and mostly need to connect the phone for USB file transfer as well as app development using Android ...
mattu's user avatar
  • 143
-3 votes
1 answer
461 views

In shell, what does "./directory" command means?

I'm trying to install busybox on my tab. I copied the busybox binaries to my tab, went to its location, then printed "./busybox", enter. message appeared: "can't execute: is a directory" It looks like ...
Bashar Issa's user avatar
1 vote
1 answer
126 views

Android device unable to connect wifi

Though I have specified, key_mgmt as WPA-PSK, the device reads it as none. Is there any problem in device? if yes how can it be rectified. I also used these commands to give device information about ...
Madala Krishna's user avatar
1 vote
2 answers
2k views

Android device is stopped getting detected in linux

My motorola android mobile was getting detected initially in linux mint 17.3 . Then I was using it for android studio where mobile is getting detected and could do testing android app via my mobile. ...
Learning's user avatar
  • 111
1 vote
1 answer
4k views

How to pull database file from physically connected android device

I am trying to copy WeChat database file called EnMicroMsg.db so I can view it in SQLite browser. With my Nexus 7 tablet rooted and physically connected, the usb debugging checked I ran the following ...
e.kenny67's user avatar
2 votes
0 answers
409 views

ADB doesn't recognize a Samsung GT-I9000

I've connected the phone via USB. The phone is rooted, USB debugging is enabled and ADB has root access. The system is a vanilla Debian 8.3.0. lsusb: [...] Bus 002 Device 004: ID 04e8:685e Samsung ...
boolean.is.null's user avatar
10 votes
2 answers
5k views

Is it possible to fake a specific path for a process?

I'm trying to run ADB on a linux server with multiple users where I am not root (to play with my android emulator). The adb daemon writes its logs to the file /tmp/adb.log which unfortunately seems to ...
gluk47's user avatar
  • 238
0 votes
0 answers
1k views

How to write a script with Android Debug Bridge command in it

I am trying to write a script to automate some testing, and the fist step is connect to my device and update the /lib/modules/ directory with the recent version of a device driver on my host. That is ...
user3326293's user avatar
3 votes
1 answer
2k views

adb pull not accepting a variable as source, gives *' does not exist..* error

I'm trying to use $EXTERNAL_STORAGE in the adb pull command. I noticed that the variable has its scope defined in Android only and so it would not work successfully in adb pull $EXTERNAL_STORAGE/...
Firelord's user avatar
  • 342
3 votes
1 answer
2k views

Setting up adb for user access

I recently purchased an Android phone (my first). This is probably not relevant to the question, but it is a Micromax Canvas Hue AQ5000, running Android 4.4.2. I want to access the phone from my ...
Faheem Mitha's user avatar
  • 35.5k
0 votes
2 answers
2k views

tcpdump filter expression breaks via adb

I installed tcpdump on my Android tablet and am running commands from a root adb shell. I'm working from the tcpdump man page examples, specifically this one: To print all IPv4 HTTP packets to and ...
Michelle's user avatar
  • 115
4 votes
1 answer
9k views

How to keep running a process in Android when disconnecting adb terminal? command "nohup" not found

I'm trying to analyze the reason for random reboots of my phone (see here). Therefore I wanted to record the logcat and kernel messages till the restart to see the logs even after the usb disconnects, ...
xuiqzy's user avatar
  • 49
1 vote
1 answer
339 views

How do I allow non-root access to Nexus 7 2013 LTE (deb) over adb and fastboot?

I need to access my Nexus 7 2013 LTE (deb) over adb and fastboot, but it seems that it's required to be root to be able to run the adb server to be able to access the device due to USB rules. How can ...
Naftuli Kay's user avatar
  • 40.4k