AOSP Part 1 (A New Hope)

Status
Not open for further replies.
Search This thread

ryman222

Senior Member
Dec 5, 2010
190
82
I have to leave now but I am trying to get it to stop fc'ing so I can poke around, I see moto crap left in too so I am assuming it just copied the system files. Going to reinstall again.

Ace if even nothing comes from you, you really seemed to kick start the community on 2nd-init.

Tonight I'm gonna start playing around with this and see what I can do that will cause an sbf :p

Sent from my DROID X2 using XDA App
 

hpark21

Senior Member
Feb 15, 2010
211
17
If I can find some time, I will look through init stuff.

Never programmed anything on the phone, but I have used Linux since 1993.

I SHOULD know something. :)
 

donlad

Senior Member
Sep 23, 2010
248
34
Do you all think that a completely AOSP ROM such as CM7 would solve the music skipping issues?

Or do you think it has to do with the kernel?
 

ryman222

Senior Member
Dec 5, 2010
190
82
Got my first build ready, flashing now, ill report back.

Sent from my DROID X2 using XDA App
 

Hashcode

Senior Recognized Developer
Sep 3, 2011
3,424
23,730
One thing to watch when writing your script is "where" you're running some of the ending commands from. I noticed the PATH= line only has /system/* directories in it. So if you don't specify where the command is running from it'll be one of those.

You're going to want to move some of the commands you'll need to execute later in the script into the /sbin directory and then prefix those commands with "/sbin/" when you run them.

See here for my logwrapper shell script (in github)
https://github.com/Hashcode/droid3_recovery/blob/master/install-files/bin/logwrapper

One other note on taskset. You'll need to "undo" it right after the new init starts running via a small "fix_boot.sh" or something which looks like this:
#!/sbin/busybox sh
/sbin/taskset -p -c 0,1 1

And this would be run at the very top of your new init.rc files like this:

on early-init
start ueventd

on init
exec /sbin/fixboot.sh

Feel free to poke around the Safestrap source on Github. Just know that it doesn't work with hijack-boot.zip files. It uses a /system/etc/rootfs dir in the ROMs it loads.
https://github.com/Hashcode/droid3_recovery
 
  • Like
Reactions: 0vermind

aceoyame

Retired Recognized Developer
Jul 14, 2009
939
254
Ok so it isnt working quite yet. It does reboot on the moto logo. Meaning 2nd init is partially working now. It is loading and getting killed. I will upload my zip soon.
 
  • Like
Reactions: 0vermind

ryman222

Senior Member
Dec 5, 2010
190
82
Ok so it isnt working quite yet. It does reboot on the moto logo. Meaning 2nd init is partially working now. It is loading and getting killed. I will upload my zip soon.

Same thing happened to me, I used what you uploaded as that is the route i was going to try and take, but since already started I just slightly modified yours. Attempt 2 in about 30 minutes.
 

aceoyame

Retired Recognized Developer
Jul 14, 2009
939
254
Well I may be having even more time soon. Sounds like im about to be banhammered or just shunned from rootzwiki thanks to droidxchat (****ing asshole) anyways...

I am going to take a look at what hashcode said, it is panicking and rebooting itself to restart (its a safety mechanism in 2nd init). So we are almost there.
 

aceoyame

Retired Recognized Developer
Jul 14, 2009
939
254
That is what my new attempt is working with. The first one was trying to make a zip but this method would make it more uniform with this generation of devices. I am uploading my atrix build atm which reboots at the M so everyone has what i has. As for that bin I used the 2nd init which I bumped.
 

ryman222

Senior Member
Dec 5, 2010
190
82
That is what my new attempt is working with. The first one was trying to make a zip but this method would make it more uniform with this generation of devices. I am uploading my atrix build atm which reboots at the M so everyone has what i has. As for that bin I used the 2nd init which I bumped.

I just added what hashcode talked about and made my build but won't be able to flash til later. Need sleep since I have school tomorrow haha.


Sent from my DROID X2 using XDA App
 

aceoyame

Retired Recognized Developer
Jul 14, 2009
939
254
2nd init sorta works in this one (panics and reboots phone) http://www.multiupload.com/4QG0NHCRG7

The script resides in mot_boot_mode inside of /system/bin/ for those who wanna take a stab at it!

Edit: Forgot to mention that the update script has been made to work with CM as well. The atrix's update script doesnt work oob.
 
Last edited:

Xyzodiac

Senior Member
Jul 9, 2011
92
8
Ocala, FL
Screw them then. You're a hard worker and we over here greatly appreciate your work on this along with everyone else working on 2nd init and deving roms/mods. Their loss is our gain :)

Sent from my DROID X2 using XDA App

We appreciate you Ace! Keep up the awesome work, I'll try to help test this weekend if needed.
 

mastafunk

Senior Member
Aug 31, 2011
406
450
Undisclosed Swamp Location, FL
Well................. Now i can SBF in my sleep lol

And may i present Test 14 http://iswarm.net/test14.zip
BOOTS ALL THE WAY!!

Still allot of work to do..

Thanks to Hashcode for his hints and
aceoyame for driving the boat
and the users who supported aceoyame's efforts.

