Showing posts with label XDA. Show all posts
Showing posts with label XDA. Show all posts

HTC HD2_Leo : How to Flash into WP6.5 Stock ROM / Radio via microSD





I've been asked this a few times and I actually had to get help the first time I tried it, so here's my tutorial on how to flash a ROM or Radio image using your microSD Card. I personally use this method because my own computer runs Linux. I could probably boot up to Windows from time to time, but that would be like cheating on my wife; I just can't bring myself to do it if I can avoid it at all

A few of us old-timers to HTC are so used to our personal little tricks we use that we forget that newer users haven't learned them yet. I'm expecting a few people to say, "Oh yeah, we already knew that!" but perhaps one or two will instead learn from it and appreciate it.

So, without further ado:

Different chefs use different methods when naming their ROM or Radio images. You must rename the image to "LEOIMG.nbh", since this is the only recognized file name the bootloader will accept. (note: Some people are reporting that the file name must be capitalized, or it will not work. When named exactly as above, it has always worked for me!)

  1. Place the LEOIMG.nbh on a 8GB or smaller microSD card.
  2. Remove the battery cover and press the Reset button.
  3. Hold the Volume Down and End Call (power) buttons at the same time.
  4. As soon as "Searching..." appears on the screen, release the Volume Down button.
  5. ROM will flash. Be sure to hard-reset afterwards to prevent weird errors (as usual).

Now, in case you are wondering about the specifics:
  1. Remember to put the file on the "root" of the device. This means you can't put it in a folder. I am using an 8GB Class 2 card for flashing. I would recommend using a 1GB Class 6, but it's not necessary. It may be possible with a higher class 16GB card, but I haven't tried. Our Class 2 that came with the phone never works, though I don't rightly know why. [update]souljaboy wrote in and said: "it doesn't work because a fat32 is needed and by default the card is formatted fat, I think you should mention that, it worked for me!" Thanks, souljaboy!
  2. The reset button is a small red or yellow spot just below the slot for the microSD card. You could also remove and replace the battery; the important thing is to shut your phone off and restart it.
  3. Pressing Volume Down and End Call (or Power) is the recommended way to enter the bootloader. If you press the Volume Up and Volume Down at the same time, you will enter the "Hard Reset" option instead.
  4. If "Searching..." does not appear, you either do not have a compatible card in the phone, or you are not holding the right buttons. If you hold the "Volume Down" button past this point, you will see a message that says, "Press the Power Button to upgrade your phone." Releasing the "Volume Down" button at this point may or may not work, I had to release it before. If you release the "Power Button" now, your phone will simply reboot without flashing.
  5. ROM flashing via SD is much safer than via USB, since you don't have to worry about accidentally unplugging the cord or an issue with your PC, such as a crash or power failure.

---Added 05/21/10 as suggested by zelendel (Thanks for the sticky!)

If you are flashing an "Official" ROM direct from HTC or T-Mobile, you will more than likely over-write your SPL (Second Program Loader). This means, even if you have HSPL installed now, you could be reverted back to SSPL, rendering you unable to flash custom ROMs.

To make matters worse, if you flash an ROM higher than 2.10 and you attempt to install the current (as of 5/21/10) HSPL, you will brick your phone. Yeah, it's bad.

So, assuming you have flashed an official ROM over 2.10 via the SD card and you decide you want a custom ROM, follow these simple directions:
  1. (You do not have to have your phone connected to your PC for these steps)
  2. Download the "Official" ROM from here. (Thanks to zelendel for the upload!)
  3. Follow the instructions above to flash your phone with this image.
  4. Once you phone has fully booted, I recommend doing an extra hard-reset.
  5. Next, visit mskip's thread to download the latest HSPL and flash that (you can flash it either via RUU or via microSD).
  6. If done properly you should now be able to once again flash custom ROMs. Congratulations!

Hopefully someone will find this useful. If you have any issues, reply to this thread and I or some other wonderful xda member will try and sort things out.

Happy Flashing!

______________
REF : http://forum.xda-developers.com/showthread.php?t=681317 

wow. finally! XDA has been released How to Compile Android from Source Code..





XDA Developers Thread 
[TUTORIAL] Setting up and Compiling ICS from AOSP

Quite a few people have asked about compiling ROMs from source, so here's a guide.

This guide is directed mainly at compiling ICS for the GSM Galaxy Nexus.

It will show you how to set up the building environment really quickly with a few simple commands in the Terminal, then show you how to sync up with the repository and compile a ROM.

http://www.freeyourandroid.com/guide/compile-ics

It can also be done in a Virtual Machine.

Thanks Nathan (nprussell) for the write up!



---




Here are the steps:
(There are additional things you can do via the link above).




======================




IMPORTANT NOTES:

