[Gen8 Android Development] shklifo:
Install Uruk 0.3 on second internal flash disk of Archos

UPDATE

At the last end of this guide you will find the steps necessary to

upgrade to Uruk 0.6

from Uruk 0.3 or 0.4.

Near the end of this guide you will find the steps necessary to upgrade to Uruk 0.4.2 from Uruk 0.3 or to install it for the first time.

Please note

.

If you are upgrading from Uruck 0.3 to 0.4.2 and installed google market hack before upgrade, after upgrade the market will be broken. To solve the problem reed the last step of this guide.

I've manage to boot from the second partition of the second internal flash of 8GB (/dev/block/mmcblk1p2) of my Archos 70IT Urukdroid vers 03 prepared by $aur0n on this post.

Thanks $aur0n for your awesome work.

It may work for other archos generation 8 too, except Archos 70 IT 250GB (i think that model doesn't have a second internal flash disk to boot from for SDE, but the owners can do it creating the 2 needed partitions on the HDD).

I've done it because:

- my micro sdcard is slow compared to internal flash

- i can mount correctly micro sdcard and second internal flash disc in Windows and linux by connecting Archos via USB and

- my sdcard is free. I can boot without sdcard in, take off from archos every time i want and upload files from a card reader or connecting the archos 70 via usb.

If you want to try it, be sure on what you are doing (linux knowledge is needed).

Try it on your own risk.

I don't have any responsibility if you brick your device (actually is hard to brick it following the guide, but pay attention please).

So if you are sure, read carefully this post and ask before if something is not clear enough for you.

I will try to answer as soon as possible (I'm actually a bit busy :-()

First of all install SDE, if you haven't already done (you can get information about it and download the SDE firmware from archos web page archos web page

Attention: Doing that You void your warranty...

Here the Archos notes:

Important notices to be acknowledged before downloading and installing the SDE firmware:

Once the SDE firmware is installed on a device, this device will be watermarked and ARCHOS will be able to detect that this firmware has been installed once.

Installing the SDE firmware is considered by ARCHOS as a voiding of the warranty and ARCHOS declines all liability and responsibility for any issues resulting from the installation of this SDE firmware.

ARCHOS strongly advises that only experts in embedded software development should install this firmware.

This firmware is provided "as is" and is not supported by ARCHOS.

Before following the steps required to install Uruk 0.3 some clarifications:

What you need to have:

- Archos 70 IT with terminal and SDE installed.

- Linux machine (nativly, visualized or LiveCD)

- Optionally Windows PC

Storage map of Archos 70 IT:

a) The first internal flash disk is of approximately 500MB (device /dev/block/mmcblk0) which is used by stock archos firmware and not changed by this guide.

Pay great attention playing with it, you may brick forever your Archos.

This flash disk have 4 partition and the block devices, mountpoints, filesystems type and size are as the following:

The first devices is "/dev/block/mmcblk0p1", mountpoint "/mnt/rawfs", type of filesystem "rawfs", size 32MB

The second devices is "/dev/block/mmcblk0p2", mountpoint "/mnt/system", type of filesystem "ext3", size 119MB

The third devices is "/dev/block/mmcblk0p3", mountpoint "/cache", type of filesystem "ext3", size 30MB

The fourth devices is "/dev/block/mmcblk0p4", mountpoint "/data" (mountpoint only by archos firmware), type of filesystem "ext3", size 300MB

b) The second internal flash disk is of approximately 7,5GB (device /dev/block/mmcblk1) which is used by this guide to boot SDE from and to accommodate the /data mountpoint (not any more on the "/dev/block/mmcblk0p4").

By stock archos firmware it has 1 partition (device /dev/block/mmcblk1p1), mountpoint "/mnt/storage", type of filesystem "fat32", size 7,5GB

After Uruk 0.3 installation it will have 3 partitions and the block devices, mountpoints, filesystems type and size will be as the following:

The first devices will be "/dev/block/mmcblk1p1", mountpoint "/mnt/storage", type of filesystem "fat32", size 5,5GB

The second devices will be "/dev/block/mmcblk1p2", mountpoint root "/", type of filesystem "ext4", size 500MB

The third devices will be "/dev/block/mmcblk1p3", mountpoint "/data", type of filesystem "ext4", size 1GB

