[APP] One Click Root for NS4G!

shabbypenguin

Inactive Recognized Developer
May 30, 2010
4,896
5,362
263
33
Oh, but mine was no good? :/

Sent from my Nexus S using Tapatalk
well for one man all yours did was unlock the bootloader and flash the nexus s recovery.. 3.1.0.1 is the first working version for the nexus s 4g. on a side note did you happen to look at yours compared to simon's? no?

http://pastebin.com/ge2ur1f5 yours
http://pastebin.com/eDyCi53C his

just for giggles http://pastebin.com/7A6uXjKM is mine. anyways as chris has already paid simon for it its pretty much a moot point.

so now being back on topic, i have no idea on why people are haviong this issue ive tried it on 3 different windows computers installing the drivers as i did it and yet it still flashes cwm for me. the only thing i can think to do is create a stop/go version with debugging in every line and have people figure out whats going on. but clearly the cwm isnt getting flashed which i dont know why i built a failsafe in if it cant find the recovery to end the script before it even starts...


EDIT ok i think i got it this time, please try one last time..
 
Last edited:
  • Like
Reactions: [email protected]

simon.ponder

Senior Member
May 12, 2010
192
21
0
Burlington
$0

well for one man all yours did was unlock the bootloader and flash the nexus s recovery.. 3.1.0.1 is the first working version for the nexus s 4g. on a side note did you happen to look at yours compared to simon's? no?

http://pastebin.com/ge2ur1f5 yours
http://pastebin.com/eDyCi53C his

just for giggles http://pastebin.com/7A6uXjKM is mine. anyways as chris has already paid simon for it its pretty much a moot point.

so now being back on topic, i have no idea on why people are haviong this issue ive tried it on 3 different windows computers installing the drivers as i did it and yet it still flashes cwm for me. the only thing i can think to do is create a stop/go version with debugging in every line and have people figure out whats going on. but clearly the cwm isnt getting flashed which i dont know why i built a failsafe in if it cant find the recovery to end the script before it even starts...


EDIT ok i think i got it this time, please try one last time.. if it doesnt work then perhaps simon could tell us how he got his version working
Two comments...

Chris has not paid me a dime,

and the other,

I considered getting the drivers not even a portion of the root as we all would need drivers for our phones to communicate with the computer. I never tested not having the drivers. I just supplied them.

Also, there is a different driver needed for fastboot than adb, so if the phone isn't being recognized in fastboot, your missing a driver. It's that easy. When windows looks for a driver for fastboot, tell it you know where it is at, and point to the parent directory where the Samsung drivers are located. Do not pick out a specific driver file.

...make that three comments...

I improved on the previous posters solution, as his was flashing the incorrect recovery, and never install su.

I did add to his, in the whole spirit of open source and all that.
 
Last edited:

shabbypenguin

Inactive Recognized Developer
May 30, 2010
4,896
5,362
263
33
uhh perhaps chris can enlighten us all then on who won the bounty? simon ill pm you the reason why

as for the drivers like i said man i was trying to go for an all in one. if i can get the damn batch script working then ill move onto making linux/mac versions as well.
 

chris378

Senior Member
Nov 6, 2010
118
25
0
Elizabethtown, KY
uhh perhaps chris can enlighten us all then on who won the bounty? simon ill pm you the reason why

as for the drivers like i said man i was trying to go for an all in one. if i can get the damn batch script working then ill move onto making linux/mac versions as well.
Shabby i pm you asking for your paypal info and that it would take 2 to 3 days to put the money jn my paypal lol look back on your messages

Sent from my Nexus S 4G using XDA Premium App
 

shabbypenguin

Inactive Recognized Developer
May 30, 2010
4,896
5,362
263
33
lol well some of it cant be done via commands but it is however a little nicer in that it is more of an aio then a one click :D
 

unforgiven512

Senior Member
Oct 28, 2008
226
147
0
32
Erie, PA
unforgivendevelopment.com
Eh, I can fix mine.

I just A) don't use Windows B) hate Windows and C) find bash a lot more flexible and usable then batch files on Windows

