• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[2nd-init] Here is a working and tested 2nd-init for the Atrix

Search This thread

edgan

Senior Member
Apr 13, 2011
98
368
I have just finished porting 2nd-init to the Atrix. It was mostly a clean port from the Defy. I didn't modify the code, just compiled it. The work was in the install/wrapper. There was also a new issue, in that we have SMP, and the code expected non-SMP.

This opens up custom ROMs, like CM7. This does not unlock the bootloader or allow custom kernels.

BETA BETA BETA
It has been tested on AT&T 1.5.7 and 1.8.3. I recommend only developers play with this for now. It is not that useful be itself, but expect to see lots of new things happen based on this.

I welcome feedback. Also feel free to Donate via the "Donate to me" link under my username, top left, on XDA. The goal is to use donations to purchase hardware that will help me get kexec working, or finding a way to unlock the bootloader.

Enjoy! :D

Update 2
Brandon15811 and I made a 2ndinit apk based installer. It has been tested. I still advise caution when using this. It is based on the DroixXBootstrap code.

It requires SuperUser.apk to already be installed, and working.

Steps for the apk:

1. Get it on the phone however you like
2. Install the apk
3. Open Atrix 2ndinit
4. Click Install
5. Click OK when the dialog comes up
6. Install Android Terminal Emulator from the Market
7. Open Android Terminal Emulator
8. type ls -al /sys/kernel/debug<enter>

Update

I have added a change from NFHimself in version 1.0.1. It lets you disable it by using USB Early Enumeration. You do this by turning off the phone, turning it back on while holding the down arrow, using the down arrow till you see USB Early Enumeration, and then up arrow once to boot. I have tested change.

I am also working on some form of simpler installer. It may become as simple as an apk.

We know it breaks in it's current form with Gingerbread. Though we also know others have gotten it to work before on Gingerbread. I will also be working on 2nd-init for Gingerbread.

Thanks to eval!
Thanks to Brandon15811!
Thanks to xfinrodx!
Thanks to xvilka!
Thanks to PAuly!
Thanks to Skrilax_CZ!
Thanks to BravoMotorola!
Thanks to NFHimself!

DOWNLOAD
2nd-init apk


2nd-init tarball


README:

Info:
This method starts 2nd-init via mount_ext3.sh, which is line 108 of /init.rc.
My init.rc continues at line 109 with a couple tweaks.

Warning! This conflicts with Tenfar's ClockWorkMod(aka CWM) Recovery
If the phone is wall charging, you shut down the phone, and start it, it will boot CWM
To avoid this, open System Recovery and hit Charge Mode.
It may also conflict with other recovery tools, or other things that tweak the normal boot process.

Tweaks:
/sys/kernel/debug mounted
reboot on zygote crash commented out

Install:
Install SSHDroid from Market. It is free.
Make sure wifi is setup and working.
Run SSHDroid
Make sure it says it is running.
Fill in the ip address in the command below. SSHDroid will display it.

Windows:
Use WinSCP to put 2nd-init-1.0.1.tar.bz2 in /data

Linux/OSX, in a terminal window:
scp 2nd-init-1.0.1.tar.bz2 [email protected]:/data

Run these two commands on the phone via ssh.

Windows:
Use putty

Linux/OSX, in a terminal window:
ssh [email protected]

/bin/mount /system -o remount,rw
tar -C / -jxf /data/2nd-init-1.0.1.tar.bz2



Reboot phone, aka Power button, Turn off, Power button to turn on

Check if it worked by running the command below via ssh.

ls -a /sys/kernel/debug

Good Output:
. battery gpio hid mmc1 tegra_gpio tracing
.. bdi heap-generic-0 mdm_ctrl mmc2 tegra_pinmux usb
apanic cpcap-irq heap-iram mmc0 sched_features tegra_wakeup

Bad Output:
. ..


If the Output is good, then Congradulations you have control over init now!
 
Last edited:

CaelanT

Senior Member
Mar 18, 2011
3,356
742
Sheffield
Interesting!

Waiting for confirmation that this indeed is full 2nd-init.

Would love to try it, but am dubious at the moment.
 

stvmac11

Senior Member
Jan 3, 2011
118
17
AWESOME
I'm curious to know, how does this work differ, if at all, from the work tenfar was doing?
 

Jotokun

Senior Member
Apr 23, 2011
785
228
Awesome! Cant wait for CM7!

