MAJOR Update 7/13/2010 15:48 PDT
Go to http://forum.xda-developers.com/showthread.php?t=724741 for the newer, confirmed root method
The following method is now outdated
Added optional instructions to flash Amon_RA's recovery image
Removed unnecessary steps (old step 6 and 7) because downloading the SDK folder in Step 2 already contains those files
Added .wav file of Tereg's cadence in the timing step
Added commands to Amon_RA's recovery image step
Added list of reported successes
Step 4 (Re-run SDK Setup) has been eliminated
Added 20th reported success with a new condition to try to test
Added YouTube video of user Dradien doing the count in the timing step
Added note in timing step about how long to wait after you see /!\ before you start the step over
Rearranged steps 2 and 3 since installing the USB driver after downloading Tereg's SDK folder might overwrite the modded .inf file
Added TODO note to at some point include instructions at various steps for other OS's where needed.
Tereg's testing has eliminated some extra steps, removed step 6 (the driver step), removed step 8 (maintaining a clean sd card, booting the phone back up, setting charge only, turning phone off), removed steps going into recovery where card DOES NOT HAVE TO BE IN when booting into FASTBOOT, therefore the timing step going from FASTBOOT to HBOOT has been removed.
Note about RUU OTA = Leak v3
More successes added with the new "60 partition" method explained by user anoek here: (http://forum.xda-developers.com/showpost.php?p=7089301&postcount=970)
Added 2 successes where both did not run loop.bat
Please note this process is experimental at best. While we have reported a number of successes, it has not been consistent and the success rate seems to be very low or non-existent for a number of users. We are doing the best we can to replicate this process in a more reliable way, and to continue testing for easier ways to achieve this.
**TODO**
Clarify/expand steps that need instructions based on user's OS
List of reported successes
If you find other people with reported successes, there are duplicates listed, or specific information needs to be added for an individual's case, please let Tereg or myself know.
1. Dc_striker (http://forum.xda-developers.com/showpost.php?p=6927162&postcount=1)
2. Hairson (http://forum.xda-developers.com/showpost.php?p=6942651&postcount=186)
3. tereg
4. a-wilcoxj (andirc) Also rooted another phone for another XDA member using his SD card
5. lame eris (http://forum.xda-developers.com/showpost.php?p=6974393&postcount=209)
6. kzoodroid (http://forum.xda-developers.com/showpost.php?p=6975283&postcount=225 and http://forum.xda-developers.com/showpost.php?p=6975440&postcount=228) Also rooted another phone for another person using his SD card
7. RKLamb2 (http://forum.xda-developers.com/showthread.php?p=6972493#post6972493)
8. Dradien (http://forum.xda-developers.com/showpost.php?p=6980387&postcount=318 and http://forum.xda-developers.com/showpost.php?p=6980491&postcount=320)
9. graphitedv (http://forum.xda-developers.com/showpost.php?p=6981435&postcount=334 http://forum.xda-developers.com/showpost.php?p=7011890&postcount=598) - Rooted a second phone, rooted using a Mac running 10.5.8 and the 2GB PNY card
10. djblade17 (http://forum.xda-developers.com/showpost.php?p=6981578&postcount=336) - Win 7 64 bit
11. xtreme3737 (http://forum.xda-developers.com/showpost.php?p=6985257&postcount=365)
12. reethewhat (http://forum.xda-developers.com/showpost.php?p=6987179&postcount=389) - Win7 64 bit
13. largerlager (http://forum.xda-developers.com/showpost.php?p=6988950&postcount=399)
14. Austinjs0102 (http://forum.xda-developers.com/showpost.php?p=6989397&postcount=405) - Windows XP SP3, 2GB PNY card
15. HaRdC0r3 (http://forum.xda-developers.com/showpost.php?p=6963059&postcount=457)
16. varkie (androidforums) (http://androidforums.com/htc-droid-eris/109901-how-many-successfully-went-leak-root.html#post1023198) - PNY 2GB National Geographic SD card
17. Pimpshit420 (http://forum.xda-developers.com/showpost.php?p=6990916&postcount=426)
18. rcharris (http://forum.xda-developers.com/showpost.php?p=6991694&postcount=437) -- Rooted using OS X. Originally tried in WinXP, switched to Mac OS X and got it rooted.
19. bpenney1 (http://forum.xda-developers.com/showpost.php?p=6993850&postcount=448) Had PNY card
20. davinci27 (http://forum.xda-developers.com/showpost.php?p=6996272&postcount=468 and http://forum.xda-developers.com/showpost.php?p=6996996&postcount=472)
21. Jdog94, on page 71, used airplane mode.
(http://forum.xda-developers.com/showpost.php?p=7034130&postcount=733)
22. NAA_Silent (androidforums) http://androidforums.com/htc-droid-eris/109865-leak-root-has-been-found-4.html#post1065772 -- "I tried about 30 times on my work machine running XP while using my Polaroid 16 gig card. I was not successful. Last night I tried again on my Win 7 64 laptop using the factory 8 gig card that came with my Eris. After about 5 attempts I hit the jackpot. I left the loop running instead of ctl+c after each attempt."
23. lostpilot28 (http://forum.xda-developers.com/showpost.php?p=7103114&postcount=1009 and http://forum.xda-developers.com/showpost.php?p=7113530&postcount=1038) - "I flashed the 60partitions.img file to my PNY 2GB SD card and did exactly as he said."
24. igot3ballz (http://forum.xda-developers.com/showpost.php?p=7104474&postcount=1013)
25. listyb01 (http://forum.xda-developers.com/showpost.php?p=7106183&postcount=1017)
26. homewmt (http://forum.xda-developers.com/showpost.php?p=7106822&postcount=1019) - Used anoek's dd image of 60 partition sd card
27. szgtr (http://forum.xda-developers.com/showpost.php?p=7122616&postcount=1055) - Used 4GB RiDATA card
28. lil_dez (http://forum.xda-developers.com/showpost.php?p=7142521&postcount=1087) - Did not run loop.bat
29. Nickboxer7 (http://forum.xda-developers.com/showpost.php?p=7143847&postcount=1088) - Did not run loop.bat
NEW thing to test "The last time I got /!\, I left the phone in the /!\ and popped the card out tand then right back in. Still had /!\ on the screen, but suddenly the device showed up in the loop." Also disable wifi, 3g, gps, bluetooth, and enable airplane mode.
Applications
-->Development-->and check the box titled "USB Debugging"
Video Tutorial by ECLIPS3 & Tereg
http://vimeo.com/album/250913
Prerequisites
Here is a dd image of teregs sdcard in a 7zip archive
http://www.multiupload.com/OT7SH4XNBP
1.Get the Java JDK
For the Java JDK go to http://java.sun.com/javase/downloads/index.jsp
Install Java Platform, Standard Edition, JDK 6 Update 20
2. Downloading Android SDK and running SDK_Setup
Go to http://developer.android.com/sdk/index.html and download the sdk for the platform you are using. Extract the folder contained in the .zip file to the C: drive. (In Windows's case, that would be C:\android-sdk-windows\).
Run SDK_Setup.exe from inside the android-sdk-windows folder.
*Note: you may get a prompt saying that it can't download the repository.xml*
To fix that error close the warning box and click on "Settings" on the left hand side and then check the box that says "Force Https://... sources to be fetched using http://"
Go to Available Packages, the list should now be populated, expand the list by clicking the little + next to https://dl-ssl.google.com/...
*Note: it is not necessary to download the SDK Platforms
Check the box marked "USB Driver Package" at the very bottom of the list
Click Install selected on the lower right corner of the window.
Click the Accept All Radio button on the lower right window that was brought up, and then click the Install button on the lower right corner.
To make sure you are on the right track you should now see in the list of installed packages two total packages:
Android SDK Tools, revision 6
USB Driver package, revision 3
3. Overwrite the android-sdk-windows folder with all the files you need
**TODO** (Include instructions for Mac and Linux SDK downloads)
Here you can download Tereg's complete SDK with all the files used http://www.multiupload.com/01Q1UXGLOF
Unzip the folder to C:
In our setup we have extracted the Android SDK to C:\android-sdk-windows
Root Process
Tereg's analysis has shown that RUU OTA = 2.1 Leak v3. If you have Leak v3 on your phone, then you probably do not have to do this step.
4. Flash the RUU OTA Update
Go to: http://shipped-roms.com/shipped/Des...WWE_2.36.605.1_release_signed_with_driver.exe and download the RUU OTA executable.
WARNING: THIS WILL WIPE YOUR PHONE. IF YOU HAVE ROOT YOU WILL LOSE ROOT. BACKUP THE CONTENTS OF YOUR SD CARD AND APPS YOU HAVE INSTALLED BEFORE YOU CONTINUE WITH THIS STEP.
If you need to backup the content of your SD Card, mount your phones SD card as a disk drive, open the drive within My Computer, and copy/paste all folders into a new folder. Copy the contents somewhere safe, we are not responsible for any lost data.
In addition to backing up your SD card, you should find a way to back up your phone (apps, settings, etc) using any method available (like MyBackup or Astro File Manager, etc). You will have a stock, wiped phone when you are finished with this step.
Execute the .exe and go through the wizard process.
5. Make sure USB Debugging is turned on on the phone
From the Home screen, press the Menu button -> Settings. Tap Applications -> Tap Development -> Make sure that USB Debugging is CHECKED.
Open a command prompt by going to Start -> Run. Type cmd in the text box, click OK.
If using Linux, open a terminal prompt and change your working directory to the android SDK tools folder and execute the "adb devices" command.
Execute these commands
Code:
cd \
If you don't see
Code:
C:\>
then type and execute
Code:
c:
Execute the following commands
Code:
cd android-sdk-windows
cd tools
adb devices
If you see the following
Code:
List of devices attached
HTxxxxxxxxxx device
where xxxxxxxxxx is some alphanumeric value, then you have done this step successfully.
Note: Old Step 6: Updating drivers for devices has been tested as unnecessary
6. Mounting the SD Card as a Disk Drive and formatting
Mount the SD card as a disk drive from within the phone. To do this, drag the notification bar down and tap the Ongoing notification (either Charge Only or HTC Sync) section. Tap the Disk Drive option (Mount as disk drive), and tap Done.
If you don't still have Computer Management open, click the "Start" button on your computer, RIGHT click on "My Computer", click "Manage", then Click "Disk Management" which is under "Storage" on the left pane and you will see all your drives.
Find your SD Card in the lower half of the right-hand pane. If you do not see your SD card, go to the Action menu and select "Refresh". If you bought the SD Card listed here, the size of the partition is 1.83 GB. Right click on this partition, and select "Format...", and click the "Yes" button that you are sure you want to do this.
Make the volume label blank, pick FAT32 as the file system, and select the allocation unit size 4096
DO NOT do a quick format.
Click the format button on the bottom right corner, then click OK to confirm the format.
Let it format, DO NOT eject the card while formatting.
When the format is complete, power off the phone.
Note: Old Step 8: Maintaining a clean SD card has been tested as unnecessary
7. Booting into recovery (the timing step)
.wav file of Tereg doing the count in this step: http://www.multiupload.com/IRL99EH394
NEW: Dradien has uploaded a video doing the count - http://www.youtube.com/watch?v=2bRl2ul7GdA
Note: The SD card does not have to be in. It can be out before you boot into FASTBOOT. Therefore, you do not need to press down on the SD card while in FASTBOOT, press Vol Down, then remove the SD card.
Make sure that the SD card is OUT before you begin this step.
Boot into FASTBOOT mode by pressing and holding the Send+Power buttons.
Go into HBOOT by pressing the Vol Down button.
NOTE: Running the loop is just for convenience purposes. It is not mandatory for this method to work.
Start -> Run -> type cmd in the box, click ok.
In the command prompt type
Code:
cd C:\android-sdk-windows\tools
Type
Code:
loop
and press enter
Position your right hand over the sd card and the left hand over the Volume Up button. As soon as you press Volume Up, starting counting "1-1000, 2-1000, 3-1000, 4-1000", which in Tereg's case took approximately 2.5-3.5 seconds. As soon as you finish counting, press the SD card into the phone.
Watch the command prompt. If it works it should display
List of devices attached
HTxxxxxxxxxx recovery
over and over again where xxxxxxxxxx is some alphanumeric value
If this succeeded you can stop the loop by pressing Ctrl+C
Important Note: After you see the /!\, you will need to wait for several seconds before you restart this step. You will need to wait for Device Manager to stop flickering before you pull the battery. Wait at least 10-15 seconds after you see the /!\ icon before you start this step over.
If this did not succeed, make sure that Device Manager is not flickering, then pull the battery to turn off the phone. Stop the loop in the command prompt by pressing Ctrl+C, and repeat this step again starting with the phone off.
8. Pushing files in recovery, and getting #
Next on the phone press Volume UP + Power at the same time, which will bring up a menu in Recovery.
Then select "Apply sdcard:update.zip"
THIS STEP WILL FAIL, don't worry, we expect it to.
Once the update has failed we need to go back to our command prompt (the one we stopped the loop in) and type
Code:
adb push ota.zip /sdcard/update.zip
and press enter, then type
Code:
adb push root.zip /sdcard
and press enter.
After each command, ensure there is no error message after executing the command.
The status for success will be something like
Code:
xxx KB/S (x bytes in xxxx.xxxs)
At the next prompt, type this command but DO NOT execute it yet.
Code:
adb push update.zip /sdcard
This is another timing step. You will need to scroll down to "Apply sdcard:update.zip", and press the Power button then look for a very faint, dim progress bar near the bottom of the screen. The progress bar will be green.
AS SOON AS YOU LOCATE THIS PROGRESS BAR, you need to execute the command you typed.
If successful you should see the Clockwork Mod Recovery along the top of the phone.
Go to the Partitions menu on your phone by rolling the trackball down and pressing the trackball to select it.
Then select "mount /system" once.
Scroll down to +++++Go Back+++++ and select it.
Scroll and select "Install zip from sd card". Then, scroll and select "Choose zip from sdcard", then scroll and select "root.zip"
Once this is done, select Reboot System from the menu, and let it boot normally.
After the phone comes back up to Sense UI, in the command prompt execute this command
Code:
adb install Superuser.apk
Again, you should see something like:
Code:
xxx KB/s (x bytes in xxx.xxxs)
pkg: /data/local/tmp/Superuser.apk
Success
underneath the command where x is some number
Once this step is done, make sure the phone is unlocked, awake and not asleep.
Type
Code:
adb shell
then type
Code:
su
You will get a prompt on the phone from superuser asking for permission. Allow this.
the $ symbol will change to #, which indicates you have root.
[Optional] Step 11. Flashing Amon_RA's recovery image
This step is optional. Follow these steps if you would like to flash Amon_RA's recovery image after you have achieved a root prompt.
Open the command prompt and change your working directory to C:\android-sdk-windows\tools exactly as you did in Step 12.
Execute these commands (Note: When you see $ or #, that does NOT mean you type $ or # respectively in the command. It means that is the prompt you should see at the time you are executing these commands.
If you extracted the android-sdk-tools folder in Step 3, you have all the files you need for this step.
Code:
adb shell
$ su
#mount -o rw,remount /dev/block/mtdblock3 /system
# exit
$ exit
adb push recovery.img /sdcard
adb push flash_image /data/local
adb shell
$ su
# chmod 755 /data/local/flash_image
# /data/local/flash_image recovery /sdcard/recovery.img
# reboot recovery
If you do these commands, you should be able to see Amon_RA's recovery.
At the bottom of the screen it should say "Build: RA-eris-v1.6.2", and you should have the following menu options.
Code:
- Reboot system now
- USB-MS toggle
- Backup/Restore
- Flash zip from sdcard
- Wipe
- Partition sdcard
- Other
- Power off
Note: If you are getting Permission Denied errors while doing any of these steps and you still have Clockwork's Recovery partition installed, user Dradien has reported success with the "Fix Permissions" function within Clockwork's Recovery main menu. Dradien reported that that function took about 5 minutes and afterwards was able to flash Amon_RA's recovery image.
Afterward
One thing to note, there is a step we did not do that Slide Root method did which is install a full root.zip that allows you complete root access when you execute an "adb shell ..." command.
i.e. if you run adb shell as the following example command prompt
Code:
C:\>adb shell
you will see a $ prompt, not a # prompt.
Therefore, any commands you are executing (at least for the moment) that require root access (like to flash Amon RA's recovery for instance):
Code:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
you will need to do this in the following manner
Code:
adb shell
$su
#mount -o rw,remount /dev/block/mtdblock3 /system
So, if you are getting permission denied errors from a regular command prompt while executing commands (adb shell mount..., adb flash_image..., etc) that require root access, you will most likely need to drop into shell manually, su into root, then cut off the first part of the command, put the rest of the command into the prompt and execute it.
Example:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
becomes
mount -o rw,remount /dev/block/mtdblock3 /system
Look at other tutorials on how to flash roms, if you have any questions pm me (Captainkrtek) or join us on irc.andirc.net #droideris & #leakroot and ask for any of the opers or Tereg for help.
Below are pictures and tools Tereg used, and how he oriented the phone and positioned his hands and screwdriver over the Vol Down/Vol Up buttons with left hand and over the SD card with the right hand during the SD card timing steps.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Well written, thank you for writing this guide.
Also, the easiest way to get on irc is to go to http://chat.andirc.net/ and make a nick.
char561 said:
Also, the easiest way to get on irc is to go to http://chat.andirc.net/ and make a nick.
Click to expand...
Click to collapse
Join #leakroot to discuss it
Congrats Tereg, and CaptainKrtek. Tereg your crazy to flash RUU, thank you for trying again and proving
I should note, just remembered, I had Wi-Fi, Mobile Network and GPS all turned off during the entirety of this process.
Wow yeah great guide, people report your success with it and stuff. I'm trying it soon.
Sent from my Eris using XDA App
Great guide hopefully more people start getting root using this method, I currently have root (s-0ff) may try and root the brother in laws phone now he has leakv3. Welcome to the party leakers.
I feel completely crazy for unrooting (and that process is now done), but that's kind of where my mind is. I really want this process to be repeatable.
Hey where is the modified Inf file?
jvward said:
Hey where is the modified Inf file?
Click to expand...
Click to collapse
oops my fault, uploading now! thanks!
EDIT: In the tutorial now
ok so, i t may be a bit early, but once we are rooted from this method, can we unroot using the standard unroot method, or does nobody know that yet?
jrhoades858 said:
ok so, i t may be a bit early, but once we are rooted from this method, can we unroot using the standard unroot method, or does nobody know that yet?
Click to expand...
Click to collapse
Yes i believe you can, tereg just unrooted his phone to try this method again
Awesome! Trying in about an hour. Thank you!
Sent from my Eris using XDA App
trying right now, and yea i deleted all the adk and everyhting to start fresh =P so when i got the the part to download modded.inf i was like where the link but i remembered i didnt delete my downloads folder so i still had tht file =D haha
edit: O and fat32 with no quick format is taking forever!!!
Is there any chance this will work with the stock Eris microSD? I would prefer not to go out and buy a new one but if I absolutely have to I will today.
To unroot once you do this all you have to do is use the ruu that is posted here and that will set it back to exactly how it was.
zigzackattack said:
Is there any chance this will work with the stock Eris microSD? I would prefer not to go out and buy a new one but if I absolutely have to I will today.
Click to expand...
Click to collapse
There is a slight chance though pretty much no. Everyone who has tried it with the stock card has failed so your best bet is to go buy a $12 card
Yea I also am wondering if the stock 8 GB on Eris will work. Please let us know or test it out leakers.
MyFixofAndroid said:
Yea I also am wondering if the stock 8 GB on Eris will work. Please let us know or test it out leakers.
Click to expand...
Click to collapse
I do not believe it will. Everyone who has tried has failed.
Related
Alright, I faced this problem a few days backed, and when I did my research I found that a lot of people face this problem, or once in a while at least:
When you try to do a nandroid restore you see this:
Error: run ' nandroid- mobile. sh restore ' via console!
So you try to do it via adb (aka console) and you get this:
Error: unable to mount /sdcard, aborting
Frustrating right! You have messed up your phone while tweaking and thought you had the upper hand because you did a back-up.. but now you are dealing with this..
Here's the solution I gathered from web:
1. Check that you have USB de-bugging on under the development settings of your phone
2. Check that you have your sdcard partitioned to at least ext3.
3. Check that you did not rename your nandroid folder, nandroid's content to anything fanciful.
4. Check that you have enough power on your phone, at least 30 percent to be safe. Low power will disable the ability to do a restore in some cases.
Well if you don't have the above:
1. Go enable USB de-bugging under settings>manage applications>development>USB Debugging>activate.
2. Transfer whatever content you have on sdcard to somewhere safe. Then do a proper partitioning via the recovery, upgrade it from ext2 to ext3. Repair the ext in case there are some errors. After this, transfer all contents back.
3. Please rename all folders back to their original name, and don't rename them ever again.
4. Charge your phone with AC supply, and wait till it is at least 30 percent and try to do a restore again via recovery, if not, do step 1 - 3.
Trying to do a restore:
1. Do it via recovery, if everything is fine, it should go smoothly, and you got your upper hand back!
2. If you like to see words running in strings, doing via console is possible too!
-
"quoted from and credit to Slug from android forums"
Open a command prompt window (Start-All Programs-Accessories-Command Prompt)
Type cd/ and hit <enter>
Enter cd adb
Now enter adb devices and it should show "000000000000 recovery"
If so, enter adb shell and you should see the prompt change to #. You're now running as su (root)!
Enter nandroid-mobile.sh --restore. You'll see instructions about "Using G1 keyboard..." disregard and hit <enter>.
After a brief search, the default (most recent) backup found will be displayed along with any others located. If the default choice isn't the one you want to restore, you'll have to enter the full path to the correct one as displayed in the list. You can use the Edit...Mark... function from the command prompt window menu to simplify this, though. Put the cursor at the beginning of the required line, hold <shift> and highlight the test using the arrow keys. <Enter> copies to the clipboard, and Edit... Paste... places it wherever the cursor is placed.
Once you have the correct backup referenced, hit <enter> and you should see the script work its magic.
When Restore done is displayed you can reboot the handset from the recovery menu.
Alright you have got your restore back! Feedback or anymore tips to this problem are welcome! Thank you for your time.
JokerAce
so if we renamed the nandroid backup to something we will remember more easily, and that the problem, what do we do?
edit: how do we know what the original name of the backup was called.
Hi, did you get a Md5 mismatched or something? Please be clear with your problem. If it's a mismatch problem, make sure your rename'd folder has NO Space in the name.
One thing I've noticed is there isn't a lot of documentation for getting set up and unlocking your bootloader on a Linux OS. Setting up your machine to get adb and fastboot to recognize your device takes a tiny bit of extra work on a Linux operating system, but what exactly needs to be done may not be clear to everyone. Whether it's because you're new to the Android SDK/adb, somewhat new to Linux, or can't simply can't seem to find the Vendor Code for the Nexus S. (For those who are looking specifically for this, it's '18d1', and I assume will be the same on all Nexus devices to come; If this means nothing to you right now, read on.)
Disclaimer: 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.
For the sake of sanity, this guide assumes you are using Ubuntu. If you're using something else (or different applications), there are terminal commands offered, and you probably have an idea on how to adapt the given instructions to your Linux OS.
Preparation: Installing the Android SDK, ADB, Fastboot & Setting Up Your Nexus S to be Recognized
1. Download the Android SDK for Linux: http://dl.google.com/android/android-sdk_r08-linux_86.tgz
2. Save it in a folder of your choice. I chose to keep it in my Downloads folder, myself. If you'd like, you can rename it to the simpler name of 'AndroidSDK.tgz'. The rest of the guide will assume that you did, because I'm lazy, and it makes things simpler; it will also assume you saved it in Downloads. If you feel that you have the intuition to rename and edit the path names based on your own choices, then fine; but if you're utterly lost here, just stick with what I'm doing; download to 'Downloads', rename to 'AndroidSDK.tgz'.
3. Now that you have it, navigate to the folder you downloaded it to, right-click, and click 'Extract' to unzip it. If for some reason you cannot do this, open up a terminal and try this command:
Code:
tar zxvf /home/<your-user-name>/Downloads/AndroidSDK.tgz
You may have to adjust the command if you didn't save it under Downloads or didn't rename the file to AndroidSDK.tgz.
4. Now, we'll install adb and some other software packages by starting up the Android SDK and AVD Manager. Start it either by:
- Navigating to your AndroidSDK folder, going to the 'tools' folder and double-clicking the file called 'android'; if a popup opens asking you what you want to do with it click 'Run'.
- Using this command:
Code:
/home/<your-user-name>/Downloads/AndroidSDK/tools/android
5. In Android SDK and AVD Manager, click on "Available packages". Check the box next to "Android SDK Tools, revision 8" and "Android SDK Platform-tools", and click on "Install Selected" then "Install". When prompted click "Yes" to restart ADB.
6.You should now have a folder in /home/<your-user-name>/Downloads/AndroidSDK/ called "platform-tools".
7. Download fastboot here: http://developer.htc.com/adp.html
- Save it to the aforementioned platform-tools folder.
- Now, navigate to the file, right click it, click 'Properties', go to the 'Permissions' Tab and check 'Allow executing file as program'. Alternatively, run this command:
Code:
chmod +x /home/<your-user-name>/Downloads/AndroidSDK/platform-tools/fastboot
8. Now to set things up so adb and fastboot recognize your Nexus.
- Type this command into a terminal:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
- Paste this into the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
- Click save and close.
- Then, type the following terminal command:
Code:
sudo restart udev
9. Almost done with preparations! Run this command:
Code:
gedit .bashrc
And add this line to the top of the file:
Code:
#AndroidDev PATH
export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools
Then save the file and close.
10. Download this file and save it to /home/<your-user-name>/Downloads/AndroidSDK/platform-tools: http://www.mediafire.com/?4pe5y906zr67nfh
10.We're ready to go!
Unlocking the Bootloader on your Nexus S and Rooting
Once again, unlocking your bootloader wipes everything on your device, including USB storage. Make a backup of any files you want to keep.
1. On your Nexus S, go to Menu>Settings>Applications. Select "Development" and check the box next to "USB debugging"
2. Power off the phone, and then hold down the Volume Up button and the Power button simultaneously to get into Bootloader/Fastboot mode. Connect your Nexus to the computer via USB.
3. Run this command to unlock your bootloader: (Once again WIPES EVERYTHING!)
Code:
fastboot oem unlock
Hit Enter and on your phone you will be prompted to confirm the action. (Use Volume +/- buttons to choose, power button to confirm choice) Confirm. At this point you will have an unlocked bootloader.
4. Copy/paste the following into the Terminal window:
Code:
fastboot flash recovery /home/<your-user-name>/AndroidSDK/platform-tools/recovery-clockwork-herring.img
5. Use the Volume +/- buttons to choose the Recovery option, then press the power button.
6. In Recovery, go to 'mounts and storage' and choose 'mount USB storage'.
7. Go to this page: http://forum.xda-developers.com/showthread.php?t=682828
About 1/5 of the way down on that page, find the link for "su-2.3.6.1-ef-signed.zip", which is the link for the Froyo version of Superuser. Control-click (right click) on that link and choose "Download Link As..." Save that file to your desktop and then copy it to the main directory of your mounted phone.
8. Click 'Unmount'. Go back to 'mounts and storage' and choose 'mount /system'. Then Go Back and choose 'install zip from sdcard'>'choose zip from sdcard'>su-2.3.6.1-ef-signed.zip
9. When it's finshed installing, reboot. You are now rooted.
Special Thanks
Amin Sabet; I used your Mac guide as a reference and copy/pasted some things for convenience.
Koush; For first posting the unlocking information, developing ClockworkMod Recovery, and ROM Manager. You should probably hook him up with a donation. https://www.paypal.com/us/cgi-bin/w...63663d3faee8d9384d85353843a619606282818e091d0
Michael.B.; for suggesting adding the platform-tools folder to the .bashrc file.
Linus Torvalds; Without which we'd have neither Android nor Ubuntu.
Feel free to leave your comments on the guide below.
Good guide for beginners, I would throw in how to update their path so they can just type adb or fastboot
On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ and platform-tools directories to it. If you don't see a line setting the path, you can add one:
export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools
Click to expand...
Click to collapse
Be sure to update your username above.
Thanks a lot man, great guide. I didn't get my NS yet but this is gonna be very useful soon
ps: someone please stick this
Michael.B. said:
Good guide for beginners, I would throw in how to update their path so they can just type adb or fastboot
Be sure to update your username above.
Click to expand...
Click to collapse
Thanks for the tip. I added your tip and instructions for marking fastboot as executable.
Stuck due to the thread's usefulness
I forgot to ask: will this work for 64 bit systems?
nicholasbgr said:
I forgot to ask: will this work for 64 bit systems?
Click to expand...
Click to collapse
It should work just fine.
Thanks, got me rooted nice and quickly.
BlackOtaku said:
It should work just fine.
Click to expand...
Click to collapse
Yes but don't forget to install 32 libs.
Thanks for guide
Useful !
I'm waiting for cyanogen ROM so i'll able to install
Cheers
To confirm, yes it works on 64bit. I am running that
Thanks for the confirmation, guys
Good stuff, much appreciated.
I'm working on a simple shell script that should automate some of the more menial tasks while holding the user's hand through the process. I should have it up later today.
UPDATE: It's up! Link on the first page.
Sent from my Nexus S using XDA App
question:
If I use
Code:
fastboot boot recovery.img
instead of
Code:
fastboot flash recovery recovery.img
will i get OTA updates?
confiq said:
question:
If I use
Code:
fastboot boot recovery.img
instead of
Code:
fastboot flash recovery recovery.img
will i get OTA updates?
Click to expand...
Click to collapse
Or, I don't get OTA until i change OS with zip file (ex: su app) ?
confiq said:
Or, I don't get OTA until i change OS with zip file (ex: su app) ?
Click to expand...
Click to collapse
You shouldn't flash the recovery in the boot partition, I think that will cause problems with the phone period. :S
If you flash a custom boot.img (which this guide doesn't cover, though the script will flash Superboot) or kernel like Paul's Superboot, Supercurio's Voodoo Kernel, or Koush's insecure boot.img, OTA updates will fail to install. OTA updates will also reflash your recovery back to stock. One of the devs around here will probably start modifying them so they don't check the boot.img or reflash the recovery though.
Thanks for this! Worked perfectly
Hi all,
I have a strange problem. I can install ClockworkMod recovery but, when I reboot the phone, I don't have superuser installed and su doesn't work. If I reboot the phone, I have to install the recovery every time. It seems it isn't permanent.
Thanks
Matroska
matroska said:
Hi all,
I have a strange problem. I can install ClockworkMod recovery but, when I reboot the phone, I don't have superuser installed and su doesn't work. If I reboot the phone, I have to install the recovery every time. It seems it isn't permanent.
Thanks
Matroska
Click to expand...
Click to collapse
To fix the problem, before selecting zip file, you have to select mount /system. Then go to apply update.zip and proceed as usual.
Thanks
ok im stock
with this part fastboot oem unlock ware i put this code in my terminal of my pc ,,i put the cell in fasboot , i intall everiting if i put that code in my terminal
bash: /home/toshiba/.bashrc: line 2: syntax error near unexpected token `('
bash: /home/toshiba/.bashrc: line 2: `export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools# ~/.bashrc: executed by bash(1) for non-login shells.'
[email protected]:~$ fastboot oem unlock
fastboot: command not found
[email protected]:~$
what can i do or im doing wrong
I am not a developer or even smart. I poked around until I found something that worked for me. Use at your own risk.
I rooted and installed CM 7.0.2 in the past and was pretty happy. When 7.1.0 came out I took the leap. Everything was great except for GPS. GPS did not connect at all. Nothing I did could bring it back other than going back to stock rom. After much frustration and fighting I have it working.
Many people said to make changes to the /system/etc/gps.conf. The problem I had was S-ON was preventing it and nothing I could find explained a work-around. Sorry if I missed it.
I am going to explain what I did to get it going.
Phone details:
- My phone is rooted and CM7.1 installed.
- S-ON
- GPS don't work (even after 30 minutes of waiting)
- Clockwork is on sdcard as update.zip (not permanent)
- Phone is connected to the computer (with adb installed and working)
Proceedure:
1. Unzip the gps.conf.zip file (attached) to the root of your sdcard
2. Turn off the phone
3. Press and hold the volume down and then press the power button
4. Choose "recovery" from the menu and press power (phone will reboot into recovery)
5. Press and hold volume up and press the power button (this may take a few seconds)
6. Choose "Apply sdcard:update.zip" and press power button (assumes clockworkmod is on the sdcard and named update.zip)
7. Choose "mounts and storage" and click the bottom middle button (trackball)
8. While mount /system is selected press the trackball. (sinkinglow suggested that you might need to mount /sdcard as well)
9. Switch to the computer now
10. At a command prompt (DOS) in the folder where adb.exe is located type "adb shell"
11. Type "cd /system/etc" (if you cant get in then you did not mount /system properly)
12. Type "cp /sdcard/gps.conf ."
13. Switch back to the phone.
14. Click the trackball again to unmount /system.
15. Click the back arrow (bottom right)
16. Choose "reboot system now"
Once the phone is back up, you should be all good.
GPS fix htc espresso
Is there anyway that you could maybe post a youtube video on how to do this, or send me a pm.I will give you my contact info.Maybe you could walk me through it.
ok im stuck at (12. Type "cp /sdcard/gps.conf .") i get this in cmd prompt :
C:\Users\Ryan>adb shell
~ # cd /system/etc
cd /system/etc
/system/etc # cp /sdcard/gps.conf
cp /sdcard/gps.conf
BusyBox v1.16.2androidminimal (2010-03-28 22:34:51 EDT) multi-call binary.
Usage: cp [OPTIONS] SOURCE DEST
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY
Options:
-a Same as -dpR
-R,-r Recurse
-d,-P Preserve symlinks (default if -R)
-L Follow all symlinks
-H Follow symlinks on command line
-p Preserve file attributes if possible
-f Force overwrite
-i Prompt before overwrite
-l,-s Create (sym)links
/system/etc #
then step 13/14 (14. Click the trackball again to unmount /system.) says on phone Error unmounting SYSTEM:!
confused on where to go in cmd prompt i think theres a step missing
Try this
Instead of "cp /sdcard/gps.conf", use :
"cp /sdcard/gps.conf /system/etc"
Worked for me and GPS locks within 15 seconds now.
boss2688 said:
ok im stuck at (12. Type "cp /sdcard/gps.conf .") i get this in cmd prompt :
C:\Users\Ryan>adb shell
~ # cd /system/etc
cd /system/etc
/system/etc # cp /sdcard/gps.conf
cp /sdcard/gps.conf
BusyBox v1.16.2androidminimal (2010-03-28 22:34:51 EDT) multi-call binary.
Usage: cp [OPTIONS] SOURCE DEST
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY
Options:
-a Same as -dpR
-R,-r Recurse
-d,-P Preserve symlinks (default if -R)
-L Follow all symlinks
-H Follow symlinks on command line
-p Preserve file attributes if possible
-f Force overwrite
-i Prompt before overwrite
-l,-s Create (sym)links
/system/etc #
then step 13/14 (14. Click the trackball again to unmount /system.) says on phone Error unmounting SYSTEM:!
confused on where to go in cmd prompt i think theres a step missing
Click to expand...
Click to collapse
Step 12 issue
I think what is being missed it the "." at the end of that comand. The "." is the second argument of the "cp" command and "." means the folder i'm currently in.
If you leave it out you are not telling the cp command where to put the file.
Sorry if I abandoned this post. It sat for weeks with no responses so I quit visiting. Hope it helped you guys out.
Is there anyway that you could post a youtube video on this process.I am missing something
---------- Post added at 05:18 PM ---------- Previous post was at 05:12 PM ----------
Maybe you could send me a pm.Then I could give you my contact info.we could go from there.I just really want to use cm7, but this GPS nonsense is keeping me from doing this.
Assumptions
I made a list of assumptions at the top of the post.
- My phone is rooted and CM7.1 installed.
- S-ON (not required but if you have S-OFF you don't need these instructions)
- GPS don't work (even after 30 minutes of waiting)
- Clockwork is on sdcard as update.zip (not permanent because of S-ON)
- Phone is connected to the computer (with adb installed and working)
So you must have already rooted and installed clockwork as well as CM7. You must have the clockwork (update.zip) in the root of your sdcard. you must have ADB working on your computer and working with your phone (shows in devices list). If you have those then it should be following the steps. I am not currently using my slide and do not have equipment or and account to post videos so that would be difficult. if you can tell me where you get stuck I might be able to help.
Like mentioned before I really don't know what I'm doing. I just tried TONS of stuff till I got a feel for things and found a combination that worked for me.
If you are having issues with rooting or installing CM7 or clockwork then that is beyond this tutorial and there is lots of info out there for that.
My phone is rooted and flashing CM7.1.0 (from CM 6.1.1) is simple.
1.) I can never get "adb shell" to "take to" (for lack of better words) the cmd prompt.I always an error message.Maybe I dont have adb installed and/or running right on my PC and/or phone any help would be awesome.
step # 10 is where I get stopped (in my tracks).
My phone is rooted and flashing CM7.1.0 (from CM 6.1.1) is simple.
1.) I can never get "adb shell" to "take to" (for lack of better words) the cmd prompt.I always an error message.Maybe I dont have adb installed and/or running right on my PC and/or phone any help would be awesome.
step # 10 is where I get stopped (in my tracks).
captorofxxx said:
My phone is rooted and flashing CM7.1.0 (from CM 6.1.1) is simple.
1.) I can never get "adb shell" to "take to" (for lack of better words) the cmd prompt.I always an error message.Maybe I dont have adb installed and/or running right on my PC and/or phone any help would be awesome.
step # 10 is where I get stopped (in my tracks).
Click to expand...
Click to collapse
Try this out before you begin. http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK
Simply start from where it says Windows and you should be good to go.
Did this fix just a moment ago and it worked like a charm. Thanks reiter01
I wish someone would post a video or give (intricate-no detail left out) instructions on how to do this.I video would be the ticket.If I could follow someone or watch someone do it........
I wish someone would post a video or give (intricate-no detail left out) instructions on how to do this.I video would be the ticket.If I could follow someone or watch someone do it........
reiter01 said:
I think what is being missed it the "." at the end of that comand. The "." is the second argument of the "cp" command and "." means the folder i'm currently in.
If you leave it out you are not telling the cp command where to put the file.
Sorry if I abandoned this post. It sat for weeks with no responses so I quit visiting. Hope it helped you guys out.
Click to expand...
Click to collapse
yeah i think that was the problem i didnt see the ''." there and sorry if im being noob with adb i was never any good with cmd prompt, i prefer a GUI
ADB issues
There are countless posts and article about getting adb working. I use a Mac so it's never an issue for me. If you haven't already installed the USB drivers for your specific phone the first time you hook up then you will have issues. Windows will choose a generic driver that ADB can't use. You need to find instructions on removing the generic driver and install the right one.
I'm really glad some had had success with my little tutorial. I am sure there has to be easier ways but it's the best I could come up with.
Worked great
This worked great for me, my GPS now locks on within seconds. One note to add, I had to mount /system and /sdcard. Thank you for this fix.
GUIless
@boss2688: I agree with having a GUI when available. I have no phone programming skills and so I didn't try that. I am not sure if it would work anyway because the S_ON would be in place blocking by the time the GUI shows up. On the other hand, I am sure that someone could make a zip with scripts etc to do what I am doing manually. I tried and failed to make a zip. I wanted to have it work just like you install google apps from clockwork.
@sinkinglow: Not sure why you would have to mount /sdcard. It should be mounted already at that point (I think). I no longer use my slide so I can't go back and test. Thanks for the tip. I will see if I can figure out how to edit the original post and add that as a possible step.
reiter01 said:
@boss2688: I agree with having a GUI when available. I have no phone programming skills and so I didn't try that. I am not sure if it would work anyway because the S_ON would be in place blocking by the time the GUI shows up. On the other hand, I am sure that someone could make a zip with scripts etc to do what I am doing manually. I tried and failed to make a zip. I wanted to have it work just like you install google apps from clockwork.
@sinkinglow: Not sure why you would have to mount /sdcard. It should be mounted already at that point (I think). I no longer use my slide so I can't go back and test. Thanks for the tip. I will see if I can figure out how to edit the original post and add that as a possible step.
Click to expand...
Click to collapse
a much easier way if you don't have experience with ADB would be to use Android Commander. Please see http://androidcommander.com/ (of course you would still need to mount the system from clockwork if you don't have S-OFF) hopefully this helps for those still having issues.
CM7 1 MyTouch Slide GPS fix
Im going up on the 26th, and was hoping to try this slide then bop over to Gothics. Im going to get to the slide and then make the call as to how safe it seems....Backup plan is any other thing time permitting from that spot. Thats how I roll
* I have to run USBDeview.exe and delete everything sometimes. I think the devices get confused etc..
* I also have to use "Vista_x86" drivers as none of them work for me ..in XP SP3
Code:
C:\usb\ANDROID\Vista_x86\androidusb.cat
C:\usb\ANDROID\Vista_x86\androidusb.INF
C:\usb\ANDROID\Vista_x86\androidusb.sys
C:\usb\ANDROID\Vista_x86\htcrndis.cat
C:\usb\ANDROID\Vista_x86\htcrndis.inf
C:\usb\ANDROID\Vista_x86\WdfCoInstaller01007.dll
Please note, I can only speak with any degree of certainty about devices bought from Play / Moto. I cannot attest to the accuracy of this information for US carrier versions etc. Anything you do is at your own risk
Contents / Thread overview
Introduction
What is Fastboot?
What is adb?
How to install adb and fastboot
How to test adb and fastboot work
OK Gimme some useful fastboot commands please!
OK Gimme some useful adb commands please!
A little more about using Windows command prompt
Myth Busters
Introduction
adb and fastboot are very useful command line tools. They can be used from Windows, Linux or Mac to carry out tasks on your android device, such as moving and backing up files, rooting and restoring your phone to it's factory state. Understanding how to use these tools could save your phone when you get yourself in trouble. This is especially true of rooted users. Particularly those of you who are "new to the scene". You definitely should read and understand this thread before you do ANYTHING root related.
This thread is not intended to be a non-exhausted reference. It is merely here to give an overview of the most basic of basics
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What is fastboot?
Fastboot comprises of 2 components.
1) Fastboot mode on the phone (The Bootloader)
2) Fastboot tool on your computer
Fastboot is a small command line tool that you can use from your computer whilst the phone is connected via USB and you are booted into the bootloader. The most common uses for fastboot are:
Unlocking the bootloader - needed as part of the rooting process
Flashing a custom recovery to the device - needed as part of the rooting process
Flashing factory images - used for saving / trestoring your device back to stock
Being able to do these 3 things are essential before rooting. Many new users skip learning these and use a toolkit to root. As a result, when they mess up and we try to explain what they need to do to fix their issues, it becomes very difficult for us to help as fastboot is not understood. It is YOUR responsibility to understand these things BEFORE you mess up.
What is adb?
adb is another small command line tool that stands for "Android Debugging Bridge". Again, it can be used from a computer connected via USB to your android device. It can be used whilst the device is booted into Android or (if you have a custom recovery), it can be used in recovery too, unlike fastboot (yes, adb and fastboot are NOT the same thing) which can only be used in the bootloader.
adb can be used to push files to (or pull files from) your phone. It can also be used to execute many of the commands available in Linux terminals (Or Android terminal emulators) on the device itself. We're not here to cover all these commands however. We just want to cover the basics.
How to install adb and fastboot
adb and fastboot are very easy to install and can be installed on Windows, Linux and MAC computers. The Windows install can be a little bit more complicated than the other 2 and may need additional drivers installing too.
Windows.
There is a very handy tool that can install adb and fastboot in 15 seconds. It is recommended that you use this to install adb and fastboot. Please see the link immediately below for that tool:
ADB, Fastboot and Drivers - 15 seconds ADB Installer - Really quick and easy way to install adb and fastboot (by @Snoop05). Download links are at the bottom of post 1.
This tool asks if you want to install adb and fastboot (to which you should answer Y) and then creates c:\adb\adb.exe and c:\adb\fastboot.exe
It then asks if you want to install it system wide .. This is asking to install for all windows users. < 15 second installer needs updating to SDK 23, which is required for latest Android versions.
Download the latest SDK (adb and fastboot) versions here: https://developer.android.com/sdk/index.html (Scroll down to SDK tools only) then download the Windows *Installer*.
Open the installer and select "Platform-tools" and install the packages. This should create "C:\Program Files (x86)\Android\android-sdk\platform-tools"
Now we want to set this path as a Windows Environment variable PATH to make the executables work system wide:
right-click computer > properties > advanced > environment variables.
under system variables click "path" and click "edit"
at the end of the line, add the below:
Code:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
Please note, the semi-colon ; is VERY important.
You may also need to install drivers.
Here is a link to the Google USB Driver: DOWNLOAD THIS
Code:
To install on Windows 7:
- Ensure existing drivers are uninstalled first*
- Extract the zip to c:\adb (created earlier by the installer)
- Right-click "Computer" > Manage in windows and choose "Device Manager"
- Boot the Nexus 6 to the bootloader (Volume down + Power) and connect the USB Cable
- Watch for any new devices with exclamation marks appearing
- Right-Click the new device > Update driver software
- Choose the "browse" method and browse to c:\adb, find teh folder you extracted then follow the wizard to the end - using amd6 64 if you're on a 64 bit system and i386 if you're on a 32 bit system.
*To uninstall existing drivers, boot into Android and connect the USB cable. Monitor device manager for the device showing up. To uninstall the device, right-click it to uninstall it. At the prompt, ensure you also choose to delete the driver. Repeat this for bootloader and recovery.
Code:
To Install on Windows 8, you may need to additionally disable driver enforcement
- From the Metro Start Screen, open Settings (move your mouse to the bottom-right-corner of the screen and wait for the - -- pop-out bar to appear, then click the Gear icon).
- Click ‘More PC Settings’.
- Click ‘General’.
- Scroll down, and click ‘Restart now’ under ‘Advanced startup’.
- Wait a bit.
- Click ‘Troubleshoot’.
- Click ‘Advanced Options’
- Click ‘Windows Startup Settings’
- Click Restart.
Once that is done, your Windows computer is configured for adb and fastboot.
In device manager, the device should show up as below, depending whether you are booted into recovery or bootloader...
Recovery - Android Device > Google Nexus 4 ADB Interface
Bootloader - Android Device > Google Nexus 4 Bootloader Interface
If it shows as something different, either you have existing drivers in the way or something went wrong.
Linux and Mac
Here is a really simple tool to install adb and fastboot on the above OS. The only expectation is you know how to open and run a terminal command. Please see the link immediately below:
Nexus Tools 2.2 (Featured by XDA) - adb and fastboot installer for Linux and Mac (by @corbin052198)
Once you have installed adb and fastboot from the above link, you're ready to go.
How to test adb and fastboot work
As previously mentioned, adb and fastboot are both command line tools. That means you must run these tools from command prompt (cmd in Windows) or Terminal (Linux and Mac).
Remember earlier, I mentioned that fastboot can only be used in bootloader? and adb can only be used in Android (or custom recovery - lets cover that later)? We can use the command "fastboot devices" and "adb devices to see if we have adb and fastboot working correctly.
Lets try it.
Boot your phone into android
Connect it to your computer via USB
Open cmd (start > type "cmd" on Windows) or Terminal (Mac/ Linux
Type in the windows "adb devices" and press enter
Here is what we don't want to see:
Notice how there is nothing underneath where it says "List of attached devices" That means it cannot see any device
Here is what we DO want to see:
We can see that there is now a device listed.
OK lets test fastboot. Unplug the USB and turn off the phone. When it is off, hold down Volume down + power until you feel the vibrate. You will now be in the bootloader. Reconnect the USB cable.
In the same window (cmd or terminal) we're going to now type "fastboot devices".
Again, here is an example of what we don't and do want to see:
If in both modes, you can see your devices "Serial Number", then you know they are both working.
Please note that if you cannot get adb and fastboot to work "system wide", you can open the command prompt to the location of the adb and fastboot executables exist and try from there.
OK Gimme some useful fastboot commands please!
Here are some of the most useful fastboot commands you will come across. Fastboot is used mostly for flashing images to the devices partitions on the internal memory.
Code:
fastboot oem unlock
This unlocks your bootloader and allows you to flash a recovery to root. WARNING, this will wipe your device. Rooting the N6 is essentially unlocking the bootloader, flashing a recovery and then putting the SuperSU zip on your sdcard and flashing it via the recovery. This thread covers rooting: [HOW-TO] The Nexus 6 All-In-One Beginner's Guide by @xBeerdroiDx
Code:
fastboot flash recovery recovery.img
This will flash a recovery.img to the recovery partition. The command is broken down into "fastboot flash" (what to do) "recovery" (where to flash to) "recovery.img" what to flash there. In the terminal or command prompt, you cannot just type "recovery.img" though. It has to be the path to where the recovery image is. For example, if my recovery image is on my desktop, I would have to type:
Code:
fastboot flash recovery c:\users\rootsu\desktop\recovery.img
It is worth noting, that it IS case sensitive, meaning if your file is called Recovery.img, you must type the capital R...
Other things you would flash:
Code:
fastboot flash system system.img
fastboot flash boot boot.img
These will flash the system image (ROM) and boot image (kernel) as you would if you were returning to stock.
A full guide to returning to stock can be found here: [TUTORIAL][GUIDE][HOW TO] Flash Factory Images || Unroot || Relock bootloader by @Mr hOaX
You can also boot into a recovery.img without flashing it...
Code:
fastboot boot c:\users\rootsu\desktop\recovery.img
which is "fastboot boot" (what to do) "c:\users\rootsu\desktop\recovery.img" what to do it with. As you may have noticed, we did not define the recovery partition in this command, that's because we're not flashing it....
OK Gimme some useful adb commands please!
At the moment, we are going to assume you have a custom recovery and you have booted into recovery. The reason for this is using adb in recovery can be much simpler.
Here are some useful scenarios for using adb.
Backup your sdcard to your PC
Code:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
**Please note, some recoveries may "mount data" automatically on boot, so don't be disheartened if you get an error stating device or resource busy. This probably just means you can't mount what is already mounted**
/data/media/0 is the real location of /sdcard for your information. Also referred to as "The mount point". What we have done here is "adb pull" (what to do) "data/media/0" (what to move) "c:\MyBackup" (where to move it to)
Push a zip file from your PC to your sdcard (useful if you wiped your sdcard and rom)
Code:
adb shell
mount data
exit
adb push c:\rom.zip data/media/0
What we have done here is "adb push" (what to do) "c:\rom.zip" (what to move) "data/media/0" (where to move it to)
You can of course also use adb to push and pull files to and from /system too. You just need to:
Code:
adb shell
mount system
exit
I mentioned earlier that using custom recovery is much easier for adb than whilst booted into Android. You need to ensure you have a kernel that allows insecure adb before you do anything with system and data partitions. You also need to ensure that USB debugging has been enabled in developer options.
For example, to mount system to pull files whilst android is running you have to:
Code:
adb root
adb shell
mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
...which is clearly a little bit more involved, so I recommend you use recovery for adb push and pull. You can find more detailed information on adb here: http://developer.android.com/tools/help/adb.html
A little more about using Windows command prompt
One thing to understand is that like Windows, command prompt (cmd.exe) works with directories (or folders if you like). The Linux and Mac terminals are the same, but most linux users, we expect you would already know this.
Here you will see I have downloaded a recovery image that I want to flash using fastboot.
As you can see, the recovery.img is located in C:\users\rootSU\Desktop
Usually when you open the command prompt from the start menu, or run command, the command prompt will default to your user location as seen below:
So lets try and fastboot flash recovery recovery.img...
It fails with a not-too-accurate error message. It has failed because you have not told it where the recovery image is. It assumes it is in the directory as listed in the prompt
So, how do we deal with this? Well, there are 3 ways.
1) We tell the command prompt where the recovery.img actully is in the command itself
Success! As you can see, we have told the command that the location for the file is Desktop\recovery.img
2) We can change the directory in command prompt to the directory where the file is. In this example, we change directory to "Desktop". The change directory command is "cd " or in this case "cd Desktop"
3) ...and possibly the simplest method. We hold shift whilst we right-click on the folder we want to change directory to, and directly open a command prompt there:
Another point to make with command prompt or terminals, is if you do a particular command, it is "pre-programmed" to "expect" a particular format of that command.
For example, we know that adb push as a command expects after it . This means the command is actually
Code:
adb push
BUT if you put something AFTER , for example -
Code:
adb push somethingelse
, it will assume that the "somethingelse" is a bad parameter, and the command will fail. It will probably display (or "print" which is the technical term in a terminal) a helpful guide of how the command should be used instead of trying to run the command which it does not understand.
You're probably wondering why I am telling you this. Well quite simply, it is a warning about folder names. Imagine you have c:\users\rootSU\My Documents as a folder. You assume the command is then
Code:
adb pull /data/media/0 c:\users\rootSU\My Documents
but it is not... There is a space in between My and Documents. What you have actually done is
Code:
adb pull Documents
because it uses a space to signify the end of a command or parameter. It is best to avoid using folders with spaces in them. Avoid as much as you can. In the event it is unavoidable (Although when is it ever>) then please surround the path with quotation marks,
Code:
adb pull /data/media/0 "c:\users\rootSU\My Documents"
so that way, it sees everything between the " " as a single parameter.
Myth Busters
Myth 1: You need USB debugging on to use adb and fastboot
If you cannot boot into Android, it doesn't matter. You DO NOT need USB Debugging turned on to use adb outside of android. USB Debugging is an Android ONLY setting. Fastboot obviously also does not need debugging either as this too is outside of Android
Myth 2: to adb push or fastboot flash files, they must be in the same folder as adb or fastboot executables. Sorry but this is rubbish. You can pass the full path of the image you're flashing or file you're pushing in the command and fastboot / adb can be called system wide if you've set them as an environment variable or used the 15 second installer
thanks(im out of thanks). but ill be back to leave one here!!!!!
simms22 said:
thanks(im out of thanks). but ill be back to leave one here!!!!!
Click to expand...
Click to collapse
No worries. Just putting it here for info. It's not a new work, just a slightly amended version of my N5 thread. No need for thanks
rootSU said:
No worries. Just putting it here for info. It's not a new work, just a slightly amended version of my N5 thread. No need for thanks
Click to expand...
Click to collapse
it was up in the n5 threads before, and was needed here. but its here now as well, so thank you
Good guide. Needs to be a sticky. In fact, I think every device general forum should have a sticky like this. Would have saved me a lot of grief back when....
Excellent update.
Very good to see. I'm sure lots of people will be sending noobs here for the basics.
Up to your usual helpful, good work I see.
rootSU said:
This tool asks if you want to install adb and fastboot (to which you should answer Y) and then creates c:\adb\adb.exe and c:\adb\fastboot.exe
It then asks if you want to install it system wide (to which again, you should answer Y)... This then allows you to type adb commands in the command prompt without having to open a particular directory first. You may or may not understand what I mean when I say that, but take it from me, its much more convenient and easier to use this way.
Click to expand...
Click to collapse
Y option = System-wide = install to "C:\adb" and add path for system variable - This mean you can use it by any account on your pc.
N option = Current user only = install to "C:\Users\[YOUR USERNAME]\adb" and add path for user only - Only user account used for installation can actually use it.
So if you say Y or N you will be still able to use it from any directory with cmd.
rootSU said:
It will also ask if you want to install device drivers. Actually, say N to this as we're going to cover that next, using the google USB drivers
Here is a link to the Google USB Driver: DOWNLOAD THIS
Click to expand...
Click to collapse
Drivers in my installer are the one from the link you posted here. I'm not using any modified drivers, just the one that come with SDK. And they are also digitally signed.
I hope you will fix these But still nice work, beginners should understand it :good:
Snoop05 said:
Y option = System-wide = install to "C:\adb" and add path for system variable - This mean you can use it by any account on your pc.
N option = Current user only = install to "C:\Users\[YOUR USERNAME]\adb" and add path for user only - Only user account used for installation can actually use it.
So if you say Y or N you will be still able to use it from any directory with cmd.
Drivers in my installer are the one from the link you posted here. I'm not using any modified drivers, just the one that come with SDK. And they are also digitally signed.
I hope you will fix these But still nice work, beginners should understand it :good:
Click to expand...
Click to collapse
Thanks for the info. I thought system wide meant it was putting it as a path environment variable. Reason I didmt use the drivers from your tool originally is (well I wrote this thread for N5 originally) they didnt work so had to install the universal naked driver. But if yours are the same as the ones linked, I can update that.
rootSU said:
Thanks for the info. I thought system wide meant it was putting it as a path environment variable. Reason I didmt use the drivers from your tool originally is (well I wrote this thread for N5 originally) they didnt work so had to install the universal naked driver. But if yours are the same as the ones linked, I can update that.
Click to expand...
Click to collapse
Path is added in both cases.
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
papeshfoo said:
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
Click to expand...
Click to collapse
Can you be very specific with your issue please?
papeshfoo said:
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
Click to expand...
Click to collapse
Android M no like root, you'll either have to live with stock or wait for chainfire to do his thing.
This all worked well until I had to find my device in the cmd prompt. It listed no devices when I typed in "ADB Devices". The issue I found was with the ADB Interface Driver. I uninstalled it and reinstalled it thinking it might've been a driver issue, but it still wouldn't work. I tried the "Uninstall driver" then "scan for hardware changes" but that didn't work. Finally I found the universal ADB driver and tried using that. STILL nothing. I figured that, because I don't have my device's driver installed, it might've been that, so I tried to DL it and yet again, nothing. I have a Kyocera Hydro Life, if that helps. Also, I tried looking through the "update driver manually" in order to update the driver software by looking through the different ADB interfaces that it had but my Kyocera driver wasn't there. Is it supposed to be there or do I just use one of the ones provided?
I checked my programs and apps and it says that the Kyocera usb driver was installed. Did I do something wrong?
ScottyChaos said:
This all worked well until I had to find my device in the cmd prompt. It listed no devices when I typed in "ADB Devices". The issue I found was with the ADB Interface Driver. I uninstalled it and reinstalled it thinking it might've been a driver issue, but it still wouldn't work. I tried the "Uninstall driver" then "scan for hardware changes" but that didn't work. Finally I found the universal ADB driver and tried using that. STILL nothing. I figured that, because I don't have my device's driver installed, it might've been that, so I tried to DL it and yet again, nothing. I have a Kyocera Hydro Life, if that helps. Also, I tried looking through the "update driver manually" in order to update the driver software by looking through the different ADB interfaces that it had but my Kyocera driver wasn't there. Is it supposed to be there or do I just use one of the ones provided?
I checked my programs and apps and it says that the Kyocera usb driver was installed. Did I do something wrong?
Click to expand...
Click to collapse
Try a different USB port. If that doesn't work try a different USB cable. If that also doesn't work, you could try disabling driver signature checking for Windows.
If those don't work, try this thread > http://forum.xda-developers.com/showthread.php?t=1583801
cam30era said:
Try a different USB port. If that doesn't work try a different USB cable. If that also doesn't work, you could try disabling driver signature checking for Windows.
If those don't work, try this thread > http://forum.xda-developers.com/showthread.php?t=1583801
Click to expand...
Click to collapse
EDIT: I also forgot to mention that the error code that came up while I was in the dev manager was compatibility error code (28) when I clicked on "Device ADB interface".
ScottyChaos said:
EDIT: I also forgot to mention that the error code that came up while I was in the dev manager was compatibility error code (28) when I clicked on "Device ADB interface".
Click to expand...
Click to collapse
Error 28 means drivers not installed. Try the driver help thread that I linked above.
---------- Post added at 12:33 PM ---------- Previous post was at 12:04 PM ----------
cam30era said:
Error 28 means drivers not installed. Try the driver help thread that I linked above.
Click to expand...
Click to collapse
@ScottyChaos,
Just a fundamental question: I assume you have enabled "Developer Options" in Settings, and then checked "enable USB debugging"?
---------- Post added at 12:39 PM ---------- Previous post was at 12:33 PM ----------
[/COLOR @ScottyChaos,
Here is a thread that you might find interesting > http://forum.xda-developers.com/android/help/metro-pcs-kyocera-hydro-life-rooted-t2870678
Windows 10 device driver management is even more locked down then windows 8. I got two of the three drivers loaded but when going into adb mode on the phone through recovery it just disappeared out of the device manager. I had to unplug and plug in while in that mode to trigger a unloaded driver in the device manager. Once there I had to force the adb driver manually with the nasty windows driver warning and all. Once I did that I could see the device in adb mode and sideload my marshmallow OTA. woot!
I decided to drop a thanks bomb...
ADB is good.
But that fastboot.
Seriously, its ONE command. OK, a few different arguments to use.... But it is so easy, and so powerful. People are afraid to mess up on command line, but its actually way harder to type the wrong thing out then to click the wrong thing.
LEARN IT. Forget your toolkit.
You can fix almost anything, Its not too hard for you. It may be new... YOU CAN DO IT.
Also, I have to say it... Its not going to help anyone, but it will keep me from punching something. ADB and Fastboot... Not the same. You don't ADB a new system image....
Hello,
In the process of flashing my note 4, several dozen times, it seems I overheated it while flashing and burned up my memory and got the dreaded memory error,
which requires you to either
1, buy a machine to remove the memory chip, solder in a new one, and reprogram it with a special flashing tool, ( probably several thousand dollars, with acccess to the correct flash file
or
2, buy a new motherboard
So,
I ordered a new motherboard from China, 29.00 on Alibaba.
When i received it it was already setup booted to a running 5.0.1 oem rom, with no user or other programs setup. I could not root it..
I tried several guides and found this one by @hsbadr
Code:
https://forum.xda-developers.com/note-4-verizon/development/howto-bootloader-unlock-upgrade-to-t3398144
In the forum found this link to files needed
Code:
https://forum.xda-developers.com/devdb/project/?id=15720#downloads
with this file
Code:
https://forum.xda-developers.com/devdb/project/dl/?id=18880
and installed it via odin.
Both this guide
Code:
https://forum.xda-developers.com/showthread.php?t=3360883
and @hsbadr guide shows to install kingroot, others show kingoroot, and others show to install a perm root after temp root.
In way with either my oem 5.0.1 or 5.1.1 could I root with kingroot, with any flavor of file! kingoroot would not install on either rom.
HOWEVER i was successful at using the PC kingoroot version with the above file mentioned.
CAUTION #1. make sure you have an antivirus installed to block some spyware. I used AVG with windows 7
CAUTION #2. dont click on any popups except to close them except for the main root screen
Root took about 30 sec with no reboots,
Caution : its a temp root that wont last on reboot
so continue onto
ADB & The Unlocker
install ADB to c:/ADB folder
copy the unlocker file to this folder or add c:/ADB to your path
Your phone should have been connected already with a usb cable to your computer. We need to verify your phone is found by adb.
open search by your home button in windows
search command or cmd
right click, open as administrator
change directory to your adb folder and
Type in the following command:
Code:
adb devices
Which should return the following
Code:
List of devices attached
123a12ab device
The 123a12ab is made up. Yours will be specific to your device.
If you see something listed like the above adb is working. Now on to the next command to move the unlocker to the phone.
Step 5.1: Send Unlocker to Phone with adb
Type the following command: adb push samsung_unlock_n4-fix /data/local/tmp/
If you get an error it’s because you a) typo b) file isn’t in the folder with adb.exe c) your phone is locked/screen is off d) usb debugging isn’t turned on in settings > developer options.
++++ modified, you should have temp root with kingoroot pc version
Step 6: SKIP -----Kingroot For Temp Root
Keep the adb window accessible you will need to be able to switch to it and enter in the commands below quickly as temp root is unstable. Be ready to copy or type them quickly.
Step 6.5: Work Quick With Precision
++++ modified
Open Root Checker so it’s ready to go. Check .
Once you do see successful root click the multi tasking button on the phone to switch over to root checker. Temp root is buggy and may crash. If it does repeat this process again with getting temp root and opening the apps in the correct order.
If you make it into root checker via the multi tasking button it will ask you to grant it root access, click yes, check for root. If it says you have root go to the command adb window and type these commands in quickly to verify root
you are now going to enter the linux shell on your device
Code:
adb shell
su
if you see the # prompt you are ready. copy and paste the following
Code:
cd /data/local/tmp/ && chmod 777 samsung_unlock_n4-fix && chown root.root samsung_unlock_n4-fix && ./samsung_unlock_n4-fix
The device will reboot and flash the developer code, shut the phone down by removing only the battery and usb cable.
+++++ edited
Step 7: One More Time to unlock the bootloader !!
Put the battery and cable back in and turn the phone back on.
Now repeat the kingoroot PC to gain temp root
Repeat step 6.5
After you send the last adb command and it will reboot and enter a bootloop . THIS IS NORMAL.
again pull the usb cable.
Pull the Battery
PULL THE SD Card and Keep the sd card out!
The sd card is unusable and needs a reformat, or you can keep it because it has a backup of your locked bootloader
Until you plug it into your computer and format it. It doesn’t matter when you format it if it’s not reporting the correct size. This will be fixed by putting it back into your phone AFTER you format it on your pc and formatting it on the phone.
Your bootloader is NOW UNLOCKED
reboot your phone,
and install TWRP via ODIN !!
++++ ignore this it wont work i tried . you need the androind kingroot or kingoroot to work. if u use kingoroot PC to root again, SUPERSUme will not find it .. waste of time
Step 8: Temp Root A Third Time
+++ Modified
Step 8: copy over a rom that you have already downloaded that you want to try
I reccomend this one
Code:
https://forum.xda-developers.com/note-4/snapdragon-dev/oreo-8-1-0-unofficial-lineage-15-1-rom-t3760969
download the rom, and the gapps to your computer and transfer them to a clean SD card.
power off the phone and install the SD card with your rom files
++++ Now were going to do it !!!
Step 9: Odin the newest twrp
Turn the phone on and enter download mode by pressing and holding volume down + power + home. When it’s comes to the screen and says “Downloading” you’re ready to proceed.
Browse to your ODIN folder on your computer , right click, open as administrator the odin.exe file
In Odin3 where it says Files [Download] click AP and navigate to the folder you have the twrp file . select/open the file twrp-3.x.x.x-trltevzw.tar.md5
Turn off the automatic rebooting in the custom tab, DO NOT select the PIT tab
Press start
Once it finishes it will say Success or FAILED
IF it says FAILED start the process over, you didn't unlock the bootloader
Power off the phone with the pull battery method
Press and hold these buttons immediately to enter TWRP ,
volume up + power + home.
++++ this step 10 is outdated. see mine below
++++ There are other methods to root unless you want to root your stock 5.1.1 kernel and stay there
Step 10: TWRP & ADB Sideloading
Swipe to allow changes in TWRP. Click Advanced and then ADB Sideload. Swipe to start adb. On your computer open adb.exe from Step 4. On the command line interface in adb.exe
Type the following command: adb devices
Verify your device is there and says sideload.
Type the following command: adb sideload BETA-SuperSU-v2.71-20160331103524.zip
The phone will install Super SU, after it is finished we will install the new Kernel before rebooting.
You may need to re-enter ADB Sideload on the phone.
Type the following command: ab devices
Verify your device is there and sys sideload.
Type the following command: adb sideload Emotion-TW-5.1.1-nightly-r21-RC1-SM-N910P.zip
Reboot the phone.
If boots into 5.1.1 open root checker and verify you have root.
++++++
Step 11: TWRP rom setup the first time by @tripLr
power on phone to recovery by holding down <up> <home> then <power>
boot into TWRP, allow changes.
select backup , change to SD card
BACKUP your rootable device with the bootloader and modem and everything. Name the backup rooted-backup-everything-5.1.1
go to install but DONT install yet
Select your sd card.
You should see the files for the ROM you transferred from your computer
If You dont, you can boot back up, transfer the files appropriately . Then come back here.
Now go to Wipe, Custom, and select everything except external SD card.
THIS IS TO guarantee, no Kingoroot or kingroot stuff is in the phone !!!
WIPE IT TWICE !!!
Now install you ROM, and after your inital setup, come back to TWRP and do a full backup
every time you try a new rom, and get it set up, do a backup. that way you can switch and test to your hearts desire till you run out of SD memory.
The cool thing is you can backup to an external memory device ! more room !
Enjoy
Information Sources: felixtaf, ryanbg, kingroot, twrp, emotion, ibowtoandroid, shimp208, & urgodfather
I also posted this on reddit. https://www.reddit.com/r/galaxynote4/comments/4f8cgc/guide_a_noobs_guide_to_permanent_rootunlocked/[/QUOTE]
tripLr said:
Admin Note: This is a special Q&A-formatted thread. Please follow this link to view it in your browser: http://xda.tv/post77375464
Click to expand...
Click to collapse
Admin can you delete this I accidentally posted the wrong type