This is a continuation of my Ubuntu 14.04 Install. In the previous post, I covered all of my notes on installing network/Internet-related configuration. In this post, I’ll cover setting up my programming environments and applications. If you would like to see the list of posts in this series, you can look at the Ubuntu 14.04 Install page.
These are just some quick notes on the various Java programs that I install. I’m sorry the notes are not very complete. I’ll do better next time, but I thought these notes might still have some value.
I have been trying to change, decompile, and recompile Trebuchet to change the items on the dock and home screen. I keep getting errors, and I think I have finally found the solution.
The output of the command is quite long, so let me post the beginning:
skp@chestnut:~/app/hd2/dev/work$ apktool b Trebuchet-orig Trebuchet.apk I: Copying classes.dex file... I: Checking whether resources has changed... I: Building resources... invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/values-sw720dp-land invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/drawable-sw600dp-nodpi invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/drawable-sw600dp-land-hdpi
And, here’s the end of the output:
invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/layout-sw720dp Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1399953021396634018.tmp, -I, /home/skp/apktool/framework/1.apk, -S, /home/skp/app/hd2/dev/work/Trebuchet-orig/res, -M, /home/skp/app/hd2/dev/work/Trebuchet-orig/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301) at brut.androlib.Androlib.buildResources(Androlib.java:248) at brut.androlib.Androlib.build(Androlib.java:171) at brut.androlib.Androlib.build(Androlib.java:154) at brut.apktool.Main.cmdBuild(Main.java:182) at brut.apktool.Main.main(Main.java:67) Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1399953021396634018.tmp, -I, /home/skp/apktool/framework/1.apk, -S, /home/skp/app/hd2/dev/work/Trebuchet-orig/res, -M, /home/skp/app/hd2/dev/work/Trebuchet-orig/AndroidManifest.xml] at brut.util.OS.exec(OS.java:83) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191) ... 6 more
What I finally found, was that I installed an old or invalid version of aapt with apktool. It was installed into /usr/local/bin…
skp@chestnut:~/app/hd2/dev/work$ which aapt /usr/local/bin/aapt skp@chestnut:~/app/hd2/dev/work$ ll `which aapt` -rwxr-x--- 1 skp skp 3747857 May 15 2011 /usr/local/bin/aapt*
The easy fix was to just rename this one installed with apktool. Then, it pulled the one from my Android SDK intallation. (I already had the platform-tools directory in the path.)
skp@chestnut:~/app/hd2/dev/work$ cd /usr/local/bin/ skp@chestnut:/usr/local/bin$ sudo mv aapt aapt-broken [sudo] password for skp: skp@chestnut:/usr/local/bin$ which aapt /home/skp/app/android-sdk-linux/platform-tools/aapt
After that, it compiled fine!
skp@chestnut:~/app/hd2/dev/work$ apktool b Trebuchet-orig Trebuchet.apk I: Checking whether resources has changed... I: Building resources... I: Building apk file...
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 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.
- Cook your own custom ROM for HTC Android Smartphones in DSIXDA’s ROM Kitchen
- XDA Thread: dsixda’s Android Kitchen
- The Unlockr: How To – Create Your Own Custom ROM for Android, Part 2 – Creating Your First ROM
- XDA Developers Wiki: HTC HD2
- [REF] Changing default wallpaper in ICS firmwares [FOR ROM DEVELOPERS]
- Android APK Tool
- lifehacker: Five Best Android Launchers
- XDA Developers: What is Best Apex,Nova or Trebuchet Launcher?
- Go Dev Team
- Rootz Wiki: Google Apps
- Swype Download Page
- XDA Developers: update-script syntax – A guide for ROM devs, modders, and themers
- AOKP GitHub
- Free Your Android: An introduction to the Edify (Updater-Script) language
On my latest ROM download, I found that Chrome wouldn’t work for some reason. It said that it wasn’t compatible with my phone, but that really confused me. I’ve had it running on my phone with no problem in the past.
I still haven’t gotten it to work. If you know what I am doing wrong, please point it out. Or, you might find a tip that will help you out. In any regard, I can’t promise any answers.
The ROM works very well for the most part. These are the issues that I have had with it so far:
- Occasional reboots for no reason — it doesn’t happen often, but it is annoying when you feel your pocket vibrate and you pull out your phone only to find it on the boot screen. (This didn’t seem to happen until the Market application upgraded)
- The browser quite working. It force closes before it opens a page. It worked at first, but again, sometime after the market upgraded, the browser quite working.
- Sound is quiet on phone calls
- Battery usage isn’t as good as CM7
Important: These are just my installation notes. There is no warranty with them intended, nor are they really instructions for installing a ROM. They are just meant to supplement what others have already written. Maybe they will provide a good starting place, but please be sure to read through the links.
First, I followed the cLK from Dummies instructions.
Step 1: HardSPL. I already had HardSPL 2.08, so I skipped this step. You can see what version you have by starting with your phone off. Then, hold the volume down button while you turn your phone on.
If you need to install HSPL, visit this thread.
Step 2: Task 29.
Basically, I prepared the phone by turning it on with the Volume Down key. I plugged the phone into the USB port. Then, I had to run (from Windows unfortunately) the .exe program included with the zip file. I had dusted off an old copy of Windows Vista, and to make it work, I had to right click on the program and choose to run it as administrator.
Step 3: Install the Radio.
I downloaded Leo_RADIO_188.8.131.52** from here. Again, I held the Volume Down key as the phone booted, and connected it to the USB. Finally, I ran CustomRUU.exe.
Step 4: Run the HotMod CustomRUU.exe
I downloaded the HotMod utilities v0.1 [cLK 184.108.40.206 +partition layout + CWM 220.127.116.11].zip file and extracted it to a directory in Windows. Then, I held the Volume Down button while the phone booted. Finally, I ran the CustomRUU.exe in what I extraced from the zip.
Note: for reference, I extracted the zip file into c:\temp\hd2, so all paths will be relative to that.
Step 5: Installed Google USB Drivers
When the “Found New Hardware” dialog displayed, I chose “Locate and install driver software”. Then, I had to choose “I don’t have the disc. Show me other options”, and “Browse my comptuer for driver software (advanced)”.
For the software location, I chose: “C:\Temp\hd2\HotMod utilities v0.1 [cLK 18.104.22.168 +partition layout + CWM 22.214.171.124]\google-usb_driver”.
The install did take quite a while, but when it was done, I finally got: “Android ADB Interface device installed correctly”. Finally, I had to reboot before the driver seemed to work.
Step 6: Flashed the Recovery
I opened command prompt (cmd.exe). Then, I had to change to the zip directory — First, “cd \temp\hd2”, and then, cd “HotMod utilities v0.1 [cLK 126.96.36.199 +partition layout + CWM 188.8.131.52]”
To do this, the ROM includes a utility called FastBoot. You can read more up on it here. So, I typed:
fastboot flash recovery recovery_leo4014.img
Note: you can use the command “fastboot reboot” to reboot the phone when your done.
Step 7: Copied the ROM to the SD Card
I copied the ROM to the SD Card by booting into recovery on the phone. That is holding the Power Button/Hang up button while the phone boots. Then, I used the menu option “mounts and storage” > “mount USB storage”.
At that point, I could access the phone as a drive, and I copied the HotMod_v0.4.zip file to the root directory of the SD card.
Step 8: Flashed the ROM
Again, in the recovery, I used the following menu: “install zip from sdcard” > “choose zip from sdcard”.
Next, it asks for the zip file to flash. I chose the “HotMod_v0.4.zip” that I copied previously. And, it asks for confirmation … “Yes – Install HotMod_v0.4.zip”.
Three articles in one day!
First, I read that Amazon is talking about selling Android Apps. Gizmodo is talking about it, too. Like Gizmodo, I wonder why we need another app store and how they plan to compete? Would a user have to enable the non-market apps option to use the store? What is going to be the advantage for either the user or the developer to use Amazon?
Then, I read about Google’s new features on their app store. To me, this should be very attractive to developers because it should give them more options for monetizing their development.
On a different note, I read about Saab putting Android in their cars. This has always been cool to me. When the prices of the tablets drop, I would like to try to make my own little car info center with one.
I have been meaning to write up my list of Andriod apps that I currently have installed on my G1, and then, I found these lists:
- Google Operating System: What Are Your Favorite Android Apps
- Matt Cutts: Gadgets, Google, and SEO: 39 Android Apps that I love
I had hopes to linking to the Market, but I couldn’t find a good link to it. This is the best I could find:
So, I thought I should finally get around to doing it. So, here are my installed programs:
I definitely use this all the time. It came with the phone, but I installed it from the market to get the new features. The biggest new feature is the Navigation, which works very well, and I really like it.
The best place I could find for info on updates was their blog.
This is a great Bible application. I use it a lot during church, and it is nice to have access to the Bible wherever I go. It looks nice and is easy to read. I can quickly browse to passages, and I can search for words. I don’t think it has a commentary or else I haven’t used it.
NewsRob (Google Reader)
I have been using Google Reader to keep up with various RSS feeds. This program gives me an interface to the reader on my phone. My biggest complaint has been that I only want to view certain feeds on my phone. Some of the feeds I had subscribed to were too hard to read on the phone. I haven’t looked to see if Google has changed their API but last I looked Google didn’t provide a way to pick and choose feeds.
All in all, I have really liked this program.
Facebook for Android
This is what I have used to post and view Facebook. I remember seeing comments about the iPhone application being so much better, but I haven’t had the chance to compare. I have noticed that it has improved since I first installed it.
The Weather Channel
According to this article, this application won the developer challenge. I have bounced back and forth between this application and the Weather Bug. With the more recent update from The Weather Channel, I have liked this one better.
This is a great application for viewing the weather. One of the features that I do like is the temperature in the notifications bar.
This is a great application for times when you need to turn your phone to vibrate. It turns all of the volumes down to vibrate only. You can choose a time frame, and it will turn it back on after the time frame. You can also choose a distance where it turn it back on after you go that distance. I haven’t used that because I haven’t wanted to spend the battery required to leave the GPS on for that.
I use Timeriffic for planned times that I need my phone on silent. I use this for meetings and such that are not on a schedule.
I started using Locale, but they made it a paid App and disabled the old version. This program allows me to set the phone to silent automatically. I have it set for during church times. That way my phone shouldn’t ring in the middle of church.
One cool thing I just learned about this program is that it is open source. It is hosted on Google Code and I could make changes to it and contribute!
SSI gTasks ToDo
This is the first app I came across that would let me sync and use the Google Tasks in GMail on my phone. I don’t use it a lot, but it gets the job done.
This program seemed to save battery at first. I don’t really open it now, but I think it runs in the background. I haven’t done any comparison to see if it really does.
I oringally downloaded this when it was free. It was great to have in Church while I was playing my guitar and couldn’t remember how to play a chord. I could look it up quickly before the song started.
This is the one game that I have probably played the most on my phone. It is addicting, and it has many levels to work through. The graphics are great which I think has a big impact on the appeal. The game play is simple: you tap the screen to shoot a ball and try to eliminate the balls in the line by getting three or more in a row of the same color. Now that I am through all of the levels, I haven’t played it in a while, but it is still fun.
This was a great application for my son. He has kind of outgrown it, but I think my second son might grow into it soon. The cool part about it is that you don’t have to worry about him clicking something wrong and getting into another program or placing a call. You do still have to watch to make sure he isn’t throwing it across the room or dropping it in the toilet.
This is a nice little way to play freecell while you are waiting for something.
This was one of the first games that I put on my phone. The reason it caught my eye was that it illustrated the phone’s accelerometer. Playing the game was very fun, but it didn’t take long to beat the 10 levels. It looks like it also works on the iPhone.
T-Mobile My Account
This program is handy to check the account details such as the minutes that I had used. It also provides a quick way to check things like how much battery is left.
I had used this program for a while, but then they made it something that you have to pay for.
PapiCatch & PapiJump
These are fun, simple little games. Sunflat has a bunch of different little games like this: PapiJump, PapiOrange, ActionPotato, SFCave, PapiMissle, PapiRiver, PapiCatch, PapiPole. I started with PapiJump because it was a game that demostrated the accelerometer. I also tried PapiRiver. The graphics aren’t much on the ones that I tried, but they were entertaining for a little bit.
I originally downloaded this program to try to create my own rings. I never got around to doing that, but I have used it to record some notes while I was in the car and couldn’t type. It is very easy to use and worked great.
This program started a great idea for me. I haven’t traveled enough to give it a far chance, but if I traveled more, it would be a necessity! The great part is that it allows you to take a picture of your receipts while you are traveling. You can key in some information such as the price and type of expense. At the end of the trip, you can download the images and info to your computer.
I also found that on the homepage, there is a link to the source repository.
While I haven’t used the program that much, I love the concept. I have started my own little program that will take pictures of receipts and sync up with my money management software.
I have a Google Voice account, but I haven’t used it that much. I had trouble with latency, and it wasn’t good enough to use on a regular basis. It has been a while since I tried, so I will have to try again. The program allows you to make calls from your phone using Google Voice. It doesn’t save anything on minutes, and the program didn’t let you change the settings and such.
This is kind of a cool application, but I never really understood what the advantage of this program was over the regular Google Maps. I think I noticed that maybe now it is combined with the Google Maps application.
I haven’t used this application very often. I can’t really even remember why I installed it!
I downloaded this program to be able to blog from my phone. The problem is that I usually wanted to just save it as a draft and finalize it on my computer. Then, I would actually publish from my computer. I couldn’t make that happen with this app for some reason. I will probably try the official application next.
Wapedia: Mobile Wikis
I haven’t used this much, but I do look at Wikipedia a lot. I am not sure how many advantages this gives over just using the regular browser.
Nimbuzz IM & Voice
I tried this is an option to use Skype with my phone. It never did work exactly the way that I wanted it to, so I haven’t stuck with it.
This is a Super Nintendo Emulator that I install but have never used. I keep meaning to download a ROM and try it out, but I haven’t ever done it.
I finally finished my first Android application to the point that I wanted to try to start using it on my phone.
This post explains how to install applications, but I had some problems:
First, with installing from the SD Card, it doesn’t say exactly what application to use. From the Market, I installed “AppsInstaller” developed by ModMyMobile.com. When I opened the program, it scanned my card, and found my application that I had uploaded via the USB cable. But, it said that the applications were blocked and offered to take me to settings. I check the “Unknown sources” option which is described as “Allow install of non-Market applications”. Then, it worked!
Also, I tried to install with adb, but I couldn’t get that to work. When I ran “./adb devices”, I don’t see any devices listed. This “G1 usb drivers for linux” post looks promising, but I haven’t finished going through all of the steps. I will try to post back when I do.
I have been trying to get my photo programs to upload to Facebook, but they just don’t want to work. There are no solutions here yet, but if anyone has any tips, I’d be glad to hear about them. Does Facebook not like Linux? Is it the Chrome that is conflicting?
I could always just upload the photos one by one the manual way. But, what programmer or Linux geek wants to do that? We would rather spend more time hacking the automatic tools than it would take to do it manually!
F-Spot to Facebook
Since upgrading to Ubuntu 9.10, I decided to give F-Spot a try. For a while, Ubuntu has been offering to import photos every time I plug the camera in. So far, I like all the features, and it has been working great.
The Facebook export doesn’t work though. I am kind of disappointed because that could be really nice. First, I found that I had to enable it. For some reason, it won’t log in once enabled. It just stops at “Session established, fetching photo albums…”. I have Chrome as my default browser, and I wondered if that had something to do with it.
G1 to Facebook
I was able to take a picture using the Facebook application and post it on Facebook. But, I have tried several times to share a picture from the Gallery application. When I installed the Facebook application, the Gallery added a new sharing option to share with Facebook. When I share a picture, it asks me to add a caption, and allows me to upload. The problem is that it just sits there at 0% and never finishes.
With both problems, I can’t find any error messages or any log that would help with searching for answers. So, for now, I am stuck. I guess I am up to the manual upload methods.