[tutorial](under construction)rooting/flashing/recovery on linux[tutorial] - Xperia Z General

PLEASE SUGGEST IMPROVEMENTS TO INCREASE READABILITY AND CLARITY TO THIS TUTORIAL
Hi guys how are we all doing? This is my first guide so don't bite. I was seriously impressed with the level of support for Linux, I was able to completely sort my phone out in a few hours using Linux. Just a few things before we start this tutorial:
1.) This is a guide for rooting your phone, flashing a recovery and flashing EXISTENZ ROM. All in Linux. It does not include unlocking your bootloader although I'm sure you could achieve this very easily
2.) This is involve using the terminal to install FlashTool, DoomLords Root, and flashing recovery.
3.) If you can use Terminal and are familiar with file structures you're in a very good place.
4.) I use Linux Mint with the Cinnamon desktop. It is a Ubuntu variant. You should be able to do 99% with the commands I give you... otherwise you might have to tweak it very slightly.
STEP ONE: INSTALL FLASHTOOL
To install FlashTool we will do the following:
We will download FlashTool
We will move the files to a more sensible directory (where all the other programs are)
We will create a menu shortcut that requests root access.
We will install libusb via synaptic package manager which FlashTool requires.
Step 1.) Ok, so, download FlashTool from here: http://www.flashtool.net/download.php
Step 2.) Choose the Linux download and just place it on your desktop for simplicity. Have a clean Desktop for simplicity (i.e.) Have only the folders you need for this tutorial.
Step 3.) Unzip the folder and you should get another folder called "FlashTool" on your desktop. Delete the zip file
Step 4.) It might be worthwhile just checking if FlashTool works. So fire up the good old Terminal and type in:
Step 4.1)
Code:
cd Desktop/FlashTool
This puts us in the FlashTool folder in Terminal. Here's a hint, you don't need to fill out every letter in the commands. If you type in "cd Des" and then hit [TAB] then terminal will fill out the rest of the name for you ("Desktop"). Similarly if you type in "cd Desktop/Flas" and then hit [TAB] then terminal will fill out the rest of the name for you ("FlashTool").
Step 4.2) You can check the contents of a directory if you type in
Code:
ls -l
.
This will list every file and folder in the directory you are currently in. So it should produce a list that includes FlashTool, FlashToolConsole, firmwares etc etc. If it doesn't you are in the wrong directory. In addition to listing the files and folders it should give extra information. Look for the line that has "FlashTool" on it. On the left hand side of that line it should have something similar to -rw-r--r--. These are the permissions. We need to change this so do this:
Step 4.3) Type into the terminal
Code:
chmod ugo+x FlashTool
This will change the permissions of the file. "chmod" means "change mode", "u" means user, "g" means "group" and "o" means other. "+x" means add executable file permissions to this file.
Step 4.4) Type in
Code:
ls -l
once again. You should see that now the permissions for the file "FlashTool" has changed. Now we need to run flash tool:
Step 4.5) Type this into terminal:
Code:
su
**ENTER YOUR OWN PASSWORD**
./FlashTool
You should see the FlashTool GUI up and running.
At this point it would be a good idea to put the things you need to Flash via FlashTool in the "firmwares" folder.
So download these:
C6603_10.3.1.A.2.67_Generic UK.ftf from here: http://forum.xda-developers.com/xperia-z/general/stock-rom-xperia-z-c6603-10-3-1-2-67-t2512422
XperiaZ_C660X_KernelOnly_10.3.A.0.423_Generic_NL.ftf from here: https://docs.google.com/file/d/0B5TbYyrM0V0POTE3bk9RS29pV1E/edit
XperiaZ_C660X_KernelOnly_10.3.1.A.2.67.ftf from here: http://d-h.st/LVH
C6603_10.4.1.B.0.101_Stripped.ftf from here: http://nut.xperia-files.com/
Put them in the "firmwares" folder within "FlashTool"
Make sure they all end in .ftf, if they do not you probably need to unzip them
Ok so we should have everything we need for FlashTool. Now we need to move it into a more sensible folder.
Step 5.) Close the terminal down by typing in "exit" twice. Open up a new terminal. Move to the directory Desktop by typing into the terminal:
Code:
cd Desktop/
Now we need to move the folder to a part of the file system that needs root permissions:
Code:
su
**YOUR PASSWORD**
mv FlashTool /usr/lib/
This will mv (MOVE) the FlashTool folder into the /usr/lib/ directory.
If you want to check if it moved just open up your explorer and navigate to /usr/lib/ and you can see that the FlashTool folder will be there.
Now we should create a start menu icon.
Step 6.) I have the Cinnamon desktop. These steps should be ROUGHLY similar. Be creative. Try different things.
For Cinnamon to create a start menu icon I need to "RIGHT-CLICK" on the Start Menu, then go to "CONFIGURE" and then "OPEN THE MENU EDITOR" and then click "PROGRAMMING" in the LEFT COLUMN. After this click "NEW ITEM"
In "Name:" type in "FlashTool" (It doesn't actually matter what you put it)
In "Command:" type in "/usr/bin/gksudo /usr/lib/FlashTool/FlashTool"
Make sure it works. Close the menu editor and launch FlashTool from the menu to see if the GUI boots up.
I'm guessing many people don't have Linux Mint, you'll need to adapt your approach if you want a start menu entry (if you're using a different desktop environment).
Step 7.) Open up Synaptic Package Manager from your Start Menu and type into "Quick Filter": "libusb-1.0" and ensure there's a green box beside "libusb-1.0-0:i386" and "libusb-1.0-0". If they aren't just click the little box next to them, click on "Mark for installation" and hit "Apply" and away you go!
You now have FlashTool installed. Congratulations.
Now we need to flash "C6603_10.3.1.A.2.67_Generic UK" ROM so we can then root it and install a recovery.
Step 8.) Fire up FlashTool. Enter your password. If it doesn't ask for password, the program will boot but flashing will fail
Press the lightning icon. Choose Fashmode. Choose 10.3.1.A.2.67 Generic UK. It will ask you to put the device into flashmode (Turn your device off, hold down volume DOWN and insert USB) and then it'll flash that ROM and do it's thing.
At the end of all that you should have C6603_10.3.1.A.2.67_Generic UK ROM on your phone.
The next step is to ROOT this. For the rooting process your phone needs to be ON. Enable developer options (Settings->about phone-> hit "Build Number" until it says "You are now a developer" press back and then go to Developer Options and check "USB debugging". Go back one more time and go into "Security" and check "Unknown Sources" **Have these are your "default settings" i.e. make sure you have these on all the time**
Download DoomLords root method from here: http://forum.xda-developers.com/xperia-z/development/root-how-to-rooting-firmware-10-3-1-0-t2386405
We need to flash a different kernel temporarily. So open FlashTool again and flash XperiaZ_C660X_KernelOnly_10.3.A.0.423_Generic_NL the exact same way you flashed the Generic UK ROM. Enable Unknown sources and USB debugging if you need to.
Just place the file on your desktop and unzip it. Delete the zip file. Keep the unzipped folder. You should get a folder with:
files
runme_linux.sh
runme_mac.sh
runme_win.bat
etc, etc.
Just remove the mac and windows files. We don't need them. Keep the "files" folder.
Remember you can use [TAB] complete. If you type "DooM" and then [tab] it should fill out the rest of the folder name for you.
Open up a new Terminal and put in these commands:
Code:
cd Desktop/DooMLoRD_Easy-Rooting-Toolkit_v18_perf-event-exploit
chmod ugo+x runme_linux.sh
./runme_linux.sh
and it'll do it's thing and root your phone!
Check this by seeing if "SU" app exists on your phone.
Turn your phone off. Flash "XperiaZ_C660X_KernelOnly_10.3.1.A.2.67.ftf" via FlashTool.
Now we have a rooted firmware!
Step 9.) Install recovery
Download NUT's dual recovery from here: http://www.fun-industries.nl/xda/do...kZHVhbHJlY292ZXJ5Mi41LjEtUkVMRUFTRS53aW5kb3dz
Put it on your Desktop and unzip it. You should get a folder called "lockeddualrecovery"
Open a new terminal and cd to the directory:
Code:
cd Desktop/lockeddualrecovery/
chmod ugo+x supersu.sh
./supersu.sh
It will do it's thing and install the recovery into your phone. Once it's done make sure it exists by turning it off and repeatedly tapping VOLUME UP. It should boot into CWM.
FINAL STEP: INSTALLING EXISTENZ
DO NOT UNZIP THESE FILES
Download the black version here: http://forum.xda-developers.com/xperia-z/development/rom-existenz-v5-black-edition-10-4-b-0-t2251512
Download the white version here: http://forum.xda-developers.com/xperia-z/development/rom-existenz-v5-0-0-ultra-edition-10-4-t2349656
Make sure you download SuperSU fix also.
Make sure all the terminal windows are gone. All you need to do is connect your phone to your computer and copy the above files to the phone. After they have copied:
Boot into CWM (Turn the phone off, turn it back on and press VOLUME UP repeatedly)
Go to Install ZIP (or something to that effect)
Select the ROM ZIP file and flash it.
After it's finished flash SuperSU fix.zip
Almost done. The ROM won't boot until you've 10.4.1.B.0.101 kernel. So make sure the phone is off. Open FlashTool and flash C6603_10.4.1.B.0.101_Stripped.ftf the same way as before.
Once it's finished turn your phone on and YOU HAVE EXISTENZ ROM!!!
One small addendum. For me my SuperSU was broken. If this is the case for you all you need to do is boot into recovery and select SuperSU fix, CWM will do it's thing and once it's done just turn your phone on and download SuperSU from the market place.
_______________________________________________________________________________________________________________________
Considerations:
1.) It's not necessary to flash "C6603_10.3.1.A.2.67_Generic UK.ftf" the aim here is to root the phone. You can use an older firmware version and root that using this method: http://forum.xda-developers.com/showthread.php?t=2327472
This avoids the need to flash a different kernel and then re-flashing the "C6603_10.3.1.A.2.67_Generic UK.ftf" kernel potentially saving YOU a lot of time.
2.) When using chmod it should be enough for you to type in "chmod u+x <filename>" the reason why I have changed the permissions of "group" and "other" is just to ensure that it works.
3.) There is a way to copy folder into the restricted /usr/lib folder. In terminal if you type in "gksudo nautilus" it will bring up a file manager GUI with root permissions that will allow you do drag and drop these folders.
4.) It's not necessary to move FlashTool into this folder. The reason why I have done it was to keep an organised filesystem. You can leave it on desktop and change the file paths appropriately.
5.) After you have rooted your phone. It may not be necessary to reflash the "XperiaZ_C660X_KernelOnly_10.3.1.A.2.67.ftf" kernel since you are going to flash an entire ROM anyway.
**Please suggest ways to make this tutorial easier to understand**

Related

[Walkthrough] From stock (1.5) to rooted 2.1 (update - new link)

Introduction:
This walkthrough will take you through rooting a stock 1.5 Eris. After following the walkthrough, you will have a rooted 2.1 Eris.
Unfortunately, this will NOT help people who upgraded to the Leaked 2.1 ROM. For now, there is no way to fix your issue.
CREDITS:
GrdLock for his walkthrough in androidforums - it inspired this one and much of the info came from his walkthrough
caboose for finding the rooted dev ROM
amon_ra for the recovery console
ivanmmj for rooting the 2.1 ROM
Warning:
Neither I, nor xda-developers.com, is responsible if this process bricks your phone. Sometimes, the unforeseeable will happen. Sometimes, you will make a mistake. Although this process is relatively safe, if your phone becomes bricked, we do not and will not provide support or replacements for your bricked phone.
Index:
I: Gaining root: an unlocked hboot
II: Prerequisites: Tools to flash
III: Flashing a rooted/modded recovery
IV: Flashing a custom ROM (rooted version of leaked 2.1 ROM)
I: Gaining root
An unlocked hboot will allows us to flash in a modified IMG ROM signed with test keys as supposed to requiring an official ROM from HTC. This will open us to be able to flash a modified recovery.
1. Download this file: PB00IMG.zip (md5: 63eacc5ede3b179f95dc22d8ef585f94)
2. Place PB00IMG.zip onto the root directory of your sdcard.
3. Power down your phone.
4. Hold Volume Down while you Power On. This should bring you to a screen saying "HBOOT" and some other stuff. Wait for it to load the image, and it will say Push Activate. Push the trackball button to continue. The process will take around 5-10 minutes. The first time your phone boots up it will take a lot longer than normal.
II: Prerequisites - Android SDK - These instructions are for Windows XP. You must adapt them to your version of Windows.
First we must install the Android SDK as it has the tools we need for both this walkthrough as well as to make your life in the Android world easier.
1. Visit the Android SDK site.
2. Visit the Java site and download the latest Java JDK.
3. Extract the Android SDK zip file unto c:\AndroidSDK\
4. Double click on SDK Setup.exe
5. Many times, you will need to click on Settings and check the box to force HTTP instead of HTTPS.
6. Choose to download the USB drivers package. Nothing else is required.
7. Enable your phone's USB debugging mode: Settings > Applications > Development > check USB Debugging
8. Connect your phone via USB to your PC.
9. Right-click My Computer > Properties, click on Hardware, and go to Device Manager. You should see a device with a yellow exclamation next to it, this is your phone (if you don't see it you probably forgot to enable USB debugging mode)
10. Right-click the device, select Update Driver. Browse to your Android SDK directory, and you should see a "USB Driver" folder in it now. If you don't, you forgot to download the USB Driver package when in "SDK Setup.exe". Select the driver in that folder.
11. To make life easier, lets add a global path to the android SDK tools. Right-click My Computer > Properties, click on Advanced, then click on Environment Variables. Doubleclick on PATH, then at the end of the Variable value, add a semi colon ";" and then c:\AndroidSDK\tools
III: Flashing a Custom Recovery
Flashing a custom recovery will make your life easier when flashing ROMs in the future.
1. Download this file: Recovery.zip
2. Extract file contents to your \tools\ directory of your Android SDK.
3. Open up a command prompt and go to your tools directory, and execute these commands:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
4. Success! You now have a recovery partition installed on your phone. You can access it by running "adb shell reboot recovery" or by powering off your phone, holding "Volume Up + Power On"
IV: Flashing a custom ROM
1. Download the Rooted 2.1 v0.8T2 zip file.
2. Copy the WHOLE zip file to the root directory of your SD card. (You can enable USB-MS enable from your shiny new recovery to mount your phone as a USB Mass Storage device.)
3. Choose Wipe. Choose data/factory Reset (In the stock ROM, the dalvik is stored in the data and you don't have an EXT partition... yet.)
4. Choose Flash zip from sdcard. Find the eris_0_3.zip file.
5. Wait until it shows as complete and choose reboot system now.
CONGRATULATIONS! You now have a rooted 2.1 phone!

EASIEST sdk adb guide tutorial instructions

I have learned alot from this site so i figured i'd give something back. these are the the two easiest methods i have found for setting up the android debug bridge. one for windows and one for linux... these instructions should work for any version of windows.
first make sure you download the latest sdk by going to android.com and clicking on developers.
windows:
after you have download the sdk, unzip it to your desktop. rename it to sdk. cut the UNzipped folder on the desktop that you just renamed by right clicking and hitting "cut" then go to start>my computer>c: and paste the folder here. now go into the new "sdk" folder and right click on the "tools" folder and click "send to" then choose "desktop (as shortcut)" you should now have a shortcut on the desktop called "tools-shortcut"
now for the easy part: hold shift and right click on tools-shorcut, holding shift adds the option "open command window here" to the context menu that comes up so click on that. now just make sure your phone is connected to the computer and on ur phone debugging is enabled (menu>applications>development>debugging). on ur command window that came up you should see a black box with white text and the cmd should be c:\sdk\tools> just type "adb devices" and you should see your phone under "list of devices attached" if you do see it you should be able to start running adb commands
adb pull "/location to file or folder on phone" -(the pulled folder or file will be in the tools folder we created earlier which you can still access by clicking on the tools-shortcut on your desktop)
adb push "name of file or folder to be placed on the phone sdcard" -(make sure the file or folder you wish to place on the phone has been placed in the "tools" folder on the computer, again its the same folder the "tools-shortcut" opens up)
hint and examples: i have found a good way to back up and reinstall all ur apps using just adb push and pull. just experimenting and playing around with it i have found you can accomplish installing with just knowing these commands above... if you plan to data wipe and flash a new rom but you don't want to go through the tedious task of reinstalling and you have a rooted android phone then you may use this method to backup/reinstall ALL of your apps. plus this will give you good practice using adb.
backup example:
adb pull /data/app .... let it finish
adb pull /data/app-private ...let it finish
now you should have ALL of ur apps in ur tools folder on ur computer! in the tools folder, create a new folder and name it what u want, i named mine APPS4EVO because i have an evo and and epic and some apps don't work for both so i keep them seperate. cut and paste all of ur apps and put them into your newly made folder. now back to the adb window
restore example:
adb push /APPS4EVO /data/app/
this will push all of your apps in your backed up folder you made earlier to the folder where apps go when they are installed and if you wait 1-10 minutes depending on how many apps you have you should be able to see them on ur phone as if you had installed them one by one. also notice the space between /APPS4EVO and /data/app/ the space seperates the folder from inside ur tools folder you wish to install and the location you wish to put them on ur phone. please be aware that you do not need to type c:\sdk\tools\APPS4EVO because the command window is already being ran in the tools folder, so the location would just be /APPS4EVO in my case.
adb shell -opens up the terminal shell to run commands specifically for the phone, while in the shell you cannot run other "adb xxxxx" commands, you will have to exit the shell by typing "exit"
OPTIONAL: i marked this as optional bc with the above it is not necessary... i have never done this and my adb works great but i have seen it often in other tutorials around the web.... i believe its only necessary on windows 7 and maybe vista. go to start then right click on "my computer" and click on "properties" then in the left pane click on "advanced system settings" then in the window that pops up click on "environment varables" button, in the next window that pops up, under "system variables" scroll down to the "path" variable and double click it. in the "variable value" box do NOT erase anything but add ";c:\sdk\tools" (without quotations). then click ok on all the windows cuz ur done.
thats all for windows.
linux (ubuntu)
extract the sdk to your home/name/ folder and rename it to sdk. now right click on the folder and go to permissions and make sure (run as executable) is checked, now go into the folder and do the same permission change to the tools directory.
now you should be able to run adb commands in the terminal when your phone is connected. same as in windows except your commands will be preceded by your tools folder location....
FOR EXAMPLE:
/home/jay/sdk/tools/adb devices
/home/jay/sdk/tools/adb push xxxx xxx
/home/jay/sdk/tools/adb pull xxxx
EXTRA:
if your having troubles connecting ur phone to ur computer over usb, even after installing drivers, like i sometimes have with my epic, you can download "wireless adb" from the market which i found to be surprisingly easy to use, just like if u were connected by usb, except under adb devices you will show up as your gateway address not ur device name but trust it still works the same.
good luck everyone, i hope this post isn't redundant and i really hope i help someone out there just starting! adb is confusing at first.

[GUIDE] Linux Ubuntu: Unlocking Bootloader / Rooting Nexus S

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

DX noob here. Anybody wanna help me out?

I ordered my DX earlier today and should have it tomorrow afternoon. (yay!)
I'm coming from the LG Ally, which I played around with quite a bit as far as root/roms go. I ended up bricking it when the Froyo update came out trying to get from 2.1 to one of the new 2.2.1 roms.
I've seen a lot of stuff about the DX and it looks like a lot of progress has been made (yay, again!). I love the look of Gingerbread, so I'd probably look into flashing one of the roms that supports a GB theme (Liberty looks cool!), but I don't want to run into trouble when the official GB release comes out.
So, how hard is this on the DX? What are the general steps? What in the world is a SBF?
Any sort of basic noob-friendly introduction would be greatly appreciated!
Thanks!
Here is a bunch of stuff I have put together for various people that should get you started:
Ok, here are the steps for setting up the sdk, getting rooted, and all that good stuff... have a feeling I will be making this into a new thread...perhaps....
SDK:
First off... you will want to go to the following site to download the sdk:
http://developer.android.com/sdk/index.html
Grab the following download: android-sdk_r08-windows.zip
I saved it to C:\sdk (i created a folder called SDK right at the root of C: drive). When it finishes, unzip this using 7zip (or any other unzip program you like) to the sdk folder. When it is finished unzipping, you should have a folder called "android-sdk_r08-windows". If you open up that folder, you will find a folder called "android-sdk-windows". Open this folder up and double click on the "SDK Manager.exe". This will open up a window, and bring up additional windows, one of which will ask you to "choose packages to install". You can download any or all of them. I recommend downloading the following:
• Android SDK Platform-tools, revision 1 (the top-most download)
• SDK Platform Android 2.3, API 9, revision 1
• SDK Platform Android 2.2, API 8, revision 2
• USB drivers (I don't think this shows up in the latest version of the sdk's first download window. I believe it is found if you go to the available packages section the "Android SDK and AVD Manager and expand the 3rd party section....but if you happen to see it in there...grab it)
This should be sufficient for now. All packages are accepted by default. If you do not wish to download all of them, simply highlight each one (one at a time) and then click the reject button towards the bottom middle of the window. When you have selected the packages you wish to download, click the install button.
After this has installed, you now have the Android SDK installed on your machine. You can close all windows related to the SDK, as we don't actually need to do anything with it, it simply has tools within it that we will need later. (This is where the adb command originates from. There is an adb.exe tool in the "tools" folder of the sdk install, but we will get to this later).
Now you will want to go to your desktop (or anywhere you have a shortcut or icon for My Computer), right click on My Computer, and select properties. Under the "advanced" tab of the window that opens, you should see a button at the bottom that says "environment variables". Click on this, and then find the "Path" variable under System Variables NOT user variables. Click Edit and go to the end of the "Variable Value" field. You will want to make sure there is a semicolon ( at the end of this before typing any additional info. You will want to add the full path of your android SDK install. For example, if you followed my example for download/saving/extracting/installing above, you would type the following information into the end of the "Variable Value" section:
C:\sdk\android-sdk_r08-windows\android-sdk-windows\tools
If you installed to another location, be sure to type the correct path to the "tools" folder within your installation of the Android SDK. Then click the OK button, and close any windows that were opened from adding to the "path variable".
Droid X Drivers
This section is a little more difficult to explain, as there are so many variables depending on what operating system you are running (windows XP, Windows Vista, Windows 7, etc). and whether or not you are running a 32-bit or 64-bit instance of your chosen Operating system.
Here is one link for Droid X drivers:
http://www.verizon-phones.org/verizon-motorola-droid-x-usb-drivers-pc-charging-drivers-download.html
I simply googled Droid X drivers, I'm sure this isn't the best link, but just for example I'm throwing it out there. If you google Droid X USB drivers <your operating system> you should be able to find the drivers you need, as well as help and instructions on how to get everything working.
Once you get the usb drivers installed, you will want to connect your Droid X to your computer. If it is recognized, you will get a notification in your drop down bar on your phone. On your phone, press on the USB connection in the drop down menu, and select "charge only". Next, open up a command prompt on your computer. Type the following in and hit enter:
adb devices
You should see something simiilar to the following come up if everything is configured correctly:
C:\>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015A882315005010 device
If you see something similar to what I have above... then ADB is working correctly, and we can continue! Now we will move on to getting your device rooted! You will want to grab the z4root.apk that I have attached earlier in this thread and download it onto your computer. We will now test out if adb is indeed working! Save the z4root.1.3.0.apk and put it in the "tools" folder of the sdk we downloaded earlier. Now open up a new command prompt (or use the one we opened earlier if you haven't already closed it!) Change directories to the "tools" folder of the sdk:
If you installed the SDK where I used in my example.... type the following:
cd C:\sdk\android-sdk_r08-windows\android-sdk-windows\tools (press enter)
type the following: adb install z4root.1.3.0.apk (press enter)
You should now see the following:
C:\android-sdk-windows\tools>adb install z4root.1.3.0.apk
1833 KB/s (978414 bytes in 0.521s)
pkg: /data/local/tmp/z4root.1.3.0.apk
Success
z4root and ROOTING
If you get all of this, you have now installed a package using adb and we know the interface works. If you don't want to have to mess with this method of installing, you could also download "Astro File Manager" from the android market. You would then need to save z4root.apk to your sdcard of your Droid X. Then open the Astro program and browse to your SDcard and file the z4root.1.3.0.apk. Press on the .apk file and it should come up with a box that says something similar to "open with app installer" or "app manager"... don't recall exactly what it says, but should be something similar to package management or install of some sort. After pressing on that, you should see an install button. Press on that to install z4root.
Now that z4root is installed, you will want to go to your application list on your phone and press on the z4root to open the application. Press on the permanent root button and wait! This process may take a while, and your phone will reboot, but when it does, you are now rooted.
Removing BOOTSTRAP COMPLETELY
If you would like to completely remove Droid X bootstrap from your phone, here is what you need to do:
1) connect your phone to ur pc in charge only mode. Make sure it is recognized by adb
A) open command prompt and type "adb devices" (hit enter, your phone should show up)
2) in the command prompt, type "adb shell" (press enter)
3) type "su" (press enter)
4) type "mount -o rw, remount /dev/block/mtdblock4 /system" (press enter)
5) type "cp /system/bin/logwrapper.bin /system/bin/logwrapper"(press enter)
6) type "adb reboot" (press enter)
Your phone will reboot after typing adb reboot, and may take a little bit longer to boot the first time after bootstrap is removed (it may not, I just haven't gone through this process in a while).
Bootstrap should now be completely removed.
Note: all text in quotes is just what you should type...do not include the quotation marks when entering commands.
Disclaimer: I take no responsibility if you mess up your phone. Typing these commands incorrectly CAN mess up your phone. By following these directions, you do so at your own risk.
Installing Droid X Bootstrap
You can grab this .apk file from this thread as well, as I have it posted in one of my previous posts. You will then install this .apk file the same way that you installed z4root. Obviously if you are using the adb command prompt method, you will want to replace z4root.apk with the full name of the droid X bootstrap apk; if you are using a file manager or installer, just follow the same instructions as before as well.
With the bootstrap installed, you are now able to take backups and restore them as well in the event your phone has problems.
Thanks for the reply, but it's actually pretty confusing...
To install z4root, do I NEED to do any of those adb steps or can I just sideload it? I'm not sure if you're telling me to do both of those steps or just either/or. Sideloading is much easier, if it's an option.
And as far as the bootstrap goes - am I removing the original bootstrap and then installing the apk you attached to replace it with a custom bootstrap? Is this different than a custom recovery?
Also, what are SBFs and how do they fit into all of this?
Thanks!
lextex said:
Thanks for the reply, but it's actually pretty confusing...
To install z4root, do I NEED to do any of those adb steps or can I just sideload it? I'm not sure if you're telling me to do both of those steps or just either/or. Sideloading is much easier, if it's an option.
And as far as the bootstrap goes - am I removing the original bootstrap and then installing the apk you attached to replace it with a custom bootstrap? Is this different than a custom recovery?
Also, what are SBFs and how do they fit into all of this?
Thanks!
Click to expand...
Click to collapse
No, you do not have to do it this way. I just used this as an example for something I was doing for someone else, especially since they needed the sdk anyways... Just was practice.
(PS, not sure what you mean by sideloading... sorry just not familiar with the term...) Nonetheless...
You can just download the file, and then use file manager to install the file or any app installer you may normally use. Just make sure that under Settings-->Applications-->Unknown sources, that the check box is marked. Then you should be good to go.
As for bootstrap... You are basically replacing a logwrapper file that tells the phone to boot to Motorola's built in recovery. Koush's bootstrap hijacks this and writes its own logwrapper and allows for the recovery process to be interrupted so backing up/restorying, etc. You can load that apk the same way you do Z4root.
As for SBF files, I'm can't recall what it actually stands for, but it is basically a file from Motorola that allowed their employees to flash a phone back to "out of the box" state in the event that a customer ruined their phone or had issues with it... this goes way back to even the Motorola Razor days I believe... In any event, it is used alongside a program called RSDlite. This program allows you to connect your phone to your computer and flash the sbf files that have been released, and as a result allows you to restore your phone back to a "clean" state in the event that you mess up the /system partition and for other uses as well.
I will be adding more to a basic guide for all things Droid X later this weekend. If you have more questions, feel free to post back. And check out my other post here:
http://forum.xda-developers.com/showthread.php?t=940986
This includes the same info as I posted here already, but should have some more updates this weekend.
Good luck!
new here also.
i thought droid x could not be rooted.
i bought mine in october 2010; it's running 2.2.1
thanks in advance

Simplifying ADB installation

There's a lot of angst around getting ADB to work, particularly over USB, and it leaves a lot of folks frustrated. Some of the stuff I have seen is outdated for one and USB itself is problematic.
But, if you use Manual Nooter (for 1.2), GabrialDestruir baked in ADB Wireless, so it should be super easy to go from zero to ADB connected in nothing flat now. Here's some quick instructions that won't change.
1. Make sure you have Java installed (I'm sure you do). You *do not* need the JDK to do this!
2. Go to the android site and grab the Android SDK zip file (the windows executable *requires* the JDK so grab the zip file)
3. Unzip it to the root of your drive (it has the 'android-sdk-windows' folder in it)
4. Now go in the android-sdk-windows folder and launch sdk manager
5. Cancel out of the window that pops up with a list of a bunch of stuff
6. Click on available packages
7. Now expand 'Android Repository' and check 'Android SDK Platform-tools'
8. Now click 'install selected' and then 'install' on the next screen
9. After it finishes it will ask if you want to restart ADB, go ahead and select yes
10. Now do the standard path edit and add these two paths to your environment path: c:\android-sdk-windows\platform-tools and c:\android-sdk-windows\tools
11. On your nook, start up adb wireless and note the command it tells you
12. open a command window on your pc and type the command adb wireless gave you
Voila! You are using ADB to access your Nook Color! No special drivers or ini files, etc. I know there is an easy ADB USB thread, but I actually eventually had issues with that and went back to grab the original "official" kit to get things working. I just did the above on a fresh machine with nothing else and it worked flawlessly.
Anyway, I figured this might help a few people out there.

Categories

Resources