[Q]Repacking boot.img (need help) - General Questions and Answers

I was trying to learn about unpacking boot.img and tried to remove my initlogo.rle inside it since I do have a oemlogo.mbn (have 2 splash screens when booting). So I tried this tutorial on how to get that done in windows as I don't have a working Ubuntu as of now (although I still don't know how to do this the right way using Ubuntu). So I managed to unpack without errors, deleted initlogo.rle and repacked it without any errors. Then put the new boot.img inside an update.zip I made and flashed it into my phone. It was flashed successful. When I rebooted the system (from recovery) it was stucked at the oemlogo. Did I miss anything. My guess is that I didn't find out what my kernel base address is (don't know how to get it) and the script from the cygwin used a default address instead of the right one. So I tried to get my base address, unfortunately, I can't figure out how to do it. Can anyone help me out?

Related

[ROM][SD-Boot]CM9 (4.0.4 ICS) Based on munjeni {WIP}

CANCELLED! GOT A NEW PHONE
Tried so many methods , non worked , I'd keep trying until one works , then I could port hTC Aria's CM10 to hTC HD MINI and redo all this again so that we can have 4.1 on our devices. Till then , I'd love it if munjeni or schlund helped me with the process , because it seems that the kernel extracted from boot.img needs modification , and that every OS needs its own initrd , I hope someone can help.
Update:
I found the required file's details , I have the ramdisk , I have the system.ext2 , what I'm missing is the required kernel , 3.0.1 , I just need a download link to that kernel, can't seem to find any.
Hi,
So I recently got into Android Development and so far , everything is good.
What I'm doing is using munjeni's CM9 ROM as a base for me to get the boot.img and the files in the folder /system/.
I tried to use iPlasm's CM9 ROM but I got some extraction problems , which I'll look into later.
I'm also using the initrd found in Shlund's posts , and the original HD Photon (Froyo 2.2).
I compared the two initrds and found out that the Froyo one was smoother and had lots of unnecessary stuff and that the CM7 one is better , but it may freeze , so I'm going to test both for maximum results.
To-Do:​-Ability to Extract zImage from boot.img Done
-Extract system files Done
-Put System Files into system.ext2 Done
-Use shlund's both kernels and see which one works.
-Create a system.ext2
-Extend Data.ext2's size to allow higher storage on higher SD cards.
If you are willing to help on this project...then please help me with these:
I need an empty system.ext2 in ext3 format (so I can put the system files inside).
Or I need someone to be able to empty the system.ext2 that I have which I got from the Froyo 2.2.
Problems :​Currently I'm facing these problems that may get fixed later:
Cannot delete bin and xbin from system.ext2 , which leads to files to be read when they are not needed.
No empty system.ext2 file present.
Cannot Modify the initrd to increase the space , looking forward to use this code:
When using the kernel from munjeni (extracted) all what happens is G1 logo appearing and nothing else.
Bases :​
zImage from mujeni's CM9 from boot.img
iPlasm's boot.img
initrd from either schlund's CM7.2 or shlund's Froyo 2.2
/system/ from munjeni's CM9
HARET_PHOTON7227.exe from PhotonAndroid Developement
Startup File from schlund's Startup.
All help appreciated
I found a 200mb system.ext2 , however , whenever i put files in it , the next time I mount it I loose everything I put inside , but everything deleted remains deleted. -_-
Glad to see you're trying to do some,
You should not try cm7 kernel with CM9, You're trying to make CM9 SDcard version so forget about cm7 kernel (you may do only for comparing)
please, try the munjeni's boot.img from (update 04.Jun. for rom 24.May.2012) or mine, because the munjeni's rom (24.May.2012) boot.img is older kernel. the new one includes bluetooth fix (NOT Handset Car).
what i see in system.ext2 i don't think you should empty or even use them, it should be writing in command (terminal) that will create those files into EXT2 file.
here is an example: http://forum.xda-developers.com/showthread.php?t=1055923
You can collect more informations in HTC HD2 forums which include SDCard versions,
Have fun,
Will try that , because the kernel from munjeni showed me .T...Mobile and then did nothing. hopefully yours work
I just tried your way iplasm , and guess what , I get the same splash screen G1 TMobile.
any thoughts?
thethiny said:
Will try that , because the kernel from munjeni showed me .T...Mobile and then did nothing. hopefully yours work
I just tried your way iplasm , and guess what , I get the same splash screen G1 TMobile.
any thoughts?
Click to expand...
Click to collapse
Sorry to say that, this htc mini is not my phone, so I'm so limited to work on it. especially going back to windowsmobile for testing sdcard again. :silly:
Let me say, are you still using both these together froyo and merging them with other? don't do that.. this won't work. froyo things with other ROMs won't work!
You should do one ROM for it's settings, don't catch another things, for example froyo or things.
just those files be their,
1- HARET.exe
2- STARTUP.TXT
and begin to do, and choose the only one ROM you want to make it SDCard version,
about splash screen, it means you didn't applied them correctly, because none of these bootscreen include t-mobile,
I remember the cotulla's version was include AT&T splash screen.
iPlasm said:
Sorry to say that, this htc mini is not my phone, so I'm so limited to work on it. especially going back to windowsmobile for testing sdcard again. :silly:
Let me say, are you still using both these together froyo and merging them with other? don't do that.. this won't work. froyo things with other ROMs won't work!
You should do one ROM for it's settings, don't catch another things, for example froyo or things.
just those files be their,
1- HARET.exe
2- STARTUP.TXT
and begin to do, and choose the only one ROM you want to make it SDCard version,
about splash screen, it means you didn't applied them correctly, because none of these bootscreen include t-mobile,
I remember the cotulla's version was include AT&T splash screen.
Click to expand...
Click to collapse
I found the problem , I'm using a new system.ext2 created by me , I put the /system/ files of yours inside , then I took the kernel from your rom , and then I used schlund's initrd (because I compared it to the original initrd and found that the only differences were in :
1-splash screen
2-mounting the sd or mounting the ext/sd
3-order of command execution)
so I found out the Cotulla (the original creator of the init inside the initrd.gz ) has put a G1 .T...Mobile splash screen , and when the kernel is loaded , it is loading it as rom , not as sd boot so it launches the splash screen instead of launching the android bootloader , I'll have a look and see and luckily munjeni will reply to the pm I sent him (he helped me with creating the system.ext2 and the initrd)
thethiny said:
Hi,
may you help me with something?
I have a ramdisk (initrd.gz)
and a kernel (boot.img)
and an zImage (kernel main)
however , I cannot seem to be able to extract the zImage , but I did extract the boot.img and the initrd .
In order for me to make it SD Boot , I should allow SD boot from zImage , but I can't open , do you think you can do that for me?
Click to expand...
Click to collapse
look, zImage is Kernel, you're doing to open Kernel.. zImage isn't an Archive file. so You don't need to edit or open zImage
Boot.img contains RAMDISK & Kernel, RAMDISK=intrd.gz, Kernel=zImage
You will need to extract the Boot.img from CM9, and convert them to initrd.gz and zImage,
iPlasm said:
look, zImage is Kernel, you're doing to open Kernel.. zImage isn't an Archive file. so You don't need to edit or open zImage
Boot.img contains RAMDISK & Kernel, RAMDISK=intrd.gz, Kernel=zImage
You will need to extract the Boot.img from CM9, and convert them to initrd.gz and zImage,
Click to expand...
Click to collapse
ok I already did that , but the zImage extracted from CM7 , doesn't match the zImage from CM7 SD Boot (same ROM , same Dev , diff size).
So I wanna extract the zImage so I can modify the Boot section to SD Boot.
it's not easy to edit kernels, just a Q: have you tried from extracted cm9 two files the kernel & ramdisk and rename them to zimage and initrd.gz to SDCard and see results?
and if you really want to modify zimage (needs unpacking and repack), click here: http://lmgtfy.com/?q=Modify+zImage+Android
iPlasm said:
it's not easy to edit kernels, just a Q: have you tried from extracted cm9 two files the kernel & ramdisk and rename them to zimage and initrd.gz to SDCard and see results?
and if you really want to modify zimage (needs unpacking and repack), click here: http://lmgtfy.com/?q=Modify+zImage+Android
Click to expand...
Click to collapse
Yes I tried , also I'm a Windows User , so I use Cygwin , and none of the commands above worked! I tried using Ubunty 12 and I get error at line 12

Create a Boot.Img

Having all sorts of difficulty creating a boot.img from a zImage I have....
I compiled a custom kernel myself with my own tweaks but having all sorts of trouble creating a good boot.img
Ive taken apart a boot img from stock Maximus (i am on new firmware, etc), and when I put it back together, trying a few tools and different, it never seems to work for me... However, I always seem to be able to fastboot boot zImage, to get a working boot (but as we all know that is temporary).
Is there a way to simply "catch" the boot.img that fastboot creates and temporarily flashes to your device? Is there a temp folder fastboot works with or something that I can access?
Cheers,
AK
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
seems relevant
Thx for the info... Also solved my problem... Really had to specify the ram disk address correctly for the type of build... Dang ramdisk
Sent from my HTC One S using Tapatalk now Free

[Q] Extracting LG E400 stock files

Hello everyone,
I'm new to low-level Android hacking, so I guess I need some help.
What I am trying to do is getting the stock files from an LG E400, and modify 1-2 things, repack, flash, and see if it works for me.
My first step:
1) Rooting the LG E400
2) Flash CWM Recovery
3) Create a backup
4) Get boot.img from the backup.
So I have a boot.img (which I think is stock, because rooting does not modify the contents of the boot image as far as I know.)
After that, I followed this tutorial to extract the kernel and the ramdisk.
I used a hex editor for this. I saved the kernel and the ramdisk as separate files, and I tried to gunzip the ramdisk. That seemed to work. However, after that, when I try to run cpio on the file, I get a lot of "Malformed number" errors, and only two empty folders are extracted.
And that is where I'm stuck at.
Are the LG phone boot.img-s encrypted somehow? Am I doing something wrong?
If anyone can help me, I would be really grateful.
Thanks in advance

Rom Customisation & Modification (PLEASE HELP!)

Hi Guys
I need some basic help/understanding about Android ROM modification.
In particular for an Android MX TV Box - but the questions is generic and applies to any ROM I guess.
The Rom im flashing has the following files (and works perfectly):
factory_update_param.aml
hd18d_mx4.zip
recovery.img
I am able to successfully restore my box with this image (so I know that the image is working fine).
Within the hd18d_mx4.zip there is:
Directotories: data, META-INF, recovery, system
files: boot.img, bootloaded.img, logo.img
I tried to do a very basic step of deleting a single system.apk file from the system/app folder (no other changes) and I am unable to flash this firmware.
Any ides - what am i doing wrong?? It seems like i cant make any modifications to the zip file or there are problems.
I tried using dsixda Rom kitchen, and even if put rom in working directory, and then immediately
Please help - this is driving me mad!! Aaarrghghg

[Modify BOOT LOGO!] Samsung Galaxy S6

Welcome. Today I am going to teach you how to modify your android boot logo!
Modify at your own risk! I strongly recommend that you do not try this. But if your going to attempt this, make a BACKUP! I will explain the backup process down the page!
This method has been tested on the Galaxy S6. I RECOMMEND you do NOT attempt this method on any other smartphone other than the S6!
I own a Samsung Galaxy S6 [SDK21 ARM64] and my carrier is Straighttalk. This method might possibly work with the newer Android smartphones. In other words, attempting to do my method will probably not work with androids running 4.4.2 or lower. I will first explain why.
According to what I researched, there is a file in the root directory of the Android system that contains a file called "initlogo.rle". That is your boot logo. Older Android phones had this. The .rle is a bitmap extension and cannot be edited with Android. Actually, let me rephrase that, the .rle COULD MAYBE possibly be edited if you were to download the right tools off of the Play Store but computers can identify .rle as a bitmap very easily and can be opened. Windows computers can open .rle according to what I researched.
The initlogo.rle is also part of the boot.img. The boot.img contains the kernel and the boot files (like init.rc), that are necessary for the phone to boot up. Modifying your boot.img requires a computer. You can't just replace the initlogo.rle with another one. To make changes to a boot.img, you need to unpack the ramdisk, replace or modify the files, repack, and THEN flash the modified boot.img to make the changes.
Newer Android smartphones don't have initlogo.rle. Or at least MINE doesn't. Instead, I had to search for my boot logo which took my quite a while. After searching deep into the android system and messing around with the files, I came accross PARAM.
If you were to go in the /dev/block/platform directory, you would come accross a file called PARAM. Mine was in the directory /dev/block/platform/15577000.ufs/by-name. Inside that directory is basically the whole system. You will find files like BOOT, EFS, OTA and all that. You will also notice that all those files look empty. They all show 0.00B. I don't know exactly why that is, but they aren't really empty files.
My official boot logo was in the file "PARAM". What I did was copied it to my internal directory and attempted to extract it. After trying different extensions, I founded out that .tar is the correct extension. So to extract it, I renamed "PARAM", to "PARAM.tar". After doing that, you will be able to actually extracted it and be left with files with .jpg. Basically pictures inside it. I used root browser. :good:
Inside, you should find "logo.jpg". And whatta ya know! It's your boot logo!
I used PicArt to create a custom boot logo. It is a really great app! You can get it off the Play Store. Then I renamed it to logo.jpg and replaced the original logo.jpg with my newer one. Make sure it is named "logo.jpg" or there will be errors!
Now the last step is to archive the files through .tar format. I used root browser to do that. To correctly archive the files, multi-select the .jpg files. In other words, DON'T SELECT THE "PARAM" FOLDER!!!
When archiving the files, use LZMA compression option along with tar.(Look for that with root browser). This will not compress the files as much which will reduce the risk of errors.
Once it's archived, rename the new archive file to just "PARAM".
LAST STEP! Before overwriting your PARAM, copy your modified PARAM into the /system folder and set the correct attributes (PERMISSIONS) to -rwxrwxrwx. Now you are ready. Copy "PARAM" to the same director where you originally got your unmodified PARAM file. It will ask you if you want to overwrite. Say yes.
I was now introduced with a different boot logo. My phone never got bricked during the process. However, with Android, ANYTHING can happen, so I will give you some advice. If you have a custom recovery, you can easily restore PARAM. Make a copy of your original PARAM and put it in your internal directory. If something ever goes wrong, you can use the file manager (like with TeamWin) and replace the currupt PARAM with your backup PARAM. Then set the permissions to -rwxrwxrwx or 0777
I strongly recommend that you do not try this. Yes, I took the risk and was able to safely change my boot logo. However, not all Android devices are the same so be very careful if you are attempting to do this one an Android device OTHER than the Galaxy S6.
Leave comments if you have any questions!

Categories

Resources