[Gen9 Android Development] trevd:
Installation Guide

Installation Guide

Build0 - Requirements

Archos G9 SD Version

android sdk / android debug bridge ( adb )

SDE Enabled Firmware ( unofficial or official )

common sense.

NOTE: I've only tested this using Linux , The procedure should be the same on Windows but we don't know until we try.

Assumptions

1.You know how to flash a SDE initramfs and zImage either through the Developer Menu or using kd_flasher from the adb command line,

2.You know how to boot your device into the Special Developer Edition Firmware ( SDE )

3.You have setup adb correctly a your device is listed in the adb devices list.

Build0 - Installation Steps

1. Download and unpack the cwm boot image [ Hotfile :/archosg9-jzo54k-cwmboot.7z ]

2. Download and unpack the system image [ CURRENTLY OFFLINE - AWAITING UPDATE ]

3. Flash the unpacked zImage and initramfs.cpio.lzo using the [Recovery]/[Developer Edition Menu]/[Flash Kernel and initramfs] option in Archos recovery mode.

4. Reboot Into Developer Edition ; You should now see the Familiar CWM User Interface, You should see a couple of error messages regarding mounting /cache/recovery/command and /cache/recovery/log. This is expected.

5. use adb to push the unpacked system.img to the /._ directory on the device with the following command

[B]adb push system.img /._/system.img [/B]

NOTE: The system.img is 500MB in size and it may take some time for the transfer to be completed

6. When the file transfer is complete, reboot the device either using the CWM UI or adb reboot, The device should reboot back into CWM, The previous error messages will still present, Again this is the expected behaviour.

At this point, if everything is ok you should be able the use adb shell commands. Lets check the mount points using

[B]adb shell mount[/B]

The output should be as follows

rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p1 on /mnt/rawfs type rawfs (rw,relatime)
/dev/block/mmcblk0p4 on /._ type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/loop0 on /system type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)

If you see the message

- exec '/system/bin/sh' failed: No such file or directory (2) -

Then either you have not followed the instructions correctly or I've not typed them up correctly! Either way something's not right. See the troubleshooting section below for tips on how to check what's what.

7. Next we need to create a ext4 image for the cache and data partitions. This involves create an empty file with dd, loop mount the file as a block device using losetup then making the filesystem using mk2fs.ext2. Sounds like a lot of work. I thought so too, so all you need to do is run the following adb shell command

adb shell createfs

This will create a 500MB cache image and a 2GB data image. Again because of the file sizes involved this does take a couple of minutes to complete. Please be patient, when the command is completed the full output should look as follows

File System Image Creation Script - For Test Purpose Only
/dev/block/mmcblk0p4 /._
FileSystem Container /dev/block/mmcblk0p4 Mounted at /._.....
Checking Available Space.
Available Space : 5129
Creating cache image at /._/CAC With Block 500000
500000+0 records in
500000+0 records out
512000000 bytes (488.3MB) copied, 39.070434 seconds, 12.5MB/s
DD Returned 0 : Loop Mounting the raw image /._/CAC to /dev/block/loop1
Creating Ext FileSystem on /dev/block/loop1
warning: 287 blocks unused

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
125416 inodes, 499713 blocks
25000 blocks (5%) reserved for the super user
First data block=1
Maximum filesystem blocks=524288
61 block groups
8192 blocks per group, 8192 fragments per group
2056 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Creating data image at /._/DATA With Block 2000000
2000000+0 records in
2000000+0 records out
2048000000 bytes (1.9GB) copied, 175.243408 seconds, 11.1MB/s
DD Returned 0 : Loop Mounting the raw image /._/DATA to /dev/block/loop2
Creating Ext FileSystem on /dev/block/loop2
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
125184 inodes, 500000 blocks
25000 blocks (5%) reserved for the super user
First data block=0
Maximum filesystem blocks=4194304
16 block groups
32768 blocks per group, 32768 fragments per group
7824 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

8. Reboot the device. The device will once a gain reboot into CWM Recovery. This time there should be no error messages. check everyhting is mounted and created correctly using

adb shell mount

The output should look as follows

rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p1 on /mnt/rawfs type rawfs (rw,relatime)
/dev/block/mmcblk0p4 on /._ type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/loop0 on /data type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1)
/dev/block/loop1 on /cache type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1)
/dev/block/loop2 on /system type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)

9. Congratulations You now have Jellyean and CWM Recovery running on you device :)

One Last time choose "reboot system now" from the cwm menu to taste those JellyBeans! :D

TROUBLESHOOTING

Ok you've got problems, nothing that cannot be worked around.

Investigating

- exec '/system/bin/sh' failed: No such file or directory (2) -

If you run into this error then I means that your system.img is not present on the device or has not been mounted correctly for some reason. because of the way the device recovery is setup at the minute adb still looks for it's shell binary in /system/bin this only exists if the system is mounted. Fortunately we still have a couple of adb commands at our disposal, namely pull and push, the work around this issue you do the following [ Example uses Bash Terminal on Linux ]

adb pull /sbin/busybox
chmod +x busybox # Linux Only - Make sure busybox is still executable
adb push /system/bin/sh

You should now be able to drop into an interactive shellk using

adb shell

A further trick to make sure you have access to all the commands is to symlink the contents of /sbin to /system/bin. like so

a s "ln -s /sbin/* /system/bin"

More Troubleshooting Soon! If folks get stuck.