We have frequently seen the utility of ADB to carry out all kinds of tasks on the mobile: from hiding pre-installed applications to recording the screen on video. The method is usually the same in all cases: connect the mobile to a PC via 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 needing any other device. You can achieve this with the LADB application, a simple app 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 the LADB app, available on Google Play for 2.99 euros. However, it 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 application 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, since the configuration for the wireless ADB would not reach this latest version.
In both cases, you need to have developer options and USB debugging enabled, but what happens next varies. In Android 11, you must go to the developer options and activate wireless debugging. Then activate the Android split screen mode (since the code changes when you change applications) and enter LADB, where you must fill in the port and PIN.
In Android 10Unfortunately, enabling wireless debugging requires a few ADB commands, so it kind of negates the benefit of the app. That is, you will need to use ADB in the traditional way to enable wireless debugging. At least, you will only have to do this configuration once and then you can continue using ADB with LADB from the mobile itself without cables until the next time you restart the mobile.
Setup is simple. After connecting to the mobile using ADB by any method you prefer, such as from a PC, you must execute the command adb tcpip 5555
. Then disconnect the cable from the PC, open LADB and it should connect without problems, after you accept the message that a new device is connecting.
From that moment, you can start sending ADB commands to the mobile, from the mobile, using the LADB box. The application does not help you much in this regard by showing you supported commands, although it does show the message log of your operations at the bottom. To write a command, you should not include the first adb shell
. For example, to take a screenshot in one of the least practical ways possible, you would type screencap -p /sdcard/captura.png
.
LADB — Local ADB Shell
Via | Android Police