C) The sdcard on device /dev/block/mmcblk2. On my case it have 1 partition (device /dev/block/mmcblk2p1), mountpoint "/mnt/storage/sdcard", type of filesystem "fat32".

Let's go:

The first step to do is to backup everything from your second internal flash disk (as above, it has 1 partition formated in fat32, 7,5GB capacity), just for backup purpose.

The simplest way is to connect your archos via usb to your linux box and copy directly that directory to a new directory on your linux with the default graphical file explorer of your distribution.

In my case it mounts automatically to /media/A70S (device is /dev/sdb1):

If doesn't mount automatically in your case, find it using "dmesg" command on a terminal after connection complete and mount it manually.

Or you can copy it on your Windows PC (connect Archos via usb, drive mount automatically to A70S).

After backup, don't disconnect your Archos from linux. You have to resize the mounted Archos disk form 7,5GB to 5,5GB.

The easiest way is to do it graphically with your distribution partition manager utility.

First umount it by right click->umount, then resize it letting on the right side of the disk 1,5GB free space.

Create other 2 partition on that free space, first of 500MB and the other with the remaining space approx. 960MB.

Then apply the changes on the partition manager and you will have now 3 partition on the second internal flash disk of your Archos.

The first one with 5,5GB and formated on fat32, the second one 500MB not formated and the third partition of 960MB not formated.

On my case the devices are respectively /dev/sdb1, /dev/sdb2 and /dev/sdb3.

The next step is to format the second and third partition with ext4 filesystems without huge option (as from $aur0n post) on a linux terminal

as root

:

When finished, just remove safely archos from your linux box.

From the archos open a terminal and just type:

The result will be:

The second partition (/dev/block/mmcblk1p2) will be your new rootfs

and the third one (/dev/block/mmcblk1p3) your new application area (/data).

On this step you are going to copy all the staff on /data (device /dev/block/mmcblk0p4 mounted on /data)

to the third partition of the second internal flash (/dev/block/mmcblk1p3).

Mount the third partition first:

and copy:

If you get any problems on coping (permissions) then the only way to do it correctly is to use "tar" to make a archive of data to a file on the first partition of the second internal flash disk (/dev/block/mmcblk1p1 mounted on /mnt/storage) like:

and then connect archos via usb to your linux computer (your three partition of the internal flash now will mount in automatic, let say /media/A70S, /media/disk1 and /media/disk2 from the devices /dev/sdb1, /dev/sdb2 and /dev/sdb3)

Now you have to extract the previous tar file (data_app.tar.gz) to the /media/disk2 (the third partition of archos internal flash disk mounted supposedly at /media/disk2):

The next step, download the Uruk 0.3 version of rootfs (rootfs.tar.gz) from this link, and kernel image (zImage) from from this link on the /tmp directory of your linux box. I want to remember that this files are prepared and postet from $aur0n on this post.

If you are still connected via usb with your archos (if not, connect it),extract the rootfs (rootfs.tar.gz) directly on the mount point of the second flash partition (as above in my case is /dev/sdb2 mounted on /media/disk1) on linux:

Change the following lines of the init.rc file (mount point of root filesystem):

mount ext3 /dev/block/mmcblk0p4 /data noatime nosuid

# Uncomment this

# mount ext4 /dev/block/mmcblk2p2 /data noatime

with those:

#mount ext3 /dev/block/mmcblk0p4 /data noatime nosuid

# Uncomment this

mount ext4 /dev/block/mmcblk1p3 /data noatime

Change the line on the file/media/disk1/syste/etc/vold.fsatb:

#dev_mount_lun volume_sdcard /mnt/storage/sdcard 3 /devices/platform/usb_mass_storage/lun1 /class/block/mmcblk2p3

with that:

dev_mount_lun volume_sdcard /mnt/storage/sdcard auto /devices/platform/usb_mass_storage/lun1 /class/block/mmcblk2

and remove safely archos from the linux box and shutdown Archos.

Download the initramfs.cpio.gz_Uruk_0.3.zip from here (or from the attachment on the end of this post) and unzip it on the /tmp folder of you linux box.

Flash the initramfs.cpio.gz and zImage (remember ;), you downloaded zImage on the step 4 and placed it already on /tmp) on SDE environment doing:

