Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,769,248 Members 39,245 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
dogmaphobia
Old
#1  
Junior Member - OP
Thanks Meter 2
Posts: 4
Join Date: Aug 2007
Default Custom kernel and initramfs in SDE... to gain rooted android in my Archos 70 Internet

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, 5017 views)
The Following 2 Users Say Thank You to dogmaphobia For This Useful Post: [ Click to Expand ]
 
$aur0n
Old
#2  
$aur0n's Avatar
Senior Member
Thanks Meter 499
Posts: 1,453
Join Date: 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...
 
MoonPhantasm
Old
#3  
Member
Thanks Meter 5
Posts: 65
Join Date: 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?
 
$aur0n
Old
#4  
$aur0n's Avatar
Senior Member
Thanks Meter 499
Posts: 1,453
Join Date: Nov 2010

 
DONATE TO ME
Quote:
Originally Posted by MoonPhantasm View Post
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 View Post
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: [ Click to Expand ]
 
dogmaphobia
Old
#5  
Junior Member - OP
Thanks Meter 2
Posts: 4
Join Date: Aug 2007
Yeah.. I'm able to get root with kernel and initramfs I've attached...
 
Darkseider
Old
#6  
Senior Member
Thanks Meter 26
Posts: 132
Join Date: 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!
 
dogmaphobia
Old
#7  
Junior Member - OP
Thanks Meter 2
Posts: 4
Join Date: 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...
 
d34thd34l3r
Old
#8  
Junior Member
Thanks Meter 4
Posts: 5
Join Date: Sep 2010
Keep up the good work guys!
 
chrulri
Old
#9  
chrulri's Avatar
Senior Member
Thanks Meter 275
Posts: 896
Join Date: 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
 
$aur0n
Old
#10  
$aur0n's Avatar
Senior Member
Thanks Meter 499
Posts: 1,453
Join Date: 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...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes