• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      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.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      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.
Sign in to follow this  
Followers 0

Manipulating the boot process and/or changing the kernel [GUIDE]

16 posts in this topic

Posted (edited)

I'm trying to change the boot.img in order to do some testing/debugging (new kernel, ICS rom etc). There are lots of guides which explain how to extract and repack the boot.img, but somehow (even without making any actual changes) the new boot.img doesn't work.

Here is what I do:

abootimg -x boot.img

  1. Extract the boot.img file
    perl ../split_bootimg.pl ../boot.img
    abootimg -x boot.img
  2. Extract the ramdisk
    mkdir ramdisk
    cd ramdisk
    gzip -dc ../boot.img-ramdisk.gz | cpio -i

  3. Make the changes you want

  4. Recreate the ramdisk
    cd ..
    ../mkbootfs ./ramdisk | gzip > ramdisk-new.gz

  5. Recreate the boot.img file
    abootimg -u boot.img -r ramdisk-new.gz
    abootimg -u boot.img -f bootimg.cfg -k zImage -r ramdisk-new.gz

What am I doing wrong here? After doing this I reflash the new boot.img. On reboot the device is stuck at the Huawei logo. As I said, even without making any changes to the files in the ramdisk.

Any ideas? Help is much appreciated!

Edited after getting this fixed:

- Changed step 1: Use "abootimg" instead of perl script. This creates a handy config file for use when recreating the boot.img in the last step.

- Changed step 5: Use "abootimg" again to update the original boot.img file. Use the config file created in step 1, otherwise it won't work

Edited by omegamoon
1

Share this post


Link to post
Share on other sites

Posted

Not quite sure. I made changes to the boot img using dsixda kitchen using cygwin in windows and it still boots...

0

Share this post


Link to post
Share on other sites

Posted

Note I don't do this all the time, but the few times I did do it I followed this guide and mine worked.

What I would initially do is unpack and immediately repack it. If that works then you know that you can create valid images and if any of your amendments hang the phone you know what to blame.

0

Share this post


Link to post
Share on other sites

Posted

He already said that he tried that.

0

Share this post


Link to post
Share on other sites

Posted

It finally works now. I updated the first post with instructions on how I did it :)

0

Share this post


Link to post
Share on other sites

Posted

Tilal has released an Ics build.

Are you working alone or could you and Tilal work together as he doesn't have a G300 phone yet

0

Share this post


Link to post
Share on other sites

Posted

I'm currently working on my own. Didn't know that others were trying as well.

I am now at the stage that the 3.0.8 kernel boots, but android (MIUI v4) is bailing out early in the init phase. I can't get any logcat info, since adb is giving "exec '/system/bin/sh' failed" errors.

Search continues...

0

Share this post


Link to post
Share on other sites

Posted

Wow. You got the 3.0 kernel??? That's bloody amazing.

The sh bailing. Go into recovery and chmod the /system/bin/* folder to 777.

Could you please share the source as well?

0

Share this post


Link to post
Share on other sites

Posted

Another suggestion:

Could you try flashing the cm9 port and then your kernel over the top and see if it boots?

0

Share this post


Link to post
Share on other sites

Posted

I'm still trying to build the kernel from source, with all the snippets I find here and there. Unsuccessful until now, so no source (yet), but I'm getting there :)

Currently I'm just trying to port the MIUI.us_Honor_v4_2.5.11 image, which contains the 3.0.8 kernel. It boots, and hey, I just got logcat working. The screen is flashing now, showing the Huawei logo on and off...

Small steps...

1

Share this post


Link to post
Share on other sites

Posted

Oh cool. Still good. You should be able to build the honor source though.

0

Share this post


Link to post
Share on other sites

Posted

I'm downloading your "update-cm-9-20120518-NIGHTLY-u8815-signed.zip" right now. Let's see what that brings :)

0

Share this post


Link to post
Share on other sites

Posted

I'm downloading your "update-cm-9-20120518-NIGHTLY-u8815-signed.zip" right now. Let's see what that brings :)

any further?

0

Share this post


Link to post
Share on other sites

Posted

any further?

No, unfortunately had not much time today to investigate any further. Didn't check tilal6991's cm9 yet with the 3.0 kernel.

The problems I see in the logcat with the MIUI v4 image + 3.0.8 kernel combo seem to be related to the kernel. Things like...

  • Couldn't open /dev/gyro
  • genlock_create_lock: open genlock device (err=No such file or directory)
  • service 'sensorservice' died; service 'entropy' died; service 'power' died

These are all fatal errors, killing the ServiceFlinger and with that the Zygote process. The lcd seems not to be initialized correctly, it only flashes shortly.

I'm again trying to rebuild the 3.0.8 kernel from source now. I first have to get rid of all the build problems. The sources are meant for the U8860, and it looks like some parts are missing for a succesful build on the U8815. I don't see light at the end of the tunnel yet :wacko:

0

Share this post


Link to post
Share on other sites

Posted

For the sake of reference, in order to get a kernel build for the U8815 you need this info about the exact hardware...

board_id: MSM7227A_8815.VerB

hw_version: HD1U8815M.VerB

charge_flag: 0

compass_gs_position: COMPASS_TOP_GS_TOP

sensors_list: G_L_P_M_SENSORS

lcd_id: CHIMEI RSP61408

wifi chip: BROADCOM

audio_property: 2

I couln't find the lcd type, and just picking one might not be such a good idea, but then I realized that a simple "cat /proc/app_info" shows al the things I need :)

0

Share this post


Link to post
Share on other sites

Posted (edited)

Hello,

I tried the above process on the boot image I extracted from my g300. However, although i mange to create an image with exactly the same size, the device does not boot with my modified boot.img.

Help would be much appreciated.

Thanks,

Arik

OK - Succeeded - the line: perl ../split_bootimg.pl ../boot.img should not be erased!

Edited by ahalp
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.