[Bootloader Bypass] Kexec for Motorola RAZR by kholk & [mbm]

Search This thread

dtrail1

Senior Member
Oct 7, 2011
4,809
7,868
Frankfurt
Of course we can use kexec this time, but only with one core working, but for me thats ok. It would be nice to include kexec in safestrap and in bootstrap too. :)

Gesendet von meinem XT910 mit Tapatalk 2
 
  • Like
Reactions: BytecodeMe

jjhiza

Senior Member
Dec 19, 2010
3,163
2,697
Dirty Jersey
You shouldn't actually need kernel source to use kexec.

IMO, this kexec function needs to be integrated into safestrap. Take any ROM image (e.g. the leaked ICS) and install it with safestrap. Use kexec to boot that ROM's kernel. Profit.

No chance of bricking, no chance of knocking your phone off the upgrade path.

When I get some more time I may put this together myself. Unfortunately I'm about to head out of town again, and won't have the time for a week or two.

Actually, that's an outstanding idea! Having the ability to drop a new kernel in, without needing to go through any extra processes would be a lifesaver!

Sent from my XT862 using xda premium
 

jjhiza

Senior Member
Dec 19, 2010
3,163
2,697
Dirty Jersey
kexec doesn't work if Safestrap is installed.

Why not? I'm not a dev...just a bit of a ROM whore, so I would love to know the specifics. If Safestrap interrupts the boot process, to load different firmware, then why wouldn't that interruption be viable to load a kernel module? Thanks in advance for any and all feedback.

Sent from my XT862 using xda premium
 

highlandsun

Inactive Recognized Developer
Sep 15, 2009
947
272
Los Angeles
highlandsun.com
Why not? I'm not a dev...just a bit of a ROM whore, so I would love to know the specifics. If Safestrap interrupts the boot process, to load different firmware, then why wouldn't that interruption be viable to load a kernel module? Thanks in advance for any and all feedback.

Exactly my point. On XDAndroid we keep a set of .tar.gz's on the partition, one for each kernel, containing its matching system/lib/modules. Our init script will automatically untar the right archive based on the current kernel version. There's no reason we can't toggle between multiple kernels at will, using kexec to load a specific one each time.

[Edit] I meant to post this here. Follow this thread for details

http://lists.xdandroid.com/pipermail/xdandroid-dev/2011-May/000327.html

It has the binaries for the kexec tools, shell script to invoke, instructions, etc...

I also added Kexec as an option to the Shutdown menu, to allow faster swapping between various kernels being tested.
Sent from my DROID4 using Tapatalk
 
Last edited:

jjhiza

Senior Member
Dec 19, 2010
3,163
2,697
Dirty Jersey
^^That seems like a perfectly logical idea, and one that I (and obviously many others) are desperate to see come to fruition. Personally, I'm mostly concerned with being able to increase battery life, and lower voltage, as most of the ICS ROMs have fairly sub-par battery life. I will, however, bow to kholk's knowledge, since he is at the forefront of the kexec movement for the Razr. Hopefully he can shed some more light on the issue.

Sent from my XT862 using xda premium
 
  • Like
Reactions: pedrotorresfilho

pokedroid

Senior Member
Apr 21, 2010
314
37
I don't mean to sound impatient/Hound anyone for an update, but is there another source where one can track the progress of this project? Probably getting a maxx in the next 72 hours and this would be a nice little treat :)
 

sevenup30

Senior Member
Jan 19, 2011
856
726
Montpellier
I don't mean to sound impatient/Hound anyone for an update, but is there another source where one can track the progress of this project? Probably getting a maxx in the next 72 hours and this would be a nice little treat :)

The development is in stand by for now, untill motorola release kernel source for 3.x kernel. With that kholk might be able to activate both CPU and port it to xt912 devices. be patient the best is yet to come ;)
 
  • Like
Reactions: Shaffer678

spawns

Senior Member
Apr 7, 2010
241
33
The development is in stand by for now, untill motorola release kernel source for 3.x kernel. With that kholk might be able to activate both CPU and port it to xt912 devices. be patient the best is yet to come ;)

One Question, with all the leaks rolling out, the kernel cant be extracted to continue development? Or there has to be a fastboot file from this versions?
Thnx!!!

Sent Via XT910..
 

[TSON]

Senior Member
Jan 28, 2011
705
314
We need the source code of the kernel, not the kernel itself. The code inside of it.
 

highlandsun

Inactive Recognized Developer
Sep 15, 2009
947
272
Los Angeles
highlandsun.com
We need the source code of the kernel, not the kernel itself. The code inside of it.

That's not quite true. All you need is to know the version of the kernel source. You can compile your kexec module based on that alone, and then hex edit the version stamp to match the actual kernel so that the module loads without complaining.

Sent from my DROID4 using Tapatalk
 

BakaPhoenix

Senior Member
Jul 16, 2010
625
110
Roma
That's not quite true. All you need is to know the version of the kernel source. You can compile your kexec module based on that alone, and then hex edit the version stamp to match the actual kernel so that the module loads without complaining.

Sent from my DROID4 using Tapatalk

I think that he need some specific data in the kernel source to let the 2° core work
 

highlandsun

Inactive Recognized Developer
Sep 15, 2009
947
272
Los Angeles
highlandsun.com
There's two separate issues. First you need a compatible kexec module that the stock kernel will load, to allow a kexec to be performed at all. Then you need source for whatever other kernel you want to load.

IMO, loading custom kernels isn't important at this point in time. The thing to focus on right now is kexec to allow stock GB installs to load the stock ICS kernel without having to flash it and take the phone off the upgrade path.

Sent from my DROID4 using Tapatalk
 

pokedroid

Senior Member
Apr 21, 2010
314
37
The development is in stand by for now, untill motorola release kernel source for 3.x kernel. With that kholk might be able to activate both CPU and port it to xt912 devices. be patient the best is yet to come ;)

Thanks for letting me know :) I was just a little worried that the project had become infeasible or something. I will be making the jump to the razr maxx as soon as this is fully operational for cdma variants, regardless of 2nd core status.
 

leerpsp

Senior Member
May 13, 2011
379
19
not saying
Guys i hope this does not make you mad but im going to port this to the droid 3 hope i can get it working

Sent from my DROID3 using XDA
 

leerpsp

Senior Member
May 13, 2011
379
19
not saying
hey leerpsp get in touch with @HASHCODE as he is the eminence on D3 right now, so you guys become a two man team :D

i will when i find my linux cd to install i got as far as useing safe system and installing ics cm9 adding kexec to cm9 to bootup with the new bootloader running and all it does it boot forever so i will talk with hash in a few days thanks for the info man
 

eyriiii

Senior Member
Apr 27, 2012
569
67
Question to kholk and the team: As of now the European ICS is delayed, is it enough for you to take the source of the US 3.0.8 ICS leak and implent it into your rom or kexec? I would like to know because I really cant wait anymore
 

sevenup30

Senior Member
Jan 19, 2011
856
726
Montpellier
Question to kholk and the team: As of now the European ICS is delayed, is it enough for you to take the source of the US 3.0.8 ICS leak and implent it into your rom or kexec? I would like to know because I really cant wait anymore

You cant wait but you'll have too, as it was said like 20 times, they need the kernel source, not the system source. And if i m right.Chinese sources only include system sources not kernel.

Wait and see
 

Top Liked Posts

  • There are no posts matching your filters.
  • 55
    Welcome to the EternityProject's Motorola RAZR Bootloader Bypass Thread!


    What do we have today?
    Kexec. After working with a really good developer, [mbm], finally this has become real.
    Linux boots Linux. No signature checks.
    Yeah, this is the beginning of custom kernels :)
    Oh, remember that this is still a WORK IN PROGRESS!

    Known issues (to be solved):
    - CPU1 doesn't come up.
    - It fails on (some?) CDMA Droid RAZRs :(

    ToDo (by priority):
    1. Fix CDMA Droid RAZR problem
    2. Fix CPU1

    Disclaimer:
    The EternityProject and [mbm] aren't responsible of anything you do on your device: if it explodes and kills you, or if it comes to life and becomes something like Terminator, it's YOUR OWN RESPONSIBILITY.
    Plus, prior complaining that it doesn't work, use a STOCK MOTOROLA ROM. Thanks.

    Tested on:
    651.167.19.XT910.Retail.en.FR
    651.167.26.XT910.Retail.en.EU
    65.1.40.XT910.MERetail.en.06
    651.73.250.XT910.Brasil.en.BR
    65.1.40.XT910.AsiaRetail.en.03
    65.3.106.XT910S.SKT.en.KR

    Installing:
    1. Copy the package on your internal memory / MicroSD
    2. Boot the bootstrap recovery
    3. Install it via that recovery.

    Booting with kexec:
    Open a terminal emulator or ADB and enter this:
    Code:
    su
    sh /system/bypassme/bypassme.sh
    Then wait for 10 seconds to jump over the new kernel. Now your device will vibrate and apparently freeze. Wait a minute and you'll be on the new kernel ;)
    You can also set the script above to be automatically executed at boot time or to be a one-tap script with apps like Script Manager.

    Video how-to by therazrguy:
    http://www.youtube.com/watch?v=0o2j543IOMc

    In case of freeze:
    VOLDN+POWER (press for ~10 seconds) will hardshutdown your device. If it freezes during the kexec boot, retry. Sometimes it can happen.

    In case of slow-like-hell device:
    Install SetCPU or AnTuTu CPU Master and change your governor from 'mot_hotplug' to 'ondemand'.

    Screenshots:


    Download:
    EternityProject Website

    Source:
    HERE

    Note:
    If something is not working, please remove anything that is automatically running at boot, like auto-recovery and the "Set on boot" option of SetCPU or AnTuTu CPU Master.


    The EternityProject Team Manager & Main Developer,
    --kholk
    7
    * whistling *

    :angel:
    5
    Hashcode got both cores running on the Droid 3 and the CDMA Razr. There's some issues but at least he got both cores running! :D
    4
    stop asking for update dudes, i know you can t wait for kexec and so do i.
    But don t worry when kholk will have something new he will tell.

    Remember he is doing This during freetime for free , it s summer now and he work on many devices!

    So we all have to wait don t update this thread for ETA, because every time i see it i m like , omagad finally! And no....