Run Fastboot, ADB, etc. from anywhere on your PC - Atrix 4G General

Had some interest in this, so I thought I'd make a quick thread about it. Not a big secret or anything, just a little time saver.
Here is how to set up your computer so that you can run a fastboot, adb, etc. command from anywhere in the file system. You will no longer have to goto the fastboot folder and the type the full file path to the file you are trying to install, push, etc. if you saved it somewhere else, or clutter up the same folder you have these important files saved in.
*These instructions are for Windows 7 (x64):
First make sure that your fastboot files, adb files, moto-fastboot files are in a folder that isn't going anywhere (give them a permanent home on your pc ).
Then do the following:
Navigate to: Control Panel -> System ->Advanced System Settings -> Advanced Tab -> Environmental Variables
Under "System variables" scroll down to the variable labeled "Path" and choose Edit.
Go to the end of the Variable Value and add a ";" (no quotes) if needed on the end of the last variable, and then add the complete file path to the location of your files (only add spaces if there are spaces in the file path). So mine would be: ....;C:\android-sdk-windows\tools
OK out of everything.
Now you can just shift + right-click in the folder you saved the file, Open command window and type the command.
*Note: If you change the location of your fastboot files, you will have to change the location in the variable path again, otherwise this wont work. Capiche?

Swiftks said:
Had some interest in this, so I thought I'd make a quick thread about it. Not a big secret or anything, just a little time saver.
Here is how to set up your computer so that you can run a fastboot, adb, etc. command from anywhere in the file system. You will no longer have to goto the fastboot folder and the type the full file path to the file you are trying to install, push, etc. if you saved it somewhere else, or clutter up the same folder you have these important files saved in.
*These instructions are for Windows 7 (x64):
First make sure that your fastboot files, adb files, moto-fastboot files are in a folder that isn't going anywhere (give them a permanent home on your pc ).
Then do the following:
Navigate to: Control Panel -> System ->Advanced System Settings -> Advanced Tab -> Environmental Variables
Under "System variables" scroll down to the variable labeled "Path" and choose Edit.
Go to the end of the Variable Value and add a ";" (no quotes) if needed on the end of the last variable, and then add the complete file path to the location of your files (only add spaces if there are spaces in the file path). So mine would be: ....;C:\android-sdk-windows\tools
OK out of everything.
Now you can just shift + right-click in the folder you saved the file, Open command window and type the command.
*Note: If you change the location of your fastboot files, you will have to change the location in the variable path again, otherwise this wont work. Capiche?
Click to expand...
Click to collapse
Thanks you as I had trouble with this for my nabi2

Swiftks said:
Now you can just shift + right-click in the folder you saved the file, Open command window and type the command.
Click to expand...
Click to collapse
It turns out you CAN learn something new every day! This is a huge timesaver. I wish I had known this years ago!

Huge thank you! I knew i could do this somehow, but havet managed to do so before. Whit this guide i managed to get it working in windows 10 enviroment.

Related

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.

[Q] Remapping the external keyboard file

The Lenovo Thinkpad Tablet's keyboard folio is a neat little accessory but there is one issue that drives me nuts. (Beside the loss of the USB port). and that is that the Ctrl key also activates the menu (any menu).
So whenever one tries to do a copy and paste using the usual Ctrl + C and Ctrl + V keys, the menu (of the app you are working in) pops up.
Someone suggested to edit the Generic.kl file in /System/usr/keylayout directory and I did, but that didn't work. (Unless i did it wrong).
I'm at a loss. Would anyone have a suggestion on how to remap that key to only be a standard Ctrl and not menu key?
TS
Having the same issue.
But I'm using an external bluetooth keyboard: the logitech one, which was actually designed for the ipad.
I love it, its slim and very good quality keyboard.
Maybe some helpful links:
http://www.kandroid.org/online-pdk/guide/keymaps_keyboard_input.html
And this one has an explanation how this could be solved on a rooted thinkpad:
http://androidforums.com/ally-all-things-root/250271-re-map-key-keyboard.html
Ok, so I was able to remap some keys. Here is what I did.
The key layout files are stored in /system/usr/keylayout
The most important one seems to be Generic.kl which can be edited with a text editor, just use root explorer or the adb commands below. When I first tried my permissions were screwed up and I wrote the directions below but left them here in case they are helpful.
----------
(I edited gpio-keys.kl thinking it controlled the hard keys but it had no effect). While running the Thinkpad it seems as though I was unable to edit these files but I did get things to work using adb while booted into recovery. Here are the steps I took:
First reboot into ClockworkMod Recovery and plug in your thinkpad to your PC via USB
In CWR select Mounts and Storage then Select Mount /system (otherwise it seems adb can't access your system files)
On your computer run cmd and type adb devices (you should see a device listed, if not go check out the ADB setup guide). Now enter the following commands:
adb remount
adb pull /system/usr/keylayout/Generic.kl
This will copy the Generic.kl file to your current directory (you can see it in the command prompt, typically it is C:\Users\[Your Username]\
Browse to the file make a copy of the unedited version and save your backup somewhere and then edit Generic.kl in a txt editor (I like Notepad++)
I changed key 150 EXPLORER to say key 150 MENU, which makes the browser key open the menu instead of your web browser.
After you made your changes save it and then use the following ADB commands to push it back and set the permissions:
adb push Generic.kl /system/usr/keylayout/
adb shell
chmod 644 /system/usr/keylayout/Generic.kl
chown system.system /system/usr/keylayout/Generic.kl
exit
adb reboot
Now your keys should be remapped!
Just thought I'd add this to skip all the ADB and do it right on the tablet:
ES File Explorer (with root permission and /system writeable checked in settings)
Navigate to file, click, choose text, choose ES Note Editor, edit the file as needed, choose save when prompted.
You can change permissions with ES as well.
I like that it automatically makes a *.bak file of whatever you edit and save.
Those are the same steps I did, but it didn't work for me even after a reboot.
And although I did a backup of the existing generic.kl file, I think I may have overwritten it. So I'm going to have to go in search of a fresh one.
TS

[GUIDE] Customizing ROMs for your needs.

At the request of others, I have decided to write this guide pertaining to ROM customization. I found that in most of the current custom Jelly Bean ROMs for the TF101, that the GPS configuration has been changed, at least compared to the stock Asus ICS ROMs for the TF101 and the stock Asus Jelly Bean ROM for the TF300T, and they are using modified user / group and permissions settings. They all say that it is because those items have changed in Jelly Bean. They are also using a custom /etc/gps.conf file. The problem is that I, along with several others, aren't seeing very good GPS response and some claim not to see any. The ones that do see something, see that the first initialization takes forever and then is likely to not hold a fix, only seeing a few satellites. I made some changes in the ramdisk and /etc/gps.conf file and tested with a few of the Jelly Bean ROMs for the TF101 and found that settings matching the stock Asus settings performed quite well and was asked to share the process that I used. While it would be easier probably to just post the modded kernels for others to reflash, I'll give it a go at explaining what I've done.
1) This guide will require either a working native Linux install or can probably be used with a virtual machine Linux install. I'm using Ubuntu 12.04-x86_64 LTS as Ubuntu is usually used in most of the guides I've found. You may be able to make things work with other Linux flavors, but YMMV. I'm going to assume, at least, a basic knowledge of Linux file systems and the ability to copy and paste to a terminal and follow instructions.
2) You may need to install the Android SDK and at least one platform in order to get a working "adb" command, which will be needed. You may be able to get the "adb" binary from other sources that will work and "adb" will require some setup in udev rules to allow your normal user to access the tab with it. I'm going to assume that you have all of these things in place and working and that "adb" is in your path. If not, then Google is your friend.
3) For good measure, it would help and definitely won't hurt anything to have some build environment files in place. In a terminal, copy and paste the following:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Let that install and when it is finished, copy and paste the following:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
4) Now we need to grab dsixda's Android Kitchen, which is where some of the magic can happen. Go here to read up on how to use it and to find the download link. While the TF101 isn't specifically supported, there are a lot of things that we can still use it for. Just don't try to build a ROM and flash it with this before you have read dsixda's thread thoroughly or you may wind up with a brick. I'm only going to describe things that I've done and tested and that I know will work. For ease of this guide, I'm going to assume that you read the instructions there and that you unzip the downloaded file to "/home/'yourname'/android/kitchen/".
http://forum.xda-developers.com/showthread.php?t=633246
5) Now we need to build the blob tools used to pack and unpack the .blob files. Here we will download the source code for these tools and build them on the local machine. Go here:
https://github.com/AndroidRoot/BlobTools
6) Download the .zip file and extract to "/home/'yourname'/blob_tools/", where 'yourname' is your home directory name. Then, in a terminal, type "cd ~/blob_tools", without the quotes. Then type "make". When this is finished, type "mkdir ~/bin", if it doesn't already exist, and then type "cp ./blobpack ~/bin/;cp ./blobunpack ~/bin/". Now we need to make sure that "~/bin/" is in our PATH. Type "cat ~/.profile" and make sure that there are lines matching the below there:
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
If not, use an editor like gedit, to add them just before the last line which should say "fi". For basic instructions on the blob tools, see here:
http://forum.xda-developers.com/showthread.php?t=1068548
That should be all for the tools and setup. Now reboot your PC to Linux, for good measure.
I'm going to use as an example, the changes I made for the GPS permissions and settings. Anything else will be up to your own personal study and research and experimentation. I assume no responsibility if you do something mentioned here or not or if you should brick your device.
1) Download the CWM flashable custom ROM of your choice. I'm not going to deal with Asus stock ROMs here because there are extra steps to do to look into those completely. Extract the ROM to a directory under your home directory. You will have to create it, such as "Team_EOS3" or whatever. I'm going to use the graphical file manager Nautilus and the graphical text editor gedit to work with files and directories and to edit files. When using Nautilus be sure to go to the "View" menu and select "Show hidden files". Some work will also be done in a terminal. I use Gnome terminal.
2) For example, I have a folder "K900_AOKP_JB", where I extracted K900's ROM. So if I look at that in Nautilus, I see 2 folders, "META-INF' and "system" and 2 files, "boot.blob" and "boot.img". Most of the custom roms will not have the boot.img file, only the *.blob file. The blob file and the boot.img file should be the same thing. Each contains the compressed kernel image and the initial ramdisk.
3) From a terminal, type, for example, "cd ~/K900_AOKP_JB". Then type, "blobunpack ./boot.blob", substituting the appropriate names for your particular files. In Nautilus, you will see that 1 more file was created, in my case, "boot.blob.LNX". Right click and copy this file to your Kitchen WORKING_DIRECTORY which you should have created from following the kitchen instructions. For me it is "~/android/kitchen /WORKING_091312_142859/", where "~" is shorthand for "/home/'yourname'", i.e. your personal home directory. Right click and delete or move to trash the boot.img file that is there already. Right click the file you just copied, i.e. "boot.blob.LNX" and rename it to "boot.img". Upper and lower case matters, so pay attention.
4) From a terminal, type "cd ~/android/kitchen". Then type "./menu". Choose option "0", then choose option "20", then choose option "w". Follow any instructions that come up. These actions will create a new directory, "~/android/kitchen/BOOT-EXTRACTED/", which is where the kitchen just extracted your renamed blob file (boot.img). Inside, you will see a "boot.img-ramdisk" folder, which contains the ramdisk files and a "zImage" file, which is the compressed kernel.
5) Inside the ramdisk folder, we are going to edit only the "init.ventana.rc" file to change some GPS settings. Open the file with gedit and scroll down to the #GPS section. Change it to read the following:
Code:
# GPS
mkdir /data/gps
chown system system /data/gps
chmod 770 /data/gps
chown root system /dev/ttyHS1
chmod 0664 /dev/ttyHS1
Scroll down to the #GPS init section and change it to read the following:
Code:
# GPS init
write /sys/class/gpio/export 203
write /sys/class/gpio/gpio203/value 0
write /sys/class/gpio/gpio203/direction out
chown root system /sys/class/gpio/gpio203/value
chmod 0664 /sys/class/gpio/gpio203/value
Scroll down to the # Start GPS daemon section and change it to read the following:
Code:
# Start GPS daemon
on boot
service gps-daemon /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
user root
group root
class late_start
Save the file. Right click and delete "init.ventana.rc~", which will only show up if you selected to "Show hidden files" in the "View" menu. In Nautilus move back to your kitchen WORKING directory.
6) In the terminal that should still be running the kitchen menu, choose option "b" to rebuild the boot.img. You can now exit out of the kitchen menu. Back in Nautilus, right click and rename the "boot.img" file to "boot.blob.LNX" or whatever your original extracted blob file was called. Right click and copy to the folder where your ROM was extracted. Choose to replace the original file if asked.
7) In a terminal, type "cd ~/K900_AOKP_JB", substituting "K900_AOKP_JB" with whatever your extracted ROM folder is called. Then type "blobpack ./boot.blob LNX ./boot.blob.LNX", substituting your file names for "boot.blob" and "boot.blob.LNX".
8) In Nautilus, in the folder where your ROM was extracted, double click the "system" folder, then double click the "etc" folder. Then double click the "gps.conf" file. It should open up in gedit, if you were using that before, if not then choose to display it. Change it's contents to read the following:
Code:
#
# IMPORTANT:
# this file is only used by NetworkTimeUpdateService.java
# DO NOT make any GPS related settings here.
#
NTP_SERVER=xtra1.gpsonextra.net
Save and close the "gps.conf" file.
9) In Nautilus, in the folder where your ROM was extracted, left click on the "META-INF", "system" folders and the *.blob and boot.img file, if present, while holding down CTRL key, to highlight all 3 or 4 items. Right click on 1 of the highlighted items and choose "Compress". Rename the file if desired, especially if you have the original zip in that folder by the same name and want to preserve it, and then click "Create". The new zip file, with your custom name, will be created in the same folder after a few seconds. In my case, I chose to name it "K900_AOKP_JB-test.zip".
10) You now have created your own customized version of someone else's ROM, modified for your needs or experimentation. Now it's time to push it to your device. You can use Dropbox, if desired to do this, but the easier way is to use adb. I'm going to assume that you have a working Custom Recovery, preferably one that can read both internal sdcard and external MicroSD and that you have adb setup and working.
11) Plug your charging cable into the computer first and then plug the other end into the TF101.
12) In a terminal, type "cd ~/K900_AOKP_JB", substituting "K900_AOKP_JB" with the folder name where you extracted your ROM and where the new zip file resides. Type "adb devices" and after a second or two, you should see something similar to the following:
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
03806245421f9417 device
If you get something looking like that, then adb is working.
13) In the same terminal, type "ls", which will list all the files and folders in your extracted ROM directory (or whatever your current directory is). If your recovery can read only the internal sdcard or both, then you can type "adb push ./K900_AOKP_JB-test.zip /sdcard/Download/", substituting "K900_AOKP_JB-test.zip" with whatever you named your zip file. After a few minutes you should get a confirmation that the transfer completed and can verify that it did with a file manager on the device.
14) If your recovery only reads from the external MicroSD card, then type "adb shell", then type "ls". You will get a list of all files and folders in the root directory of your device's file system. If you are running ICS or older, then you should see a "Removable" directory. If you are running one of the custom JB ROMs, then you may not have the "Removable" folder, but most likely a "storage" folder. For ICS or older, your external MicroSD should be located at "/Removable/MicroSD/". In the latter case, it should be located at "/storage/sdcard1/". In any case, once you have verified where the external card is mounted, then type "exit". Now type either "adb push ./K900_AOKP_JB-test.zip /Removable/MicroSD/" or "adb push ./K900_AOKP_JB-test.zip /storage/sdcard1/", depending on your results from adb shell. After a few minutes you should get a confirmation that the transfer completed and your new zip should now be on the root directory of your external MicroSD card.
15) Now you should be able to reboot to your recovery and flash the zip you created just like you would flash any ROM. Reboot and enjoy, from this example, working as intended GPS.

