Simple SDK setup guide

This is a discussion on Simple SDK setup guide within the Nexus One Development & Hacking forums, part of the Nexus One Development category; For me, the Android SDK (Software Development Kit) setup is the most arduous part of rooting a phone. The SDK is intended for developing software ...


Nexus One Forum Nexus One Forum RSS Feed Find us on Facebook Nexus One Twitter
Register Button
Go Back   Nexus One/Nexus S Forum - Google Phone Forum » Nexus One Development » Nexus One Development & Hacking

Nexus One Development & Hacking General area for Nexus One Programming / Development / Hacking

Reply
Old 01-16-2011, 10:04 AM   #1
Super Moderator
 
danger-rat's Avatar
 
Member #12109
Join Date: Oct 2010
Location: USA
Posts: 1,961
Phone: Nexus One-point-three
Carrier: Not Listed
Simple SDK setup guide

For me, the Android SDK (Software Development Kit) setup is the most arduous part of rooting a phone. The SDK is intended for developing software on, and provides a lot of unnecessary files that you typically don't need to just hook your phone up to the PC. With that in mind, I've attempted to simplify the process.

In order to do this, you will need a working phone.

USB Debugging
USB debugging will need to be enabled on the phone (Menu> Settings> Applications> Development, and enable USB debugging).

FASTBOOT
You will also need to be able to boot into FASTBOOT. From power off, hold volume down and while still holding, power the phone up. This will then show a white screen with 3 Androids and some text. The screen you are seeing is HBOOT. Follow the instructions on the screen to select the FASTBOOT option (volume keys to change selection, and power key to select). The FASTBOOT screen will look much like HBOOT; you can tell them apart because the text above the menu options will say HBOOT or FASTBOOT. (note: If you want to return to the HBOOT screen from FASTBOOT, you need to select BOOTLOADER)

You will also need to download the following zip file:
http://db.tt/10De9hz

To set up the SDK:
1. Download the file (above)
2. Extract the file (I recommend C:\)
3. That's it (but you will need to install the drivers for the phone)

To install the drivers:
1. Boot your phone into FASTBOOT
2. Connect the phone to the PC via USB (the FASTBOOT screen should now say FSTBOOT USB)
3. Windows will ask you to install a driver; select the manual option, and point to the usbdrivers folder from the zip extracted above.
4. Windows will install the drivers, and may ask to reboot
5. Done

That's it, you should have the SDK setup on your PC.
__________________
"There is no charge for awesomeness"

Last edited by danger-rat; 04-22-2011 at 10:10 AM.
danger-rat is offline   Reply With Quote
Old 01-16-2011, 10:06 AM   #2
Super Moderator
 
danger-rat's Avatar
 
Member #12109
Join Date: Oct 2010
Location: USA
Posts: 1,961
Phone: Nexus One-point-three
Carrier: Not Listed
How to Manual Root

*** Now working for Gingerbread 2.3.3 ***

*** NOT WORKING FOR 2.3.4 ***


This is an alternative for 2.3.4
http://nd1razor.blogspot.com/2011/07...nexus-one.html



I spent quite a bit of time working with other guides, and pooled my experience into this single thread.
I have managed to get this to work sucessfully many times, though I have had a few failures also.
The whole idea is to install the files busybox, su, and Superuser.apk on the phone, and give them the necessary permissions to enable them to run. The biggest problems seem to be with enabling the permissions.

Let me know if you have any problems

I PUT THIS TOGETHER QUICKLY, AND I STILL NEED TO GIVE CREDIT TO THE GUYS WHO MADE THIS POSSIBLE...

** Instructions for Windows:
** Green commands are to be typed into the cmd prompt
** Boot your phone into fastboot, and connect to the PC
** In Windows, locate the extracted folder (c:\sdk\tools)
** Double click the cmd batch (either cmd.bat or cmd)
** Test connection
adb devices
** Copy the files to your phone
adb push GingerBreak /data/local/tmp/GingerBreak
adb push Superuser.apk /data/local/tmp/Superuser.apk
adb push busybox /data/local/tmp/busybox
adb push su /data/local/tmp/su


** Change the permissions on the files
adb shell

chmod 700 /data/local/tmp/GingerBreak
chmod 755 /data/local/tmp/busybox

** Run the exploit
cd /data/local/tmp
./GingerBreak

** Wait - this may take a few minutes
** When complete, you should see the message "dance forever my only one"
** The $ prompt should change to #, showing you now have TEMP root

** Mount your phone with read/write (rw) access
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
chmod 777 /system/bin
chmod 777 /system/app

** Install busybox, and change permissions
cd /data/local/tmp
./busybox cp busybox /system/bin
chmod 4755 /system/bin/busybox

** Use busybox to install the other files and change permissions
busybox cp Superuser.apk /system/app
busybox cp su /system/bin
chmod 4755 /system/bin/su
chown root /system/bin/su


** Mount your phone back to read-only (ro) access

chmod 755 /system/bin
chmod 755 /system/app

mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system

** Exit the root shell
exit
** The # prompt should change to $
** Exit the adb shell
exit

** DONE!

** Note: If you to run GingerBreak a second time, it will fail unless you
delete 2 files. You need to first run the following:
adb devices
adb shell
cd /data/local/tmp
rm boomsh
rm sh

** Now you can run Gingerbreak again, starting from:
./GingerBreak

** DONE!
** To install a custom ROM, start by installing a custom recovery...
__________________
"There is no charge for awesomeness"

Last edited by danger-rat; 07-23-2011 at 09:06 AM.
danger-rat is offline   Reply With Quote
Old 01-16-2011, 10:07 AM   #3
Super Moderator
 
danger-rat's Avatar
 
Member #12109
Join Date: Oct 2010
Location: USA
Posts: 1,961
Phone: Nexus One-point-three
Carrier: Not Listed
What Next?

The very next thing I recommend is to make some backups...

A lot of the following can be done via fastboot, but I’m not going to discuss that here. Using fastboot requires you to unlock your bootloader, and unlocking your bootloader will wipe the phone. Making a backup before wiping your phone is smart - make a backup first...

Backing up your apps and data
The most common app for this is Titanium Backup, which is available from the market. Titanium Backup provides the ability to back up your apps and settings, meaning you can not only restore information, but you can also transfer information to a new ROM (should you chose to go down that path). Use the batch mode from the menu options, to save time. I recommend buying the paid version - it will likely cost less than your next meal, and you won’t flush it away 24 hours later...

I used to keep a copy of the apk on my SD card (backed up using App Monster, or eStrongs File Manager). I now have a copy of Titanium in my own custom Gapps, which I just flash on all new installs. This way, when I flash a new ROM, I just install Titanium from the SD, and then restore everything. The advantage is that you won’t need to sign into the market, and deal with the auto backup, and download, etc.

Installing a custom Recovery
Making a system backup typically requires installing a custom recovery.

The first time you install a custom recovery, it may not stick. Details about this are at the bottom of these instructions, so be sure to read “Getting a Custom Recovery to Stick” (lower down this post).

In order to backup your whole system, you’ll need a custom recovery image. The recovery is a very simplistic Operating System, with very limited functions. It is operated from a menu system, so you are limited to the options available in the menu. Stock recovery has very few options, and is limited to flashing (installing) officially signed zips. Custom recoveries have been developed to include additional options, and also have the ability to bypass signature verification (so you can flash non-official zips - meaning custom ROMs, etc). The only two custom recoveries I am aware of are Clockworkmod and Amon Ra.

Newer phones with SLCD screens require a newer version of a recovery, in order for it to work with their phone. Flashing older versions will NOT damage the phone, but they won’t be able to interface with the display, so you’ll just get a black screen. Flashing a compatible recovery will fix this. Clockworkmod 2.5.1.1 and greater, or Amon Ra 1.8.1.1 and greater, will work with SLCD screens. Older phones with AMOLED screens can use any version of the recoveries.

The easiest way to install a custom recovery is via ROM Manager, though they can also be installed via adb (part of the sdk, so it requires a computer), or terminal emulator (app, so it can be done from the phone).

ROM Manager:
With ROM Manager, just open the app, and the first option will flash the Clockworkmod recovery. This version is not SLCD compatible, so the very bottom of the options page also has ability to flash Amon Ra (Flash Alternate Recovery), or newer versions of Clockworkmod (All Clockworkmod Recoveries).

ADB and Terminal Emulator:
With ADB and terminal emulator, you will need the flash_image binary that is included in the SDK setup (zip) from the first post. You will also need to download the zip for the recovery you wish to flash, and it also needs to be in a flashable format. For that reason, I recommend finding the appropriate thread, and following directions from there...

Getting a Custom Recovery to Stick
Stock ROMs include two files that restore the stock recovery each time the phone is booted up. The simple solution is to remove these two files from your phone.

The two files that need to be removed are:
/system/etc/install-recovery.sh
/system/recovery-from-boot.p

If you already have a custom recovery installed, you can flash this file through recover to delete the two files (may need to turn off signature verification in the recovery):
http://db.tt/cp7De8G



These can be removed using Root Explorer (app). Just find the files, mount the system as r/w (read write), delete the files, and return the system to r/o (read only). This can also be done via adb, terminal emulator, etc...

Custom ROMs typically don’t include these two files, so once you have a custom ROM you can forget about this.

Booting Into Recovery
Recovery can be accessed from the bootloader menu. To access bootloader, hold volume down, then power up the phone while still holding volume down. The bootloader has a white screen with three androids on skateboards and some text. There are two screens or modes to the bootloader, one labeled HBOOT, and one labeled FASTBOOT. The modes can be switched between by selecting the first menu option. The second option on the HBOOT screen will let you boot into RECOVERY...

The recovery typically has a black screen with text. The text varies, depending on which recovery you currently have installed. The stock recovery often appears as an android next to and exclamation mark in a triangle /!\. If you see this, holding volume up and power will take you to the menu options for the stock recovery.

Making a System Backup
This is also referred to as a nandroid, since nandroid is the utility that actually performs this action (although you may never see nandroid in any of the visible options).

Backups can be done via ROM Manager (select “Backup Current ROM” from the options), from recovery (follow the recovery menu options to backup, which vary depending on the installed recovery). Backups can be restored following a similar approach...

Installing a Custom ROM
ROMs can be installed through ROM Manager, via recovery, or a number of other methods. The method and instructions for installing any ROM is typically available in the ROM thread, so I recommend reading those instructions. A good rule of thumb is to perform a clean wipe when switching between different ROMs. Upgrading the same ROM may not need a wipe, but I’ve often found that when problems occur, it’s typically cured by wiping and reinstalling the ROM...


That’s it...
__________________
"There is no charge for awesomeness"

Last edited by danger-rat; 02-01-2011 at 12:43 PM.
danger-rat is offline   Reply With Quote
Old 01-16-2011, 11:06 AM   #4
Super Moderator
 
SliceBurgSlim's Avatar
 
Member #1973
Join Date: Jan 2010
Location: Ohio
Posts: 2,437
Phone: Nexus One
Carrier: T-Mobile
Nice Job Danger!
__________________




SliceBurgSlim is offline   Reply With Quote
Old 01-16-2011, 11:15 AM   #5
Super Moderator
 
SliceBurgSlim's Avatar
 
Member #1973
Join Date: Jan 2010
Location: Ohio
Posts: 2,437
Phone: Nexus One
Carrier: T-Mobile
Stickied up!

Thanks WERA!!
__________________




SliceBurgSlim is offline   Reply With Quote
Old 01-16-2011, 11:42 AM   #6
Super Moderator
 
