[Defy General] kakpvoi:
1. How can I root my phone?

1.1 General information/Basic adb-commands

Rooting a phone enables you to do things, which normally aren't possible for the average user like:

- Removing apps which were preinstalled by the provider (like Orange, Vodafone, etc.). My Tattoo had Vodafone apps for buying music and other sh*t, which was installed on the system partition (to which a "normal" user has no rights to write to, including deleting).

The Tattoo was successfully rooted by a bunch of guys here, namely -bm-, mainfram3 and Coburn64 (maybe, I don't remember quite correctly ). Also the Tattoo was the first phone having a security mechanism hindering a user to mount the filesystems as read/write, which had to be overridden by remapping the read only memory region to a read/write one. This is done by the module Tattoo-hack.ko, also made by mainfram3. He also created the first boot.img, which enabled su directly from adb and loading Tattoo-hack directly from boot on.

A few words about adb:

ADB is a tool for communicating from the PC with the mobile phone. For this a service is running on the phone enabling the communication via Terminal Emulator. Here are the most useful adb-commands:

Code:

adb push localFileFromPC /path/on/mobilephone

-> pushes a file "localFileFromPC" to a specified location on the phone

adb pull /path/to/file pathFromPC

-> receives a file from the phone and stores it to "pathFromPC"

adb remount

-> This is only possible in custom ROMs, remounts the file system to r/w automatically

adb shell "command"

-> executes "command" and returns to the computer shell

adb shell

-> opens a shell session on the phone (from here on you have to be very careful! Also you can execute now normal linux commands like rm, mv, ls, chmod and so on, but not cp (this can done through busybox)). You will have to use this more often, so get used to it ;)

1.2 Do I have to create a goldcard?

I read this question quite often. For rooting, you don't need it, but for SIM-locked phones you can't flash custom unbranded ROMs (I think).

A guide to create a goldcard follow this link: http://xdaforums.com/show...88&postcount=1 (thanks to MiSSigNNo to this point)

1.3 Tools you need

A complete set of tools can be found here Feel free to mirror it:

http://rapidshare.com/files/403766494/Tattoo.rar.html

Mirror(s):

http://www.bild-ton.net/Tattoo.rar

http://www.megaupload.com/?d=CI9AW83F

This package contains:

- adb binaries for Windows (sorry Linux users )

- su (Please note: use the su-binary attached in this post, not the one in the archive!!!!!)

- m7 exploit

- Amon_RA recovery.img

- mainfram3 boot.img

- flash_image binary

- tattoo-hack.ko

1.4 The automated way

This method was created by maverixx and can be found here. This basically consists of a package doing everything you need by itself. It roots the phone and flashes maverixx recovery.img, which (no offense) I don't like as much as I like Amon_RA's one!). Just click the batchfile and it does the rest (you have to connect your phone via USB to your PC though ).

If you want to use the automated way, but flashing Amon_RA's recovery, just replace the recovery.img from maverixx' package with the recovery.img provided in my archive file (see 1.3 for the link).

In my time here I noticed quite a few users experiencing problems either with a fully functional su or with the recovery image not flashing certain update.zip packages. It seems to be a matter of luck.

1.5 The manual way (recommended by the author)

I personally like what is done when and how, that's why I recommend the manual way. So let's get down to business Let's see if you know all the adb-commands I wrote here:

1. Let's say you have everything unpacked into C:\Tattoo

2. In your terminal (on your PC) type:

- adb shell "mkdir /data/local/bin" (if it returns an error it means that the directory already exists, just proceed)

- adb push m7 /data/local/bin/

- adb push su /data/local/bin/

- adb push flash_image /data/local/bin/

- adb push tattoo-hack.ko /data/local/bin/

- adb push recovery.img /sdcard

- adb push boot.img /sdcard

3. We have every needed file on the phone now. Type now (we are still in your terminal):

- adb shell

$ cd /data/local/bin

$ chmod 766 m7 (I don't retain this step as mandatory, so if this process fails, just proceed)

$ while ./m7 ; do : ; done

lots of text until you see something like "wrote shell code", press enter 2 or 3 times enter to see:

#

4. Then perform this:

- # export LD_LIBRARY_PATH=/system/lib

- # export PATH=/system/bin

- # insmod ./tattoo-hack.ko

- # mount -o rw,remount /dev/block/mtdblock5 /data

- # mount -o rw,remount /dev/block/mtdblock3 /system

- # cat ./su > /system/bin/su

- # chmod 4755 /system/bin/su

- # chmod 755 ./flash_image

Questions?

1.6 Problems and (hopefully good) solutions

Q: How do I execute my command line tool?

A: On your Windows host, go to Start->Run...->type "cmd"

Q: Where is my adb? When I type it in my shell it says that it was not found!

A: The adb binary is found in the archive I supplied above or in the Google SDK. As my archive-file is quite smaller than the Google SDK you should take mine. Let's suppose your adb binary is unpacked in C:\Tattoo, then type:

Code:

Your\Current\Location> cd C:\Tattoo

C:\Tattoo> adb <command>Q: adb says "error: device not found" when I try to launch the shell on the phone!

A: Connect the phone with the usb cable and make sure the sd card is not mounted as drive on your PC!!!

Q: When I want to copy something the phone returns that "cp" is not found! Also when I try to move a file, it says "cross-link device".

A: Well, copying from one partition to another is only possible either via busybox or via

Code:

cat file > /location/filename

Example:

cp /data/su /system/bin

is realized by typing

cat /data/su > /system/bin/suAlso make sure that system is r/w!!!

Q: flash_image returns write errors when flashing recovery/boot image!

A:

For boot: Try to redo the flash procedure

For recovery: Note that you can't flash the same recovery.img as the one already installed, so install another recovery.img first (like maverixx) and then Amon_RA's again. If it still doesn't work reboot, remount the partitions r/w, insmod tattoo-hack.ko and retry flashing.

Q: How can I unroot my device?

A: Just delete su from /system/xbin and restore the old boot.img. Alternatively see here for retrieving a stock ROM to flash it on your phone.

i hope someone try this i don't have time