[APP][2.2+] Remote ADB Shell

Search This thread

cgutman

Senior Member
Aug 14, 2010
485
430
Overview
Remote ADB Shell is a simple terminal app that allows you to connect to the ADB shell service of another Android device over the network. This works in the exact same way that the "adb shell" command works on a computer. Because this app uses a native implementation of the ADB protocol in Java, it does not require root on either device or any 3rd party apps on the target device. The devices simply speak the same protocol to each other that they would to a computer running the ADB client from the Android SDK.

Features
  • Command history (accessible by long pressing the command box)
  • Send Ctrl+C (accessible by long pressing the terminal view)
  • Auto-scroll (with toggle accessible by long pressing the terminal view)

Screenshots
G5kLW6xPwt-Lw1TXF76ZvpTQoL_VrMAe87fPGytjF8B-WWdxyIAc1byTFeiIYJZ6og=h900-rw
b6QigvMGJvOhXikmk8TtHI5K_QeUzKOmFPD0I-IgKYjsPMi5lm_D8wtjk-0oBg9AVw=h900-rw
VLkJMy-crbxpheopAeIK4Y4b1CoaRZ7Q4lhVfj7c_xTYgattP51Gu8GyBaD59Fv6mA=h900-rw
CIfAKahmQi91xMKbUR-CdDHpXnaYu82RrB8EKGV0Zf5wHxpoUKsw-xuKme7mO6bElEk=h900-rw


Instructions
IMPORTANT: Android 4.2.2+ devices use RSA keys to authenticate the ADB connection. These devices will need to be plugged in to a computer the first time you connect to them (from each device with this app installed). This allows them to display the public key acceptance dialog, which you must accept (and check "Always allow from this computer").

To configure a stock un-rooted target, plug the target device into a computer and run "adb tcpip 5555". This will start ADB listening on port 5555 on the target device. The device can then be unplugged and will remain configured properly until reboot.

For devices that are rooted (although it's not required), you can install one of the several "ADB WiFi" apps to enable the ADB server to listen over the network. Devices with a custom ROM may have an option to enable ADB over the network in the Developer Options pane of Settings. Using either of these methods will properly configure ADB for network access with this app. The extra step for 4.2.2+ is still required for the initial connection.

To connect to your remote Android device, type in the IP address of the device and the port number (5555 from the example above) in Remote ADB Shell. Tap Connect and it will attempt to connect to the device and start up the terminal.

Notes
This app is unique because it runs a custom ADB implementation that I wrote from scratch in Java. I plan to open-source my ADB implementation on GitHub or Google Code once I give it a bit of cleanup and documentation. Using this custom ADB implementation means that I don't require an ADB binary or root on the device running the app. Because it speaks standard ADB, it doesn't require anything special on the target either.

Please post feature requests or suggestions here and I'll do my best to work on them.

Download
The app is available on Google Play for free. https://play.google.com/store/apps/details?id=com.cgutman.androidremotedebugger
 
Last edited:

harlekinwashere

Senior Member
Aug 20, 2016
78
37
Hi, cgutman - I actually have a feature request. :)

But first, let me say thank you for providing this featureset in an app I already have gotten a fair amount of use out of it. :)

Backstory:

I use adb shell commands to automate repetitive processes on a Fire TV (Android Settop Box, connected to a TV, runs apps), like launching certain apps, performing certain actions - and so on.

I actually have about 20 actions across multiple Applescript apps on the Mac that allow me to remote controll apps like Spotify or Pandora - and your app allows me to do that from an Android device (smartphone) as well.

That said - I run into two major speedbumps.

Without a "Bookmarks" feature (store a certain shell script, give it a name, be able to edit it, execute it on click), so far I can only effectively cycle through two scripts (using the "recent history" feature in your app) - and I'd like to be able to use 20+ scripts eventually. A bookmark list (sorted by name) would be great for my purpose.

Second - to really be able to speed up the use of those items a launcher shortcut feature would be great. It could look up and reference the bookmark entries from the suggestion above - or let you set an IP and enter a command in the shortcut dialogue (Terminal Emulator does it that way). Maybe even with an auto exit option (although "&& exit" works just as well right now (*yay*) - but people would have to know to use it). Also it should allow you to name the shortcut, before creating it.