danger-rat's Avatar
 
Member #12109
Join Date: Oct 2010
Location: USA
Posts: 1,961
Phone: Nexus One-point-three
Carrier: Not Listed
Quote:
Originally Posted by SliceBurgSlim View Post
Nice Job Danger!
Just standing on the shoulders of giants.
None of this it's my own work...

Sent from my Nexus One using Tapatalk
__________________
"There is no charge for awesomeness"
danger-rat is offline   Reply With Quote
Old 01-16-2011, 12:32 PM   #7
Super Moderator
 
SliceBurgSlim's Avatar
 
Member #1973
Join Date: Jan 2010
Location: Ohio
Posts: 2,437
Phone: Nexus One
Carrier: T-Mobile
Well I appreciate you Consolidating the info into this thread
__________________




SliceBurgSlim is offline   Reply With Quote
Old 01-16-2011, 07:56 PM   #8
Senior Member
 
iPeck's Avatar
 
Member #11591
Join Date: Sep 2010
Location: Laval, Québec
Posts: 1,102
Phone: Nexus One
Carrier: Big Brother - Vidéotron
nice !

but where do I input the commands ? console ? sdk command window ? I tried both and no luck Why can't I root like everybody ? lol dang...

I installed the driver and did the steps with sdk...
iPeck is offline   Reply With Quote
Old 01-16-2011, 08:00 PM   #9
Super Moderator
 
danger-rat's Avatar
 
Member #12109
Join Date: Oct 2010
Location: USA
Posts: 1,961
Phone: Nexus One-point-three
Carrier: Not Listed
When you extract the zip, you will create a folder called sdk. Inside the sdk, there will be a folder called tools. Inside tools will be a file called cmd.bat.

Double click cmd.bat and type in the cmd prompt that opens...

Sent from my Nexus One using Tapatalk
__________________
"There is no charge for awesomeness"
danger-rat is offline   Reply With Quote
Old 01-16-2011, 08:34 PM   #10
Senior Member
 
iPeck's Avatar
 
Member #11591
Join Date: Sep 2010
Location: Laval, Québec
Posts: 1,102
Phone: Nexus One
Carrier: Big Brother - Vidéotron
thanks for your help danger

now an unroot guide ? lol

will this just root or erase the current rom and contents too ?

Last edited by iPeck; 01-16-2011 at 08:40 PM.
iPeck is offline   Reply With Quote
Reply

Lower Navigation
Go Back   Nexus One/Nexus S Forum - Google Phone Forum » Nexus One Development » Nexus One Development & Hacking

Divider


Currently Active Users Viewing This Thread: 4 (0 members and 4 guests)
 

Search tags for this page

hello fota android incredible

,

hello fota droid incredible

,
how do i back up my sd card on nexus one
,
how to install 2.3.6 on a rooted nexus s
,

how to root google nexus one 2.3.6

,
how to root htc nexus one 2.3.6
,
how to root nexus one with sdk
,
how to setup android sdk nexus one windows
,
remove hello, fota?
,
rooting nexus one 2.3.6
,
sdk manager guide for android 2.3.6
,
sdk setup nexus one 2.3.4
,
setting up a nexus phone
,
simple sdk setup guide
,
su binary not found in the system declared path
,

superoneclick 2.3.6

,
superoneclick nexus one 2.3.6
,

what is hello fota droid incredible

,

what is hello fota on droid incredible

,
what phones you can root with sdk
Click on a term to search our sites for related topics.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone else on simple mobile? jay Nexus S General Discussion 4 01-17-2011 10:19 PM
A simple review of iPhone vs Nexus One iPhoneSlayer Nexus One General Discussion 2 05-03-2010 11:01 AM
SDK Setup Hays Nexus One Development & Hacking 5 04-19-2010 11:29 PM
Looking For Simple Note App just999in Nexus One Application Discussion 8 02-15-2010 08:45 AM