Tag Archives: ADB

Note: Unlocking deletes all data. So take backup of all your required data.

Download the Android SDK or the minimal ADB and Fastboot (The latter is recommended).
Install Motorola adb and fastboot drivers.
Power down the phone.
Press down Vol Down button, and press Power down too. Keep them pressed and release Power button followed by Vol down button. This lets you enter the Fastboot mode.
Connect the phone to PC with a cable, enter command prompt (In Win 8+, type cmd in Start screen).
Add fastboot.exe and adb.exe to the path.
In a commmand prompt, enter the following, and copy the required data:

fastboot oem get_unlock_data

Visit the unlocking site.
Sign in using your Google account or Motorola ID.
Paste the string copied earlier, in the field.
Click on ‘Can my device be unlocked?’.
Click on the “REQUEST UNLOCK KEY” button.
Select the ‘I Agree’ option. The unlock key will be delivered to your email.
With your device still connected, in command prompt, type:

fastboot oem unlock KEY

replacing KEY with the actual key you received.

For more, Read this XDA post by Lucas Eugene.

These instructions have been copied from the Cyanogenmod Wiki, titled “How to compile CyanogenMod for Bravo (HTC Desire)”

This how-to was written for Ubuntu 10.04 & Ubuntu 10.10BravoCyanogenMod 7.x (Gingerbread), on 2 February 2010.

Contents

[hide]

Prepare the Build Environment

NOTE: You only need to do these steps the first time you build. If you previously prepared your build environment, skip to Copy proprietary files.

Install the ADB

Install the Android SDK.

Install the Build Packages

Install using the package manager of your choice:

For 32-bit & 64-bit systems:

git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool[/code]

For 64-bit only systems:

g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib[/code]

NOTE:

gcc-4.3-multilib g++-4.3-multilib[/code]
is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.

NOTE:
On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:

add-apt-repository "deb http://archive.canonical.com/ maverick partner"[/code]

Of course in an ssh environment without root access you'd have to compile required packages by yourself!

Create the Directories

You will need to set up some directories in your build environment.

To create them:

mkdir -p ~/bin[/code]

mkdir -p ~/android/system[/code]

Install the Repository

Enter the following to download make executable the "repo" binary:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo[/code]

chmod a+x ~/bin/repo[/code]

NOTE:

You may need to reboot for these changes to take effect.

Now enter the following to initialize the repository:

cd ~/android/system/[/code]

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16[/code]

Copy proprietary files

NOTE:

This only needs done the first time you build. If you have already done these steps, you may skip to Download RomManager.

You will need to have a Bravo with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.

Connect the device to the computer and ensure that ADB is working properly.

cd ~/android/system/device/htc/bravo/[/code]

./extract-files.sh[/code]

NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.

Download RomManager

NOTE:

This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.

Download RomManager which is needed by the build:

~/android/system/vendor/cyanogen/get-rommanager[/code]

Building CyanogenMod

Check for updates

First, check for updates in the source:

cd ~/android/system/[/code]

repo sync[/code]

Configure Build & Compile

Now, the environment must be configured to build and the ROM compiled, from code, for the Bravo.

. build/envsetup.sh
brunch bravo[/code]

Install

  1. Copy your .zip file from ~/android/system/out/target/product/bravo/update.cm-XXXXX-signed.zip to the root of the SD card.
    Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
  2. Flash both of these .zip files from recovery.

 

After setting up ssh client access,

follow the instructions for bravo:

Ref: http://wiki.cyanogenmod.com/wiki/HTC_Desire_(GSM):_Compile_CyanogenMod_(Linux)

Prepare the Build Environment

NOTE: You only need to do these steps the first time you build. If you previously prepared your build environment, skip to Copy proprietary files.

Install the ADB

Install the Android SDK.

Install the Build Packages

Install using the package manager of your choice:

For 32-bit & 64-bit systems:

git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool[/code]

For 64-bit only systems:

g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib[/code]

NOTE: 

gcc-4.3-multilib g++-4.3-multilib[/code] is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:

add-apt-repository "deb http://archive.canonical.com/ maverick partner"[/code]

Create the Directories

You will need to set up some directories in your build environment.

To create them:

mkdir -p ~/bin[/code]
mkdir -p ~/android/system[/code]

Install the Repository

Enter the following to download make executable the "repo" binary:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo[/code]
chmod a+x ~/bin/repo[/code]

NOTE: You may need to reboot for these changes to take effect.

Now enter the following to initialize the repository:

cd ~/android/system/[/code]
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread[/code]
repo sync -j16[/code]

I'm modifying this code. git:// is not supported on most proxies and ssh via sourceforge, so if you do a default repo init, it will fail. Instead, you have to replace the git:// with http://

Repo actually makes a hidden folder names .repo under ~/android/system/ the first time you run it. Thereafter it runs those scripts. You can do a grep/sed to replace all instances of git:// with http://

Copy proprietary files

NOTE: This only needs done the first time you build. If you have already done these steps, you may skip to Download RomManager.

You will need to have a Bravo with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.

Connect the device to the computer and ensure that ADB is working properly.

cd ~/android/system/device/htc/bravo/[/code]
./extract-files.sh[/code]

NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.

Download RomManager

NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.

Download RomManager which is needed by the build:

~/android/system/vendor/cyanogen/get-rommanager[/code]

Building CyanogenMod

Check for updates

First, check for updates in the source:

cd ~/android/system/[/code]
repo sync[/code]

Configure Build & Compile

Now, the environment must be configured to build and the ROM compiled, from code, for the Bravo.

. build/envsetup.sh && brunch bravo[/code]
Here, I hit a snag. It started giving errors saying java wasnt installed. So I got a self installing .bin, and installed it.

Install

  1. Copy your .zip file from ~/android/system/out/target/product/bravo/update.cm-XXXXX-signed.zip to the root of the SD card.
    Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
  2. Flash both of these .zip files from recovery.