- While power on your archos, press the "Volume -" button

- Go to "Recovery System",then "Developer Edition Menu"

- Select "Flash kernel and Initramfs".

- Attach your Archos via USB to linux computer. Archos will automatically mount, in my case is A70S_REC mounted on /media/A70S_REC/. Copy the files (initramfs.cpio.gz and zImage) from /tmp folder.

Disconnect safely archos, then push "Ok", power and the archos will reboot.

- Press the "Volume -" to boot to the ""Boot Menu" and choose "Developer Edition" or just while booting press both "Volume -" and "Volume +" to boot directly to the "Developer Edition".

You are done.

Enjoy booting from internal flash (SDE edition).

Update: Uruk 0.4.2

There are 2 possibilities:

- You want to upgrade from Uruk 0.3

- Install Uruk 0.4.2 for the first time (You are on stock archos firmware).

Let's begin with the upgrade from Uruk 0.3 to Uruk 0.4.2

First of all download the Uruk 0.4.2 rootfs prepared from $aur0n UrukDroid-0.4.2-rootfs.rar on your linux box.

Download also UrukDroid-0.4.2-kernel.rar from here (or from the attachment on the end of this guide).

It's is $aur0n's one with the modifications to boot and mount /data from second internal flash.

Copy the above 2 files on the folder /tmp/archos of your linux machine. In my case is the 2 downloaded files are

under /home/shklifo/Download folder:

Unrar both of them (if you don't have rar utility, just install it), giving the command:

When the unrar process goes ok you will see the following on terminal (example of UrukDroid-0.4.2-kernel.rar):

After that you will have the following files on /tmp/archos:

You are upgrading and you have all the applications on second internal flash disk already, so just remove the UrukDroid-copy_data.cmd, you don't need it:

Now you have to copy UrukDroid-rootfs-upgrade.tgz to the rootfs of the archos (second partition of the second internal flash disk mounted on / of type ext4 with 500MB space).

To do that just connect archos via usb to your linux box and all the tree partition of archos second internal flash will be mounted automatically.

To verify where those partition are mounted just type:

on a linux terminal and on my case is as following:

and "df -m" like:

So in my case the second partition of the second internal archos flash disk of 485MB is:

mounted on /media/disk

Then just copy the UrukDroid-rootfs-upgrade.tgz file on the second partition of the second internal archos flash disk, like in my case:

Safely disconect archos from the linux box and shutdown completely your archos.

Now you have to flash initramfs (initramfs.cpio.gz) and kernel (zImage) to your archos from "Recovery Menu" (you know already how to do it;)),

or if you forget it just do the following:

- While power on your archos, press the "Volume -" button

- Go to "Recovery System",then "Developer Edition Menu"

- Select "Flash kernel and Initramfs".

- Attach your Archos via USB to linux computer. Archos will automatically mount, in my case is A70S_REC mounted on /media/A70S_REC/. Copy the files (initramfs.cpio.gz and zImage) from /tmp/archos folder.

Disconnect safely archos, then push "Ok", power and the archos will reboot.

- Press the "Volume -" to boot to the ""Boot Menu" and choose "Developer Edition" or just while booting press both "Volume -" and "Volume +" to boot directly to the "Developer Edition".

You will see the UruckDroid 0.4 screen with "Initramfs: Loading ...." than Rootfs: Loading .... and finally you will see the Uruck Desktop.

Enjoy

Install Uruk 0.4.2 for the first time

For those who whant to install Uruk 0.4.2 for the first time (now it's simplier that Uruk 0.3) will do:

a) First backup, create the partitions and filesystems on the second internal flash disk of archos (step 1

and step 2 of the Uruk 0.3).

You don't need anymore step 3 (copy of /data folder), because Uruk 0.4.2 do it automatically.

b) Then following step by step the guide Let begin with the upgrade from Uruk 0.3 to Uruk 0.4.2, except removing UrukDroid-copy_data.cmd file, because you need it to copy automatically /data files.

When you are on the step "copy the UrukDroid-rootfs-upgrade.tgz file on the second partition of the second internal archos flash disk", you need to copy additionaly UrukDroid-copy_data.cmd like:

Than follow till the end the guide Let begin with the upgrade from Uruk 0.3 to Uruk 0.4.2.

Enjoy

OPTIONAL

: Install google market.

If you have already istalled google market (using gAppsInstaller for example), you have to uninstall it (market/vending) first.

Then download UrukDroid-0.4.2-GoogleMarket.zip and copy it on the root (/) filesystem of archos (see above on the upgrade section an do the same steps of copying UrukDroid-rootfs-upgrade.tgz to archos rootfs).

Reboot archos.

NOTE

If you are upgrading from 0.3 version to 0.4.2 and installed before the google market from kenyu73 like i did, then the market

will be broken

and doesn't work any more.

To get it back, you have to remove all the google applications from SDE (Uruk 0.4.2) including the kenyu73's installer (gAppsInstaller).

Then install the market as on the previuos step OPTIONAL: Install google market downloading the file UrukDroid-0.4.2-GoogleMarket.zip and following the instructions.

After rebooting archos on SDE, you need to fix it, because you can't access the whole market (missing some "protected applications" like copilot etc).

To fix just do the following steps as kenyu73 explain on his post :

I've done it twice the fix step, and after that no problem anymore. All the google applications (downloaded from the fresh working market) are working correctly as before.

Update

: How to upgrade to

Uruk 0.6

from Uruk 0.3 or 0.4.2

There are 2 possibilities:

a) The first one is the simplest one.

Just download the $auron Uruk 0.6 UrukDroid_0.6-EasyInstall.rar posted on this post, extract it on your computer and

delete

the file initramfs.cpio.gz, because we don't need it.

Then download the file initramfs.cpio_Uruk_0.6.gz.rar in attachment on the end of this post and extract it on the same directory of your computer (this is the initramfs that you will flash on SDE prepared from $auron and can be found on the /root/ directory of $auron new rootfs UrukDroid-install.tgz).

Then boot Archos on stock Android and connect it to your linux box via USB. The root filesystem of Archos (/dev/block/mmcblk1p2 on Archos) will be mounted on some directory on linux automatically, just find it or manually mount it (it's the filesystem with 500MB space, to be sure just type "df -h" on a terminal).

With root on a linux terminal go to that directory (in my case was /media/Disk-1) and remove all the files there:

rm -rf *

Then copy the UrukDroid-install.tgz extracted before from UrukDroid_0.6-EasyInstall.rar on the above directory.

So, you will have only the file UrukDroid-install.tgz on your rootfs directory of Uruk.

Then disconect safely Archos from your linux box and flash initramfs.cpio.gz and zImage files on SDE (you know how to do that ...) and boot to SDE.

That is ;)

Uruk 0.6 will automatically copy everything needed as you will see on the boot time.

You have to do a last thing to be able to mount automatically the sdcard on Uruk 6. Uncomment the sdcard line on the file /system/etc/vold.fsatb like:

dev_mount_lun volume_sdcard /mnt/storage/sdcard auto /devices/platform/usb_mass_storage/lun1 /class/block/mmcblk2

This is needed on the second method too (the one below).

Who want to install Uruk (version 0.6 in this case) for the first time on internal, must create and format the 2 partitions of the second internal flash disk (like on the beginning of this post described) and follow step by step the above method and at the end copy everything from the data partiotion (last partition of the first internal flash /dev/block/mmcblk0p4) to the third partition of the second flash disk (/dev/block/mmcblk1p3).

b) The second method is more complicated, but works also good.

You just install Uruk 0.6 to a sdcard like on this $auron post, than shutdown Archos, put the microsd card on a card reader connected to a linux PC and with root make a tar archive of the entire rootfs (root filesystem) of Uruk 0.6 (the second partition of the sdcard with 500MB of space on ext4 filesystem) to a tar file that you can put to the first partition of the sdcard (the fat partition of the sdcard).

Eject the sdcard and put on Archos. Turn on Archos and from a terminal on Uruk as root mount the second partition of the flash disk (/dev/block/mmcblk1p2) on a directory and just delete ("rm -rf") everything on there and then extract the tar archive there.

So, you just put everything from rootfs of the sdcard to internal flash, with correct permissions, timestamp, ownership etc.

Now just shudown Archos, take off the sdcard and boot.

This time it will Uruk 0.6 will boot from internal flash ;)

Enjoy it