Reputation: 8268
I am seeing an issue with my android images where the command adb reboot bootloader
simply reboots back the android, instead of going to bootloader mode.
In order to fix the issue, I did some study and find that there are acually two things, adb
and adbd
and the host and target devices communicate using the TCP protocol over sockets.
So, the interesting thing is commands like adb shell
and adb devices
are working but not the reboot bootloader
. I want to understand what the adbd
on receiving the reboot bootloader
. Does it change the boor order, sets some flag, changes EFI vars....?
Can you please point to some good links or understanding you can share?
PS : I am working on embedded device environ, similar to raspberry pi...
Upvotes: 7
Views: 7311
Reputation: 31676
This is how adb reboot bootloader
works on a standard Android device connected via USB
(the only transport supported by the standard Android bootloader in the fastboot
mode):
adb
client sends the reboot bootloader
command to the adb
server (over TCP)adb
server forwards the reboot bootloader
command to the adbd
on the device (over USB)adbd
sets the sys.powerctl
property to reboot,bootloader
sys.powerctl
change triggers the init.rc
rule which runs powerctl
init
's built-in_NR_reboot
syscallreboot to bootloader
flag and reboots the deviceOn the next power up the bootloader would see the flag and go to the fastboot
mode. But only if USB
is connected.
Upvotes: 12