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.

14 October 2012

Welcome to the wild hacker view.

Greetings to all of you out in the the inter-blags!
Welcome to my new project and idea blog!

I'm sure some of you are wondering what this is all about, well let me explain. First I chose the title based on the two ideas. First I tend to spend my time more in the wilds of Northwest US more then in the city, and I'm always trying to make technology work for me out in the wilds. Second I wanted to make a blog about hacking in real life, not just hacking for hacking sake. You know the kind of projects I'm talking about, the Augmented reality Doom backpack computer system with VR helmet and 3 years dumped into it just to play Augmented reality Doom...
This blog is all about projects I(and I hope you) can use daily  and may make your life a little better because of it.

So you know why, now the question is what! The projects will be focused mostly around green tech. Using solar and wind to power devices, automated sustainable farming and gardening systems, reusing scraped electronics and doing it all the cheep! (Because none of us have much in the way of money.)

So are we ready, here we GO!!

Project #1:Portable USB style solar charger for portable devices.

I find the effects of electronic devices on society very fascinating. How things like the person computer, the calculator, and the cell phone has completely changed the way we act, our expectations, and what we consider productive in our world. Specificity the effect of the "smart phone", the current apex of portable computing. Its is the do all device, it has access to many different mediums of communications, it has any kind of function you want limited only by hardware, and it can work just as well as a PC but fits(mostly) in your pocket. Its what we hackers where dreaming of 5 years ago. But, just as with every device it has a few limitations. Its only effective when in range of the cell system, its only as capable as its OS and its operator, and its only good as long as it has battery power. This leads me to our topic, the smart phone owners constant bane,...... a dead battery!!!!
With the addition of internet access on your phone you can now stay connected 24/7, as long as your device is powered on and in range of the cell network or a WiFi AP. Every time your device talks to the network to sync email, check facebook or load a web page its transmitting. For a short period of time(the duration of the packet being transmitted) its using as much power as it would when you where on a phone call(in ratio to time duration). So of course being that the transmit duty cycle is much higher the battery lasts a shorter time. The way most people fix this is by having chargers every where they go so it only runs on battery for a short time. But what about those of us who walk, cycle or are other wise are away from a ready charger or easy power source? Well here are one of my ideas to over come this.

Charging on the go.
Most phones now charge off of a USB 5VDC power sources. So you now are finding every where 120AC to USB or car socket to USB adapters. These are great if your near a wall outlet or a car that is running. But what about on a bike, or hiking or when the car is off? My answer is solar.
Now there are several products out on the market now that are solar powered phone chargers. But my goal in this project is to build a charger that is simple, rugged and will last as long as it can with little maintenance.

Batteries vs. Supper Caps
Most products that will charge your phone from solar power use a photovoltaic panel hooked to a voltage regulator or charging circuit. This then charges a small battery which in turn charges your phone. This works as long as the battery is in good health, but over time it will fail or retain a shorter and shorter charge life and will die at some point.
The other way to do this is use a capacitor in a RC circuit. The challenge with this is to get a large enough capacitance to do this would render this device none portable. Standard capacitors with values grater than 1 farad and voltages higher than 5VDC are 3cm in diameter and at least 5cm higher, if not taller. Even though they are much lighter than a battery you would still have to carry a large pack of these things around with you. But we are in luck with the advent of double sided capacitors, or what they call supper caps. These have a value of 10 farads and a voltage of 2.5VDC and are only 3cm high and .5cm in diameter. Now with several of this our pack is looking much smaller, but how effective would they really be?
Power density
When looking at the effectiveness of a power source for a portable device one must look at power density. This has two factors to, the power(in Watt Hours) per volume and the power per weight. This will help us to determine the best balance between longevity, size, weight.
Now, most people would do research on line to out this info. But, that sounds boring! So I have put together information based on tested done in my shop to fit this required function of charging a smart phone.

What's next?
The next step in our project is to determine the power requirements of the device we will be charging. This will give us parameters to work with in when designing our power source.
Second is to test several different power sources to see which will best meet our requirements and have the highest power density.
Third, we put it all together!

In my next blog installment I'll cover the first step, determining the phones power requirements.

So stay tuned for the next installment of electrical goodness!