It'd be substantially easier to do things on Linux, lol. No drivers to worry about, just do:
Code:
if [[ $# != 1 ]]
then
    echo "You must enter \"crespo\" or \"crespo4g\" after ./root-ns.sh"
fi
if [[ ! -e "first_run_complete" ]]
then
    sudo touch /etc/udev/rules.d/51-android.rules
    sudo echo "SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"18d1\", MODE=\"0666\"" > /etc/udev/rules.d/51-android.rules
    sudo service udev restart
    touch first_run_complete
    echo "Setup complete. Please unplug your phone, and plug it back in. Close this terminal, open a new one, and run this same program again to root your phone."
else
    echo "Please select yes on your phone to proceed."
    ./fastboot oem unlock
    sleep 5
    if [[ $1 == "crespo" ]]
    then
        ./fastboot flash recovery recovery-nexus-s.img
        echo "Your phone is now rooted. Please install ROM Manager from the market to flash ROMs."
    elif [[ $1 == "crespo4g" ]]
        ./fastboot flash recovery recovery-nexus-s-4g.img
        echo "Your phone is now rooted. Please install ROM Manager from the market to flash ROMs."
    else
        echo "You have entered an invalid device name. Use \"crespo\" or \"crespo4g\" and try again."
    fi
fi
:)

If you seriously want me to, I'll make you a badass Windows version. Just let me know.
 

TheBurgh

Senior Member
Sep 30, 2010
1,578
195
93
Pittsburgh
Also, Whos OneClickRoot is actually working? Shabby or Simon? Because in all fairness whos ever is "Complete" and works is who should get the $100.
If this is the case then you may want to consider changing the name of the thread......difficult to justify not paying shabby when the thread says differently. Just a thought

Sent from my Nexus S 4G using Tapatalk
 

shabbypenguin

Inactive Recognized Developer
May 30, 2010
4,896
5,362
263
33
problem with your linux script is that even then it still doesnt root it, sure it gets recovery on there but if you are directing users to use rom manager, that app requires root to reboot into recovery.
 

unforgiven512

Senior Member
Oct 28, 2008
226
147
0
32
Erie, PA
unforgivendevelopment.com
There, I fixed it.

Code:
if [[ $# != 1 ]]
then
    echo "You must enter \"crespo\" or \"crespo4g\" after ./root-ns.sh"
fi
if [[ ! -e "first_run_complete" ]]
then
    sudo touch /etc/udev/rules.d/51-android.rules
    sudo echo "SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"18d1\", MODE=\"0666\"" > /etc/udev/rules.d/51-android.rules
    sudo service udev restart
    touch first_run_complete
    echo "Setup complete. Please unplug your phone, and plug it back in. Close this terminal, open a new one, and run this same program again to root your phone."
else
    echo "Please select yes on your phone to proceed."
    ./fastboot oem unlock
    sleep 5
    if [[ $1 == "crespo" ]]
    then
        ./fastboot flash recovery recovery-nexus-s.img
        echo "ClockworkMod Recovery has been installed."
    elif [[ $1 == "crespo4g" ]]
        ./fastboot flash recovery recovery-nexus-s-4g.img
        echo "ClockworkMod Recovery has been installed."
    else
        echo "You have entered an invalid device name. Use \"crespo\" or \"crespo4g\" and try again."
    fi
    echo "When your phone reboots, please select RECOVERY from the menu."
    read -p "When the recovery is loaded, press [enter] to continue..."
    ./adb shell "/sbin/busybox mount /system"
    ./adb push su /system/bin/su
    ./adb push Superuser.apk /system/app/Superuser.apk
    ./adb shell "chmod 6755 /system/bin/su"
    ./adb shell "mkdir -p /system/xbin"
    ./adb shell "ln -s /system/bin/su /system/xbin/su"
    ./adb shell "mv /system/etc/install-recovery.sh /system/etc/install-recovery.disabled.sh"
    ./adb shell sync
    sleep 2
    ./adb shell "umount /system"
    sleep 1
    ./adb reboot
    echo "Enjoy your newly-rooted phone. You can install ROM Manager from the Android Market to install custom ROMs."
fi
 
Last edited:

xjman

Senior Member
Feb 12, 2008
332
53
0
Used it today, worked 99% the only thing I had to do was manually move the su zip over to the sd myself. Otherwise flawless.

Shabby you do good work man.
 
  • Like
Reactions: shabbypenguin