Busybox for the EVO - EVO 4G Android Development

Does anyone have a compiled busybox for the EVO yet. Preferably in update.zip format. I'd like to get Debian working on the phone and Busybox is a requirement.

Im confused, I got busybox installed from titanium backup. Is that the same one you need? If so install titanium backup, hit 'problems' and install busybox that way.

I made a custom rom I just posted with BusyBox preinstalled. I will see if I can post an update.zip with busybox in it soon.

ChrisDos said:
Does anyone have a compiled busybox for the EVO yet. Preferably in update.zip format. I'd like to get Debian working on the phone and Busybox is a requirement.
Click to expand...
Click to collapse
here is one of my busybox binaries which should get you going. you'll have to manually install it, adb push to sdcard and then using root, mv to /data and chmod 755. should be good to go. if you're using unrevoked root, you can put it in the shadow directory and it'll appear in /system/bin.
http://forum.sdx-developers.com/android-2-1-development/(source)-sdx-busybox-for-android-2-1/ - where we maintain our latest version of busybox thanks to LouZiffer. I use this binary in all my ROMs. Its our community trade off for features with size..
my personally hosted mirror isnt always as updated as the link above - http://www.joeyconway.com/sdx/busybox/busybox (its the recovery version from link above with more features)
i'm sure somebody will throw up an update.zip which might be easier for most users.

joeykrim said:
here is one of my busybox binaries which should get you going
http://www.joeyconway.com/sdx/busybox/busybox
Click to expand...
Click to collapse
Even better Will installing it out of recovery work since it needs to add symlinks? You will probably need to go into recovery, and then adb shell busybox --install.

chuckhriczko said:
Even better Will installing it out of recovery work since it needs to add symlinks? You will probably need to go into recovery, and then adb shell busybox --install.
Click to expand...
Click to collapse
yea, so depends. if you're as root in normal android mode, unrevoked or one of toast/maejrep's rooted ROMs you can manually install w/o rebooting to recovery. if you dont have root in normal android mode, no custom ROM and no unrevoked root, you'll need to go into the recovery mode with root access.
i think the command to put sym links into /sbin which would be in the default PATH is:
busybox --install -s /sbin
i havent really experimented to see what people are using as their default install locations ... sorry for the rough guide!

I installed busybox entirely from my phone using the directions laid out in the troubleshooting section on the TitaniumBackup webpage (sorry, new user cannot post link, but you can link to it from the app in the market). I have toast's root and radio and flipz's .6 ROM, and I was able to do it all using a terminal on the phone, so, no recovery.

Thank you all. I got busybox installed and working fine. Though I guess I'll have to wait until an official ROM comes out with Ext4 support as it won't let me mount the partition that contains the Debian install. I suppose I could format the partition with yaffs2, but I haven't done any research into that file system. I might just have to be patient until an ASOP based ROM is released or someone includes a kernel with Ext4 support.
Thanks everyone. I appreciate all the hard work put towards this phone.

ChrisDos said:
Thank you all. I got busybox installed and working fine. Though I guess I'll have to wait until an official ROM comes out with Ext4 support as it won't let me mount the partition that contains the Debian install. I suppose I could format the partition with yaffs2, but I haven't done any research into that file system. I might just have to be patient until an ASOP based ROM is released or someone includes a kernel with Ext4 support.
Thanks everyone. I appreciate all the hard work put towards this phone.
Click to expand...
Click to collapse
can you post the files and directions to so i can get it installed? thanks

ChrisDos said:
Thank you all. I got busybox installed and working fine. Though I guess I'll have to wait until an official ROM comes out with Ext4 support as it won't let me mount the partition that contains the Debian install. I suppose I could format the partition with yaffs2, but I haven't done any research into that file system. I might just have to be patient until an ASOP based ROM is released or someone includes a kernel with Ext4 support.
Thanks everyone. I appreciate all the hard work put towards this phone.
Click to expand...
Click to collapse
if you use toast's kernel source released here, you can compile a working kernel with ext4 support ... just throwing out ideas cuz i'd hate to see you stop with your progress!

Busybox Installation Instructions
I use Linux, well, for all my computers, including my phone
So these instructions are biased for Linux...
Boot into torch's recovery.
Download busybox from joeykrim:
http://www.joeyconway.com/sdx/busybox/busybox
Place it in a directory and create this script:
Install_Busybox.sh:
#!/bin/bash
echo "Mounting /system"
adb shell mount -v /system
echo "Mounting /data"
adb shell mount -v /data
sleep 3
adb push busybox /data
adb shell chmod 755 /data/busybox
adb shell /data/busybox --install -s /system/xbin
echo "Waiting for system to stabilize before unmounting"
sleep 3
adb shell umount -v /system
adb shell umount -v /data
chmod 755 Install_Busybox.sh
./Install_Busybox.sh
Windows/Mac users can just manually run the adb commands and it should work fine.

joeykrim said:
if you use toast's kernel source released here, you can compile a working kernel with ext4 support ... just throwing out ideas cuz i'd hate to see you stop with your progress!
Click to expand...
Click to collapse
Well, I compile kernels all the time for my laptop and Myth boxes. Is there a bit of a how-to for compiling the kernel for ARM and install it/replace the current kernel. It's be nice to find out how-to on how to make an update.zip to provide the install for everyone else as well.

Related

Testers needed - latest busybox compiled for Android

