We have often seen the usefulness of ADB to perform all kinds of tasks on the mobile: from hiding preinstalled applications to recording the screen in video. The method is generally the same in all cases: connect the mobile to a PC via a cable or, if you don’t have a PC, to another mobile. There is a third way: ADB from the same mobile.
This has the advantage of being able to use ADB’s advanced mobile management functions without the need for another device. You can achieve this with the LADB app, a simple application that connects to ADB locally
ADB from your mobile to your mobile
An easy way to use ADB from your mobile to your mobile is with LADB application, available on Google Play for 2.99 dollars. However, this is an open source application, so if you have the necessary tools and knowledge, you can download the source code from GitHub and compile it for a free copy.
The app takes advantage of wireless connection to ADB to create a server and connect to it from the mobile itself, although its configuration is slightly different depending on whether you have Android 10 or Android 11, because the wireless ADB configuration would not reach this latest version.
Either way, you need to enable developer options and USB debugging, but what happens next varies. In Android 11
In Android 10Unfortunately, enabling wireless debugging requires some ADB commands, which somehow negates the benefit of the app. That is, you will have to use ADB in the traditional way to enable wireless debugging. At least you will only have to do this setup once, then you can continue to use ADB with LADB from the mobile itself without cables until the next restart of the mobile.
The setup is simple. After you connect to mobile using ADB by any method you prefer, like from PC, you need to run the command adb tcpip 5555
. Then disconnect the cable from the PC, open LADB and it should connect without problem, after accepting the message that a new device is connecting.
From this moment you can start sending ADB commands to the mobile, from the mobile, using the LADB box. The app doesn’t help you much in this regard by showing you the supported commands, although it does show the message log of your operations at the bottom. To write an order, you must not include the first adb shell
. For example, to take a screenshot in one of the least convenient ways possible, you would have to type screencap -p /sdcard/captura.png
.
LADB – Local ADB Shell
Via | Android Police