How to Root and Unlock the Google Nexus 6 on a Mac – XDA TV

In the past, XDA Developer TV Producer droidmodd3rx has shown you how to … more

Set Up Your MediaTek Device with Comprehensive Beginner’s Guide

As can be seen with the use of MediaTek chips in Android One devices … more

Sony Updates AOSP Sources to Android 5.0.1

Just a few days ago, Sony did an utterly fantastic job by pushing out numerous device trees for … more

Stop Your Screen From Turning Off with KeepItOn

We all know the feeling of reading a news article orrather longdocument, when our screen … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Bootloader - How does it know what partition to boot

OP bigbiff

10th February 2013, 06:46 PM   |  #1  
OP Recognized Developer
Thanks Meter: 4,277
 
4,757 posts
Join Date:Joined: Jun 2010
Donate to Me
More
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.
13th February 2013, 02:20 AM   |  #2  
Senior Recognized Developer
Flag Gdańsk
Thanks Meter: 3,437
 
1,340 posts
Join Date:Joined: May 2009
Donate to Me
Maybe this can help you?
https://github.com/CyanogenMod/andro...s/sec-reboot.c
The Following User Says Thank You to Rebellos For This Useful Post: [ View ]
13th February 2013, 03:43 AM   |  #3  
OP Recognized Developer
Thanks Meter: 4,277
 
4,757 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Quote:
Originally Posted by Rebellos

Maybe this can help you?
https://github.com/CyanogenMod/andro...s/sec-reboot.c

Hi, thanks for the pointer. Do you know how to pass the info to that sec reboot function to boot normally?
13th February 2013, 07:00 AM   |  #4  
thewadegeek's Avatar
Senior Member
Flag Cedar Rapids
Thanks Meter: 800
 
695 posts
Join Date:Joined: Mar 2011
More
Re: Bootloader - How does it know what partition to boot
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
13th February 2013, 11:34 AM   |  #5  
OP Recognized Developer
Thanks Meter: 4,277
 
4,757 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Quote:
Originally Posted by thewadegeek

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.
13th February 2013, 04:42 PM   |  #6  
thewadegeek's Avatar
Senior Member
Flag Cedar Rapids
Thanks Meter: 800
 
695 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by bigbiff

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.

Ah ok my bad, misunderstood the question. Beyond my are of expertise though.
13th February 2013, 05:14 PM   |  #7  
OP Recognized Developer
Thanks Meter: 4,277
 
4,757 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Quote:
Originally Posted by thewadegeek

Ah ok my bad, misunderstood the question. Beyond my are of expertise though.

I don't have my phone now to list running modules, but I am wondering if there is a module that might handle this. I will investigate tonight.
14th February 2013, 05:03 AM   |  #8  
thewadegeek's Avatar
Senior Member
Flag Cedar Rapids
Thanks Meter: 800
 
695 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by bigbiff

I don't have my phone now to list running modules, but I am wondering if there is a module that might handle this. I will investigate tonight.

btlock.ko
cifs.ko
commkm.ko
dhd.ko
dns_resolver.ko
md4.ko
mvpkm.ko
pvtcpkm.ko
scsi_wait_scan.ko
vpnclient.ko

CyanogenMod 10.1.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes