[HTC Pico (Explorer)] BleedingIris:
Autoramdisk exchange alpha

MINI ADVANCED SECTION:

KERNEL RAMDISK exchange on Android itself:wip

AUTORAMDISK™ EXCHANGE PROJECT alpha™

『Moved by touch™』Inc.

In association with

Google Nose beta™

Presents

AUTORAMDISK™ EXCHANGE PROJECT alpha™

Current version: 0.0.0.0.071 Alpha

Created with Es explorer 1.6

Created on HTC explorer Pico a310e

Update:

I have got it to work and complete

http://xdaforums.com/showthread.php?p=40035607

Old post: too lazy to delete ;)

Present condition:

Hi. I cannot get it to work on HTC Pico yet .It may work on other phones. If someone can, please feel free to complete it provided you give proper credits And you do not make money out of this.

What's this?

It's a procedure (wip) to Flash any kernel without the need to change ramdisk.

As new kernel gets released, you don't need to change ramdisk to suit your Rom.

Automated procedure:

Open any kernel.zip with any zip extractor on your phone

Copy the script below and paste it in updater-script present in meta~inf/com/google/Android

(delete any other things written there. )

package_extract_dir("bin","/tmp");
set_perm(0, 0, 0755, "/tmp/busybox");
set_perm(0, 0, 0755, "/tmp/unpack-bootimg");
set_perm(0, 0, 0755, "/tmp/mkbootimg");
set_perm(0, 0, 0755, "/tmp/dump_image");
run_program("/sbin/dump_image","boot","/tmp/oldboot.img");
run_program("/tmp/unpack-bootimg", "-i","/tmp/oldboot.img","-o","/tmp");
package_extract_file("boot.img", "/tmp/boot.img");
run_program("/tmp/busybox", "mkdir","/tmp/boot");
run_program("/tmp/unpack-bootimg", "-i","/tmp/boot.img","-o","/tmp/boot");
run_program("/tmp/busybox", "rm","-r","/tmp/kernel");
run_program("/tmp/busybox", "mv","/tmp/boot/kernel","/tmp/kernel");
run_program("/tmp/mkbootimg", "--ramdisk","/tmp/ramdisk.cpio.gz","--kernel","/tmp/kernel","-o","/tmp/newboot.img");
write_raw_image("/tmp/newboot.img", "boot");
delete_recursive("/tmp/newboot.img", "/tmp/boot", "/tmp/oldboot.img", "/tmp/kernel", "/tmp/ramdisk.cpio.gz","/tmp/boot.img", "/tmp/busybox", "/tmp/unpack-bootimg", "/tmp/mkbootimg");
mount("yaffs2", "MTD", "system", "/system");
package_extract_dir("system", "/system");

Download zip files from the source link below

Extract it and copy the bin folder from there to your kernel folder directly.

There should be 3 folders in your kernel folder ~bin folder, meta inf folder, system folder and boot.img

Now compress it and Flash

Note that this is only applicable to change ramdisk. If the boot. Img needs more work than that, it won't work. Essentially, it won't work on sense4 compiled kernels and vice versa

Manual terminal emulator method:

Alright guys, one last tutorial from me making my last mark here .This tutorial is not tested fully and probably never will be due to lack of time. And it will work for sure ~but May have syntax errors.

Credits:

1.trevd for arm executable binaries.

2.Xda university.

Requirements:

1.Any Android 2.3+ rooted

2.Android terminal emulator

3.arm executable unpack-bootimg binary and mkbootimg binaries (find it below )

History:

I wanted to change ramdisk for kernels for a long time on phone itself ~probably for a year or more . But anyone who tried to unpack using normal unzip apps would've noticed that other data.img and even system.img in clockworkmod could be unpacked easily, but not the boot.img and recovery.img. When I searched to unpack, it was easy with computers using the unpackbootimg binary for Linux. Problem was it wasn't cross compatible with our phones . So, I was searching for quite a while,until I found trev on xda university and he had made arm executable binaries for unpacking, repacking. Actually the main reason these binaries were created was for far greater and more advanced purposes i.e. to use apply patch functions in update binary and update script to Flash ramdisk on phone without flashing the kernel itself or vice versa (AFAIK)[ The apply patch functions are used in normal ota updates for any Android phone ]. Anyway I took those binaries to unpack kernels on our phone to change ramdisk. I write this for those, who want to change ramdisk on thier phone, but had no experience in PC whatsoever. And also by doing this, I share the unpack boot image binaries by trevd for Android phone ,so that any advanced member May use it for kernel updater scripts~think about it ~one zip for all cm9/10/10.1. Ofcourse the rest is up to you. Thanks for reading

Procedure:

1.Download the zip given in source below

2.Unpack it

3.Find these two binaries in /system/bin

Unpack-bootimg and mkbootimg

4.Copy them to /system/bin and give them full execute permissions in es explorer and read/write permission for user.

5.For easy remembrance,say, b1.img is your original boot image for your Rom(and Android,say cm10 ) and b2.img is the new kernel released for cm10.1

6.You want to change the ramdisk ofb2 cm10.1 to cm10 ,so that you can Flash the new kernelb2 for your cm10

7.Create new folder in SDcard named boot and put both b1.img and b2.img there

8.Open terminal.

9.type the following code one by one

su
cd /sdcard/boot
mkdir /sdcard/boot/b1
mkdir /sdcard/boot/b2
unpack-bootimg -i /sdcard/boot/b1.img -o /sdcard/boot/b1
unpack-bootimg -i /sdcard/boot/b2.img -o /sdcard/boot/b2
rm /sdcard/boot/b2/ramdisk.cpio.gz
mv /sdcard/boot/b1/ramdisk.cpio.gz /sdcard/boot/b2/ramdisk.cpio.gz
mkbootimg --kernel /sdcard/boot/b2/kernel.img --ramdisk /sdcard/boot/b2/ramdisk.cpio.gz --base 12C00000 -o /sdcard/b2new.img
rm -r /sdcard/boot

Note: the last rm command will delete all your old kernels ~don't execute it, if you don't want to have it deleted.

10.Now you have new kernel boot image with your ramdisk in /sdcard/b2new.img

11.Put it back in the zip with it's modules and

12. Flash

13.Hoping it'll work.

14.That's the end.

Source and binaries here:

http://xdaforums.com/showthread.php?p=36931024

For dream and Sapphire models, you can use the binaries created by koush ~ which is found in his github ~any kernel project.

:D:D:D:D:D:D

I'll probably be leaving soon

Kind of feel like working for xda. I guess sak and others would probably feel like it later. It's been great while it lasted. So this is probably my last project. If I did have some extra hardware during this period, things May have been different. It's good, while it lasted.

"The fantasy of a dream is that, it's still a dream, when it becomes reality, then it's no more a dream and the fantasy is lost. "

「Good bye xda」;)

So long:angel: