Putting Android on HP Touchpad

My brother was lucky and bought one of the HP Touchpads when they went real low in price. Recently though, he couldn’t play movies on it, as the codecs didn’t work correctly or the Touchpad didn’t support it (I didn’t see it, just guessing). He asked me to put on Android for him, so this is basically what I did.
1. Downloading all the stuff
2. Some small commands
3. What happened/Extras!

Downloads

I received a “Unable to find device” on Novacom after putting in the command (Shown in step two), so I had to download this.

I also had the SDK downloaded from HP’s Palm site, so you may want to download this first, then download the previous program to duplicate exactly what I did.  Here is the download.

This is the actual CM9 download.

This is the actual Google Apps.

This is ACME.

This is MOBoot.

This is CWM.

Small Commands

So the “Technical” portion.  Basically, on your machine, go to the furthest Novacom folder, mine was here:

C:\Program Files (x86)\HP webOS\SDK\bin\novacomd\x86>

In this folder, put the download above called ACME.  It won’t be executable by you, but it will know what to do when you enter the command in the cmd (Command prompt, I assume on Linux and Mac you’d use Terminal).  Before this command however, you need to do some work on the Touchpad.  Connect the device as you normally would to the computer.  When connected, on the device, it’ll prompt to enable USB mode.  Say yes.  On the computer, go to the devices folder (Via My Computer) and open up the external device.  Make a directory called “cminstall”.  In here, you want to put the CWM and MOBoot download .zip’s in to this folder.

Now, shut down the device.  But when you go to start it up (Be sure it’s connected to the computer still!), you want to hold the volume up button, (The button closest to the powerbutton).  Once this happens, you want to have your command prompt/terminal still in the previously mentioned path, and input this command:

novacom boot mem:// < ACMEInstaller3

This is the “Magic” portion.  Upon completion, unplug.  If the USB logo stays on, you’ll want to hold all three, the volume up button, the home button (The middle guy below the screen), and then the power button.  Hold until it goes away.  Then go on as normal.

Now, if you start up, you’ll notice that you have WebOS working still.  But you also have a small boot menu.

Now to install the CM9.  You downloaded a .zip file, of which, is named a bit oddly.  Rename the CM9 folder to update-cm.zip.  (I believe it complained about the naming however, so this may change depending on the versions of things, but it tells you on the HP device what to rename it to).  You want to do the same for the Gapps too, rename it to gapps-gb.zip.

Now, run that command above again in the same path, and then it’ll do its thing.  Now you’re done!

Extras

I said their were extras.  I was surprised to see that you can still boot in to WebOS.  So you didn’t lose this functionality, which I think my brother will enjoy.  To do this, you want to hold the power button, click Reboot, then select bootloader, then Ok.  It’ll reboot, and prompt you for selection.  To use this menu, use the volume buttons to scroll, then you use the home button to select an option.

Go-Lang

So I’ve started to poke around Google App Engine and Go.  Honestly, I like it.

1. Thoughts

2. Why

3. Little Tutorial

Go

Go, or commonly search, “golang” is a language made by Google.  Dah dah dah, I’m not a guy who knows much about the language, but I’ve read about it, and don’t want to give false information about it, so read it’s Wikipedia page if you’d like.  I decided I wanted to learn Go several months ago.  Problem was, no reason to learn it.  Not that I don’t enjoy learning new things on my own, I just can’t think of project ideas to actually put it to use.  But I found out about Go several months ago, followed it a bit for about a year, then decided I should learn it.

Go, the language, I do enjoy writing in.  I did some of the go-tour (It got boring after number 17 a couple months ago and couldn’t bring myself past fixing Pi in the tour this time around), but decided that I’d just jump in and go for it.  I usually learn this way, unless it’s something that’s massive and complex, in which case I try to find break down tutorials.  But this was actually successful, I’m getting the hang of the syntax and differences from other languages surprisingly quickly.  Again, I’m not doing anything dramatic with Go, but compared to how I feel learning other things, this went very smooth.

Why Go/GAE?

So I’m working on my Android app and I need some multiplayer work done (Nothing major, honestly just submit some info, get some info, pretty basic).  I looked around for some platforms I can get this on (Mostly to test and get it working locally).  I though of Google App Engine and Amazon’s EC2.  Amazon, your interface sucks.  I’m sorry, but honestly, it’s a massive wall of text with what seems (To me, a guy who just wants to make a small app) like a lot of worthless data that I won’t want or need. Google App Engine however, looks appealing, secondly, it’s more structured and organized, and I feel I can actually do something with it.  That’s honestly why I chose what I chose, nothing to do with specs (I’m making a small app that I don’t expect more than a thousand people playing, I don’t need any fancy stuff, just something that works).  Further, GAE supports Go.  I’m slightly certain you could get it to work, maybe with some hassle, but for what I’m planning, I’m sure it’s more than able.  If not, I could just use good ol’ PHP.

Tutorial, how to use POST/GET, and what about the datastore?

Below, I’m omitting package, imports, and the init, simply because the basic tutorial on GAE goes over this pretty well.

type Griddler struct {
	Id         string
	Author     string
	Name       string
	Rank       string
	Difficulty string
	Width      string
	Height     string
	Solution   string
}

func createHandler(w http.ResponseWriter, r *http.Request) {
	//Creating a Griddler to add to datastore.
	c := appengine.NewContext(r)
	parsed, err := url.Parse(r.URL.String())

	if err != nil {
		fmt.Fprintln(w, "Bad stuff happened in the create handler\t")
	}
	q := parsed.Query()       //Parse the URL.
	griddler := new(Griddler) //Create and set all the data in your griddler.
	griddler.Id = q.Get("id")
	griddler.Author = q.Get("author")
	griddler.Name = q.Get("name")
	griddler.Rank = q.Get("rank")
	griddler.Difficulty = q.Get("diff")
	griddler.Width = q.Get("width")
	griddler.Height = q.Get("height")
	griddler.Solution = q.Get("solution")
	k := datastore.NewKey(c, "Griddler", griddler.Id, 0, nil) //Make a key based on the Id of the Griddler.
	if _, err := datastore.Put(c, k, griddler); err != nil {
		fmt.Fprint(w, "Error during adding item in data store.  Sorry mate.\t", err)
	} else {
		fmt.Fprintf(w, "Added: %s with key %s", griddler, k) //If no error putting in, send back a success message.
	}

}

So, Honestly this code isn’t too interesting. You parse the url from the request, then you just use the query to set some data. Next you get a key for this Griddler (Please note, all Id’s will be a different hash, so first I’ll want to check if this hash exists).

Beyond this, you Put the griddler in the datastore, and you output the result. Prior, I wrote my own URL parser, which I mean, great and all because I control what the app does, but I’d much rather not doing this.