init.d support


pjovp

Members
Aug 5, 2011
637
67
I just can't install init.d in this new stable 16. Why or what can I do?
Thanks
 
You have to include run parts command to enable init.d in ramdisk - init.rc from unpacked kernel. Then repack the kernel and install the rom.
 
thank you for your reply but I just don't make a clue of what you just said. I completly noob in this part
 
honestly I don't understand why this is not allowed in this latest release
 
Download any custom rom that support Init.D e.g. http://bbs.ydss.cn/forum.php?mod=viewthread&tid=459132&extra=page=1&filter=typeid&typeid=1993&typeid=1993 Extract boot.img. Create a .zip file with structure.

You can use updater script to write new kernel or ADB
My updater script
Code:
ui_print("****************************");
ui_print("*                          *");
ui_print("*      REDMI Unique      *");
ui_print("*      by REDMI Team      *");
ui_print("*        www.miui.cz      *");
ui_print("****************************");
show_progress(0.500000, 0);
ui_print("Installing update files...");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
delete_recursive("/system/etc/init.d/");
package_extract_dir("system", "/system");
ui_print("Set permission...");
set_perm_recursive(0, 0, 0755, 0644, "/system/ota.prop");
set_perm_recursive(0, 0, 0755, 0644, "/system/rom.ota.prop");
set_perm(0, 0, 0755, "/system/etc/init.d/01MTKTweakCPU");
set_perm(0, 0, 0777, "/system/etc/init.d/02MTKTweakRam");
set_perm(0, 0, 0777, "/system/etc/init.d/03MTKTweakElse");
set_perm(0, 0, 0777, "/system/etc/init.d/04SDspeedfix");
set_perm(0, 0, 0777, "/system/etc/init.d/05Tweaks");
set_perm(0, 0, 0777, "/system/etc/init.d/06memery");
ui_print("Update Boot image...");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/bootimg");
unmount("/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/data");
package_extract_dir("data", "/data");
set_perm(0, 0, 0644, "/data/miui/gallery/city.db");
show_progress(0.100000, 0);
ui_print("****************************");
ui_print("*                          *");
ui_print("*      Install complete    *");
ui_print("*      Enjoy new ROM      *");
ui_print("*                          *");
ui_print("****************************");
unmount("/data");

Uni.init works. But is only for personal use. You cant make custom rom with init.d support. For this you need dsixda's Android Kitchen or use my solution
 
Your procedure is not much simpler than extracting original boot.img and adding init.d support. Proces is already documented in detail on xda. No need to mix foreign boot.img into rom.