The reason why this would be great is to reduce steps. Right now I have to open the app, connect to the remote Android device, longpress on the command line entry field, select a history item, press enter - press OK once the app has finished the script, then exit the app.

It would be great to be able to automate all of this down to one launcher shortcut click.

To give you an Idea - what I am using the app for currently - here is one of the scripts I wrote today:

Code:
monkey -p com.netease.cloudmusic 1 && sleep 5 && input tap 960 978 && sleep 0.8 && input keyevent 19 && input keyevent 19 && input keyevent 19 && sleep 0.3 && input keyevent 20 && input keyevent 20 && input keyevent 20 && sleep 0.3 && input tap 50 960 && sleep 0.8 && exit

This opens the netease app and starts the "daily recommended" playlist.

Code:
input tap 60 100 && sleep 0.8 && input tap 60 100 && sleep 0.8 && input tap 60 100 && sleep 0.8 && input tap 1444 1030 && sleep 0.8 && exit

This exits the app cleanly - and so on...

Again - I've set up dozens of scripts like that on my Mac to be able to navigate Pandora, and spotify - to pull files, make screenshots, and so on and so forth. If you could implement said features (again - Terminal Emulator has them.. ;) ) - your app would allow me to realize the same functionality on my smartphone.

Thank you for reading through my posting and contemplating the idea -

so long

h.

edit: Also thank you for already exiting the session cleanly (adb disconnect) once you type in exit. The Fire TV only allows one adb session at a time, so this is great. :)
 
Last edited:

harlekinwashere

Senior Member
Aug 20, 2016
78
37
Found a way to make the app a little more usable "as is" for my purposes in the meantime. Part of my problem was, that the shell scripts turned out quite complex - so I couldnt run several of them - because they weren't instantly recognizable on the run history level.

The temporary workaround for me was to move the commands as shell scripts to a folder (I named "shell") in /system on the target device and make them executable. That way the history in Remote ADB Shell stays cleaner and is better parseable by humans. ;)

This is what it looks like now:

http://i.imgur.com/AuGFZ0a.png
 
Last edited:

m4f1050

Senior Member
Apr 20, 2007
1,994
208
Trying to connect to my phone but I am not getting device authorization messages.
 

AS2107

New member
Sep 16, 2018
1
0
Great application, thank you.
My task:
- - the device has no Root
- in the directory / tmp there is a binary file su and SuperSU.apк for this device
- How to launch an "adb root shell tcpip:5555" using your application on the this device?
may be:?
1) adb tcpip:5555
2) adb root
3) adb tcpip:5555
4) adb remount
5) "adb shell"
6) or without "adb shell" -> adb pull ... adb pushh... adb reboot...
This is possible?
Or is this impossible in principle?
 
Last edited:

Kranium31

New member
Feb 2, 2016
1
0
I'm having trouble installing apk's with this. The normal command that I use on Windows doesn't seem to work...

Could it be having trouble finding the file on my phone while trying to send it to my fire stick?
 

Humpie

Recognized Developer
I'm having trouble installing apk's with this. The normal command that I use on Windows doesn't seem to work...

Could it be having trouble finding the file on my phone while trying to send it to my fire stick?
You can't, it's just "adb shell" commands (where you leave out the adb shell part), not "adb install" for instance.

---------- Post added at 12:23 AM ---------- Previous post was at 12:20 AM ----------

Great application, thank you.
My task:
- - the device has no Root
- in the directory / tmp there is a binary file su and SuperSU.apк for this device
- How to launch an "adb root shell tcpip:5555" using your application on the this device?
may be:?
1) adb tcpip:5555
2) adb root
3) adb tcpip:5555
4) adb remount
5) "adb shell"
6) or without "adb shell" -> adb pull ... adb pushh... adb reboot...
This is possible?
Or is this impossible in principle?
The app only connects via "adb shell", so only those commands are possible, so no "adb install", "adb tcpip" or whatever. It's like typing "adb shell" on a PC and then you're able to give direct commands to the phone like moving a file with "mv /sdcard/Download/file /sdcard"
 

Aaaadiii

