5,599,190 Members 35,370 Now Online
XDA Developers Android and Mobile Development Forum

[HACK] [Script] Semi-Automated Unlock/Root Script for Linux

Tip us?
 
BlackOtaku
Old
(Last edited by BlackOtaku; 13th February 2011 at 05:26 PM.) Reason: Scripts links were broken; I'm going to update the links and possibly tweak some other things before I reup it.
#1  
BlackOtaku's Avatar
Senior Member - OP
Thanks Meter 41
Posts: 197
Join Date: Dec 2009
Post [HACK] [Script] Semi-Automated Unlock/Root Script for Linux

Script pulled; should have it back up by Wednesday.

Hey guys. I've written a shell script to automate some of the more menial tasks involved with unlocking the Nexus S bootloader and rooting it. It also guides you through the various tasks involved in the process, and IMO is a more noob-friendly alternative to my guide on manually rooting.

Disclaimer again: I take no responsibility if something goes wrong (if it does, it should be fixable though), Unlocking your bootloader voids your warranty (but you can lock it back), Unlocking the bootloader will wipe your entire phone, including USB Storage; so make a copy of all those family photos and other files you may have put onto the USB storage if you want to keep them.

The script should run fine on most configurations; if you have issues post them below. The script isn't very elegant, but it gets the job done. Pay attention to the terminal as you go through it and you should be fine.

Some Notes:
- OTA updates will not flash because the modified boot.img flashed in this script causes an MD5 mismatch. You should flash the latest OTA update before running this script, if you aren't already running the latest update.
- The latest OTA update, GRH78 (2.3.1) can be found with instructions on flashing here: http://forum.xda-developers.com/showthread.php?t=884097
- You do not need root to flash OTA updates.

How to run
1. Download the attached file and rename it to 'nsrootscript.sh'
2. Mark it as executable either by navigating to it, right-clicking it, Properties > Permissions tab, and checking 'Allow executing file as program', or running this command:
Code:
chmod +x /path-to-file-here/nsrootscript.sh
3. Double-click it and choose 'Run In Terminal' or use the command:
Code:
./path-to-file-here/nsrootscript.sh
4. Follow the instructions given in the script, and you should be rooted in no time.

Special Thanks

Koush; Developer of ClockworkMod Recovery and ROM Manager. Buy him a beer here: https://www.paypal.com/us/cgi-bin/we...06282818e091d0

Paul; Developer of Superboot. Help him raise money for Cancer Research and possibly win yourself a nice gadget here: http://android.modaco.com/content/ch...hood-leukemia/

If you have any issues, concerns, or comments, feel free to leave them below.
Retired: Motorola Droid 1. You're old and broken now, but you served me well.
Side phone (no service): Nexus S running MIUI.
Main phone: Galaxy Nexus on Verizon. Great phone, hands down.
Tablet: 32GB White Samsung Galaxy Tab 10.1, big thanks to Android Central.

Rooting your Nexus S on Linux? This can help!
The Following User Says Thank You to BlackOtaku For This Useful Post: [ Click to Expand ]
 
Luxferro
Old
#2  
Senior Member
Thanks Meter 310
Posts: 1,057
Join Date: Nov 2009
Location: Long Island, NY
I just looked through your script. Noticed it is using superboot boot.img's to root. You might want to put a note that this will probably prevent future OTA updates from flashing, since those boot.img's are modified and will get MD5 mismatches.
 
BlackOtaku
Old
#3  
BlackOtaku's Avatar
Senior Member - OP
Thanks Meter 41
Posts: 197
Join Date: Dec 2009
Quote:
Originally Posted by Luxferro View Post
I just looked through your script. Noticed it is using superboot boot.img's to root. You might want to put a note that this will probably prevent future OTA updates from flashing, since those boot.img's are modified and will get MD5 mismatches.
Thanks for the heads up, I'll put that in the OP.
Retired: Motorola Droid 1. You're old and broken now, but you served me well.
Side phone (no service): Nexus S running MIUI.
Main phone: Galaxy Nexus on Verizon. Great phone, hands down.
Tablet: 32GB White Samsung Galaxy Tab 10.1, big thanks to Android Central.

Rooting your Nexus S on Linux? This can help!
 
suomaf
Old
#4  
suomaf's Avatar
Senior Member
Thanks Meter 49
Posts: 384
Join Date: Jul 2010
Location: Jerudong
Thanks man, looking forward to getting and trying this out
 
crking1980
Old
#5  
Senior Member
Thanks Meter 31
Posts: 240
Join Date: Aug 2007
works like a charm thank you very much!
 
stothy862
Old
#6  
Member
Thanks Meter 3
Posts: 94
Join Date: Aug 2010
Location: Norwich
I'm sorry but I just don't see the point it rooting a DEVELOPER phone? You open up lots of features that are not available to non root so therefore make developing useless as you will lose more than half your market! I understand if you are specifically making a root application but I'm sure most of you aren't!
[/Rant]
 
BlackOtaku
Old
#7  
BlackOtaku's Avatar
Senior Member - OP
Thanks Meter 41
Posts: 197
Join Date: Dec 2009
Quote:
Originally Posted by stothy862 View Post
I'm sorry but I just don't see the point it rooting a DEVELOPER phone? You open up lots of features that are not available to non root so therefore make developing useless as you will lose more than half your market! I understand if you are specifically making a root application but I'm sure most of you aren't!
[/Rant]
Root isn't just of interest to developers. Root allows the end user to do many interesting things, a small set:

- Applying custom themes
- Blocking annoying ads
- Take screenshots
- Set CPU clock speeds / overclock for better performance, underclock for better battery life
- Replacing system apps / files (There are various reasons for this, one example is the modified MMS.apk floating around that fixes the blurry MMS issue)
- Flash custom ROMs which can offer performance increases, battery life increases and add useful features not found in stock (CyanogenMod is a good example)
-And there's a lot more, but it's 2 AM where I live, lol.

As for people that develop applications that require root, that's because what they do (blocking ads, theming, taking screenshots, etc.), well requires root. There's no way around that. And since root is obtainable on most Android devices without too much hassle, what's the harm in coding something to make people's Android experience a little better?
Retired: Motorola Droid 1. You're old and broken now, but you served me well.
Side phone (no service): Nexus S running MIUI.
Main phone: Galaxy Nexus on Verizon. Great phone, hands down.
Tablet: 32GB White Samsung Galaxy Tab 10.1, big thanks to Android Central.

Rooting your Nexus S on Linux? This can help!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes