[Gen8 Android Development] $aur0n:
This is backup of install instruction, leaving more space for custom approach. Instruction in first post is now much simpler with less 'if/or'.

Material for this thread came from discussion here. So please be kind read also this thread before getting to work ;)

This is mini how-to boot modified Archos Android from SD card, using SDE. It's base on 2.0.71.

Since this Android mod/distribution required some name - let it be Uruk-Droid :)

Why bother:

ext4 (much faster than ext3, can store files >4GB comparing to FAT32)

full r/w access to every part of system

root (su + superuser.apk) out of the box

possibility to remove some google/Archos apps (already done partly)

swap memory when you need it

no 300MB limit for apps (and no faulty app2sd required)

you can have SD card Class 8/10 - and that's much faster storage than internal flash (inside is something equal class 6 or 4)

Warning

Be aware that this modification requires SDE and probably some Linux knowledge.

By doing described below steps you probably can't brick your Archos - but do it on your own risk.

Root access on your devices makes it less secure form malicious software (user more head - less fingers ;) )

Known problems:

Android automounter (vold) does not recognize EXT4 in stock firmware - so it will claim SD card is damaged (it's just a message) (FIXED)

Before you start:

Read about SDE on forum

Install some terminal emulator from Market (eg. "Android Terminal Emulator")

You should have 2.0.71 already installed (I'm not sure if it's required but only with that configuration tested)

All operations described here, done on Linux or Android should be done from

root

user (you can switch to that user in terminal by typing "su" or "sudo su" command)

If you don't have Linux - find any recent Rescue CD, Live CD or Virtual disk (VirtualBox or VMware) - distributions does not matter

SD card partition design

First of all, preferably buy card class 6+. So it won't be slower than internal storage ;)

I'm currently using 3 partitions

0,5GB / (rootfs)

1GB /data

rest /mnt/storage/sdcard/

but You can create one big partition instead - I've made my configuration because of easiness to backup and upgrade (rootfs is easy to upgrade later on, /data has only runtime data and application, rest is for movies etc.) Size of /data partition determines how many apps you can install on your device.

Here it's how it looks on fdisk

linux-machine:~# fdisk -l /dev/sdb

Disk /dev/sdb: 16.0 GB, 16012804096 bytes
199 heads, 44 sectors/track, 3571 cylinders
Units = cylinders of 8756 * 512 = 4483072 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 121 529716 83 Linux
/dev/sdb2 122 362 1055098 83 Linux
/dev/sdb3 363 3571 14049002 83 Linux

Step one

Create at least one primary partition on SD card with fdisk, gparted, parted or any other partitioning tool. Assuming your SDCARD is visible as /dev/sdb (on Linux box - check "dmesg").

su (go root)
fdisk /dev/sdb

fdisk options (it's interactive):

p (print existing partitions)

d n (delete partition by it's number 1,2,3 etc)

n (create partition, you will be asked about type (primary, secondary - go primary), number (give first available), start sector (just enter will set first possible), size (you can give it as +1M, +2G etc)

w (write all changes, until you give this command no changes are made on disk physically)

Format partitions as EXT4 - but without huge_file option (it won't work with this feature since it requires special kernel option that brakes compatibility with existing modules).

su (go root)
mkfs.ext4 -O ^huge_file /dev/sdb1

If you created more partitions - do those steps for everyone.

mkfs.ext4 -O ^huge_file /dev/sdb2
mkfs.ext4 -O ^huge_file /dev/sdb3

Kind of "session log" for this steps you can find in this post.

Step two

Extract content of rootfs.tar.gz onto first partition on SD card (it HAS to be first one). Do it from root account on Linux/UNI*X box - or you won't transfer all permissions properly (mainly +s on su/superuser.apk).

assuming your SD Card is visible under Linux as /dev/sdb (you can check it by typing "dmesg" after you connect it)

open terminal/shell - go root: su, or sudo su

create mount point: mkdir /tmp/sdcard

mount it (if it's not mounted already) for example: mount /dev/sdb1 /tmp/sdcard

go to /tmp/sdcard directory: cd /tmp/sdcard

extract rootfs: tar -zxf /path_to_file/rootfs.tar.gz

exit directory: cd

umount your card: umount /tmp/sdcard

Flash initramfs.gz and zImage from SDE boot menu:

reboot Archos70, hold up or down volume key until you see Recovery menu,

choose "Recovery System"->"Developer Edition Menu"->"Flash Kernel and Initramfs",

connect Archos to PC and copy initramfs.gz and zImage to device

Reboot and hold up or down volume, choose "Developer Edition".

You should see all yours apps etc. - it should look like your Archos ;), but with su/superuser.apk etc. (check it on terminal emulator by typing "su" and enter).

Before go to next step make sure you have booted to SDE system AND it has root access! (check "su" in terminal, run root explorer or titanium backup)

Step three

It's kind of optional - since you have already working system - but it's not fun yet ;)

Now you should copy /data files onto SD card. Use terminal emulator (from market can be "Android Terminal Emulator") or sshd (QuickSSHd and log into your tablet) and do:

If you have ONE partition

su
cp -rp /data/* /data.new/

If two or more

su
mount -t ext4 /dev/block/mmcblk2p2 /data.new
cp -rp /data/* /data.new/
umount /data.new/

Poweroff device.

Step four

Put card into computer and:

one partion

remove /data

rename /data.new to /data

On Linux it may look like this:

su (or sometimes "sudo su")
mkdir /tmp/sdcard
mount /dev/sdb1 /tmp/sdcard
cd /tmp/sdcard
rm -rf data
mv data.new data

edit /init.rc (it's /init.rc on Android - on Linux box it's going to be something like /tmp/sdcard/init.rc) - use any editor to modify file - do it as a root!

su
vi /tmp/sdcard/init.rc (edit the file)
umount /tmp/sdcard/

What to edit:

# Comment this
# mount ext3 /dev/block/mmcblk0p4 /data noatime nosuid
# Uncomment this
# mount ext4 /dev/block/mmcblk2p2 /data noatime
mount ext3 /dev/block/mmcblk0p4 /data.old noatime nosuid

two or more partitions

edit /init.rc (it's /init.rc on Android - on Linux box it's going to be something like /tmp/sdcard/init.rc) - use any editor to modify file - do it as a root!

su (or sometimes "sudo su")
mkdir /tmp/sdcard
mount /dev/sdb1 /tmp/sdcard
cd /tmp/sdcard
vi init.rc (edit file)
umount /tmp/sdcard

What to edit:

# Comment this
# mount ext3 /dev/block/mmcblk0p4 /data noatime nosuid
# Uncomment this
mount ext4 /dev/block/mmcblk2p2 /data noatime
mount ext3 /dev/block/mmcblk0p4 /data.old noatime nosuid

If you have third partition on SDCARD, whether it's EXT4 (recommended) or FAT32 it should by automounted since 0.2 version.

Reboot - it should work :)

End

Stuff you can do later:

Vold - automount daemon on android is quit.... crappy - to let go message about "sd card damaged" edit /etc/vold.fstab and hash the line "dev_mount_lun volume_sdcard /mnt/storage/sdcard...."

Other partitions - if, by any reason, you have more partition on SD card (more then 3) you can also mount it putting in init.rc (there are some potential issues with vold to be solved)

for ext4

mount ext4 /dev/block/mmcblk2p5 /mnt/sdcard2 noatime nosuid

For fat32 partition preferably tweak with Vold config (/etc/vold.fstab) - or add something like this (in init.rc)

mount vfat /dev/block/mmcblk2p3 /mnt/sdcard2 uid=1000 gid=1015 fmask=0000 dmask=0000

Files (UrukDroid-0.3):

Megaupload.com

initramfs.cpio.gz

zImage

rootfs.tar.gz

Dropbox.com (there can be server error because of download limit)

http://dl.dropbox.com/u/1017593/ArchosGEN8/UrukDroid-0.3/rootfs.tar.gz

http://dl.dropbox.com/u/1017593/ArchosGEN8/UrukDroid-0.3/initramfs.cpio.gz

http://dl.dropbox.com/u/1017593/ArchosGEN8/UrukDroid-0.3/zImage