Still very force closey but not as bad as before. Did a factory reset to see if that helped no go. I was able to make it through setup though and to the launcher.. just lots of fc's.. Gonna throw a few more hours in tonight..

EDIT.

Some observations after a factory reset. Still lots of fc's but not making the device unusable. Can still go to app drawer etc, launch some apps... Phone is force closing on dial. Settings is not coming up @ all not even a force close..... Moto apps got preinstalled.... something strange in the initial setup wizard.. 3g must be working as my contacts are showing after logging into google. SystemUI is not loading, not notification area or dropdown.

Somethings seriously off, power menu looks stock

Since i cant get to settings, i cant enable debuging so no adb for now. Gonna try a wireless adb market app..... Market works fine oddly enough, keyboard not so much. Had to use swype. I think the issue is this updater-script doesnt blow out the existing /system before going to town we have a mix and match of files lying around. Gonna redo the updater and try again in a bit..

EDIT

Having to SBF each time is a *****. If this round doesnt get us to a point where we can run recovery i think that is gonna be next. Build some sort of conditional into the wrapper so we can activate recovery by droping a file on the sdcard or something of the like...
 
Last edited:

donlad

Senior Member
Sep 23, 2010
248
34
I am a little confused on what exactly you all are working on.

Are you working on getting CM7 to boot with 2nd-init or are you implementing a correctly working 2nd-init with a Moto ROM first (if that's even possible?)
 

donlad

Senior Member
Sep 23, 2010
248
34
Were trying to get our second intit to boot cm7, our first init boots blur roms just fine lol.

Thanks for the clarification. In hindsight it was an unintelligent question.

I'm glad that CM7 booting is now possible. Is it 2.3.7 that you are working with?

I'm extremely happy to see so much progress. Thank you!
 

mazz0310

Senior Member
Dec 28, 2007
183
36
Los Angeles
They aren't working on any ROM's yet. 2nd init is required to launch any non-based Blur ROM's. Once 2nd init works then they will work on 2.3.7 or w/e they fell like. For now they are just trying to make the phone boot.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    For those following along we have gone through what we had and found we were missing some files..

    namely from the test14 the hijack.killall was not present. And /sbin need to be setup for busybox and its links. Trying again.

    EDIT

    Well from the logs we get logs up till and including the ls after the file copy then nothing.

    Gonna add some logging on hijack-killall and have it dump the perms as well as the files for the structure logs maybe something isnt executable.
    7
    Indeed i sent you a pm yesterday with that info. I can do it again if ya lost it.

    ---------- Post added at 01:11 PM ---------- Previous post was at 01:06 PM ----------

    Edit2: It is adbd we should be moving, dragonz must've typo'd it.

    Edit4: That USB part is because it identifies what usb mode it is running in and we latch onto that with our mot_boot_mode script. That is what the IF statement is referring to in there.

    Edit5: If this last attempt doesnt work with the D3 stuff I am going to trash it, can you upload what you have atm or is that your test 14 build?

    Im running test14 with a modified updater-script that blows out /system
    The diffs in my test14 were mainly the fixboot.sh being put in /system/etc/rootfs and being copied to /sbin for execution, added /sbin to the path and added some new logging.

    I get what the USB part does but why? In this method if we ever turn on debugging for adb and reboot we will be in trouble on the finished product. Why not check for the existance of a file on the sd card or something like that..

    The part i was wondering was why the need to rename adbd?

    EDIT

    for the lurkers..

    We know that everyone is excited and appreciates the progress.
    In the future instead of posting to express your gratitude you can simply hit thanks on the posts you are most excited about, that will keep the thread from getting cluttered but let us know you guys are watching.
    6
    This is a think tank for making 2nd init load aosp based roms. It currently loads only init.rc. Attached below is the zip file I have made of where I currently stand with 2nd init. Please only download it if you want to help fix it. It probably doesnt work yet.

    2nd init is further than the attached in this build (This is a full CM build) The script that is currently being hammered out is mot_boot_mode inside of /system/bin/ Also note that I have made the update script work in the build.

    http://www.multiupload.com/4QG0NHCRG7
    6
    Heres the first working iteration

    Test 23

    http://iswarm.net/test23.zip

    Heres a newer more cleaned up version for those that might want to try there own rom base with this....

    http://pastebin.com/WuHUNaYS

    replace the contents of mot_boot_mode in /system/bin with this and
    just move your fixboot.sh and hijack.killall out of /system/etc/rootfs to /system bin from test 23 and then simply drop the files including folders from your boot.img ramdisk for your rom to /system/etc/rootfs and merge whatever else you want from your rom to /system.

    Also be sure to set usb debugging off before rebooting to recovery to flash. The script will not execute with USB debug enabled.

    Probably the last update for tonight..
    5
    Well my last run was a bit of a success...

    hijack.killall ran and completed
    and 2ninit did as well for the first time...

    Code:
    # cat log
    Run date: Thu Dec  1 19:36:18 EST 2011.
    Running as: uid=0(root) gid=0(root).
    Usb mode is: normal.
    2nd-init completed successfully.

    Now its just something with the rom that is hanging us. I am suspecting we will need to get adb up to get any further @ this point but As far as i can tell
    2nd-init is now functional..

    I will wrap this up and upload it shortly..