init.d support

Discussion in 'Xiaomi Redmi (Red Rice / HongMi)' started by pjovp, Jul 29, 2014.

  1. pjovp

    pjovpMembers

    Aug 5, 2011
    609
    44
    67
    Male
    Portugal
    I just can't install init.d in this new stable 16. Why or what can I do?
    Thanks
     
  2. Acid

    AcidScripting Ninja
    Staff Member

    Aug 20, 2011
    2,726
    744
    245
    Male
    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.
     
  3. pjovp

    pjovpMembers

    Aug 5, 2011
    609
    44
    67
    Male
    Portugal
    thank you for your reply but I just don't make a clue of what you just said. I completly noob in this part
     
  4. pjovp

    pjovpMembers

    Aug 5, 2011
    609
    44
    67
    Male
    Portugal
    honestly I don't understand why this is not allowed in this latest release
     
  5. acn

    acnMembers

    Jan 17, 2014
    93
    5
    20
    Male
    Software developer
    Croatia
  6. redmaner

    redmanertranslators.xiaomi.eu maintainer
    Staff Member

    Jan 12, 2013
    533
    547
    180
    Male
    The Netherlands
  7. pjovp

    pjovpMembers

    Aug 5, 2011
    609
    44
    67
    Male
    Portugal
    For that is Chinese
     
  8. Sonic1SVK

    Sonic1SVKMembers

    Nov 17, 2013
    228
    61
    62
    Male
    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
     
  9. acn

    acnMembers

    Jan 17, 2014
    93
    5
    20
    Male
    Software developer
    Croatia
    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.
     
  10. redmaner

    redmanertranslators.xiaomi.eu maintainer
    Staff Member

    Jan 12, 2013
    533
    547
    180
    Male
    The Netherlands

Share Our Site