Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Custom kernel and initramfs in SDE... to gain rooted android in my Archos 70 Internet

OP dogmaphobia

20th December 2010, 08:17 AM   |  #1  
OP Junior Member
Thanks Meter: 2
 
4 posts
Join Date:Joined: Aug 2007
So I've finally kind of figured out several files in partition mmcblk0p1. Files named custom, init, and recovery are actually kernel and initramfs packed with 256 header. Information at offset 0x94 is length of kernel + header (256 bytes) and offset 0x98 is length of initramfs. Except of file init, contain additional size which I'm not actually understood.

By extracting init file, and modifying extracted initramfs, I can boot to android system with rooted state.
I've experimenting using unionfs got from somewhere in this forum and added files su and superuser.apk. I've added in init file inside initramfs.

Actually analyzing recovery files, we can get information regarding recovery program which mostly in bash script.

I've include my kernel and initramfs extracted from file init in mmcblk0p1. You can try for yourself only in Developer Edition, where you can flash your own kernel and initramfs.
Beware, I don't guarantee it will succeed... try for yourself

*Sorry, bad english...
Attached Files
File Type: zip kernel+init.zip - [Click for QR Code] (2.90 MB, 5114 views)
The Following 2 Users Say Thank You to dogmaphobia For This Useful Post: [ View ]
20th December 2010, 01:54 PM   |  #2  
$aur0n's Avatar
Senior Member
Thanks Meter: 499
 
1,453 posts
Join Date:Joined: Nov 2010
Donate to Me
Hi,

Is it not pointless to work on this squashfs, when we can use plain file/device partition on SDE (like Angstrom demo)? I guess (it's still theory - since I've just installed SDE) it's enough to create rootfs with copied everything from squashfs and /data - to make it fully writeable and rootable - and boot on it as /.
I'll give it a try later...
20th December 2010, 03:49 PM   |  #3  
Member
Thanks Meter: 5
 
65 posts
Join Date:Joined: Dec 2010
No methods are pointless. Stop saying that. It's a progress to what we can do with the device.

Anyway, were you able to make that root work on the main OS, dogma?
20th December 2010, 04:04 PM   |  #4  
$aur0n's Avatar
Senior Member
Thanks Meter: 499
 
1,453 posts
Join Date:Joined: Nov 2010
Donate to Me
Quote:
Originally Posted by MoonPhantasm

No methods are pointless. Stop saying that. It's a progress to what we can do with the device.

Ehh ok - but it makes thinks complicated, while we should straight everything up - to make upgrading smooth and easy

Quote:
Originally Posted by MoonPhantasm

Anyway, were you able to make that root work on the main OS, dogma?

As far as I can see in files - it should work.
Here's a diff of those init files (what was added)
out# diff init init.old
53,54d52
< CP=/bin/cp
< CHMOD=/bin/chmod
122,130d119
<
< # Create tempfs on /rootfs/home and unionfs with /rootfs/system
< $MOUNT -t tmpfs tmpfs $rootfs_path/home
< $INSMOD /lib/modules/unionfs.ko
< $MOUNT -t unionfs -o dirs=$rootfs_path/home=rw:$rootfs_path/system=ro unionfs $rootfs_path/system
< $CP /home/su $rootfs_path/system/bin/
< $CP /home/superuser.apk $rootfs_path/system/app/
< $CHMOD 6755 $rootfs_path/system/bin/su
< $CHMOD 755 $rootfs_path/system/app/superuser.apk

Booting from normal ext3 device requires some more changes - but gives us no 300MB (or similar) limit, allows to change boot parameters after kernel boots up (now on squashfs partition) etc. etc.
The Following User Says Thank You to $aur0n For This Useful Post: [ View ]
20th December 2010, 06:51 PM   |  #5  
OP Junior Member
Thanks Meter: 2
 
4 posts
Join Date:Joined: Aug 2007
Yeah.. I'm able to get root with kernel and initramfs I've attached...
20th December 2010, 07:24 PM   |  #6  
Senior Member
Thanks Meter: 26
 
132 posts
Join Date:Joined: Jun 2010
I am very excited about the prospects with SDE. Hopefully with some more poking and prodding and with Archos Froyo source released we will see some nice custom ROMs coming down w/ full root and a re-mapped file system in the coming months. I for one am hopeful that the dev community embraces the Gen8's w/ SDE and bakes up a nice serving of Gingerbread!
20th December 2010, 08:06 PM   |  #7  
OP Junior Member
Thanks Meter: 2
 
4 posts
Join Date:Joined: Aug 2007
I was thinking that in recovery there's tool to flash initramfs and kernel which formed in file custom in mmcblk0p1. If we can replace destination to init (not custom). I think we can force booting to our new change, without entering to recovery mode first.

But, I still don't want to break anything in partition mmcblk0p1 .

Also, if we can modifying squashfs file with new one, without script checking the file (I think is on cramfschecker program); we can have custom rootfs itself replacing androidmerged.squashfs.secure....

Just the thought...
20th December 2010, 11:43 PM   |  #8  
Junior Member
Thanks Meter: 4
 
5 posts
Join Date:Joined: Sep 2010
Keep up the good work guys!
21st December 2010, 12:21 AM   |  #9  
chrulri's Avatar
Senior Member
Thanks Meter: 275
 
896 posts
Join Date:Joined: Dec 2010
Donate to Me
just copied the content of the squashfs in an ext3 image and modified the init and mountpoints.

will report later after some testing
21st December 2010, 03:08 PM   |  #10  
$aur0n's Avatar
Senior Member
Thanks Meter: 499
 
1,453 posts
Join Date:Joined: Nov 2010
Donate to Me
Heh.. I've just did the same - but on ext3 partition of sd card. Not luck yet to full boot... yet...

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes