How to add custom command in adb?

404 views
Skip to first unread message

swetabh suman

unread,
Aug 23, 2019, 5:14:49 PM8/23/19
to android-platform
Hi all,
I am currently working with the adb commands and would like to know, how can we add our own commands in android adb (AOSP).
For eg, I sent the command "adb apply ota", this will open up the sideload mode and there we can apply it. via adb sideload <pkg.zip>.

In the AOSP i have seen that the command were received in the system/core/adb/services.cpp file where it gets segregated into different path , I mean If it is shell command then it will open ShellService , or if it is reboot command then It will create a new service thread. 

Now If I want to support my custom command how can I approach?

Farhan Ar Rafi

unread,
Aug 25, 2019, 11:24:48 AM8/25/19
to android-...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/9f0019b6-d5df-4f51-a580-7c00817dc1f3%40googlegroups.com.


--
Best Regards,
Farhan Ar Rafi

Tommaso Merciai

unread,
Dec 22, 2019, 1:43:22 PM12/22/19
to android-platform
Hi Farhan Ar Rafi,
Looking adb source code in system/core/adb

Regards,
Tommaso Merciai


Il giorno domenica 25 agosto 2019 17:24:48 UTC+2, Farhan Ar Rafi ha scritto:
On Sat, Aug 24, 2019 at 3:14 AM swetabh suman <giet.1...@gmail.com> wrote:
Hi all,
I am currently working with the adb commands and would like to know, how can we add our own commands in android adb (AOSP).
For eg, I sent the command "adb apply ota", this will open up the sideload mode and there we can apply it. via adb sideload <pkg.zip>.

In the AOSP i have seen that the command were received in the system/core/adb/services.cpp file where it gets segregated into different path , I mean If it is shell command then it will open ShellService , or if it is reboot command then It will create a new service thread. 

Now If I want to support my custom command how can I approach?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages