I see that a few of you have been asking how to set up ADB.. I hope this helps!
Step 1: Download the Android SDK from http://developer.android.com/sdk/index.html The Windows file is called android-sdk_r4-windows.zip. Extract the files to your C: drive so that you now have the folder C:\android-sdk-windows
Now open up command prompt and type these codes:
1: Code:
cd C:\android-sdk-windows\tools
2: Code:
adb devices
If you've been following this guide you will see your phone's serial number. If you get "device not found" error, you either need to make sure you the drivers were properly installed or make sure you enable USB debugging AFTER you connect the USB cable. Continue on once you get the proper phone serial output.
You shouldn't have to install anything other than the HTC Sync... And the only reason you install HTC Sync is for the drivers.. You dont have to install anything for ADB just put the extracted file on the C:\ drive.... And then whenever you wanna Push or Pull a file with ADB, just put that file in the C:\android-sdk-windows\tools file....
I flashed MIUI recently. However, I found there was nothing coming out when I dialed coded numbers like: ##3424# (DIAG MODE), or ##786#, or ##3282#. These numbers used to work under other ROMs. But somehow, they are disabled in MIUI. Any solutions?
Those only work on Sense Roms, not on AOSP Roms
HipKat said:
Those only work on Sense Roms, not on AOSP Roms
Click to expand...
Click to collapse
Thanks. Is there a similar way to edit the related settings in the phone? I'd like to edit some settings in ##3282#, any equivalent command in AOSP roms?
No. U have to flash between sense & aosp to use them
Sent From My Pocket
ctzw said:
Thanks. Is there a similar way to edit the related settings in the phone? I'd like to edit some settings in ##3282#, any equivalent command in AOSP roms?
Click to expand...
Click to collapse
No, you have to flash a sense rom to access anything in those menus.
Install HTC Diag Driver on your PC (Windows OS) and make sure it recognize your HTC Phone.
Enable USB Diagnostic on your HTC Phone. If You don’t understand step 1 and step 2 then forget it, you’re not ready for this yet.
Install adb tool on your PC (just copy paste it to an easy accessed directory on your pc. i.e c:\adb
No, you don’t need Android SDK, or JRE, etc, You just need this tool, about 500Kb in package. Google for it!
Enter the abd mode c:\adb> adb shell
You need to alter the value of enable file located in your phone (/sys/devices/virtual/usb_composite/diag/enable) file from 0 to 1. here’s how :
full path :
echo 1 > /sys/devices/virtual/usb_composite/diag/enable
you don’t have to remember that. You can enter each dir manually and if you forget the next dir you can simply command ls to list directory and file available. After you reach the last dir (/diag) then you can execute theecho > 1 enable command.
Voila, you enter HTC Diag mode on AOSP ROM.
skumar9988 said:
Install HTC Diag Driver on your PC (Windows OS) and make sure it recognize your HTC Phone.
Enable USB Diagnostic on your HTC Phone. If You don’t understand step 1 and step 2 then forget it, you’re not ready for this yet.
Install adb tool on your PC (just copy paste it to an easy accessed directory on your pc. i.e c:\adb
No, you don’t need Android SDK, or JRE, etc, You just need this tool, about 500Kb in package. Google for it!
Enter the abd mode c:\adb> adb shell
You need to alter the value of enable file located in your phone (/sys/devices/virtual/usb_composite/diag/enable) file from 0 to 1. here’s how :
full path :
echo 1 > /sys/devices/virtual/usb_composite/diag/enable
you don’t have to remember that. You can enter each dir manually and if you forget the next dir you can simply command ls to list directory and file available. After you reach the last dir (/diag) then you can execute theecho > 1 enable command.
Voila, you enter HTC Diag mode on AOSP ROM.
Click to expand...
Click to collapse
im trying your method, but the /diag/enable reset to 0 again after reboot the phone
jgra_2003 said:
im trying your method, but the /diag/enable reset to 0 again after reboot the phone
Click to expand...
Click to collapse
Yes bud, this is normal.
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**
Will it safely work on Moto?
Copied from
You can use script to charge it from USB.!!!
1. Tab must be Rooted!!!
2. Make new .txt file (USB Charging Script.txt) and fill inside following:
Code:
#!/system/bin/sh
su
echo 1 > /sys/class/power_supply/battery/force_usb_charging
3. Put file inside SD-card.
4. Download SManager (not from Play Market, from different place!) and install it.
5. Open Script Manager - > select your script -> check "Run as root", "Run on Boot", "Run"
6. When ask root permissions -> Enable
7. Enjoy!!! Now you tab always must charge from USB (also from car charger, 100% true, I use it!-)))
Click to expand...
Click to collapse
Will it safely work on Moto?
Copied from
You can use script to charge it from USB.!!!
1. Tab must be Rooted!!!
2. Make new .txt file (USB Charging Script.txt) and fill inside following:
Code:
#!/system/bin/sh
su
echo 1 > /sys/class/power_supply/battery/force_usb_charging
3. Put file inside SD-card.
4. Download SManager (not from Play Market, from different place!) and install it.
5. Open Script Manager - > select your script -> check "Run as root", "Run on Boot", "Run"
6. When ask root permissions -> Enable
7. Enjoy!!! Now you tab always must charge from USB (also from car charger, 100% true, I use it!-)))
Click to expand...
Click to collapse