Announcements

ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.

Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

[Kernel] init.d support for ZTE Blade V

25 posts in this topic

What is this?
It's a boot image which adds support for init.d scripts.

What does that mean?
By flashing this to your phone, it gives support for custom scripts to be executed at boot time. There are plenty of examples of the kind of mods this will allow, see this post as an example.

Prerequisites
You must be rooted and ideally have CWM recovery installed. This post tells you how to do both of these things.

Next, boot the phone to recovery and MAKE A BACKUP - flashing a new boot image is not without risk.

How do I test if it will work for me?
You can test the install without permanently flashing it to your phone, I'd suggest you do this first if you have any concerns. You will need to have set up the ZTE USB drivers and have fastboot working on your computer, again see this post for details.

1. Download init.d-test.zip and put it somewhere on your phone that you can find it again, for example in the root folder
2. Download boot-gah0.9-8225uk2.2.img and put in on your computer in the folder that contains fastboot.exe
3. Connect your phone via a USB cable to the same computer
4. Reboot your phone and hold volume down to boot into CWM recovery
5. install zip → choose zip from sdcard → (find init.d-test.zip) → Yes to install
6. +++++ Go Back +++++ → advanced → reboot to bootloader
7. When the green android appears, on your computer navigate to the folder containing boot-gah0.9-8225uk2.2.img and type

fastboot boot boot-gah0.9-8225uk2.2.img

Give your phone a few seconds and it should boot normally. To check that the new boot image has worked, use a file explorer to navigate to /data/local/tmp and look for a file named 00confirm.txt. If the file exists, congratulations, the boot image works for you. You can safely delete /data/local/tmp/00confirm.txt and also /system/etc/init.d/00confirm (make sure you use a root explorer to mount /system as rw first).

You can now permanently flash the image if you wish.

How do I install after testing?
If you haven't done a test install, I suggest you try the above first. To flash the image you will need to have set up the ZTE USB drivers and have fastboot working on your computer, again see this post for details.

1. Download boot-gah0.9-8225uk2.2.img and put in on your computer in the folder that contains fastboot.exe
2. Connect your phone via a USB cable to the same computer
3. Reboot your phone and hold volume down to boot into CWM recovery
4. advanced → reboot to bootloader
5. When the green android appears, on your computer navigate to the folder containing boot-gah0.9-8225uk2.2.img and type

fastboot flash boot boot-gah0.9-8225uk2.2.img
fastboot reboot

Congratulations, your Blade V now has init.d support!

What next?
Create a script to do something cool and put it in the /system/etc/init.d folder. Don't forget to give the script execute permissions (755 suggested). The script should run every time your phone is booted. If it's really cool, make sure you share :)

Technical details
I extracted boot.img from the UK v2.2 stock ROM, specifically, this. I split the image, unpacked the ramdisk, added a hook to execute init.d scripts to init.rc then repacked it all. The kernel itself is untouched, only the ramdisk was modified.

Credits
100% of the credit for this goes to KonstaT. Not only did he encourage me and patiently tell me where I was repeatedly going wrong, he also wrote most of the code!

Share this post

Link to post

Share on other sites

Im sorry for off-topic i need to ask something KonstaT, here is my problem i have flashed MIUI for blade V in my blade III pro with Blade V boot.img and rom booted but touch dont works only power key is working and i tried with my stock boot.img, apps were optimizing the same procedure as blade V boot.img but the phone after apps optimizing again goes to bootanimation and its stucked here and only LED Notification is going on here is logcat:

Share this post

Link to post

Share on other sites

What toolchain did you use? It can make a small difference in size (0.1-0.2 mb) but I doubt that much. I can't remember if the kernel I built had any major differences in size compared to stock.

I used r7 of the android NDK, I guess I could try a newer revision. Oddly my boot.img comes out at 7.1mb versus 7mb for the stock, so the bloated zImage compresses well.

[edit]

I reset everything and compiled with the r9d toolchain. This time zImage is 4.8mb and boot.img is 6.9mb. So zImage still larger, boot.img smaller (??) Still seems to boot OK so I'll go with the smaller boot.img and pretend that the reduced size is due to my "optimisations" lol.

Most likely it just indicates that ZTE has releases non-GPL compliant source that doesn't match the binary kernels shipped in devices.

I came to the same conclusion. The fact that it doesn't even compile without tweaking means it can't be the version they shipped.

I've been running my compiled version for almost 48 hours without any issues so it looks fine.

I started to read up on adding governors, I thought I'd start with smartassV2 as it's one I've used before in CM etc. But it's a huge learning curve, so much to understand and so much of the info our there is contradictary. Anyway, I was making some reasonable progress in understanding when I came across a recent IRC chat log where an experienced kernel dev was ridiculing someone for adding smartassV2 to a dual core device, as it was originally intended for single core. And here I am trying to add it to a quad core. Maybe back to the drawing board!

Share this post

Link to post

Share on other sites

With smartassV2 it's not even a case of "just" adding it. It works on a principle of what it calls "ideal" frequencies. So before you even include it, you need to supply a value of what you believe is the ideal frequency to aim for when the device is awake and when it's suspended and the deltas for ramping up and down.

Like I said, a lot to get your head around and a lot of conflicting info. I think instead of trying to reinvent the wheel I need to KANG someone's else's work!

Link to post

Share on other sites

Notification sometime works sometimes doesnt. Its the same on wifi or 3g. Push notification have big dealey. I have this probem with facebook messages, whatsapp and others .... Have you got someone this problem?

thanks

0

Share this post

Link to post

Share on other sites

Not really. I tried a couple of governors but couldn't get them to compile, I seem to be missing a lot of dependencies.

If I'm reading the source correctly, the stock kernel includes some additional frequencies for our chipset, so I though overclocking would be easier. I increased the maximum frequency that the kernel allows, but when I tried to install some overclocking apps, it didn't let me select anything higher than 1.21GHz.

There's also an option to enable USB OTG. I tried this and got a bunch of compilation errors. After a few hours of debugging I was able to get it compiled, but once again, when I tried a USB powered hub it didn't detect any devices.

So nothing very successful at all, and at the moment I have no time to work on it further.

Is here some one who fix this problem ?

I have the same problem on stock rom and on miui rom too.

Notification sometime works sometimes doesnt. Its the same on wifi or 3g. Push notification have big dealey. I have this probem with facebook messages, whatsapp and others .... Have you got someone this problem?

thanks

Sorry, I don't have the skills for that. But I would question whether it's a kernel bug anyway because I don't have this problem.