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
1 answer
45 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 ...
user avatar
  • 101
1 vote
1 answer
20 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 ...
user avatar
  • 113
0 votes
1 answer
34 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 ...
user avatar
  • 21
2 votes
0 answers
350 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 ...
user avatar
0 votes
1 answer
42 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 ...
user avatar
  • 1
0 votes
0 answers
392 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 ...
user avatar
  • 3,510
-1 votes
1 answer
2k 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 ...
user avatar
  • 101
0 votes
1 answer
49 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" ]]; ...
user avatar
  • 101
0 votes
0 answers
166 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-...
user avatar
1 vote
0 answers
154 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 /...
user avatar
  • 31
1 vote
1 answer
573 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 ...
user avatar
0 votes
1 answer
84 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 ...
user avatar
  • 289
2 votes
1 answer
669 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 ...
user avatar
3 votes
2 answers
218 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 ...
user avatar
  • 85
2 votes
1 answer
400 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 ...
user avatar
1 vote
0 answers
2k 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....
user avatar
  • 11
0 votes
0 answers
40 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 ...
user avatar
1 vote
1 answer
656 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 ...
user avatar
0 votes
2 answers
2k 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 ...
user avatar
  • 145
2 votes
0 answers
111 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 ...
user avatar
0 votes
2 answers
313 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
720 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 ...
user avatar
  • 544
1 vote
2 answers
10k 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 ...
user avatar
  • 1,151
2 votes
2 answers
4k 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 ...
user avatar
  • 121
0 votes
1 answer
4k 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 ...
user avatar
  • 103
1 vote
1 answer
4k 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 ...
user avatar
  • 512
7 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.
user avatar
  • 73
1 vote
2 answers
832 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 ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
  • 143
-3 votes
1 answer
431 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 ...
user avatar
1 vote
1 answer
84 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 ...
user avatar
1 vote
2 answers
1k 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. ...
user avatar
  • 111
1 vote
1 answer
3k 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 ...
user avatar
1 vote
0 answers
371 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 ...
user avatar
10 votes
2 answers
4k 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 ...
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 ...
user avatar
3 votes
1 answer
1k 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/...
user avatar
  • 288
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 ...
user avatar
  • 33.3k
0 votes
2 answers
1k 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 ...
user avatar
  • 115
4 votes
1 answer
7k 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, ...
user avatar
  • 47
1 vote
1 answer
322 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 ...
user avatar
  • 35.8k