Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
bigbiff
Old
#1  
Recognized Developer - OP
Thanks Meter 1073
Posts: 1,175
Join Date: Jun 2010

 
DONATE TO ME
Default Bootloader - How does it know what partition to boot

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.
Phone: ATT Galaxy Note 2
ROM: CM 10.1
64 GB Class 10 Sandisk
Exfat works thanks to Andrew Nayenko!



If you need help please, please, please, please post recovery.log.
1. adb pull /tmp/recovery.log or Advanced->Copy Log to SDCard
2. Upload /tmp/recovery.log or /sdcard/recovery.log to http://paste.tinyw.in

How to submit a bug report!
 
Rebellos
Old
#2  
Elite Recognized Developer
Thanks Meter 2690
Posts: 1,248
Join Date: May 2009
Location: Gdańsk

 
DONATE TO ME
Maybe this can help you?
https://github.com/CyanogenMod/andro...s/sec-reboot.c
Feedback on my development is highly appreciated, but first you should read this GUIDE and watch this MOVIE.

If you like my work - you can help me getting various cool stuff by clicking donation link in my profile. It's not required while pressing is, just appreciated.

Pretty owsom Android/Kernel dev tips&tricks: http://omappedia.org/wiki/Android_How-tos

Git HOW-TO by eagleeyetom: http://forum.xda-developers.com/show...php?p=31304826
15-minutes GIT introduction: http://try.github.com
If you want to submit patches to my git projects - use the guides above and make a pull request.
The Following User Says Thank You to Rebellos For This Useful Post: [ Click to Expand ]
 
bigbiff
Old
#3  
Recognized Developer - OP
Thanks Meter 1073
Posts: 1,175
Join Date: Jun 2010

 
DONATE TO ME
Quote:
Originally Posted by Rebellos View Post
Hi, thanks for the pointer. Do you know how to pass the info to that sec reboot function to boot normally?
Phone: ATT Galaxy Note 2
ROM: CM 10.1
64 GB Class 10 Sandisk
Exfat works thanks to Andrew Nayenko!



If you need help please, please, please, please post recovery.log.
1. adb pull /tmp/recovery.log or Advanced->Copy Log to SDCard
2. Upload /tmp/recovery.log or /sdcard/recovery.log to http://paste.tinyw.in

How to submit a bug report!
 
thewadegeek
Old
#4  
thewadegeek's Avatar
Senior Member
Thanks Meter 570
Posts: 647
Join Date: Mar 2011
Location: Cedar Rapids
Default 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
Search before asking for help.
Search again.
Once more.
And again.
Now post.
Oh and you ask for thanks? I say no.
 
bigbiff
Old
#5  
Recognized Developer - OP
Thanks Meter 1073
Posts: 1,175
Join Date: Jun 2010

 
DONATE TO ME
Quote:
Originally Posted by thewadegeek View Post
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.
Phone: ATT Galaxy Note 2
ROM: CM 10.1
64 GB Class 10 Sandisk
Exfat works thanks to Andrew Nayenko!



If you need help please, please, please, please post recovery.log.
1. adb pull /tmp/recovery.log or Advanced->Copy Log to SDCard
2. Upload /tmp/recovery.log or /sdcard/recovery.log to http://paste.tinyw.in

How to submit a bug report!
 
thewadegeek
Old
#6  
thewadegeek's Avatar
Senior Member
Thanks Meter 570
Posts: 647
Join Date: Mar 2011
Location: Cedar Rapids
Quote:
Originally Posted by bigbiff View Post
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.
Search before asking for help.
Search again.
Once more.
And again.
Now post.
Oh and you ask for thanks? I say no.
 
bigbiff
Old
#7  
Recognized Developer - OP
Thanks Meter 1073
Posts: 1,175
Join Date: Jun 2010

 
DONATE TO ME
Quote:
Originally Posted by thewadegeek View Post
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.
Phone: ATT Galaxy Note 2
ROM: CM 10.1
64 GB Class 10 Sandisk
Exfat works thanks to Andrew Nayenko!



If you need help please, please, please, please post recovery.log.
1. adb pull /tmp/recovery.log or Advanced->Copy Log to SDCard
2. Upload /tmp/recovery.log or /sdcard/recovery.log to http://paste.tinyw.in

How to submit a bug report!
 
thewadegeek
Old
#8  
thewadegeek's Avatar
Senior Member
Thanks Meter 570
Posts: 647
Join Date: Mar 2011
Location: Cedar Rapids
Quote:
Originally Posted by bigbiff View Post
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.
Search before asking for help.
Search again.
Once more.
And again.
Now post.
Oh and you ask for thanks? I say no.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Guide to Using Adobe Air on Android

When writing an app with performance in mind, you most likely want to write it native code using the … more

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more