Bootloader - How does it know what partition to boot

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
Hello.

I am looking at fixing powerdown from TWRP on the Galaxy Note2 series of phones. I was able to get it to power down calling android_reboot(ANDROID_RB_POWEROFF, 0, 0); from libcutils. However when the phone powers on, it goes straight into recovery.

I was hoping someone might have an idea on where the bootloader gets it's information on what partition to boot so we can fix this to boot into system right away.

On the qualcomm Note1, we could run
Code:
echo 3 > /dev/block/mmcblk0p12
to boot into system.

I am looking forward to your ideas.
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
Based off a quick glance at the code from my phone you want to hit the reboot_mode_none case.

Sent from my SCH-R950 using Tapatalk 2
Yeah I was wondering how to pass that to some place from userland since you can't talk to the kernel without some facility interface.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone