[Linux] Copy files to your phone via an adb GUI. - myTouch 3G Slide General

I just thought I'd throw this script up here in case any Linux users want something to play with. I use it for copying nightly ROMs to my phone for flashing. It simply gives a file selection dialog, allows the user to select files, and copies them via adb to a specified directory on the phone.
There's really not much to it, but it can be edited to point to any directory (I use /sdcard/Android-updates on my phone because it shows up at the top when I want to flash.)
Prerequisites:
Linux distro with gtk/gnome installed.
Zenity installed.
Working adb with normal-user privileges.
Just re-name the file, changing the extension to ".sh" and in the right-click "properties" dialog, change the permissions to make it executable.

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.

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.

Portable Android Development

Hello everyone
Have you ever been bored in a borrowed pc and wanting to try out a new library/idea on your android but dont have admin privileges to install all the needed android tools? I was in this exact same situation, so i decided to engineer a solution (After all, i AM an engineering student ) to this boring problem. This solution works almost entirely like a standard Android SDK install (Only downside: Eclipse won't run your application) and has only been tested on Ubuntu Linux so you are on your own on other platforms, but the principle is the same, it might work after all.
Whenever prompted for a platform choose x86 , x64 needs ia32-libs which you cant install due to not having admin privileges
1. Create a directory for all the files and folders (I'll name mine "Development")
2. Download the JDK tar.bz file from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html (You'd better search for an updated link when you read this tho) and extract it into Development
3. Download eclipse from http://eclipse.org/downloads/ (I used the Eclipse IDE for Java Developers) and extract it into the Development folder
4. Download the Android SDK from http://developer.android.com/sdk/index.html (If you are on windows, choose the zip!. Again, i've only tested on Linux so you are on your own) and extract it into the Development folder
5. Open the tools/android (It's a shell script) file with gedit/any other editor and edit the line containing java_cmd=".." to read java_cmd="/home/xxx/Development/jdk1.7.0_06/bin/java" (This is my case, make sure this line actually points to the place where you extracted the jdk zip, else this will fail)
6. Open a terminal, cd to the location where you extracted the android sdk, then type "./tools/android" and press enter (Without the quotation marks) to start the sdk manager, install the platform-tools package, the Jellybean (4.1) SDK, and any other SDK you may want, then close the SDK manager.
7. cd to the Development folder and run this "./eclipse/eclipse -vm jdk1.7.0_06/bin" (Assuming you kept the stock folder names from the zips) to run eclipse, then install the ADT as described here http://developer.android.com/sdk/installing/installing-adt.html.
8. When eclipse restarts, it will ask you for the android sdk, just point it to the location where you extracted it.
That's it, your eclipse installation is ready for you to write code.
Now, to debug you'll need to do so manually as eclipse won't somehow recognize this workaround to the usb priviliges (Linux won't allow adb to communicate with the phone unless it's ran as root [Which you can't, that's why you are here] or a configuration file [Again, written as root] is present) system so you need to do this to make adb work:
1. Disconnect your phone from 3G (Optional)
2. Connect your phone to your pc via usb
3. Enable usb tethering on your phone
4. Enable ADB over Network on Application settings
5. On the terminal emulator, run "ip addr show" and look for the usb section
6. On your computer, open a terminal and cd to the tools directory fo the android sdk, then type "./adb connect xxx.xxx.xxx.xxx" (Replace the x's with the IP of your phone, as it appears on the output of the previous command. Remember to use the one on the USB section)
7. Verify adb picked up your device by runing "./adb devices", if it lists an IP as a device, you are ready
Each time you want to test your app, export a signed apk from your project (I may write a small guide for that later, google will help you if you dont know how to do it) and run "./adb install xxx.apk" (Obviously, replace xxx with the path to your exported apk). The icon(s) for your main activity(ies) will promptly appear on your launcher. Again, Eclipse won't run nor debug your app using this method. (Maybe it's an SDK bug?)
I know it's not exactly streamlined but it's something for when you are on the go.
Hope you find this guide useful someday. Until next time.

[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.

[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