How to Enable init.d on Stock Rooted Desire ROMS

13 Flares Twitter 11 Facebook 1 Google+ 0 Reddit 0 StumbleUpon 1 Pin It Share 0 LinkedIn 0 Email -- Buffer 0 Filament.io 13 Flares ×

If you like your stock Desire ROM, you rooted it using unrEVOked or some other methods, you made some custom adjustment to it an you really don’t want to load a fully fledged third party ROM but still, you would like to tweak it a little bit more, you will quickly realize that you are going to need a working init.d system in order to start custom scripts on boot.

In this tutorial, I tried to explain how to add init.d support to your ROM, without needing to flash a new ROM and wipe everything, I just going to flash a new boot.img.

How to Enable init.d on Stock Rooted Desire ROMS

Requirements :

  • Rooted HTC Desire
  • New modified boot.img, supported firmware versions: 2.10.405.2, 2.29.405.2/5, check your firmware version here: (Settings -> About Phone -> Software information -> Software number)
  • Download this one: boot_2.10.405.2.zip if your “Software number” is: 2.10.405.2
  • Download this one: boot_2.29.405.2_5.zip if your “Software number” is: 2.29.405.2 or 2.29.405.5
  • Make sure you download the one matching your “Software number”, the wrong one will cause boot loops and weird behaviors.
  • ADB shell access
  • flash_image binary, usually provided by unrEVOked under /data/local/flash_image but if you don’t have grab it here:
  • busybox correctly installed under /system/xbin

Disclaimer: Best Android Blog should not be held responsible/liable for any damages that might occur to your device while following this rooting procedure. So, do everything at your own risk.

Procedure :

NOTE : If your desire is not S-OFF (meaning you can’t write to the /system directory), you’ll need to do the whole procedure in recovery mode.

1. Do a nandroid backup, this in order to save your current boot.img, and also because it is never a bad idea.

2. Make sure the nandroid backup went ok.

3. Then check your exact firmware version (Settings -> About Phone -> Software information -> Software number) and download the corresponding modified boot.img

4. Copy and unzip the downloaded boot.img to your SD card or wherever you like it.

5.Obtain adb shell access, become root (su) and wipe the existing boot image with:

Code:

cat /dev/zero > /dev/mtd/mtd2

ignore the “write: No space left on device, it’s normal”.

6. Flash the new boot image:

Code:

flash_image boot /sdcard/boot.img

where “/sdcard/boot.img” is the path where you copied the downloaded boot.img

7. Remount the /system partition read-write if you’re not in recovery mode:

Code:

mount -o remount,rw /system

or mount it if you are in recovery mode:

Code:

mount /system

8. Create the init.d directory where all the custom boot scripts will be executed:

Code:

mkdir /system/etc/init.d

and set permissions:

Code:

chmod 755 /system/etc/init.d

9. Important: unzip and copy the 99complete.zip script to the newly created /system/etc/init.d/99complete, set permissions:

Code:

chmod 755 /system/etc/init.d/99complete

and ownership:

Code:

chown root.shell /system/etc/init.d/99complete

Failure to do so will cause a boot loops.

10. Cross your fingers and reboot! If anything goes wrong you can always boot into recovery and fix errors or you can restore the nandroid backup (you can just restore the boot.img if you don’t want to do a full restore).

From now on, every script you put inside /system/etc/init.d will be executed at boot before almost any other initializations. Make sure you set the correct permissions to your scripts (i.e. 755).

Incoming search terms:

  • how to enable init d on stock rom xda
About Sarvesh Darak

Sarvesh Darak is a blogger, an online marketer, a social media specialist and an Android Lover. At Best Android Blog, he writes Android news & tutorials for Android Rooting. He is the tech head and ensures that the blog keeps running at good pace. He also looks after all the SEO and promotion work. He’s from Surat, India and keep contributing regularly at the blog.

Speak Your Mind

*

13 Flares Twitter 11 Facebook 1 Google+ 0 Reddit 0 StumbleUpon 1 Pin It Share 0 LinkedIn 0 Email -- Buffer 0 Filament.io 13 Flares ×