STOP: YOU NEED ROOT!
If you like this please Donate for a dev droid. (http://bit.ly/OptedDonate)
Most of the development scene going on for Android revolves around the HTC world. I am a big HTC fan, and love their phones. I am with Verizon though, and the last HTC I had was an HTC Touch/Vogue, which I successfully ran Android on. It wasn’t too pretty though. Now that I have a Droid, and there seems to be a small community of Droid developers, a lot of them try to hide their trade secrets. My goal is to post everything I can figure out about this awesome device.
Wanna work with the AOSP to compile your own vendor setup? Choose which Packages you want to install? Lets do it! I am going to go over the easiest way possible.
In order to work with this you will need to familiarize yourself with Git; which can be done with Google so we won’t cover that here. Really you can get away with reading the link in step two, but it is recommended to RTFM.
Most of these tools are obtainable from searching google!
Full List of Needs:
- SPRecovery 0.99b
- Sun Java SDK 1.5
- Git
- Repo Tool
- flash_image tool
- Brain
Disclaimer: IF YOU BRICK YOUR DEVICE ONLY YOU ARE RESPONSIBLE!!!
Okay, Step 1 – navigate to http://www.github.com/cyanogen (this guy is awesome, so be sure to stop by and thank him on twitter @cyanogen)
Step 2 – download the repo tool from google. Go here and read this to learn how to use it and Git.
Google Repo and Git
Step 3 – Ok, now that we should have some needed tools to get the repo lets get some code!
mkdir -p $HOME/Cyanogen && cd $HOME/Cyanogen
repo init -u git://github.com/cyanogen/android.git -b eclair
repo sync
Now take a trip to your local gate for a red bull.
*some jeopardy music as you drink your red bull*
When it’s done, you should have a huge directory of code (~3.5GB). In short, what the repo tool did was a massive git from many locations. These locations can be found in the .repo/manifest.xml.
Step 4 – Now lets try to build something!
cd vendor/motorola/sholes-open
Step 5- Plug in your phone, and I am assuming you have ADB (Android Debug Bridge) and the appropriate udev rules!!
Step 6 – Run the proprietary extraction script provided in the sholes-open vendor setup.
./extract-files.sh
Step 7 – Now for the fun part
Note: depending on how many cores you have, replace the -j8 with -j.
cd $HOME/Cyanogen
source build/envsetup.sh
lunch cyanogen_sholes-eng
make -j8
Step 8 – Wait…..Now depending on how long it takes for your local repo to compile…might wanna take a nap, or go do something.
Note: This article doesn’t cover debugging the build!
Step 9 – Once your repo has successfully compiled.
cd $HOME/Cyanogen/out/target/product/sholes-open/
Look around you should see quite a few files. The only ones we should be interested in for the moment are:
Now do this:
Note: this is for SPRecovery. There is a better recovery out from clockworkmod. You can package the build as an update.zip for that one.
cd system
tar -cvvf system.tar `ls`
cd ..
mkdir -p ./packaged && cd packaged
mv ../boot.img ./
mv ../system/system.tar ./
adb shell mkdir /sdcard/cyanogen
adb push boot.img /sdcard/cyanogen/
adb push system.tar /sdcard/cyanogen/
adb reboot recovery
Now we need to install it. Everything from here forward will be done in the android terminal via “adb shell”
Now also would be a good time to nandroid!
In your terminal type “adb shell”
Now in your recovery shell
Make sure your sdcard is mounted!
mount /sdcard
cd /sdcard/cyanogen
format SYSTEM:
format DATA:
format CACHE:
flash_image boot boot.img
mount /system
cd /system
tar xvf /sdcard/cyanogen/system.tar
exit
now type “adb reboot”
then “adb lolcat” to watch it boot.
Good luck!
If you like this please Donate for a dev droid. (http://bit.ly/OptedDonate)