PLEASE NOTE: THIS THREAD IS NOW OBSOLETE, BUSYBOX COMES WITH JUST ABOUT EVERY COOKED ROM
Hi all,
This is my first attempt at compiling anything for the android platform. My reason for doing this is whilst the busybox version does what we need it to do when rooting our HTC Dream's / G1's, as an everyday app it fails because it segfaults all the time.
This isn't a dig at Benno because to be honest, he's a bit of a hero for compiling it the first time round, without him it would have been a lot harder (if not impossible) to root our G1's.
Problem is, his version of busybox was compiled over a year ago (14 nov 2007 if his blog is anything to go by) and segfaults quite a lot (probably because it wasn't compiled for the G1, but more for the Android emulator), particularly if you try and do "ls -al"..
So what I've done is I've compiled the latest stable version of busybox (1.13.1 as of 14 December 2008) for the G1, I've tested this on my own G1 and it seems to work fine, but I could do with some help extensively testing it.
You can grab it here (for G1: long press -> save, for other browsers: right click -> save as / save target)
Installation Instructions:
Download the above file to your G1, it should be saved as /sdcard/download/busybox2.asc
(if you downloaded it with the G1 browser that is, otherwise please copy it to your G1's SD card to that exact path / name)
Remount your /system partition with this command:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
Copy the busybox binary into the /system/bin/ folder by running this command:
Code:
dd if=/sdcard/download/busybox2.asc of=/system/bin/busybox
Set the busybox binary as executable with suid bit by running this:
Code:
chmod 4755 /system/bin/busybox
Remount your /system/bin partition as read only again (unless you want to create more shortcuts) by doing the following:
Code:
mount -o remount,ro /dev/block/mtdblock3 /system
And thats it! Please test it as thoroughly as you can and let me know in this post if you have any problems
Ps. I take no responsibility for any damage that occurs directly or indirectly from using this program. Although I will try and make amends if something doesn't work as expected, you must acknowledge that you are solely responsible for your actions when modifying the filesystem of your G1.
Please note, this version is compiled as follows:
* It is compiled against regular libC so is 1.8MB big
* It is compiled with the soft links options
I'm investigating compiling it against uClibC to get the size down dramatically, and compiling it with a seperate set of options so it auto-identifies when to use itself when you're shell is busybox sh.
Appears to have installed alright! Haven't had a chance to test it out otherwise, but I'll let you know if my phone explodes.
Excellent going through it now!!!
Thank you!
anybody else get
Code:
/system/bin/busybox: write error: no space left on device, 1045+0 records in , 1044+0 records out, then the speed stats
Im just gonna chmod it anyway, I wonder which file it forgot?
man all my G1 hack went smooth till I tried the market cache move, i got 1 file and 100 force closes, tried moving them back to no avail..HARD RESET, now I messed up this one somehow, Its par for my course these days, f'it...
bhang
edit:
I reran the "dd" command after I freed up almost a meg and it output same write error: no space left on device 1+0 records in 0+0 out, looks like it copied the last file I missed in the first run? do I need to chmod everything again since I dunno which 1 of the files it may have been..
on second thought 'dd' looks like it may have realized it only needed the 1 file but still needed more room cause 0+0 out, I dunno im confused any advice?
good work
installed successfully. so far no problems. does this new version contain commands not found in the previous versions, ie/ the version JesusFreke used in modified rc30 v1.2 (Sauriks' version from here: http://www.telesphoreo.org/pipermail/g1-hackers/2008-November/000032.html)?
edit: just realized that the previous ver i had installed was 1.12.2 (2008-11-16)
I think JesusFreke was compiling the bionic version last night. Might wanna check on that before you spend your time doing if it you have not already.
Darkrift said:
I think JesusFreke was compiling the bionic version last night. Might wanna check on that before you spend your time doing if it you have not already.
Click to expand...
Click to collapse
uninstall is just as easy as installing
-beers!
Bhang, have you installed anything else on your /system partition bar the stock files?
I'm working on a solution at the moment that moves all this to the /data partition to provide some more usability. For now I suggest you delete busybox from /system/bin/ so you don't fill up your /system partition.
syntax?
I could not quite get this to work as stated. I am no command line expert, so I guessed at what might work. I did the following:
Instead of this:
mount -o remount, rw /dev/block/mtdblock3 /system
I did this:
mount -o remount, -rw /dev/block/mtdblock3 /system
At the last I did this:
mount -o remount, -r /dev/block/mtdblock3 /system
Then I rebooted. Everything seems fine. I looked up some busybox commands, but they don't seem to do anything. Any way to know for sure?
my bad, it works!
Excuse a noob, I didn't know you had to type "busybox" in front of the command...
Hi, the link is down, can someone please re-upload? Thank you .
Please note, this is now obsolete as busybox comes with just about every other ROM out there.
foxdie said:
Please note, this is now obsolete as busybox comes with just about every other ROM out there.
Click to expand...
Click to collapse
Unfortunitally there have been people releasing versions without busybox recentl for the mytouch series mainly and we need a good version of Busybox if possible
Hi,
I know that, but I'm having problems getting SUFBS (http://forum.xda-developers.com/showthread.php?t=530271) to work correctly. I read through the thread and someone tried your busybox and it worked. Also, the one I have (using myhero 0.0.7) is using 1.8.1.
You can actually rip the busybox binary out of any of the roms that come with it.
Any instructions? It'd be simpler if foxdie's busybox is re-uploaded though. Thanks!
Wysie said:
Any instructions? It'd be simpler if foxdie's busybox is re-uploaded though. Thanks!
Click to expand...
Click to collapse
try this out, it's what i used http://benno.id.au/blog/2007/11/14/android-busybox
http://www.busybox.net/downloads/snapshots/busybox-snapshot.tar.bz2
can anyone please compile the latest source or explain how to do this with windows and visual studio?
I tried to build busybox latest with android bionic lib and gave up on passwd.
I had problems with bionic umtp, no strchrnul in string.h and no pw_gecos in passwd.
I can not understand how other busybox builds where able to get build. Any experiances?
EDIT: Doh, stupid me. I made 2 big mistakes. I will give it a new try with an other compile.
EDIT2: wich lib was taken to compile busybox? androids c lib bionic was not possible for me.

Can't install Debian in CUPCAKE system?

i have rooted, and flash Haykuro's cupcake on my G1!
but i can't use the command as root in the terminal , like Chmod .
so i can't install Debian in my gphone now, Who has the solution to help me ?
ghostwalker makes a *.img file ,can we install Debian in our SD card's ext2 partition? can we make it ?
Thanks everyone who have noticed my question!
swyws said:
i have rooted, and flash Haykuro's cupcake on my G1!
but i can't use the command as root in the terminal , like Chmod .
so i can't install Debian in my gphone now, Who has the solution to help me ?
ghostwalker makes a *.img file ,can we install Debian in our SD card's ext2 partition? can we make it ?
Thanks everyone who have noticed my question!
Click to expand...
Click to collapse
It would be best to reply in this topic: Installing Debian + blahblah
The Debian installation has not been tested with Haykuro's builds.
zeezee said:
It would be best to reply in this topic: Installing Debian + blahblah
The Debian installation has not been tested with Haykuro's builds.
Click to expand...
Click to collapse
thank you all the same, I've tried as you say!
But my problem is i can't use the command like "chmod 4755 *"
so i can't install Debian
I was install Debian in JF's RC33 1.42. and have no problem!
You could also try this, not an installer but all the steps.
Debian & Android
zeezee said:
You could also try this, not an installer but all the steps.
Debian & Android
Click to expand...
Click to collapse
without root my file, what can i do with debian?
chmod my file as root is the first step!
zeezee said:
You could also try this, not an installer but all the steps.
Debian & Android
Click to expand...
Click to collapse
Won't work. I already tried it. For more info, check out the thread that I posted.
swyws said:
without root my file, what can i do with debian?
chmod my file as root is the first step!
Click to expand...
Click to collapse
Without root you cant do anything.
zeezee:
I think by "root my file", he means SUID...
swyws:
Try running "busybox chmod 4755 *" instead of "chmod 4755"... just to see if busybox can do it
Also, as long as YOU'RE root, whatever you run will have root privs (and SUID won't be necessary)... so chmod 755 * should do
And as a last thing, the other guide zeezee linked to doesn't set suid either (thats a step-by-step of the installation process, while the one you follow is automated).
Hope that helps

[APP] Zipalign binary and script - Optimize installed applications

Hey everyone,
wesgarner said:
Zip Align reduces the amount of RAM used during processing running for a major speed increase in running the apps: http://developer.android.com/guide/developing/tools/zipalign.html
Click to expand...
Click to collapse
I had been messing about with a script to pull apks off my phone, zipalign them and then push them back, but then I saw wesgarner's CM build with a binary and script for use on your phone. I don't really want to mess round with flashing a ROM just for that though, so I've ripped them out and uploaded them below. Another reason is I want to run this manually (with GScript) rather than on boot (as it does in wesgarner's ROM).
I take no credit for this, the binary and script were both taken from wesgarner's CM buiild.
To "install" this, just adb push the two files in the zip below onto your phone with:
Code:
adb shell mount -o remount,rw /system
adb push zipalign /system/bin
adb push zipalign_apks /system/sd/zipalign_apks.sh
adb shell chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
adb shell mount -o remount,ro /system
Then anytime you want to run the script just do:
Code:
adb shell sh /system/sd/zipalign_apks.sh
Or in terminal:
Code:
su
sh /system/sd/zipalign_apks.sh
Has been tested on CM 4.2.7.1
ZipAlign
senab said:
Hey everyone,
I had been messing about with a script to pull apks off my phone, zipalign them and then push them back, but then I saw wesgarner's CM build with a binary and script for use on your phone. I don't really want to mess round with flashing a ROM just for that though, so I've ripped them out and uploaded them below. Another reason is I want to run this manually (with GScript) rather than on boot (as it does in wesgarner's ROM).
I take no credit for this, the binary and script were both taken from wesgarner's CM buiild.
To "install" this, just adb push the two files in the zip below onto your phone with:
Code:
adb shell mount -o remount,rw /system
adb push zipalign /system/bin
adb push zipalign_apks.sh /system/sd
adb shell chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
adb shell mount -o remount,ro /system
Then anytime you want to run the script just do:
Code:
adb shell /system/sd/zipalign_apks.sh
Or in terminal:
Code:
su
sh /system/sd/zipalign_apks.sh
Has been tested on CM 4.2.7.1
Click to expand...
Click to collapse
i do not even know what zipalign does .. but i did add this to my script
# lucid -z
so .. what does it do exactly?
Sweet... Thanks...
I was surprised that more than half of the Apps I have were already ZipAligned...
LucidREM said:
i do not even know what zipalign does .. but i did add this to my script
# lucid -z
so .. what does it do exactly?
Click to expand...
Click to collapse
APKs (as you probably already know) are just zip files. zipalign simply aligns the APK on 4-byte boundaries which Android is more efficient wrt memory access.
You can read more from Jean-Baptiste Queru at http://android-developers.blogspot.com/2009/09/zipalign-easy-optimization.html
Vermithrax said:
Sweet... Thanks...
I was surprised that more than half of the Apps I have were already ZipAligned...
Click to expand...
Click to collapse
Since the 1.6 SDK was released, the ADT does this automatically on APK export. Therefore any app which has been updated since ~September (and was developed using the ADT Eclipse plugin) will be zipalign'd. I was more surprised that 12 out of the 43 apps on my phone weren't aligned!
ZipAlign
senab said:
APKs (as you probably already know) are just zip files. zipalign simply aligns the APK on 4-byte boundaries which Android is more much efficient wrt memory access.
You can read more from Jean-Baptiste Queru at http://android-developers.blogspot.com/2009/09/zipalign-easy-optimization.html
Click to expand...
Click to collapse
that's awesome .. thanks for the link .. i hadn't read about that
Thanks much for this!
Here is a simple gscript to install zipalign after a wipe or new build flash.
You must first create directory /sdcard/zipalign and place zipalign from the zip in the OP there. Path to the file should now be /sdcard/zipalign/zipalign.
Place this script in your gscript folder (after removing .txt from the name) and load it in gscript with su permissions.
I also find it easier to run the script in the zip from the OP in Gscript as well. Instead of placing it in /system/sd run this (assumes zipalign_apks.sh is at root of C:\)
Code:
adb remount
adb push C:\zipalign_apks.sh /sdcard/gscript/zipalign_apks.sh
Then just load it into Gsrcipt with su permissions as with the other script.
Easiest of all may just be to use the commands within Lucid's script. But, I'm comfortable with Gscript, and I can make it 2 clicks away.
EDIT: First execution, you may want to run the original way, because guess what? Gscript isn't zipaligned. But it worked fine just the same.
worked great thanks.
Thanks. I didn't want to flash whole ROM to zipalign apps, so script was very handy.
Actually I've zipaligned only 2 apps, one of them was everybody loved Linda
so anyone wanna bless me with a terminal code to install the script?
garz said:
so anyone wanna bless me with a terminal code to install the script?
Click to expand...
Click to collapse
Read, its on the first post....xD
ZipAlign
garz said:
so anyone wanna bless me with a terminal code to install the script?
Click to expand...
Click to collapse
# lucid -z
yeah so su? then #lucid -z? cause that did nothing for me...
LucidREM said:
i do not even know what zipalign does .. but i did add this to my script
# lucid -z
so .. what does it do exactly?
Click to expand...
Click to collapse
I put a quick explanation of my script on my ROM page: here ya go (rough explanation)
Zip Align reduces the amount of RAM used during processing running for a major speed increase in dex-opt and running the apps, along with the RAM hack and a CC (or your userinit) boots speeds incredibly and better usability of apps (boot and system) in Android: http://developer.android.com/guide/d.../zipalign.html
Most developers have not used this yet (CM does ZipAlign his apps), but this does for the system apps provided from the now old Google Apps
Click to expand...
Click to collapse
senab said:
Since the 1.6 SDK was released, the ADT does this automatically on APK export. Therefore any app which has been updated since ~September (and was developed using the ADT Eclipse plugin) will be zipalign'd. I was more surprised that 12 out of the 43 apps on my phone weren't aligned!
Click to expand...
Click to collapse
Agreed. The Market won't let non-zipaligned apps be uploaded.
AndroidAppCritic said:
Agreed. The Market won't let non-zipaligned apps be uploaded.
Click to expand...
Click to collapse
it will really, it doesn't detect the diff
Also, SDK4 didn't really include an enforced ZipAlign like SDK5 (eclair) does
Plus I built the ZipAlign from source from eclair - so this script may not update them all perfectly
garz said:
yeah so su? then #lucid -z? cause that did nothing for me...
Click to expand...
Click to collapse
Unzip the files to your SD Card, then:
Code:
su
mount -o remount,rw /system
mv /sdcard/zipalign /system/bin
mv /sdcard/zipalign_apks /system/sd/zipalign_apks.sh
chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
mount -o remount,ro /system
Post deleted becoz it was redundant
can someone make a script for windows or a bat file that can zipalign a batch of apks? I am not that ofay with line commands and when i create a new theme (which i often do), i then have to go and zipalign every single apk i have altered 1 at a time..... i do:
Code:
zipalign -f -v 4 E:\app\theapp.apk E:\app\theapp.apk.out
senab said:
Unzip the files to your SD Card, then:
Code:
su
mount -o remount,rw /system
cp /sdcard/zipalign /system/bin
cp /sdcard/zipalign_apks.sh /system/sd
chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
mount -o remount,ro /system
Click to expand...
Click to collapse
This isnt working for me bc of the .sh after zipalign_apks .. do i rename the zipalign_apks to zipalign_apks.sh after unzipping?
edit:that worked THANKS!

