# [DEV] Getting Android dump on all WebOS Devices



## damageless (Aug 25, 2011)

*Nothing here is flashable, you cannot put this on your device (yet)!*

*Intro*
Okay, after looking around for a bit it looks like some really incompetent "devs" have completely screwed people over on the TouchPad and like to act like little girls, so I'm here to try to organize information that I have and try the best method I think we have available to get Android on the TouchPad, which is by doing a byte-by-byte copy of the TouchPads that have Android on them, maybe manipulating WebOS doctor to flash what we need (since we have the source), and then going from there. It will be super simple to do all kinds of Android Development when this is done.

We already have a dump of Android that was shipped on very few TouchPads as test devices for Qualcomm (or at least that's the rumor). This dump has each partition listed as a number, although I'm not sure that they are in order and I don't know very much about them, but they are available here:
http://www.multiupload.com/6BXSFF4N7H

The problem with this mainly is that I'm not sure that things are in order. You can see that WebOS has 14 partitions if you check in /dev. These devices are listed as /dev/mmcblk0p? (with ? going up to 14). In the android build, things are partitions differently and it goes up to 17.

We'll come back to this later.

*Recovery*
You need to be able to get into recovery so that stuff isn't mounted that shouldn't be. To get into recovery, power down and then press power and volume up while you are plugged into your computer. You will then get a USB symbol.

*Download WebOS Doctor*
Make sure you download WebOS doctor and install the PDK tools. This is available at:
http://palm.cdnetworks.net/rom/touchpad/p302r0d08012011/wifip302rod/webosdoctorp302hstnhwifi.jar

If you start the doctor, it will connect to your device and start flashing it. Around 12% you should be able to run:
novacom open tty:// = novaterm

in a terminal. From here we can do whatever we want because things aren't mounted and the things that are we can umount. When you get to this point, if you unplug your device and plug it back in then you will cancel the update process but still be able to run commands (after re-running the novacom open command again). You will need to reboot by pressing the center key (first) and power button, then holding down the volume up and power to boot back into recovery and start WebOS doctor and let it finish to use your device again.

From here we should be able to dd those partitions, but because the schemas are likely different, I think the best chance we have of doing this and keeping the MBR is getting a dump of /dev/mmcblk0 (this will include the ENTIRE disk), the only question is where internal storage is at. If the device that the dump is from is a 16gb device and you try to flash to a 32 gig, you won't fill up your disk which probably isn't a big deal. We can grow the partition later. If it was a 32 gig and you try to dd it to a 16 gig, then you will run out of disk space, but you should still be able to recover using doctor.

A good thread with some information: 
http://rootzwiki.com/showthread.php?t=3827

*WebOS Doctor, and why we need it*
It looks like WebOS doctor flashes the images by just using an InputStream. I didn't look into it much at all, but I think the best way to get the partition(s) or whatever you're going to dd is by booting into WebOS, copying the files over through USB, then mounting it in recovery. I haven't tested this yet because somehow I managed to kill my touchscreen last night and haven't had time to fix it so I can enable Developer Mode back on my tab. 

That is pretty much where we're at. I'm trying to get ahold of the guy that has the Android TouchPad, so far only through Twitter. If somebody has connections, please hook me up. If nothing else, I would like him to get a dump of the entire disk.

*Source to WebOS Doctor is here:*
http://www.multiupload.com/776HW72BTS

*Next Steps and how you can help:*
We need to contact the guy who has the TouchPad with Android on it and get him to run
dd if=/dev/mmcblk0 of=/tmp/mmcblk0 or something similar. Somehow we need to get this if we want this to be a simple process! Otherwise we are looking at trying to recreate MBR records and such...
If you are good at looking around in Linux, post any information you can find about flashing or how WebOS works. 
If you want to test stuff, READ through what I have posted, try a few things, post back!
Also would be helpful if we could get the owner of the Android TouchPad to run printenv in the shell. Thanks rainlake for the input.

We should be able to get this running TODAY if people help out like they should. Let's do this as a community, not as some lame "team" with exclusive members/information asking/not asking for donations and acting like little girls. This thread should basically be a wiki. Post any information here, read through what people have posted, help out.

This thread will be updated as I find more things out and get more information. PLEASE post if you have any useful information. Thanks.

*Update 1* - 2:28 PM: After doing a little socializing on IRC, it sounds like they were unable to read the partition table by doing a cat /proc/partitions - no such file or directory. They were also unable to copy /dev/mmcblk0, however it was pointed out that they should try in recovery. Here is what the output of df -h (from TouchPad with Android)

df /dev: 410928K total, 0K used, 410928K available (block size 4096)
/system: 153376K total, 110392K used, 42984K available (block size 4096)
/data: 151136K total, 86356K used, 64780K available (block size 4096)
/system/etc/firmware/misc: 204580K total, 4964K used, 199616K available (block size 4096)
/mnt/asec: 410928K total, 0K used, 410928K available (block size 4096)
/mnt/sdcard: 14301760K total, 24800K used, 14276960K available
-------------
(Thanks roadkill)

A developer (Craptain) has gotten the images to boot. As per samcripp:


samcripp said:


> Craptain and eval- are to thank for the info.
> 
> Once you set bootie to android bootloader mode.
> 
> ...


I haven't tried this yet, but apparently somebody did it and touchscreen wasn't working. They believe this is due to the fact that /persist isn't mounted (from what I was told).

*Novacom*
With novacom, it's pretty easy to send files across and boot kernels and such. Boot into recovery and then run the following in terminal to get devices that are connected:
novacom -l

The most important part of the output is the long string you can use later to connect to the device through novacom.

First it's probably a good idea to boot into a kernel that's compatible with novacom. You can send kernels across extremely easy from your computer, using the following command:
novacom -d <device string you got above> boot mem:// < /path/to/kernel

That will boot the kernel. Right now I think it would be worth trying to compile Little Kernel from here:
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/lk.git;a=summary
git://codeaurora.org/kernel/lk.git
Which would give us fastboot.

I haven't been able to compile it yet, getting errors while trying to use the toolchain from CodeSourcery.

You can send files through novacom after the kernel boots using the following command:
sudo novacom put file:///path/on/tab < /path/to/file/on/local/computer

*Current status:*
We need to get an android kernel, change the ramdisk to make sure we're booting from a partition with android and then we should be good. I believe there is a kernel somewhere, I just need to find it


----------



## apu95 (Aug 25, 2011)

Hijacking this post in case damageless needs more space for information.

Also: Is there anything that people with the TP (but without Android on it) can actually with the TP to help?


----------



## throwaway (Aug 26, 2011)

hi,

i'd like to get away from these forums and talk with you on irc about your work so far. i have some questions and theories as to how to get this to boot without the dd of the boot partition.


----------



## rainlake (Aug 26, 2011)

I hope the android owner could post his env settings.

boot to bootloader, connect use novacom open tty:// = novaterm
then execute printenv


----------



## damageless (Aug 25, 2011)

rainlake said:


> I hope the android owner could post his env settings.
> 
> boot to bootloader, connect use novacom open tty:// = novaterm
> then execute printenv


I put that in OP.


----------



## Dox (Aug 21, 2011)

Damageless, are you on the IRC? #touchpad?


----------



## temporalshadows (Jun 24, 2011)

I know it's not 100% certain, but it would make sense that the partitions were numbered in order, and that each partition is the size of the .img file, right?
If that's the case we can use that info to recreate the partition table, then just dd the images back.
However, do we have any idea what the others do? From what I've read, boot, system, and data have been identified. Maybe it would be possible to create our own partition table, restore only those 3, and modify the boot image to point to the new locations? If we want to use all of the space on a 32g we're going to have to modify the partition layout somewhat anyway (assuming the donor device was a 16g device).


----------



## damageless (Aug 25, 2011)

temporalshadows said:


> I know it's not 100% certain, but it would make sense that the partitions were numbered in order, and that each partition is the size of the .img file, right?
> If that's the case we can use that info to recreate the partition table, then just dd the images back.
> However, do we have any idea what the others do? From what I've read, boot, system, and data have been identified. Maybe it would be possible to create our own partition table, restore only those 3, and modify the boot image to point to the new locations? If we want to use all of the space on a 32g we're going to have to modify the partition layout somewhat anyway (assuming the donor device was a 16g device).


That is possible, and that's something we can do and I will attempt to do soon - just haven't had the time yet.


----------



## sorrowuk (Aug 24, 2011)

Wheres the guy that has android on his touchpad ?

He going to be around anytime soon.


----------



## samcripp (Jul 17, 2011)

You can boot the images.


----------



## comoc85 (Aug 26, 2011)

Unfortunately, I highly doubt that guy is going to help with this effort. Why would he? He is selling that touchpad at a HUGE markup. Why would he help flood the market he has control of? I digress, and ask : what can a TOTALL noob do to help get this running today? I have experience rooting and flashing phones (G1, Motorola Cliq, that's about it...) I would love nothing more than to see this happen sooner rather than later. Yes, I read the OP, but again, me=nooooooob.


----------



## dreed75 (Aug 25, 2011)

comoc85 said:


> Unfortunately, I highly doubt that guy is going to help with this effort. Why would he? He is selling that touchpad at a HUGE markup. Why would he help flood the market he has control of? I digress, and ask : what can a TOTALL noob do to help get this running today? I have experience rooting and flashing phones (G1, Motorola Cliq, that's about it...) I would love nothing more than to see this happen sooner rather than later. Yes, I read the OP, but again, me=nooooooob.


The guy he is talking about is not the guy selling it on eBay. This guy (Jiwanish) is actually helping out on here and provided the original dump that everyone is talking about. damageless just needs more info from Jiwanish's touchpad.


----------



## samcripp (Jul 17, 2011)

Craptain and eval- are to thank for the info.

Once you set bootie to android bootloader mode.

You can fastboot image 12 (system) to block 14.

Edit ramdisk to use 14 to boot from

You can then add data to the inside of internal storage and the persist img there as well and loop mount then.

The technicalities like setting bootie the right way you will have to discuss with Craptain. But that's the crash course of booting the dumps.


----------



## Dox (Aug 21, 2011)

samcripp said:


> Craptain and eval- are to thank for the info.
> 
> Once you set bootie to android bootloader mode.
> 
> ...


Thanks for the info.


----------



## pfer10 (Aug 26, 2011)

Not sure if this will help anyone along but here is openSSH on the touchpad.

http://hackaday.com/2011/08/26/installing-openssh-on-the-hp-touchpad/


----------



## damageless (Aug 25, 2011)

Updated OP to reflect what I found out by talking to people in IRC.


----------



## apu95 (Aug 25, 2011)

damageless said:


> Updated OP to reflect what I found out by talking to people in IRC.


What's the IRC channel you're looking at? I'm in #touchpad and all they seem to talk about are the shipping emails and inventory numbers and whatnot.


----------



## DTCBob (Aug 26, 2011)

apu95 said:


> What's the IRC channel you're looking at? I'm in #touchpad and all they seem to talk about are the shipping emails and inventory numbers and whatnot.


#touchdroid


----------



## bedalus (Aug 26, 2011)

Is it #PureDev now?

I was just there and it seemed there was some length reminiscence about laptops and zero development


----------



## fixxxer2012 (Jul 31, 2011)

damageless said:


> Updated OP to reflect what I found out by talking to people in IRC.


hmmm....damage huh? you the same damage who abandoned your damage roms for the hero/ evo? :_con:


----------



## tdiebold (Aug 20, 2011)

Thank you for all the _public_ hard work that you are doing. This is looking great so far. Thanks for keeping us in the loop!


----------



## DrMacinyasha (Jun 6, 2011)

fixxxer2012 said:


> hmmm....damage huh? you the same damage who abandoned your damage roms for the hero/ evo? :_con:


Watch it...


----------



## justin108 (Aug 28, 2011)

I am curious has any dev tried contacting Qualcom about this? It is open source after all, and while I doubt it will as a company give out the info, but maybe a dev there would anonymously. A shot in the dark is still a shot. I am sure the devs are dying to give the info out but fear repercussions of doing so. If I were said dev, I would make a page visible on TOR just to get the info out.


----------



## calris (Aug 22, 2011)

justin108 said:


> I am curious has any dev tried contacting Qualcom about this? It is open source after all, and while I doubt it will as a company give out the info, but maybe a dev there would anonymously. A shot in the dark is still a shot. I am sure the devs are dying to give the info out but fear repercussions of doing so. If I were said dev, I would make a page visible on TOR just to get the info out.


Hmmm, it would fall under the 'distribution' clause of the GPL, so Qualcom/HP would, in theory, be legally bound to provide source for at least any GPL elements of the Android TouchPad port


----------



## Taylored (Aug 22, 2011)

I could hunt down some names and contact info if needed. That is kind of my day job. (Tech Headhunter).


----------



## md213 (Aug 21, 2011)

Taylored said:


> I could hunt down some names and contact info if needed. That is kind of my day job. (Tech Headhunter).


I might need ya to hunt down some names and contact info for me (note: *md213* works for Nokia :smile3: )


----------



## Taylored (Aug 22, 2011)

just send me a PM with what you need.


----------



## md213 (Aug 21, 2011)

Taylored said:


> just send me a PM with what you need.


PM sent


----------



## tuckerson (Aug 29, 2011)

just saw this in another thread - should help greatly!

https://docs.google.com/document/d/1K24KdGNLhaTICV1LXSRLdA8GyyrKAP31uj_LrKU8OG0/edit?hl=en_US


----------



## md213 (Aug 21, 2011)

tuckerson said:


> just saw this in another thread - should help greatly!
> 
> https://docs.google.com/document/d/1K24KdGNLhaTICV1LXSRLdA8GyyrKAP31uj_LrKU8OG0/edit?hl=en_US


ps - here's the link to the code repository made by the guy who wrote that Google doc:

http://t3c.us/touch/

good stuff in there for sure


----------



## tuckerson (Aug 29, 2011)

md213 said:


> ps - here's the link to the code repository made by the guy who wrote that Google doc:
> 
> http://t3c.us/touch/
> 
> good stuff in there for sure


really good stuff! I want to try it out myself, but my little sister loves playing Angry Birds on it too much! ha


----------



## md213 (Aug 21, 2011)

tuckerson said:


> really good stuff! I want to try it out myself, but my little sister loves playing Angry Birds on it too much! ha


Just tell her to GIVE IT BACK so you can get to work!! And that once you win the $2,000 bounty for this project, you'll buy her a TouchPad of her own...and she can then play Angry Birds all she wants 

And until then, she can play here ( http://chrome.angrybirds.com/ ) for free ALL she wants


----------



## ECOTOX (Jun 24, 2011)

I would try this out myself, but saidly i cant afford to nuke my TP =/ If it was an SD boot method id give it a go though

EDIT:heres some useful inof i found on bootie and some commands you can use with it =3

http://www.webos-internals.org/wiki/Bootiethe chainboot is of particular interest there i think.....having another bootloader, perhaps having some sort of flag to tell the system to go to the android bootloader vs webOS? like an sdcard file or something??? Idk, just throwing out ideas here XP

ok....dont know if this is gonna be able to help us out at all as I havent gone through all of it, but if you want heres a large portion of the FS off of my TP running webOS (16gb version)

http://dl.dropbox.com/u/25791676/files of interest?.zip


----------

