23 November 2012

Holiday Hacking distraction!!!


So as a break from all the holiday madness I thought I might share a good hacking distraction for you all! *No worries I'm still working on the next installment of the Android Solar charger project.*

My brother recently acquired a Lenovo Android tablet and so had no need for his Archos 101 IT. He ditched the Archos 101 because it is not an official Android OS device, so you are not able to access things like Google play or normal Google account functions. There were some work around but they were flaky at best. So he gave me the tablet with the hopes I could do something useful with it and if nothing else have a fun toy to keep me occupied during the time of year I hate. So here is the breakdown of how I made it a bit for functional, enjoy!


The Device:

The Archos 101 IT is a gen8 device put out by Archos. From what I have read on line it is a mid level device with a comprises of cost and capability. It has a 1GHz ARMv7 processor which in the stock ROM is turned down to 800MHz. There is 6GB of on board flash, the alt OS is loaded as a loop device which is only 170MB.  This can cause a bit of a problem Cyanogenmod OS because you run out of space to install apps which are installed in the OS partition by default. The Stock OS is 500MB so there is a little more room but not much. The 101 IT also has the ability to read micro SD and microHCSD which is handy for loading files to it.
The Device screen is 21.5cm(8.5 inches) wide and 12.7cm(5 inches) tall. According to info I was able to glean out of /proc/bus/input/devices it uses a Unitech USB Touch screen interface. From the same file I found it uses a MMA7660FC Accelerometer to detect orientation of the device. I am able to get a location off of google maps but I couldn't find a GPS on any of the bus in the system so I'm not sure how that is working. I'll post more on that as I dig it up.
The 101 IT has 256MB of onboard RAM which is supplemented by a swap file on the on board flash. I was unable to find any more info on the speed or what kind of RAM it is.
It also has a Camera on the front of the device but I was unable to find much about it, and I really didn't care at this point as its not pivotal to the operation of the OS.

The Rooting:
The rooting of the device is very easy as ARCHOS gives you all the tools to do so. I must give ARCHOS cred here for having a developer flash you can load on the tablet. This is very much in the spirit of GNU/Open source on which Android is built. ArchOS calls this their SDE * Special developer edition* firmware. This is basically another image and mod to the boot rom which will give you the tools to load new kernels and zimages to the device. You can get the SDE from Here: http://www.archos.com/support/support_tech/updates_dev.html?country=us&lang=en
This will be an *.aos file which you down load from the tablet in the stock OS. Once the stock OS finds the *.aos file it will ask you to upgrade, just tell it yes.
Next we go to the people who build openaos, this is a unofficial build of Cyanogenmod for the ARCHOS tablets. You can find them here: http://www.openaos.org/
Now their site is hard to navigate so I'll save you the trouble and send you where you need to go. http://dev.openaos.org/wiki/SettingUpMultiRootGen8
At the link above they have some rough instructions on loading their kernel and zimage to the device. They say nothing about needing the SDE first so its a little confusing without that bit of info.
Hold the volume down button while powering the device up. This will bring up a recovery screen with a few options. The first two are to boot into the stock OS, labeled "Android", and the second is to boot into the SDE, labeled "Developer Edition". You want the third option, "Recovery System". Use the volume up down to move up and down and a momentary press on the power button for select.
Once in the recovery menu you will see the option for "Developer Edition Menu", thats where our goodies will be to uploaded. In that set of menus select "Flash Kernel and Initramfs" and it will ask up to hook up the USB cable and load the files.
Hook up the USB and mount the device like any other USB mass storage device. *I'm assuming you know how to do that in your OS*
http://www.openaos.org/wp-upload/gen8/2012-04-09/
 Then from the link above download the tar ball kernel_gen8_20120409_002900.tar.gz  and extract its contents. You will want the initramfs.cpio.gz and the zimage files from the tar ball. There is a modules file that is not needed in the tar ball, so just leave that be.
Copy the files over to the the USB mass storage on the device and select ok on the device. It will reboot back into the stock OS.
To test your Root, reboot the device again and as its coming up hold the volume down button and wait for the recovery menu to come up. Select the "Developer Edition" item and let it boot. You will see after the ARCHOS splash an openaos splash and then a simple GRUB boot menu. If this is indeed what you want to see, you have rooted the tablet!!! Now lets load Cynogenmod!



The Loading of the OS:
Now on the GRUB menu you will see three items, Archos, Angstrom, and Advanced Menu. The first two are the stock OS and the SDE OS. We now need to load the new OS onto the system to get the real fun going.
To do this boot into the Archos selection on the menu and hook the device back up to your computer via USB. After you have it talking as a mass storage device we will need to go back to the openaos site from above and get the OS image file.http://www.openaos.org/wp-upload/gen8/2012-04-09/
Decompress the gzip file and copy it to the root of the USB mass storage. Then take a raw text editor like notepad++ in windows or just vi in *nix and edit the menu.lst file. In menu.lst you will see the following lines already there:
Archos|ARCHOS|ARCHOS|/init|0
Angstrom||/rootfs.img|/sbin/init|1

You will need to append this line to the file:
Gingerbread||/openaos-gingerbread-bull-gen8-121502.img|/init|0


You will want to make sure that the second parameter matches the filename that you just loaded on the devices. The fourth parameter sets the frame buffer to high res, where a one in the fourth parameter 1 sets it to low res. Now save the file and reboot again. Remember to hold down the volume down button while it powers up to go into the recovery mood so you can select the developer edition. Once you do and GRUB comes up you should see an option for Gingerbread now, select that option and Gingerbread should boot. You'll see nothing at first and then the word android come up on the screen. The first boot takes some time but its faster after that. Once its up you are ready to rock and roll!! You have loaded Cyanogenmod on your tablet!!

Google Apps:
Because Cyanogenmod is not an official google OS it can not come loaded with the google apps, you have to add them yourself. The good thing is that the folks at google don't want to exclude you because of this and so make these available to the folks at Cyanogenmod. To install these apps go to the following link while in the Gingerbread OS:
http://wiki.cyanogenmod.org/wiki/Latest_Version#Google_Apps
Go down and click the mirror1 link under Cyanogenmod7 and this will take you to a mediafire page where you can download the zip file. After you download it just reboot back into Gingerbread, its that easy! The openaos guys set up a script to look for that file in the download location and it runs it on boot. Once Gingerbread comes up it will take you through the normal google setup. One tip to help you along, it will not select the right default language, so make sure to manually pick the right one to make things move smoother. Once you have gone through that google play will be installed and you can start installing stuff from google to your hearts content!


Conclusion:
So there you have it, hope you enjoy your Holidays and your hacking distractions! Thanks again to the guys at openAOS, ARCHOS, and Cyanogenmod for all the info on their pages and making all this available so you we can have fun doing it!


Thanks to the people at ArchOS they have made it a breeze to install an alternative OS on the 101 IT.  With the help of the openaos folks and their hard work there is an OS out there which you can load and have fun with.
You will have to do some tweaking with Gingerbread to make work really well for you. The CPU governer is set quite low at first and it runs very slow. But if you go into settings-->Cyanogenmod Settings--> Performance-->CPU settings you can change the governor to Performance and the max CPU speed to 1000MHz. This will speed things up greatly and make it useable.
The only other problem I have run into thus far is the space limitation with the OS image only being 150MB in size. I have had mixed luck installing apps to the external storage space, which is the on board flash, and having them work as needed. I plan on trying to expand the size of the image to around 1GB and see if that helps.