FORUMS

OnePlus Addresses Reservation List Cheating

Jake Cooper figured out how to bump his place up on OnePlus’ reservation list and … more

OnePlus 2 Benchmark Scores Show Its Muscle

This video by FoneArena contains all the popular benchmarks being tested on the OnePlus 2, … more

Sony’s Emergence in The Middle: Is The Price Right?

Sony’s Electronics Division is not in its best days, and its smartphone … more

HTC Delivering Ads Straight to Sense Home

HTC’s 2015 has been a year marked by a desperate search for revenue.The HTC One M9 … more

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

4 posts
Thanks Meter: 2
 
By dogmaphobia, Junior Member on 20th December 2010, 07:17 AM
Post Reply Subscribe to Thread Email Thread
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, 5484 views)
The Following 2 Users Say Thank You to dogmaphobia For This Useful Post: [ View ]
 
 
20th December 2010, 12:54 PM |#2  
$aur0n's Avatar
Senior Member
Thanks Meter: 501
 
Donate to Me
More
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, 02:49 PM |#3  
Member
Thanks Meter: 5
 
More
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, 03:04 PM |#4  
$aur0n's Avatar
Senior Member
Thanks Meter: 501
 
Donate to Me
More
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, 05:51 PM |#5  
OP Junior Member
Thanks Meter: 2
 
More
Yeah.. I'm able to get root with kernel and initramfs I've attached...
20th December 2010, 06:24 PM |#6  
Senior Member
Thanks Meter: 26
 
More
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, 07:06 PM |#7  
OP Junior Member
Thanks Meter: 2
 
More
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, 10:43 PM |#8  
Junior Member
Thanks Meter: 4
 
More
Keep up the good work guys!
20th December 2010, 11:21 PM |#9  
chrulri's Avatar
Senior Member
Thanks Meter: 276
 
Donate to Me
More
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, 02:08 PM |#10  
$aur0n's Avatar
Senior Member
Thanks Meter: 501
 
Donate to Me
More
Heh.. I've just did the same - but on ext3 partition of sd card. Not luck yet to full boot... yet...
21st December 2010, 02:12 PM |#11  
chrulri's Avatar
Senior Member
Thanks Meter: 276
 
Donate to Me
More
me neither. don't have time for more testing today and tomorrow, but soon I have a lot of spare time

edit: currently running kernel and initramfs of dogmaphobia, works great so far
Last edited by chrulri; 21st December 2010 at 02:28 PM.

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

Advanced Search
Display Modes