[DEV] 2nd-init Compiled and Running

Search This thread

Loglud

Senior Member
Jul 29, 2011
235
449
Google Pixel 7 Pro
So I have been working on this for a while trying to get things to cross compile, and i got this to compile it is the Source and the program runs on the nook. Next we will have to write our new init.rc to mount our own os. Someone will have to help me with some research, but I just thought you should know.

Here are the files:
2nd-init.tar

To recomile with the NDK use the following command:
Code:
/home/<user>/Downloads/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/home/<user>/Downloads/android-ndk-r7/platforms/android-14/arch-arm/ 2nd-init.c
(Thanks to Indirect)

GOOD LUCK
 

Attachments

  • 2nd-init.tar
    20 KB · Views: 163
Last edited:

Indirect

Senior Member
Mar 25, 2011
2,346
3,001
Florida
So I have been working on this for a while trying to get things to cross compile, and i got this to compile it is the Source and the program runs on the nook. Next we will have to write our new init.rc to mount our own os. Someone will have to help me with some research, but I just thought you should know.

Here are the files:
2nd-init.tar

To recomile with the NDK use the following command:
Code:
/home/<user>/Downloads/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/home/<user>/Downloads/android-ndk-r7/platforms/android-14/arch-arm/ 2nd-init.c

GOOD LUCK


Hmm, if only another developer told you how to cross compile. Oh wait! Haha, congrats Loglud. :)
 
Jun 16, 2010
29
1
So I have been working on this for a while trying to get things to cross compile, and i got this to compile it is the Source and the program runs on the nook. Next we will have to write our new init.rc to mount our own os. Someone will have to help me with some research, but I just thought you should know.

Here are the files:
2nd-init.tar

To recomile with the NDK use the following command:
Code:
/home/<user>/Downloads/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/home/<user>/Downloads/android-ndk-r7/platforms/android-14/arch-arm/ 2nd-init.c
(Thanks to Indirect)

GOOD LUCK

Awesome! Great job Log. Big Step in the right direction.
 

Loglud

Senior Member
Jul 29, 2011
235
449
Google Pixel 7 Pro
Jeeze idk, i completely forgot about this thread until you guys posted on it. I never did to much testing. This was mostly done in concurrence with the Kexec-Mod since i had the toolchain up and running. If i remember correctly it did generate the second init file, don't know if it ever loaded it, but i can work on it some more if people want. I was hoping some one would point me in the direction they needed me to go with this.
 
  • Like
Reactions: antonyfl

diamond_lover

Senior Member
Apr 2, 2009
1,579
117
Top Secret
Jeeze idk, i completely forgot about this thread until you guys posted on it. I never did to much testing. This was mostly done in concurrence with the Kexec-Mod since i had the toolchain up and running. If i remember correctly it did generate the second init file, don't know if it ever loaded it, but i can work on it some more if people want. I was hoping some one would point me in the direction they needed me to go with this.

I prefer first a compatible Custom Recovery :rolleyes:
I compiled, but I don't know how adapt the hijack...
 

diamond_lover

Senior Member
Apr 2, 2009
1,579
117
Top Secret
However the problem is it requires kexec mod.

Sent from my ADR6425LVW using xda premium

Sorry, but you're wrong.
From this source use the Hijack method. This mean you can instal a custom rom, but you can't replace the kernel or bootloader.
From the source:
It's also important to remember that 2nd-init does NOT unlock the bootloader, nor does it allow you to run a custom kernel. It simply allows us to utilize the kernel that is there for our own means

That method is good enough to run CM9 and it's relative simple to port.

The kexec method is something different, but better: is a system call that enables you to load and boot into another kernel from the currently running kernel.
kexec performs the function of the boot loader from within the kernel.... essentially a hijack to allow us to call another kernel as a function of the stock one, allowing us to bypass the locked bootloader.

Source
 
Last edited:

HMG10

Senior Member
Nov 29, 2011
210
48
Someone has had success with this method

See this twitter feed:
http://twitter.com/androidnemith

@AndroidNemith just have seen your photo with the CWM on the Nook tablet. How did you do that since the Bootloader is locked ?

@PetePetePete1 Hijacking . Same way moto defy and others are doing it. Right now i am kicking it manually looking for a better way now.

@AndroidNemith can you show your current state XDA developers, because they are still searching for a method to get a custom bootloader

@PetePetePete1 It's not quite ready and i got distracted by NookColor bits. If you want to see what i am doing look at the Moto Defy CM

I take no credit for finding this, as I haven't been talking with @AndroidNemith
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    So I have been working on this for a while trying to get things to cross compile, and i got this to compile it is the Source and the program runs on the nook. Next we will have to write our new init.rc to mount our own os. Someone will have to help me with some research, but I just thought you should know.

    Here are the files:
    2nd-init.tar

    To recomile with the NDK use the following command:
    Code:
    /home/<user>/Downloads/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/home/<user>/Downloads/android-ndk-r7/platforms/android-14/arch-arm/ 2nd-init.c
    (Thanks to Indirect)

    GOOD LUCK
    3
    However the problem is it requires kexec mod.

    Sent from my ADR6425LVW using xda premium

    Sorry, but you're wrong.
    From this source use the Hijack method. This mean you can instal a custom rom, but you can't replace the kernel or bootloader.
    From the source:
    It's also important to remember that 2nd-init does NOT unlock the bootloader, nor does it allow you to run a custom kernel. It simply allows us to utilize the kernel that is there for our own means

    That method is good enough to run CM9 and it's relative simple to port.

    The kexec method is something different, but better: is a system call that enables you to load and boot into another kernel from the currently running kernel.
    kexec performs the function of the boot loader from within the kernel.... essentially a hijack to allow us to call another kernel as a function of the stock one, allowing us to bypass the locked bootloader.

    Source
    1
    Jeeze idk, i completely forgot about this thread until you guys posted on it. I never did to much testing. This was mostly done in concurrence with the Kexec-Mod since i had the toolchain up and running. If i remember correctly it did generate the second init file, don't know if it ever loaded it, but i can work on it some more if people want. I was hoping some one would point me in the direction they needed me to go with this.