Going to hold off installing this until some roms start showing up. Not that I dont trust this, but it couldn't hurt to wait until there's something to use with it.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 68
    I have just finished porting 2nd-init to the Atrix. It was mostly a clean port from the Defy. I didn't modify the code, just compiled it. The work was in the install/wrapper. There was also a new issue, in that we have SMP, and the code expected non-SMP.

    This opens up custom ROMs, like CM7. This does not unlock the bootloader or allow custom kernels.

    BETA BETA BETA
    It has been tested on AT&T 1.5.7 and 1.8.3. I recommend only developers play with this for now. It is not that useful be itself, but expect to see lots of new things happen based on this.

    I welcome feedback. Also feel free to Donate via the "Donate to me" link under my username, top left, on XDA. The goal is to use donations to purchase hardware that will help me get kexec working, or finding a way to unlock the bootloader.

    Enjoy! :D

    Update 2
    Brandon15811 and I made a 2ndinit apk based installer. It has been tested. I still advise caution when using this. It is based on the DroixXBootstrap code.

    It requires SuperUser.apk to already be installed, and working.

    Steps for the apk:

    1. Get it on the phone however you like
    2. Install the apk
    3. Open Atrix 2ndinit
    4. Click Install
    5. Click OK when the dialog comes up
    6. Install Android Terminal Emulator from the Market
    7. Open Android Terminal Emulator
    8. type ls -al /sys/kernel/debug<enter>

    Update

    I have added a change from NFHimself in version 1.0.1. It lets you disable it by using USB Early Enumeration. You do this by turning off the phone, turning it back on while holding the down arrow, using the down arrow till you see USB Early Enumeration, and then up arrow once to boot. I have tested change.

    I am also working on some form of simpler installer. It may become as simple as an apk.

    We know it breaks in it's current form with Gingerbread. Though we also know others have gotten it to work before on Gingerbread. I will also be working on 2nd-init for Gingerbread.

    Thanks to eval!
    Thanks to Brandon15811!
    Thanks to xfinrodx!
    Thanks to xvilka!
    Thanks to PAuly!
    Thanks to Skrilax_CZ!
    Thanks to BravoMotorola!
    Thanks to NFHimself!

    DOWNLOAD
    2nd-init apk


    2nd-init tarball


    README:

    Info:
    This method starts 2nd-init via mount_ext3.sh, which is line 108 of /init.rc.
    My init.rc continues at line 109 with a couple tweaks.

    Warning! This conflicts with Tenfar's ClockWorkMod(aka CWM) Recovery
    If the phone is wall charging, you shut down the phone, and start it, it will boot CWM
    To avoid this, open System Recovery and hit Charge Mode.
    It may also conflict with other recovery tools, or other things that tweak the normal boot process.

    Tweaks:
    /sys/kernel/debug mounted
    reboot on zygote crash commented out

    Install:
    Install SSHDroid from Market. It is free.
    Make sure wifi is setup and working.
    Run SSHDroid
    Make sure it says it is running.
    Fill in the ip address in the command below. SSHDroid will display it.

    Windows:
    Use WinSCP to put 2nd-init-1.0.1.tar.bz2 in /data

    Linux/OSX, in a terminal window:
    scp 2nd-init-1.0.1.tar.bz2 [email protected]:/data

    Run these two commands on the phone via ssh.

    Windows:
    Use putty

    Linux/OSX, in a terminal window:
    ssh [email protected]

    /bin/mount /system -o remount,rw
    tar -C / -jxf /data/2nd-init-1.0.1.tar.bz2



    Reboot phone, aka Power button, Turn off, Power button to turn on

    Check if it worked by running the command below via ssh.

    ls -a /sys/kernel/debug

    Good Output:
    . battery gpio hid mmc1 tegra_gpio tracing
    .. bdi heap-generic-0 mdm_ctrl mmc2 tegra_pinmux usb
    apanic cpcap-irq heap-iram mmc0 sched_features tegra_wakeup

    Bad Output:
    . ..


    If the Output is good, then Congradulations you have control over init now!
    4
    I jizzed in my pants.
    4
    I just added a link to a new 2ndinit apk installer.
    3
    whoa awesome news

    this is another reason we have to allow Junior Members to post
    2
    Great work Edgan! Works perfect here. Nice eye with taskset =)