[How To] SetUp The EnvironMental Variable for Decompiling apps

TECHNICAL INFORMATION
The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window.
The PATH system variable can be set using System Utility in control panel on Windows, or in your shell's startup file on Linux and Solaris.
SOLUTION
Here PATH represents the bin path of installed version of Java that contains classes. (e.g. C:/jdk1.6.0/bin)
Setting Path on Windows
Windows 7
1. Select Computer from the Start menu
2. Choose System Properties from the context menu
3. Click Advanced system settings > Advanced tab
4. Click on Environment Variables, under System Variables, find PATH, and click on it.
5. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH,
you may select to add a new variable and add PATH as the name and the location of the class as the value.
6. Reopen Command prompt window, and run your java code.
Windows XP
1. Start -> Control Panel -> System -> Advanced
2. Click on Environment Variables, under System Variables, find PATH, and click on it.
3. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH,
you may select to add a new variable and add PATH as the name and the location of the class as the value.
4. Close the window.
5. Reopen Command prompt window, and run your java code.
Windows Vista
1. Right click My Computer icon
2. Choose Properties from the context menu
3. Click Advanced tab (Advanced system settings link in Vista)
4. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may
select to add a new variable and add PATH as the name and the location of the class as the value.
5. Reopen Command prompt window, and run your java code.
Setting Path on Solaris and Linux
To find out if the java executable is in your PATH, execute:
% java -version
This will print the version of the java executable, if it can find it. If you get error java: Command not found. Then path is not properly set.
To find out which java executable the first one found in your PATH, execute:
% which java
Below are the steps to set the PATH permanently,
Giving instructions for two most popular Shells on Linux and Solaris.
For bash Shell:
Edit the startup file (~/ .bashrc)
Modify PATH variable:
PATH="$PATH":/usr/local/jdk1.6.0/bin
export PATH
Save and close the file
Open new Terminal window
Verify the PATH is set properly
% java -version
For C Shell (csh):
Edit startup file (~/ .cshrc)
Set Path
set path="$PATH":/usr/local/jdk1.6.0/bin
Save and Close the file
Open new Terminal window
Verify the PATH is set properly
% java -version
No need To thanks mee for this guide,Coz I have just copy/pasted a comment by KartzXDAin one of my guide
If possible thanks him.........
Reserved
Reserved !!!!!!! :fingers-crossed:
Thankx a lot dude
can we add multiple instants of java paths ?
i have 2 java folders
jre1.6.0_31\bin
And
jre1.6.0_25\bin

[tutorial](under construction)rooting/flashing/recovery on linux[tutorial]

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**

Categories

Resources