- For the purposes of this guide, you MUST be running 64-bit Ubuntu. This can be set up on a VM (it will compile if set correctly).
- If using a VM, ensure you give it at LEAST 2gb RAM and 2xCores (it'll take 3-4 hours at best)
- The source download is approximately 6gb.. you're going to need 25gb HD space for a single build.

To learn how to setup a Ubuntu 64bit VM on your Windows PC, use THIS GUIDE. I recommend using 10.04.

So... let's assume you're running Ubuntu 64 bit for the first time, and start right from the beginning.

NOTE : You're probably better of copying and pasting these commands, as some are quite long! All commands are in RED!


======================


1. Preparing your development environment

The very first thing you're going to need to do, is ensure you're working in a root terminal. Much like when using your Android phone, you'll want the # and not the $. In order to do this, open TERMINAL, and type:

sudo -i

Then type in your password. From this point forward, all of the commands in this guide assume you have root priviliges (saves typing sudo *superuser do* before everything!)

Next, we need to add a repository so that apt-get knows where to look for Java JDK:

add-apt-repository "deb http://archive.canonical.com/ lucid partner"

After that, you'll need to update the repository with the following command:

apt-get update

Now that your repository has been updated, you can proceed with installing the required packages to make building Android from source possible. The first thing you're going to need is the Java Development Kit 6:

apt-get install sun-java6-jdk

Followed by (and this may already be installed depending on which version of Ubuntu you went for):

apt-get install python

Now you're going to need Git. Git is the revision control system.

apt-get install git-core

Now, you're going to pull in all the required packages needed for the build process. As I have stated already, this guide is for 64 bit ONLY. Some of these will not work on 32-bit, so if you're using 32 bit, you're reading the wrong guide (sorry)!

apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils

IF YOU'RE USING UBUNTU 11.10, TYPE THIS COMMAND (if not, ignore this next one)

ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

Congratulations; you now have all the required packages to proceed with the next step!


======================


2. Installing and initialising the repo

Now we need to download repo, add it to our path and set the permissions . Please note that if you close terminal, you'll have to do this again. Type each command on a new line, pressing enter after each:

mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo


Now we need to create a directory for where our source is going to be pulled to, and change directory to it:

mkdir ICS_SOURCE
cd ICS_SOURCE


Next, you'll need to initialize the repo. There are two commands below; the top one initializes the specific branch, and the bottom is the master.

ONLY USE ONE OF THE FOLLOWING COMMANDS (recommended - TOP)

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.3_r1

OR:

repo init -u https://android.googlesource.com/platform/manifest

You will now be prompted to provide your name and email address. Please give it real details; that way you can use the gerrit code review tool if your email is connected with a Google account.


======================


3. Downloading the source (sync)

This is probably the most simple part, but depending on your connection speed, it could take a while. I am on 40mb download/10mb up, and it took about 25 mins. If you're on a typical DSL connection, expect to be waiting 60-120 minutes.

repo sync


======================


4. Obtaining proprietary binaries

New for ICS, Android cannot just be compiled from source code only. It requires additional hardware-related proprietary libraries to run, specifically for graphics acceleration (and GSM/LTE).

The binaries must first be downloaded from here

Each set of binaries comes as a self-extracting script in a compressed archive. After uncompressing each archive, run the included self-extracting script from the root of the source tree, confirm that you agree to the terms of the enclosed license agreement, and the binaries and their matching makefiles will get installed in the vendor/ hierarchy of the source tree. For example... after extracting one of the files, you will have 'extract-imgtech-maguro.sh'. Simply run:

sh extract-imgtech-maguro.sh

From your ICS_Source directory.

IMPORTANT NOTE : If you are building for the Nexus S, you will need the Nexus S binaries.


======================


5. It's build time!

If you're a JAVA developer, feel free to have a play with the source and make any changes you want to make at this stage. Be careful though, adding rubbish/old syntax code to the source (formatting is slightly different to gingerbread) will cause the build to fail.

Assuming that you just want to get on with building ICS, set the build environment up with:

source build/envsetup.sh

Next, you'll need to lunch. I don't mean go and have a sandwich, I mean... select which device you're building for.

NOTE - you can add other devices to this list PRIOR to proceeding with this step. If you're NOT building for the GNexus, go to the bottom of this guide and look at how to add devices to the list.

As previously stated, we're going to assume you're building for the Galaxy nexus, so type:

lunch

You'll be presented with a number of options (full-eng, etc).


If you're building for the Galaxy Nexus (codename: Maguro), type:

8

(7 for Nexus S and 6 for Nexus S 4G)


and hit enter. Now, we're ready to set the compile in motion, ladies and gentlemen. There's a lot of debate over the next bit. the -j part of the below command is technically not needed, but I have had MUCH more success compiling on a virtual machine with the -j1 added. Could be random... who knows...

Anyway, to set your build in motion, you now have TWO options. The first option will output the build as img files. The second option will output a flashable .zip file. I recommend the latter if you intent to use CWM over fastboot.

make -j1

or

make -j1 otapackage

Congratulations - in a few hours, you should have a working AOSP build for the Galaxy Nexus!