[Gen9 Android Development] trevd:
Good Afternoon Folks.

[UPDATE] I Probably give this one a miss, see bug report below.

Update time once again. I've prepared a nice package for yous ( Is that a word?!? :) ) to play with.

Contents of archosg9-kernel+ramfs+modules-3.0.21-Jellybean.7z [ HOTFILE ] Summary

[FILE] kernel/zImage - Archos linux kernel zImage 3.0.21-JellyBean+ with omap4-reboot-reason enabled
[DIR] kernel/modules - Directory containing loadable kernel modules for 3.0.21, This also include the PowerVR OpenGLES modules
[FILE] initramfs.cpio.lzo - The SDE initramfs containing CWM Recovery and Bootmode aware init scripts.
[DIR] rootfs - The unpacked version contents of initramfs.cpio.lzo

Highlights and Updates

Checkfs - Update Overview

I've done quite a lot of work on the checkfs program to make it more forgiving. It now checks to see if space is available before attempting anything. It also works on each partition individually, so I you already have some partitions created it will only create the ones that are missing.

I also made the output a more verbose. Because it's no fun looking at a static screen for more than a minute. There's still much work to do on this and I can think of about 10 differents ways I can break the process so god know In what weird and wonderful devices configurations the random punter will throw at it :) . Lets put it this way, it's a lot more solid and sane than the last version and It's not going to have a little lie down should you look at it funny! :) , Obviously if you do run into issues with the checkfs then post here.

Checkfs - Functionality and Expected Behaviour - COMMING LATER..... MAYBE MUCH LATER

I suppose it might be a good idea to share some more specific technical details on what to expect from checkfs...... Unfortunately that will have to wait because writing technical documentation ranks pretty high on my list of things I don't enjoy. Perhaps surprisingly writing verbose forum posts is also up there which must make me a bit of a masochist. :)

Right Now you can get a look at the code located in the aosp device tree on my github

Installation Rebooting and Switching

So, We've effectively added an extra bootmode to the tablet. The list as follows

1. Archos Stock Boot

2. Archos Recovery

3. SDE Android

4. SDE Recovery

Here's a couple of examples on how to flash and switch between modes etc. I not a massive fan on the hardware switching method.

From a rooted stock shell

adb push initramfs.cpio.lzo /data/initramfs.cpio.lzo

adb push zImage /data/zImage

adb shell kd_flasher -i/data/initramfs.cpio.lzo -k/data/zImage

adb shell reboot_into -s sde

adb reboot recovery

This should boot into CWM Recovery. What was /data is now mounted at /._ , this is where the partition images are create, checkfs will check to see if space is available ( 3.1 GB ). Assuming It is it will create the ext4 images and the reboot into recovery.

Recovery should start without any errors.

Once you are booted into an sde mode that where you'll stay :). you can use "adb reboot" to boot into sde android or "adb reboot recovery" to load CWM. The CWM selectable reboot options also provide this behaviour as well as the standard shell command line reboot binary.

To break-out of sde set the archos.bootloader.entry system property to either recovery, android or sde. and the run reboot from where-ever you want. This property is a wrapper for reboot_into which is symlinked from abcbox in the /sbin directory.

Updating the SDE Rootfs

Remember the zImage you pushed to /data, that should now exist at ._/zImage. We need to leave a copy of the kernel to allow us to do on device updates on the SDE initramfs. You can easily persist any changes you , i.e updates to init.rc etc by running. sbin/update_ramdisk which blows a copy of the rootfs structure in ram and then runs kd_flasher to update using ._/zImage as kernel binary, The device will reboot it's backing CWM recovery upon completion. :) . update ram also sets the rc file permissions correctly so you don't need to worry about that.

Issues, Bugs and Strange Behaviour

A couple of things I've notice, I've added power off to the CWM Menu, It does seem a little buggy and the device seems to require 2 reset to get it to response and then you'll be back on the archos side of the fence. It also think more work is required in the kernel code just to make sure even behaves it's self.

Update 2012-11-14 : There seems to be a issue with getting the device to show signs of life when coming from a cold start.

Symptoms:

1. device was powered off while booted in recovery

2. power on shows a blank screen.

3. device will only response to the power button

Cause:

My Kernel Patch needs some more work to handle exceptions, or put another way, I need to do some f*&*king error checking cos I'm a slack bas*rd :D

Work Around:

Boot the device into recovery with the hardware keys (Volume Down+Power Key)

Reboot In Stock

Set Reboot mode to sde ( adb shell reboot_into -s sde )

Reboot into sde recovery ( adb reboot recovery )

I'm really not kidding when I say I don't enjoy writing. I might get myself a "Ghost Writer" or a Secretary. although that might just be a distraction.

Right I'm going to have a little "Recovery" and do some smoking in the rain! then I suppose I better get this "JB Rom Going On" Can't have Recovery with No Roms for too long!!!

Keep Gaming, You Might Win! :good: