Analysis & Opinion

Top Forum Discussions

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

97 posts
Thanks Meter: 370
By edgan, Member on 3rd June 2011, 10:13 PM
Post Reply Subscribe to Thread Email Thread
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.

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.


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>


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!

2nd-init apk

2nd-init tarball


This method starts 2nd-init via, 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.

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

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.

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 root@ipaddress:/data

Run these two commands on the phone via ssh.

Use putty

Linux/OSX, in a terminal window:
ssh root@ipaddress

/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 by edgan; 15th June 2011 at 06:53 AM.
The Following 69 Users Say Thank You to edgan For This Useful Post: [ View ]
3rd June 2011, 10:15 PM |#2  
Retired Recognized Developer
Thanks Meter: 335
Great work Edgan! Works perfect here. Nice eye with taskset =)
The Following 2 Users Say Thank You to eval- For This Useful Post: [ View ]
3rd June 2011, 10:16 PM |#3  
Senior Member
Thanks Meter: 17
tenfar re-incarnate?
3rd June 2011, 10:18 PM |#4  
Charsher47's Avatar
Senior Member
Flag Atlanta, GA
Thanks Meter: 67
Niiice, great work
3rd June 2011, 10:19 PM |#5  
kennethpenn's Avatar
Retired Forum Moderator / Retired Recognized Developer
Flag Washington, D.C.
Thanks Meter: 3,806
Donate to Me
Awesome job. Good work!
3rd June 2011, 10:19 PM |#6  
CaelanT's Avatar
Senior Member
Flag Aberdeen
Thanks Meter: 762
Donate to Me

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

Would love to try it, but am dubious at the moment.
3rd June 2011, 10:19 PM |#7  
madquack's Avatar
Senior Member
Thanks Meter: 439
I jizzed in my pants.
The Following 4 Users Say Thank You to madquack For This Useful Post: [ View ]
3rd June 2011, 10:21 PM |#8  
Flag Cape Girardeau
Thanks Meter: 19
Great with 2.3 coming we will have a proper kernel Cyanogen Mod! Awesome stuff!
3rd June 2011, 10:22 PM |#9  
dLo GSR's Avatar
Senior Member
Flag Los Angeles
Thanks Meter: 225
wow! good work!
3rd June 2011, 10:23 PM |#10  
neer2005's Avatar
Senior Member
Flag New Jersey
Thanks Meter: 122
Originally Posted by CaelanT


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

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

The Following User Says Thank You to neer2005 For This Useful Post: [ View ]
3rd June 2011, 10:23 PM |#11  
plasticglock's Avatar
Senior Member
Flag Texas
Thanks Meter: 14

10 char

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

Advanced Search
Display Modes