HD2 Android Cooking

This is my first delve into cooking my own ROM for HD2.  I am not at a point where I can give step-by-step directions, but I wanted to post some of the things that I figured out so far.

Danial’s (dsixda) Android Kitchen

I have heard a lot about the Android Kitchen, so I thought I would try it.  It was an easy install.  I just had to download the zip file from Git Hub and extract it into a directory:

To launch it, I go to that directory in a terminal…

… and run the ./menu command.  That brings up the Kitchen menu.

Importing My First ROM

I started with the Paranoid Android – AOKP – Sourcery ROM.  I simply downloaded it, and placed it in the

Then, on the menu, I chose option 1 to create the working folder.

When it was done, it created this working directory:

Adding My First App

Just to make a small easy change, I decided to add an app to the ROM.  I have been using the Wifi Tether program, and I decided to bake that into the ROM.  It was as easy as placing it into the working folder under data/app.

This worked fine, but for some reason, the wireless tethering won’t work on my ROM.  The app works fine, but when it tethers, it gets an error.   That’s an issue for troubleshooting another day.

Changing the Default Background

I found some instructions that suggested using the apktool program to update the background.  But, rather than that, I just used the File Roller to extract and replace the files in the apk file.

I found the framework-res.apk file inside the system/framework folder in the working directory.  I opened the file with file-roller and I went to the /res/drawable-hdpi folder.  There I extracted the default_wallpaper.jpg.

I simply edited the image with Gimp and replaced it in the apk file.

This worked great at first.  Then, my old wallpaper mysteriously reappeared.  I assume that was from Google’s syncing my phone to previous setups.

Adding Chrome By Default

I unzipped my Titanium backup of Chrome to the System directory.

This made Chrome show up in the list, but it failed to run.  I ended up moving it to the /data/app folder of the ROM, and that fixed the problem.  Chrome was installed by default.

Note: I did the same thing with Swype.  I found it also had to go in the /data/app folder.

Changing the Launcher

The ROM that I started with has the Nova Launcher in it.  I did a little reading up on launchers, and I decided to try to the Go Launcher EX.

First, I removed the Nova Launcher.  I deleted the NovaLauncher.apk file:

I tried to download the Go Launcher from their website, but it mostly sent me to the market.  Instead, I installed it from the Market.  Then, I pulled it off the phone with adb.

adb pull /data/app/com.gau.go.launcherex-1.apk
adb pull /data/app/com.gau.go.launcherex.gowidget.weatherwidget-1.apk

I simply removed the NovaLauncher.apk from the /system/app folder.  Then, I added these two apk files in its place.  That gave me the Go launcher.

I tried that out for a bit, but then I decided to go back to Trebuchet.  So, I swapped the two Go apk files with Trebuchet.apk from another CM10 ROM.

Building the ROM

After all this, I built the ROM from the kitchen.  I just used option #99.

Then, I picked option#1, the interactive mode.  Then, I took the defaults.  It creates the zip file in the output zip folder.

I had a problem with the ROM flashing.  I think that it has to do with the “if” statements in the update script.  The kitchen didn’t translate it correctly.  So, I replaced the update script with the original script from the original ROM.

Later, I went back into it and found that I could remove the if, else, and end-if lines from the update-script in the working folder.  This takes out the feature that autodetects CLK vs. MagLdr.  But, it flashes on my phone fine.  I can figure that out later.

Resources

Leave a Comment

Your email address will not be published. Required fields are marked *