New member
Aug 29, 2020
1
0
Hello I am having an issue
I want to use the adb on my own device (meaning only one device is being used)
I am able to connect the adb shell but whenever I try to type the following command it gives the error adb not found

adb shell sh /sdcard/.chaozhuo.gameassistan2/inject.sh

If anyone knows what the issue is Plz help
Thanks in advance
 

Powerfader

Member
Feb 15, 2022
18
7
I just bought a 2019 Nvidia Pro. I installed your Wolf Launch and was attempting to install a widget. A prompt appears and states my device doesn't support a widget and have to run an ADB shell. Troypoint has an app for a remote adb shell as so do others, but I cannot find one for a nvidia.

In the widget binding failure the code it is telling me to type is, appwidget grantbind --package com.wolf.firelauncher --user 0

I was all set to do this but the firelauncher gave me pause. The device I am attempting this on isa 2019 Nvidia Pro v.9.0.1 + hotfix 1

need confirmation this is the correct code for my device.

Thanks,
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Overview
    Remote ADB Shell is a simple terminal app that allows you to connect to the ADB shell service of another Android device over the network. This works in the exact same way that the "adb shell" command works on a computer. Because this app uses a native implementation of the ADB protocol in Java, it does not require root on either device or any 3rd party apps on the target device. The devices simply speak the same protocol to each other that they would to a computer running the ADB client from the Android SDK.

    Features
    • Command history (accessible by long pressing the command box)
    • Send Ctrl+C (accessible by long pressing the terminal view)
    • Auto-scroll (with toggle accessible by long pressing the terminal view)

    Screenshots
    G5kLW6xPwt-Lw1TXF76ZvpTQoL_VrMAe87fPGytjF8B-WWdxyIAc1byTFeiIYJZ6og=h900-rw
    b6QigvMGJvOhXikmk8TtHI5K_QeUzKOmFPD0I-IgKYjsPMi5lm_D8wtjk-0oBg9AVw=h900-rw
    VLkJMy-crbxpheopAeIK4Y4b1CoaRZ7Q4lhVfj7c_xTYgattP51Gu8GyBaD59Fv6mA=h900-rw
    CIfAKahmQi91xMKbUR-CdDHpXnaYu82RrB8EKGV0Zf5wHxpoUKsw-xuKme7mO6bElEk=h900-rw


    Instructions
    IMPORTANT: Android 4.2.2+ devices use RSA keys to authenticate the ADB connection. These devices will need to be plugged in to a computer the first time you connect to them (from each device with this app installed). This allows them to display the public key acceptance dialog, which you must accept (and check "Always allow from this computer").

    To configure a stock un-rooted target, plug the target device into a computer and run "adb tcpip 5555". This will start ADB listening on port 5555 on the target device. The device can then be unplugged and will remain configured properly until reboot.

    For devices that are rooted (although it's not required), you can install one of the several "ADB WiFi" apps to enable the ADB server to listen over the network. Devices with a custom ROM may have an option to enable ADB over the network in the Developer Options pane of Settings. Using either of these methods will properly configure ADB for network access with this app. The extra step for 4.2.2+ is still required for the initial connection.

    To connect to your remote Android device, type in the IP address of the device and the port number (5555 from the example above) in Remote ADB Shell. Tap Connect and it will attempt to connect to the device and start up the terminal.

    Notes
    This app is unique because it runs a custom ADB implementation that I wrote from scratch in Java. I plan to open-source my ADB implementation on GitHub or Google Code once I give it a bit of cleanup and documentation. Using this custom ADB implementation means that I don't require an ADB binary or root on the device running the app. Because it speaks standard ADB, it doesn't require anything special on the target either.

    Please post feature requests or suggestions here and I'll do my best to work on them.

    Download
    The app is available on Google Play for free. https://play.google.com/store/apps/details?id=com.cgutman.androidremotedebugger
    1
    Love this app! However I would like to ask if it were possible to send adb commands from outside the app using apps like Tasker. This could already simply be done by sending your app and intent with the ip, port and command.
    1
    I just created a Tasker Plugin myself using the AdbLib library! Have a look if you like https://play.google.com/store/apps/details?id=com.ADBPlugin