Showing posts with label desire c. Show all posts
Showing posts with label desire c. Show all posts

Monday, April 22, 2013

[How to] Root your Android device in Linux

How to root your Android device if you use Linux

¿De qué está hablando? Versión en español

You can adapt this tutorial to your device.

Introduction and motivation


When I was looking for a tutorial that will show me how to root my device in Linux I didn't find a post that will show me exactly how it was going to be, that's why I decided to do this post.

I have a HTC Desire C, which has Ice Cream Sandwich (Android 4.0.3).

First steps


Usually if you bought your device in a retail store, your "Bootloader" should be blocked. The Bootloader is what allows you to install new operating systems in your Android device.

For any HTC device, you need to follow the tutorial in the developer website of HTC. The tutorial explains how to unlock the Bootloader in Windows actually, so I'm going to show you how to do it with your Linux machine:

Go to the HTC site: http://www.htcdev.com and choose "Unlock Bootloader".


After you clicked in "Get Started" you will see a list of devices that are supported. If your device isn't supported you can choose the "All Other Supported Models" option.
Note: you need to create an account in HTCdev, you will receive a mail afterwards with a binary that you will need to unlock the Bootloader. Also you need to accept some conditions.

Now we can see the tutorial made by HTC. Basically we are going to do the same thing but in Linux!! (yeah awesome)
  1. Remove the battery and before you turn ON your device again you need to press the Volume Down Key and then the Power Button. Hold them until your device boots again.
  2. You will see a different screen, and some options will be displayed: "Fastboot", "Recovery", "Factory Reset" and "Simlock". To choose an option you need to use the Volume Keys.
  3. Choose "Fastboot" and press the Power Button.
  4. Plug in your device to your computer. You will see that the title "FASTBOOT" will change to "FASTBOOT USB".

Download the Android tools (adb, fastboot)


For the Ubuntu users: with all the developing that is happening with Ubuntu Touch the "Phablet" team released a PPA in order to download and install adb and fastboot (if your release doesn't have them in the default packages). Just run the following commands:

sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot

If you don't use Ubuntu you need to search for the tools in the Google website. Again maybe your distro has uploaded the tools to your packages.

Unlock the Bootloader


Once you have fastboot installed, the next step is to use this command:

sudo fastboot oem get_identifier_token

This will generate a token and the output must look like this:


Then in the tutorial of HTCdev you need to copy (Ctrl + Shift + C in the Terminal) and paste this token in the box of the website.


After you hit the "Submit" button you will receive a mail with a binary that you will execute to unlock the Bootloader.



After you received the mail, you will see a link with the rest of the instructions. Download the attached file "Unlock_code.bin" and put it in a strategic place, "~" (<- your home) seems good to me. Again from a Terminal you use this command:

sudo fastboot flash unlocktoken Unlock_code.bin


Then in your device you will see the following screen. It will ask you if you are sure of what you are doing. After you select "Yes" your phone will have its Bootloader unlocked.

Note: if you want to lock the Bootloader again, just use:
 
sudo fastboot oem lock

Downloading the super user


The next step is to download the super user, this little program will give you all the privileges in your Android device, that way you can do whatever you want with your phone. For example you can erase all the apps that you don't want but that are installed by default. Or you can install a new ROM into your phone.

You need to go to this website and download the file "Superboot r1".

Put the file where you want and extract it, you need to give the permission to execute the script:

chmod +x install-superboot-linux.sh

Then you need to plug in your phone, again in "FASTBOOT USB" mode.
You can do that without removing the battery with abd. But your device has to have the USB Debugging option activated. Go to "Settings">"Developer options"



sudo adb reboot-bootloader


Install the super user


Once your phone is connected and after you are in the good folder in your terminal, you will just need to run the script:

sudo ./install-superboot-linux.sh

Once you did that your phone will restart and the super user (SU) will be installed.

Did you like this post? Here you can see what I'm going to write about in this blog (for the moment). Don't forget to add me to your G+ circles or follow me on Twitter: @RobertoXMed

[Tutorial] Cómo rootear su Android en Linux

Cómo rootear su Android si usan Linux

What is he talking about? English version

Introducción e interés


Buscando tutoriales sobre como rootear mi teléfono en Linux no encontré nada muy claro ni muy gráfico entonces he decidido hacer este tutorial.

Yo utilizo un HTC Desire C, vino con Ice Cream Sandwich (versión 4.0.3 de Android).

Primeros pasos


Normalmente cada dispositivo tiene su "Bootloader" bloqueado. El Bootloader es lo que permite instalar un nuevo sistema operativo en su Android.

En el caso de los dispositivos HTC lo que tienen que hacer es seguir el tutorial en la página de desarroladores de HTC. Como el tutorial está más centrado para gente que usa Windows aquí les mostraré lo que tienen que hacer:

Vayan al sitio de HTC: http://www.htcdev.com y elijan "Unlock Bootloader".


Luego de clikear en "Get Started" van a tener una lista de dispositivos a su derecha. Si su dispositivo no está en la lista van a tener que elejir "All Other Supported Models".

Nota: tienen que crear una cuenta en HTCdev porque luego van a recibir un mail con un código que les va a servir para desbloquear el "Bootloader". Así mismo tienen que aceptar algunas condiciones en las cuales dicen que saben lo que están haciendo.

Luego llegamos al tutorial de HTC. Básicamente vamos a hacer lo mismo que está en el tutorial pero solo les diré cómo hacerlo en Linux y no en Windows.
  1. Saquen la batería y cuando vayan a prenderlo de nuevo deben aplastar el botón del volumen hacia abajo y el botón de encendido al mismo tiempo. (Pueden aplastar el volumen hacia abajo primero y luego el botón de encendido).
  2. Cuando su teléfono se va a encender van a ver una pantalla en la que tienen algunas opciones: "Fastboot", "Recovery", "Factory Reset" y "Simlock". Para navegar en este menú deben utilizar los botones de volumen.
  3. Seleccionan "Fastboot" luego aplastan en el botón de encendido.
  4. Conecten su dispositvo al computador. Una vez que lo hicieron el título debe cambiar a "FASTBOOT USB".

Descargar los utilitarios (adb, fastboot)


Para los usuarios de Ubuntu: con todo el desarrollo que se está dando a causa de Ubuntu Touch para los teléfonos se ha creado un PPA del cual pueden descargar e instalar abd y fastboot (si estos no están en los paquetes). Solo usen los comandos siguientes.

sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot

Si no usan Ubuntu deben ir a la página de Google y descargar estos dos utilitarios para Linux (si estas herramientas no están en los paquetes de su distribución).

Desbloquear el Bootloader


Una vez que tengan instalado fastboot el siguiente paso es usar este comando para que fastboot nos genere un código:

sudo fastboot oem get_identifier_token

Les va a salir un mensaje como este:


Luego ese código deben introducirlo en una casilla de los pasos que están en la página de HTC con el tutorial sobre cómo desbloquear el bootloader.


Una vez que le den click en "Submit" van a recibir un mail con un script que van a ejecutarlo y así su teléfono se desbloqueará.



Después de que recibieron el mail, van a ver que en él hay lo que sigue de las instrucciones. Descargamos el archivo adjunto  que se llama "Unlock_code.bin" en un lugar fácil de encontrar por ejemplo en "~" (<- eso es su home). De nuevo desde el terminal vamos a usar el comando siguiente:

sudo fastboot flash unlocktoken Unlock_code.bin


Y luego en su teléfono van a ver la pantalla siguiente que les preguntará si están seguros de que quieren desbloquear el Bootloader. Seleccionan "Yes" y listo. Su teléfono debe reiniciarse.


Nota: si quieren bloquear el bootloader de nuevo lo único que tienen que hacer es:

sudo fastboot oem lock

Descargar el super utilizador (super user)


El siguiente paso es descargar el super utilizador, es lo que les va a dar todos los derechos en su Android y así podrán hacer lo quieran con su dispositivo. Como por ejemplo eliminar todas las aplicaciones que no les sirven de nada y que ocupan mucho espacio. O pueden instalar un nuevo ROM en su teléfono.

Para eso deben ir a esta página y descargar el archivo "Superboot r1".

Lo ponen donde quieran en su computador, lo extraen y deben darle el permiso para ejecutarse:

chmod +x install-superboot-linux.sh

Luego deben volver a conectar su teléfono prendiéndolo como al principio, es decir con "FASTBOOT USB".
Pueden hacer esto usando adb. Pero antes deben activar el modo depuración USB, yendo a "Ajustes">"Opciones de desarrollo":



sudo adb reboot-bootloader


Instalar el super utilizador


Una vez que su teléfono está conectado y en su terminal están en la buena carpeta (donde pusieron el instalador del súper utilizador), lo único que les resta hacer es lo siguiente:

sudo ./install-superboot-linux.sh

Una vez que hicieron esto su teléfono va a reiniciarse y tendrán instalado el súper utilizador (SU).

Les gustó este post? Aquí pueden ver lo que se va a venir en este blog (por el momento). No se olviden de agregarme a sus círculos en G+ o de seguirme en Twitter: @RobertoXMed