Simple (not one-click) root for stock ROM & kernel

Update: One click root has been using this "simple" method since version 2.2.7. If you're rooting your phone for the first time, please try that first. Consider this thread to be purely informational for those who want step-by-step details of how the process works.
I've been suspicious of the joeykrim root method since it was first posted at SDX. I finally got my Epic yesterday and confirmed that is, indeed unnecessary. I don't fault joeykrim though, he ported the working root method from the Moment to the Epic without actually having access to an Epic himself.
Anyways, the joeykrim root method is unnecessarilly complex becuase it works around an RFS permissions bug which loses the setuid bit on the Moment. It appears the Galaxy S phones have this bug fixed, which is why the root methods on the I9000, Vibrant, Captivate, Fascinate, etc., are much simpler.
So, for the simple root:
First, make sure joeykrim root is not installed.
Upgrade to DI18 (not strictly necessary, but you'll want to do it).
Setup a working adb from the Android SDK and whatever drivers are necessary for your platform.
Download rageagainstthecage-arm5.bin from the C skills blog (link removed due to my newbieness) or from any of the one-click root packages.
Download su-2.3.6.1-ef-signed.zip and extract "system/bin/su" and "system/app/Superuser.apk" to a temporary directory you'll be working from.
Enable USB debugging on your phone and connect it to your computer.
Now, open a command prompt/shell on your computer and cd to the appropriate temporary directory. Run:
Code:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
adb shell /data/local/tmp/rageagainstthecage-arm5.bin
and confirm you have a working root shell. Then continue with:
Code:
adb push su /system/xbin
adb shell chmod 4755 /system/xbin/su
adb install Superuser.apk
That's it! You should have a working root via su & the Superuser package. At least, I did.
Note that the preceeding steps installs Superuser.apk to /data, which is what I prefer to do. This means if you do a "Factory data reset" su will be temporarilly broken until you reinstall the Superuser.apk package. Since installing the package itself doesn't require root, this is easily done after a /data reset.
Also note that I did not perform a /system remount-rw anywhere. At least on my Epic, /system appears to always be mounted read-write so it's an unnecessary step. It's actually the "joeykrim-root.sh" script that remounts /system read-only during the boot process, which is why folks who don't use root kernels have run into this problem before. I'm not sure why joeykrim's script does that, I guess he probably assumed /system is mounted read-only by default. There's arguments that /system should be read-only, but I didn't touch it in case some Samsung stuff depends on it being read-write.
Finally, if you're already rooted via joeykrim or are running a root kernel, there's nothing really to be gained by doing this. I'm just throwing this out there as I perfer to make the minimum invasive changes possible to obtain root.
Wow, that was really informative. To check for Super user you:
Type: adb shell
then type: SU
You should get a # sign if you have root. Correct?
In the original Noobln post method would the Epic keep root even after a wipe therefore not needing to re-apply the superuser apk again? That might be a reason why folks would want to go the more invasive route (considering rooters seems to change ROMS fairly often which requires wipes sometimes). Either way, keeping a copy of the apk file on your SD card is no big deal.
mkasick said:
Also note that I did not perform a /system remount-rw anywhere. At least on my Epic, /system appears to always be mounted read-write so it's an unnecessary step. It's actually the "joeykrim-root.sh" script that remounts /system read-only during the boot process, which is why folks who don't use root kernels have run into this problem before. I'm not sure why joeykrim's script does that, I guess he probably assumed /system is mounted read-only by default. There's arguments that /system should be read-only, but I didn't touch it in case some Samsung stuff depends on it being read-write.
Click to expand...
Click to collapse
This explains a lot of problems! thanks
EDIT- another noob question- why do you prefer to have superuser installed to /system/data- why not put it in /system/app? Also if I want to install busybox where is the best location to put it?
ZenInsight said:
Wow, that was really informative. To check for Super user you:
Type: adb shell
then type: SU
You should get a # sign if you have root. Correct?
Click to expand...
Click to collapse
Once you run rageagainstthecage-arm5.bin, you should get a root-shell automatically every time you run "adb shell" after until you reboot the phone. Yes, you can tell it's a root shell since it uses the "#" prompt. This is the important part to check, since if the exploit doesn't work, you'll have to run it again. But I haven't seen it not work.
After su is installed and you reboot, your steps are correct: run "adb shell", run "su", then you'll be prompted on the phone scren to authorize access and once you allow it you'll end up with a "#" prompt.
ZenInsight said:
In the original Noobln post method would the Epic keep root even after a wipe therefore not needing to re-apply the superuser apk again?
Click to expand...
Click to collapse
noobnl installs Superuser.apk to /system, you can do that here too. Just replace the "adb install Superuser.apk" step with "adb push Superuser.apk /system/app". It's independent of the joeykrim scripts.
With my captivate we have many update.zip root methods to choose from. Any chance this will be coming to the epic? Have a friend with an epic and command lines would be too much and one click didn't work.
Sent from my SAMSUNG-SGH-I897 using XDA App
jimmyz said:
why do you prefer to have superuser installed to /system/data- why not put it in /system/app?
Click to expand...
Click to collapse
I prefer to keep consistent with the idea that user-installed applications go in /data, and stock-installed-and-unmodified applications remain in /system/app. This way, upgrading Superuser.apk doesn't require a root-shell/root-explorer, you can remove it or upgrade it the way you do with any user installed application--adb install, side-loading via an sdcard, or downloading it from the market.
Plus, in general I prefer to keep my /system as untouched as possible. For example, I don't remove stock apps either. The "su" binary has to be installed in /system to persist after a /data wipe, and busybox is best installed to /system so it's in PATH (haven't looked into modifying the default PATH yet). Otherwise I try to keep /system alone.
jimmyz said:
Also if I want to install busybox where is the best location to put it?
Click to expand...
Click to collapse
Android's default PATH provides four places for busybox to be installed: /sbin, /system/bin, /system/sbin, and /system/xbin. /sbin is part of the initramfs, in other words it's controlled by the kernel you're running. You can install busybox to any of the three /system/*bin directories, but I prefer /system/xbin.
In the traditional Unix conventions, "/usr/bin" is for user-runnable stock-installed programs, and "/usr/sbin" is for root-requiring (superuser-runnable) stock-installed programs. "xbin" isn't part of the standard convention, but I'd guess it's intended for "extra binaries" that are not part of the stock installation (much like /usr/local/bin), thus it seems like an appropriate location for a user-added "su" and "busybox" programs.
The second reason is that "xbin" is relatively empty, so if you want to create the applet symlinks (i.e., so that you can call "cp" instead of "buybox cp") it won't overwrite the stock toolbox symlinks. Also, since "xbin" is last on the default PATH, any programs provided by both toolbox and busybox will default to the toolbox version--which would be important for stock system scripts that might run into compatibility issues if they were to use the busybox versions instead.
To install busybox, grab a copy of the binary from somewhere (one click packages, a copy of stericson.busybox.apk, etc.). Then, once rooted run:
Code:
adb push busybox /data/local/tmp
adb shell
su # Authorize on phone screen
cat /data/local/tmp/busybox > /system/xbin/busybox
chown root.shell /system/xbin/busybox
chmod 755 /system/xbin/busybox
rm /data/local/tmp/busybox
/system/xbin/busybox --install -s /system/xbin
jhnstn00 said:
With my captivate we have many update.zip root methods to choose from. Any chance this will be coming to the epic?
Click to expand...
Click to collapse
I don't believe so. The I9000/Vibrant/Captivate have recoveries that don't check the signature of update.zip (as I understand, or maybe they do but only require test keys) which makes rooting-via-recovery possible. Unfortuntaely the Epic and Fascinate do perform signature checks, so we can't enable root via stock-recovery.
That said, the Fascinate one-click methods should also work on the Epic. Although depending on why your friend couldn't get the Epic one-click to work, the Fascinate one may not work either.
mkasick said:
I prefer to keep consistent with the idea that user-installed applications go in /data, and stock-installed-and-unmodified applications remain in /system/app. This way, upgrading Superuser.apk doesn't require a root-shell/root-explorer, you can remove it or upgrade it the way you do with any user installed application--adb install, side-loading via an sdcard, or downloading it from the market.
Plus, in general I prefer to keep my /system as untouched as possible. For example, I don't remove stock apps either. The "su" binary has to be installed in /system to persist after a /data wipe, and busybox is best installed to /system so it's in PATH (haven't looked into modifying the default PATH yet). Otherwise I try to keep /system alone.
Android's default PATH provides four places for busybox to be installed: /sbin, /system/bin, /system/sbin, and /system/xbin. /sbin is part of the initramfs, in other words it's controlled by the kernel you're running. You can install busybox to any of the three /system/*bin directories, but I prefer /system/xbin.
In the traditional Unix conventions, "/usr/bin" is for user-runnable stock-installed programs, and "/usr/sbin" is for root-requiring (superuser-runnable) stock-installed programs. "xbin" isn't part of the standard convention, but I'd guess it's intended for "extra binaries" that are not part of the stock installation (much like /usr/local/bin), thus it seems like an appropriate location for a user-added "su" and "busybox" programs.
The second reason is that "xbin" is relatively empty, so if you want to create the applet symlinks (i.e., so that you can call "cp" instead of "buybox cp") it won't overwrite the stock toolbox symlinks. Also, since "xbin" is last on the default PATH, any programs provided by both toolbox and busybox will default to the toolbox version--which would be important for stock system scripts that might run into compatibility issues if they were to use the busybox versions instead.
To install busybox, grab a copy of the binary from somewhere (one click packages, a copy of stericson.busybox.apk, etc.). Then, once rooted run:
Code:
adb push busybox /data/local/tmp
adb shell
su # Authorize on phone screen
cat /data/local/tmp/busybox > /system/xbin/busybox
chown root.shell /system/xbin/busybox
chmod 755 /system/xbin/busybox
rm /data/local/tmp/busybox
/system/xbin/busybox --install -s /system/xbin
Click to expand...
Click to collapse
You sir are a true gentleman! Thank you for the informative answers- its great to have you over here! I have one more question- why can't I usually push directly to /system ?
jimmyz said:
why can't I usually push directly to /system ?
Click to expand...
Click to collapse
Pushing directly to /system requires running the adb service on the phone as the root user, so that it has permissions to write to that directory. Usually adb runs on the phone unprivileged, so you can only push to world-writable directories.
Running rageagainstthecage-arm5.bin actually changes this. The exploit forces the adb service to run as the root user, which is why "adb shell" gives you a root shell and "adb push" to /system does work, until the phone is restarted.
Interesting enough, the adb service also runs as root by default in the Android emulator. So there's probably a configuration setting, somewhere, to make it do that. In general it's safer to run adb unprivileged though, and "su" to move files to /system once uploaded elsewhere on the phoe.
mkasick said:
Pushing directly to /system requires running the adb service on the phone as the root user, so that it has permissions to write to that directory. Usually adb runs on the phone unprivileged, so you can only push to world-writable directories.
Running rageagainstthecage-arm5.bin actually changes this. The exploit forces the adb service to run as the root user, which is why "adb shell" gives you a root shell and "adb push" to /system does work, until the phone is restarted.
Interesting enough, the adb service also runs as root by default in the Android emulator. So there's probably a configuration setting, somewhere, to make it do that. In general it's safer to run adb unprivileged though, and "su" to move files to /system once uploaded elsewhere on the phoe.
Click to expand...
Click to collapse
I am learning a lot!!! Could you take a look at koush's kernel here, with it I noticed that when using adb I got the # prompt right away and was able to push to /system- maybe he was able to figure out the config settings? Once again thanks!!!
one more ? (feel free to ignore this one) what actually happens when you do
Code:
adb shell /data/local/tmp/rageagainstthecage-arm5.bin
and how does that give you permanent root?
mkasick said:
Pushing directly to /system requires running the adb service on the phone as the root user, so that it has permissions to write to that directory. Usually adb runs on the phone unprivileged, so you can only push to world-writable directories.
Running rageagainstthecage-arm5.bin actually changes this. The exploit forces the adb service to run as the root user, which is why "adb shell" gives you a root shell and "adb push" to /system does work, until the phone is restarted.
Interesting enough, the adb service also runs as root by default in the Android emulator. So there's probably a configuration setting, somewhere, to make it do that. In general it's safer to run adb unprivileged though, and "su" to move files to /system once uploaded elsewhere on the phoe.
Click to expand...
Click to collapse
It is indeed a config option in default.prop. However, this is in the initramfs and you can't change it on the fly, so you need to rebuild the kernel to change it. With some work you can modify the stock kernel to do it, but I personally haven't tried it.
Sent from my Epic 4G using XDA App
Thank you, this worked perfectly for me, running stock DI18 ROM that I flashed tonight!!! I confirmed by installing the wireless tethering pre-9 apk, and successfully ran the wireless tethering without any errors.
Quick question: do we need to do this after root or is it not needed?
NEEDED?? ===> SuperUser App to help with Security Concerns for the Epic - h**p://forum.sdx-developers.com/epic-development/superuser-app-to-help-with-security-concerns/
Also, Titanium Backup failed to work - it gave an error of denied root access, and said busybox was not installed. What needs to be done to make it work? Do I need to install clockwork mod (not exactly sure what it does though) or a custom ROM?
AndroidSPCS said:
Quick question: do we need to do this after root or is it not needed?
Click to expand...
Click to collapse
Not sure exactly what you're asking. This is an alternative to the joeykrim-based one-click roots and rooted kernels. If you already have one of those this isn't really necessary.
AndroidSPCS said:
NEEDED?? ===> SuperUser App
Click to expand...
Click to collapse
Yes, the su binary used here requires the Supruser appto be installed to authorize su requests. Otherwise they'll always be denied. Other su binaries might not require it, but then all apps have root access which isn't really a good thing.
AndroidSPCS said:
Also, Titanium Backup failed to work - it gave an error of denied root access, and said busybox was not installed. What needs to be done to make it work?
Click to expand...
Click to collapse
Did you authorize Titanium Backup when the Superuser prompt came up (requies the Superuser app to be instald too)?
Titanium Backup has an option to download and install it's preferred version of busybox. Follow the prompts to do that.
mkasick said:
Not sure exactly what you're asking. This is an alternative to the joeykrim-based one-click roots and rooted kernels. If you already have one of those this isn't really necessary.
Click to expand...
Click to collapse
Thanks, actually this was referring to the thread where the instructions for going to adb shell or terminal and typing in the following commands:
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
cp /system/bin/su /system/bin/jk-su
exit
Yes, the su binary used here requires the Supruser appto be installed to authorize su requests. Otherwise they'll always be denied. Other su binaries might not require it, but then all apps have root access which isn't really a good thing.
Click to expand...
Click to collapse
Yes same as above, the question is not whether we need SU app (I know we do), but whether we needed to type the additional commands:
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
cp /system/bin/su /system/bin/jk-su
exit
What do these commands do? It seems to me my Superuser app is working fine with wifi tether - popping up with allow / disable permission boxes, etc. Do these commands add something else to Superuser?
Did you authorize Titanium Backup when the Superuser prompt came up (requies the Superuser app to be instald too)?
Titanium Backup has an option to download and install it's preferred version of busybox. Follow the prompts to do that.
Click to expand...
Click to collapse
There was no Superuser prompt during the install of the app, nor anytime when it said it had a failure with root access. However there is an option to install BusyBox, which I have not done yet, because I am not sure what busybox is, or what it does. I'd like to find out why I need it and what it does, so I can feel comfortable with installing it.
Thanks again.
echo "root::0:0:root:/data/local:/system/bin/sh" > /etc/passwd
echo "root::0:" > /etc/group
you need to do that in a shell to make sure su works properly.
I'm updating the one click root right now to be less silly.
http://forum.xda-developers.com/showpost.php?p=8543226&postcount=455
I just cleaned up the one click root to not do many of the silly things joeykrim's root does. It also means your system will be mounted as rw after a reboot and it won't overwrite your su with jk-su every boot (no more modified playlogo).
Cleaned up all the old stuff from the root so it should work fine even if you were using one of the older one clicks. I made sure su works, incl titanium backup.
I'm still installing superuser.apk to /system/app because I think it belongs there.
Thanks for doing the footwork, mkasick!
Firon said:
http://forum.xda-developers.com/showpost.php?p=8543226&postcount=455
I just cleaned up the one click root to not do many of the silly things joeykrim's root does. It also means your system will be mounted as rw after a reboot and it won't overwrite your su with jk-su every boot (no more modified playlogo).
Cleaned up all the old stuff from the root so it should work fine even if you were using one of the older one clicks. I made sure su works, incl titanium backup.
I'm still installing superuser.apk to /system/app because I think it belongs there.
Thanks for doing the footwork, mkasick!
Click to expand...
Click to collapse
Firon- why are these lines still needed?
Code:
adb push playlogo /system/bin/playlogo
what is playlogo? Does this just put the stock one back in case you used the joeykrim method in the past?
Code:
adb push remount /system/xbin/remount
Are the remount scripts still needed?
Code:
adb shell ln -s /system/xbin/su /system/bin/su
why is this link needed? why cant su just be in xbin
thanks in advance!
Code:
jimmyz said:
Firon- why are these lines still needed?
Code:
adb push playlogo /system/bin/playlogo
what is playlogo? Does this just put the stock one back in case you used the joeykrim method in the past?
Click to expand...
Click to collapse
This is just pushing the stock playlogo, since joeykrim's method overwrites it with some custom script.
Code:
adb push remount /system/xbin/remount
Are the remount scripts still needed?
Click to expand...
Click to collapse
The script allows you to easily remount system as ro or rw at will. Why not?
Code:
adb shell ln -s /system/xbin/su /system/bin/su
why is this link needed? why cant su just be in xbin
Click to expand...
Click to collapse
I don't know if any apps depend on it being in a particular location. It is in xbin, but I'm also linking it to /system/bin to be safe.
AndroidSPCS said:
What do these commands do? It seems to me my Superuser app is working fine with wifi tether - popping up with allow / disable permission boxes, etc. Do these commands add something else to Superuser?
Click to expand...
Click to collapse
These commands were necessary to get Superuser working with the old joeykrim root method. They're not necessary with this method (or the newly released one-click). In other words, if wifi-tethering is already working for you, nothing further is needed to be done.
AndroidSPCS said:
There was no Superuser prompt during the install of the app, nor anytime when it said it had a failure with root access.
Click to expand...
Click to collapse
I don't actually use TitaniumBackup. I'm not sure why its superuser-requirements would be different from other apps, but I guess it is. The new one-click appears to address this.
AndroidSPCS said:
However there is an option to install BusyBox, which I have not done yet, because I am not sure what busybox is, or what it does. I'd like to find out why I need it and what it does, so I can feel comfortable with installing it.
Click to expand...
Click to collapse
Busybox is a suite of "familar" Unix command-line utilites (things like cp (copy), mv (move), ls (list), etc.). It targets embedded platforms by being very featureful, yet relatively small. It's installed and used on a wide variety of embedded devices including wireless routers, print servers, phones, even televisions.
Oddly enough, Android does not include busybox by default. Instead it comes with it's own utility-programs-package called "toolbox" that isn't nearly as featureful, and quickly becomes a pain to use. Some programs, like TitaniumBackup depend on busybox programs/features, and thus require it's installation. It's safe.
The only problem with busybox is that there's not one single version of it. There's multiple builds of it from the same source code with different sets of features turned on and off. In the past, some folks had a version of busybox installed that didn't contain all the features necessary to support TitaniumBackup, so they added the option to install their own version. It's installed in a separate location, so it won't overwrite any version you do have installed, and it's safe to do. But if you've already installed another version of busybox that does work, then it may be unnecessary.
I did the Jokeyrim method a few days ago. I installed a new kernal and now a new ROM. All seems ok, but ow when I do the "whoami" command in adb shell I get whoami not found. I don't think I'm really rooted anymore. Any attempt to reinstall the Jokeyrim root script results in failure (mostly "device not found" errors). When in adb shell, most commands I type now are either "not found" or "permission denied", so I'm not confident that I'm really rooted now.
Since I have / had Jokeyrim installed, how can I "uninstall" it so that I can use this method of rooting instead? BTW, the newest Clockworkmod is installed and working.
Do I need to flash to stock first? Sorry, but I'm a VERY STOOPID NOOB.

[MOD][HOW TO][Update: 05-Aug-2011] 2nd-init port for Milestone2

Credit for koush for Droid2 Bootstrap
Credit for edgardcastro for sharing lots of information about 2nd-boot on Milestone1
Credit for Skrilax_CZ for 2nd-init and sh hijack
If you just want to install 2nd-init on your phone you can skip the whole guide and flash update-2nd-init.zip into your phone. As usual I will not hold responsibility to any damages it may cause.
WARNING: Use this ONLY if you know exactly what you are doing. This guide will make major changes in the /system partition and may turn the phone inoperative. I won’t hold responsibility if you brick your phone or to any damages it may cause.
Pre-requisites: A computer with Android SDK and ADB drivers installed and working. It’s recommended to have RSD Lite 4.9 and the appropriate SBF image just in case anything goes wrong.
This guide was made using a Brazilian Motorola Milestone2 based on Brazil Retail SBF and a computer running Windows Vista 32-bits. I started it from the scratch by flashing my phone with RSD Lite 4.9 and performing a full data/cache wipe, just to make sure any changes were discarded.
Note: Commands that should be entered in command prompt will be listed as: “C:\> <command>”. Commands issued to ADB Shell will be listed as: “# <command>”.
1. Enable USB Debugging on your phone;
2. Get permanent root. I used the app z4root which can be found here on XDA;
3. Install Droid2 Bootstrap. It may be downloaded from Market to support the developer. More info here http://www.koushikdutta.com/2010/08/droid-x-recovery.html;
4. Open Droid2 Bootstrap and click “Bootstrap Recovery”;
5. Use bootstrap to reboot into Clockwork Recovery and backup your phone;
6. Reboot;
7. C:\> adb remount
8. # stop
9. # mkdir /system/etc/rootfs
10. # cp /*.rc /system/etc/rootfs
11. # mkdir /system/etc/init.d
12. # cp /system/bin/sh /system/bin/_sh
13. # cp /init_prep_keypad.sh /system/bin
14. C:\> adb push sh_hijack.sh /system/bin/
15. C:\> adb push 2nd-init /system/bin/
16. C:\> adb push sysinit /system/bin/
WARNING: at this point you should keep a terminal window (adb shell) opened before replacing the 'sh' binary. This is so because you wont be able to open a new abd shell window to run the chmod command.
17. C:\> adb push sh /system/bin/
18. # chmod 755 /system/bin/sh
19. # chmod 755 /system/bin/sh_hijack.sh
20. # chmod 755 /system/bin/2nd-init
21. # chmod 755 /system/bin/sysinit
22. # ln -s /system/bin/busybox /system/xbin/mount
23. # ln -s /system/bin/busybox /system/xbin/rmdir
24. # ln -s /system/bin/busybox /system/xbin/cp
25. # ln -s /system/bin/busybox /system/xbin/umount
26. # ln -s /system/bin/busybox /system/xbin/run-parts
27. # reboot
28. At this point you should be getting into Clockwork Recovery every time, no matter how many times you have rebooted or if you’ve taken the battery of or not. THIS IS NORMAL. It means that the 2nd-boot + sh hijack is working as it should. The boots into clock recovery are caused by a conflict between sh hijack and logwrapper hijack (used by Droid2 Bootstrap). Continue the guide to fix this issue.
29. In clock recovery menu go to: mounts and storage>mount /system;
30. Open ADB Shell again (it will be available in clockwork recovery as well);
31. # cp /system/bin/logwrapper.bin /system/bin/mylogwrapper
32. C:\> adb pull /system/etc/rootfs/
33. Open init.rc and init.mapphone_umts.rc into a text editor that preserves unix end-line format (e.g.: notepad++). Find all entries of “/system/bin/logwrapper” replacing for “/system/bin/mylogwrapper”.
34. In init.mapphone_umts.rc find entry for “exec /init_prep_keypad.sh” replacing for “exec /system/bin/init_prep_keypad.sh”. Add the following text to the end of this file to be able to run all scripts in /system/etc/init.d at boot time:
Code:
service bootscripts /system/bin/sysinit
class post-zygote_services
disabled
oneshot
35. Save and close.
36. C:\> adb push init.rc /system/etc/rootfs/
37. C:\> adb push init.mapphone_umts.rc /system/etc/rootfs/
38. # chmod 755 /system/etc/rootfs/init.rc
39. # chmod 755 /system/etc/rootfs/init.mapphone_umts.rc
40. Choose “Reboot system now” in clock recovery menu;
You’re all set! Now it is just a matter of changing the rc files in /system/etc/rootfs to customize your system boot.
If you want to log the system boot you may also copy the provided log-init.sh script into /system/etc/rootfs and uncomment the line “exec /log_init.sh” from my init.rc file. Doing so will create the /data/logcat.log file that may get huge in sometime.
2nd-init files and my modified *.rc files attached.
Have fun!
UPDATED to version 2.0.0 (froyo) this version exploits /system/bin/mount_ext3.sh instead of sh binary. It's a new method I developed in order of starting 2nd-init earlier but also keeping compatibility with Droid2bootstrapper (recovery takes place first). This might help me booting Leaked GB from 2nd-init, which wasn't possible on the previous version. Take note it's not ready yet to apply on GB.
I just missed the exec /system/bin/init_prep_keypad thanks!
What is this for?
Sent from my A953 using XDA App
inheme said:
What is this for?
Sent from my A953 using XDA App
Click to expand...
Click to collapse
A method to customize initialization scripts of android system. It's a major hack used be some Milestone1 custom ROM's. I've succeeded into porting this to MS2, and I think some modders here of XDA may be interested into adding this to custom ROM's. It may be added to the stock ROM (as I did) but it is not something that everyone is willing to try.
Word of advise: If you don't know what it is you don't need it
Ok thanks for the explanation
So it means that custom roms will be easier to create?
Sent from my A953 using XDA App
That's some major news for our little community.
Tell me if I'm wrong, but since init starts after the kernel is loaded, it's not useful at all for loading a custom kernel, true?
But having a custom init script is a step to CyanogenMod 6 port on Milestone 2, still true?
Anyways, great job, and great howto.
momus87 said:
That's some major news for our little community.
Tell me if I'm wrong, but since init starts after the kernel is loaded, it's not useful at all for loading a custom kernel, true?
Click to expand...
Click to collapse
To load a custom kernel we'll need that kexec hack that team freemymoto is working on.
But having a custom init script is a step to CyanogenMod 6 port on Milestone 2, still true?
Click to expand...
Click to collapse
Well, it's possible, but I believe the big issue here is the impossibility of running custom kernels. Even so, a skilled Modder may be able to overcome that and port CM6 to MS2 using Motorola's stock kernel. It has been done for the MS1.
Anyways, great job, and great howto.
Click to expand...
Click to collapse
You're welcome.
Thanks, r2beta0... this is going to help us out a lot!
r2beta0 said:
Well, it's possible, but I believe the big issue here is the impossibility of running custom kernels. Even so, a skilled Modder may be able to overcome that and port CM6 to MS2 using Motorola's stock kernel. It has been done for the MS1.
You're welcome.
Click to expand...
Click to collapse
Guess that would be me
nah just kidding. I've just happened to have some luck porting Froyo and Gingerbread to the bootloader-locked x10 mini pro. I've just ordered my milestone 2 and I will work on CM6. AWESOME JOB on the 2nd init man! Really, thanks!!
edit: just can't stop thanking you! You saved me a lot of work and porting CM will be easy as sh*t for me now! THANKS
Mikevhl said:
Guess that would be me
nah just kidding. I've just happened to have some luck porting Froyo and Gingerbread to the bootloader-locked x10 mini pro. I've just ordered my milestone 2 and I will work on CM6. AWESOME JOB on the 2nd init man! Really, thanks!!
edit: just can't stop thanking you! You saved me a lot of work and porting CM will be easy as sh*t for me now! THANKS
Click to expand...
Click to collapse
You're welcome! You can count on me to provide as much help as I can to free our MS2's from Motorola's hand. I would be very grateful if you could share your knowledge of porting CM to locked devices. I was trying to port MIUI and Shadow mod BR to MS2 but I got stuck when dealing with proprietary files.
Sent from my A953 using XDA App
@r2beta0
Could this port work on Motorola defy?
Sent from my MOTO Defy
demolition23 said:
@r2beta0
Could this port work on Motorola defy?
Sent from my MOTO Defy
Click to expand...
Click to collapse
It's very likely, since the 2 devices are very similar. Most of the files I attached are from Milestone1 and works perfectly on MS2. Though I recommend you to NOT replace your *.rc files with the attached ones since they could be not compatible. It would be better if you edit your own files. Also try it ONLY if you have a working version of ClockworkMod Recovery (or other custom recovery). You may adapt this guide for your device and post it here on XDA, just remember to mention my name on credits
Already posted and hoping someone to port this..
http://forum.xda-developers.com/showthread.php?t=1003449
demolition23 said:
Already posted and hoping someone to port this..
http://forum.xda-developers.com/showthread.php?t=1003449
Click to expand...
Click to collapse
BTW, why do you want to use 2nd-init? You know, this guide is more inclined for devs/mods who want (need) to include this feature on their ROM's. With this you can change the way things are loaded on linux system before android starts up. But to take advantage of that you should know a lot about how linux works and so on. Regular users should look for a ROM based on the features he needs. Most ROM's already have 2nd-init implemented, but it's not something users are aware of.
Possible issue I've come across:
When replacing sh, i can no longer re-open the shell for obvious reasons... potentially I need to already have a second terminal open with shell running in it already?
SBFing and trying again :3
smacky_wolf said:
Possible issue I've come across:
When replacing sh, i can no longer re-open the shell for obvious reasons... potentially I need to already have a second terminal open with shell running in it already?
SBFing and trying again :3
Click to expand...
Click to collapse
I had no such issue here. When executing the steps of this guide I kept two windows opened all the time. One command prompt to run adb push/pull and another window running adb shell.
Thanks to point that out! I will post a warning in the main post. You should have a adb shell window already running to be able to run chmod just after replacing sh.
But don't worry, you don't need to SBF. Just reboot into clockwork recovery, mount /system via menu, and open your adb shell. It uses a different shell so you can fix the problem in /system/bin.
Looks like Motorola Defy now has CyanogenMod 7 using 2nd-init script! Wish same were the case for MS2.
syl0n said:
Looks like Motorola Defy now has CyanogenMod 7 using 2nd-init script! Wish same were the case for MS2.
Click to expand...
Click to collapse
I'm on it, but development is slow
No necessary to use 2nd init.
Just install "droid 2 bootstrap" and Rom Manager will work perfectly.
keylight65 said:
No necessary to use 2nd init.
Just install "droid 2 bootstrap" and Rom Manager will work perfectly.
Click to expand...
Click to collapse
What are you talking about? This guide isn't related to ROM Manager.

Categories

Resources