Hi guys,
Can anyone explain me how to change the boot image contained in initrd.gz?
Thank you vary much...
erestor6 said:
Hi guys,
Can anyone explain me how to change the boot image contained in initrd.gz?
Thank you vary much...
Click to expand...
Click to collapse
+1 for this, I'm trying to do the exact same thing! Check out this post to create the image in the correct format:
http://forum.xda-developers.com/showthread.php?t=537515
I created a logo.rle image from a 480x800 image (both attached) but don't know how to overwrite the one inside my initrd.gz file. I tried using 7zip but it seems that it is write-protected. If anyone knows how to do this, it would be much appreciated. I've changed all of the other boot screens but just want to change the green HTC logo if I can.
Thanks in advance
gargon01 said:
+1 for this, I'm trying to do the exact same thing! Check out this post to create the image in the correct format:
http://forum.xda-developers.com/showthread.php?t=537515
I created a logo.rle image from a 480x800 image (both attached) but don't know how to overwrite the one inside my initrd.gz file. I tried using 7zip but it seems that it is write-protected. If anyone knows how to do this, it would be much appreciated. I've changed all of the other boot screens but just want to change the green HTC logo if I can.
Thanks in advance
Click to expand...
Click to collapse
thank you very much..but I was arrived at that poit.
In second of me the normal procedure is wrong, there wil be some steps that will be immediate and that we don't know.
help please...
Yeah - now it's working on my HD2!
This method is applicable for firmware, which include the file initrd.gz in zip archive. Many firmwares are distributed as img files, and I have not tried to extract initrd.gz from there, though perhaps it is possible.
The file logo.rle is not the usual rle and programs for creating or convert rle can not create it, also You can not view logo.rle by any usual rle-viewer. I took logo.rle from another firmware, because I could not do it (it can be reached by 7zip from initrd.gz; or copied from root directory after boot by root explorer, if firmware is already installed).
For this process Linux on a PC required - terminal emulator on phone doesn't work correctly! I used Chaox Live CD because I use Windows on my PC.
I put the file initrd.gz (from my firmware) in a folder and the new logo.rle file near this folder. In a Linux terminal I entered to that folder (by command cd) and ran the commands:
gunzip initrd.gz
cpio -i < initrd
cp -f ../logo.rle
rm initrd
find . | cpio -o -H newc | gzip > ../initrd.gz
Than I change the original initrd.gz in the firmware to the one I created.
ps: Not necessarily replace the entire firmware to replace the file initrd.gz. You can replace only a boot partition. To do this, take the original files boot/zImage & META-INF/com/google/android/updater-script from the firmware and add Your own boot/initrd.gz & META-INF/com/google/android/updater-script. Now You can zip it and place the archive to the root of the sdcard. Than enter to MAGLDR-ADrecovery-install zip from sdcard
Archive must contain this 4 files with pathnames:
boot/initrd.gz
boot/zImage
META-INF/com/google/android/update-binary
META-INF/com/google/android/updater-script
file updater-script must containe this commands:
mount("MTD", "boot", "/boot");
package_extract_dir("boot", "/boot");
unmount("/boot");
In my case I use this firmware and logo.rle file from this firmware.
Hope it's will be helpfull!
I'm sorry - english is not my language.
Awesome work, vovchok!
However after reading your sequence of 'nix commands multiple times I have determined that the little white guy doesn't look bad at all.
My momma's boy ain't touching that.
I found this Thread . After reading, I landed here. Now this is where I just got stuck.
I'm using Hyperdroid and there is no initrd.gz. There's just a "boot.img" with ~3mb.
I still would like to change my second boot screen to fit in the boot sequence.
(I already mastered to create my own 1st bootscreen, flashed it, and changed my boot animation, but as said, I got stuck here finding a guide how to change the second boot screen.)
Any ideas?
smeee_again said:
I found this Thread . After reading, I landed here. Now this is where I just got stuck.
I'm using Hyperdroid and there is no initrd.gz. There's just a "boot.img" with ~3mb.
I still would like to change my second boot screen to fit in the boot sequence.
(I already mastered to create my own 1st bootscreen, flashed it, and changed my boot animation, but as said, I got stuck here finding a guide how to change the second boot screen.)
Any ideas?
Click to expand...
Click to collapse
Yeah - it's a lot more complicated to extract the initrd.gz file from a boot.img than it is from a ROM with a boot partition. I spent many hours trying to do it, and failed.
Currently just building a ROM with an edited initrd.gz file inside it. I know that the logo.rle file in the initrd.gz file is the correct image that I want (the stock white HTC screen) but I just don't know if I'm building the ROM with the correct options (using the Android Kitchen).
I'll report back with results, because I tried to do this a couple of months ago and failed, since the ROM required me to flash a separate kernel zip after the main ROM, which replaced initrd.gz, and I couldn't edit the initrd.gz file using the Android Kitchen because it was in a boot.img.
EDIT: Okay, just spent about 2 hours trying to change the damn image, having replaced initrd.gz with what was definitely the right one, and I boot it up and see the black HTC logo.
Alright, I've actually successfully modified the logo.rle file from inside a boot.img, rebuilt the ROM with it, and reflashed it - the image is now in place, and the ROM works great.
So, the steps:
Use dsixda's Android Kitchen to unpack the ROM into a working folder.
Locate the boot.img and copy it to a separate folder.
Follow this tutorial to unpack the boot.img file, then locate the logo.rle inside there (there's no initrd.gz).
Use the tools found here to convert the image that you want to use to an RLE file, and then overwrite the existing RLE file in your working directory where you unpacked the boot.img.
Continuing the tutorial found in the link from step 3, repack your boot.img with the edited logo.rle now inside it.
Head back to your working folder in the Android Kitchen, where the ROM that you want to modify has been unpacked. Replace the boot.img there with the one that you just modified.
Choose option 99 in the kitchen to build a ROM from the working folder, and follow the steps.
Now flash your ROM in CWM! I flashed straight over an existing installation instead of wiping etc., although it did still get rid of all my settings
Hopefully this is helpful to someone. I might post it in a new thread - since I spent so long trying to find this, and finally figured out how to do it for myself.
This helped a lot. Thanks.
ryan1990 said:
This helped a lot. Thanks.
Click to expand...
Click to collapse
No worries. If anyone ever gets stuck or doesn't know what I did for some bit, let me know and I'll see if I can help, because it sucked when I was trying to figure this out for ages and nobody else seemed to know how to do it either.
vovchok said:
Yeah - now it's working on my HD2!
gunzip initrd.gz
cpio -i < initrd
cp -f ../logo.rle
rm initrd
find . | cpio -o -H newc | gzip > ../initrd.gz
Hope it's will be helpfull!
I'm sorry - english is not my language.
Click to expand...
Click to collapse
search for long time, now work fine.
THX bro.
vovchok said:
Yeah - now it's working on my HD2!
This method is applicable for firmware, which include the file initrd.gz in zip archive. Many firmwares are distributed as img files, and I have not tried to extract initrd.gz from there, though perhaps it is possible.
The file logo.rle is not the usual rle and programs for creating or convert rle can not create it, also You can not view logo.rle by any usual rle-viewer. I took logo.rle from another firmware, because I could not do it (it can be reached by 7zip from initrd.gz; or copied from root directory after boot by root explorer, if firmware is already installed).
For this process Linux on a PC required - terminal emulator on phone doesn't work correctly! I used Chaox Live CD because I use Windows on my PC.
I put the file initrd.gz (from my firmware) in a folder and the new logo.rle file near this folder. In a Linux terminal I entered to that folder (by command cd) and ran the commands:
gunzip initrd.gz
cpio -i < initrd
cp -f ../logo.rle
rm initrd
find . | cpio -o -H newc | gzip > ../initrd.gz
Than I change the original initrd.gz in the firmware to the one I created.
ps: Not necessarily replace the entire firmware to replace the file initrd.gz. You can replace only a boot partition. To do this, take the original files boot/zImage & META-INF/com/google/android/updater-script from the firmware and add Your own boot/initrd.gz & META-INF/com/google/android/updater-script. Now You can zip it and place the archive to the root of the sdcard. Than enter to MAGLDR-ADrecovery-install zip from sdcard
Archive must contain this 4 files with pathnames:
boot/initrd.gz
boot/zImage
META-INF/com/google/android/update-binary
META-INF/com/google/android/updater-script
file updater-script must containe this commands:
mount("MTD", "boot", "/boot");
package_extract_dir("boot", "/boot");
unmount("/boot");
In my case I use this firmware and logo.rle file from this firmware.
Hope it's will be helpfull!
I'm sorry - english is not my language.
Click to expand...
Click to collapse
Thz for your help^^
The rom i am using hvn't boot.img.
but i can find initrd.gz and i hv change the logo.rle.
the probllem is how to edit the updater-script only update the initrd.gz?
and is it possible to random boot a few of .rle files ?
Please, make initrd.gz for CM9ight
Oops, not the right thread.
Related
Howdy all,
Just wondering, how are the system.img files made? I have read that if it's a YAFFS image file, that the maximum filesize cannot exceed 128MB. However, I've seen on some NAND HD2 Android builds, the system.img filesize is >128MB.
My question is, what method are you guys using for making the NAND system.img files to flash within MAGLDR? (ie. is it like a ZIP archive with a .img extension on it)
I'm currently working on a remix of a ROM that I use (a hint is in my Sig), and I know that the update.zip method that was used on "true-Android" devices to change ROMs doesn't apply to our MAGLDR method now.
Cheers and I'm sure you'll see another ROM for the HD2 in the coming weeks!
IcedCube.
IcedCube said:
Howdy all,
Just wondering, how are the system.img files made? I have read that if it's a YAFFS image file, that the maximum filesize cannot exceed 128MB. However, I've seen on some NAND HD2 Android builds, the system.img filesize is >128MB.
My question is, what method are you guys using for making the NAND system.img files to flash within MAGLDR? (ie. is it like a ZIP archive with a .img extension on it)
I'm currently working on a remix of a ROM that I use (a hint is in my Sig), and I know that the update.zip method that was used on "true-Android" devices to change ROMs doesn't apply to our MAGLDR method now.
Cheers and I'm sure you'll see another ROM for the HD2 in the coming weeks!
IcedCube.
Click to expand...
Click to collapse
The system.img is a yaffs2image. Google 'compiled windows unyaffs' use that program to take a peak inside the .img. When you're completely ready to make your own .img your gonna need a linux distro or cygwin w/mkyaff2image compiled. However I recomend compiling the mkfs.yaffs2 command if you are using linux. Alternatively you can place the /system/ directory you are trying to make an image on your SD and run that command in the terminal emulator in Android. It should look like this #mkyaffs2image /sdcard/system/ System.img
Hope that helps.
KillaHurtz said:
The system.img is a yaffs2image. Google 'compiled windows unyaffs' use that program to take a peak inside the .img.
Click to expand...
Click to collapse
Does this give you write abilities so that files can be changed out pre-flash?
dharvey4651 said:
Does this give you write abilities so that files can be changed out pre-flash?
Click to expand...
Click to collapse
I think you have to dump them to a folder, then you can change what you want. Then do the yaffs2 cmd and it will package it back up to .img for flashing...
Chris
noellenchris said:
I think you have to dump them to a folder, then you can change what you want. Then do the yaffs2 cmd and it will package it back up to .img for flashing...
Chris
Click to expand...
Click to collapse
I think that a tutorial is in order. Someone who knows how to extract and replace files in a system.img needs to write a short tutorial on how to do it. - A simple step by step on how to decompile a system.img and re-compile it.
I for one would be extremely grateful because I finally worked out a perfect MMS patch and I'd like to be able to easily modify the builds pre-flash.
dharvey4651 said:
I think that a tutorial is in order. Someone who knows how to extract and replace files in a system.img needs to write a short tutorial on how to do it.
I for one would be extremely grateful because I finally worked out a perfect MMS patch and I'd like to be able to easily modify the builds pre-flash.
Click to expand...
Click to collapse
I have been trying to do that all night. I can unpack them but haven't got around to repacking them. For now all I do is install the build and push the patched file that I have and do a AD hardrest in MAGLDR. MMS 300-1024k and all TMO US app works.
dharvey4651 said:
I think that a tutorial is in order. Someone who knows how to extract and replace files in a system.img needs to write a short tutorial on how to do it. - A simple step by step on how to decompile a system.img and re-compile it.
I for one would be extremely grateful because I finally worked out a perfect MMS patch and I'd like to be able to easily modify the builds pre-flash.
Click to expand...
Click to collapse
yeah, it would be very nice if smb can write some tutorial on modifying system.img files
i have been trying to figure this out too!
IcedCube said:
This is IcedCube, the Developer of GingerHD2, a Android 2.3 ROM for your HD2.
Click to expand...
Click to collapse
Thought I should point out that you could really confuse things by using that name...
http://forum.xda-developers.com/showthread.php?t=871387
That's not actually a Gingerbread build - it's just themed to look like one, but still got the same name
hnamanh said:
I have been trying to do that all night. I can unpack them but haven't got around to repacking them. For now all I do is install the build and push the patched file that I have and do a AD hardrest in MAGLDR. MMS 300-1024k and all TMO US app works.
Click to expand...
Click to collapse
Another option is to connect to ADB or Android Commander before going through the initial setup(when it asks you to choose your language) and change the files then - use the PC to reboot the phone, not the phone's built-in reboot. This should take you right back to the setup screen where this time, should show United States localization.
Still a bit too much work. I'd like to be able to patch the build, flash it, and be good to go.
found this but too educated for me
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
sorry i think this one is normal data img.not sure.
well i did say it was too educated for me
Turorial
KillaHurtz said:
The system.img is a yaffs2image. Google 'compiled windows unyaffs' use that program to take a peak inside the .img. When you're completely ready to make your own .img your gonna need a linux distro or cygwin w/mkyaff2image compiled. However I recomend compiling the mkfs.yaffs2 command if you are using linux. Alternatively you can place the /system/ directory you are trying to make an image on your SD and run that command in the terminal emulator in Android. It should look like this #mkyaffs2image /sdcard/system/ System.img
Hope that helps.
Click to expand...
Click to collapse
Windows
-----------------------------------------------------------------------------
Ok, let's start again. If you are using windows, google the said phrase above and you will find the precompiled utility 'unyaffs'.
Place the System.img you want to extract in a new directory with unyaffs.exe & drag the .img onto unyaffs. A command window will open and start extracting the files in the image to that same folder. You can now explore & edit/pull whatever you need to get things going. Once you have it the way you want copt it to your SD/root/ & make a folder for it with an obvious name like "Project" or "Test". Now to get it back into a bootable .img open Terminal Emulator in Android & enter the following
#mkyaffs2image /sdcard/NAMEofFOLDERuCHOSE/ System.img
**alternatively you can do this in windows itself if u have the utility compiled under cygwin or simular.
Linux
-----------------------------------------------------------------------------
Ok, you will need the unyaffs & mkfs.yaffs2 utilities compiled and working 1st off.
mkyaffs2image works to make the image however it fails upon flash with DFT Android Flasher. So I recomend mkfs.yaffs2 & have included it, you will need to place it in /usr/sbin/. If you have trouble copying it open a terminal and run "gksudo nautilus" then copy to the above mentioned directory.
**Now that those utilities are working let's get to work.
open a terminal and run 'unyaffs /home/yourusername/Desktop/targetdirectory/targetimage.img
copy/edit/pull the files you want. When your ready to build the image you are happy with open a terminal and run 'mkfs.yaffs2 /home/yourusername/Desktop/targetdirectory/ System.img'
Now your ready to flash !
System.img & Boot.img Contents
============================================================
System.img contains the entire root/system/ directory in Android
System/
app
bin
etc
fonts
framework
lib
lost+found
media
usr
xbin
build.prop
dmesg.txt
Boot.img contains
Boot/
initrd.gz
zImage
lost+found
============================================================
Hope that helps guys, It's my first tut on XDA
**EDIT: I included an archive for windows users that has unyaffs2.exe & cygwin1.dll
The Linux archive contains mkfs.yaffs2.x86, once moved to /usr/sbin/ rename to mkfs.yaffs2
The process works exactly the same for Boot.img
you need linux and run command by terminal
put them in /bin
http://www23.zippyshare.com/v/13814384/file.html
then you can yaffs or unyaffs
example
unyaffs /home/rafpigna/folder_with_img_you_wann_unpack/system.img
or
mkyaffs2image /home/rafpigna/folder_with_stuff_you_wanna_pack/ system.img
strange thing...when I open with unyaffs and then close with mkfs.yaffs2 or mkyaffs2image I get init: untracked pid 250 exited (where 250 varies) in a loop :S
some light for me?
michyprima said:
strange thing...when I open with unyaffs and then close with mkfs.yaffs2 or mkyaffs2image I get init: untracked pid 250 exited (where 250 varies) in a loop :S
some light for me?
Click to expand...
Click to collapse
What platform are you using? Have u tried copying your target directory to your sdcard and running the command in android's terminal?
Reguards
KillaHurtz said:
What platform are you using? Have u tried copying your target directory to your sdcard and running the command in android's terminal?
Reguards
Click to expand...
Click to collapse
linux x64.
btw no I didn't, because I want to make a rom (I'm not new to android development but that makes me think that I'm probably stupid )
Everything I do doesn't work.
Already tried something like:
- opened a premade working rom, exchanged just app and framework: no way
- exchanged everything but not bin/xbin/lib: no way
- exchanged just what was different between a stock and a premade leo rom: still no way
mmmh...
yaffs2
There is actually a way to modify files in a yaffs2 image but I've not done it my self yet. I'm 100% sure it's possible cuz everything is possible.... under Linux of course.
You need:
Linux, compiling skills, mounting skills, etc.
Basically for any other filesystems you can mount them as loop devices but not yaffs2. For yaffs2 you actually need a virtual mtd block device. once you have the mtd device you can mount the yaffs image on it.
For details google for: mounting yaffs image
and focus on virtual mtd block device.
michyprima said:
linux x64.
btw no I didn't, because I want to make a rom (I'm not new to android development but that makes me think that I'm probably stupid )
Everything I do doesn't work.
Already tried something like:
- opened a premade working rom, exchanged just app and framework: no way
- exchanged everything but not bin/xbin/lib: no way
- exchanged just what was different between a stock and a premade leo rom: still no way
mmmh...
Click to expand...
Click to collapse
http://www.miui-dev.com/forums/showthread.php?481-Howto-Make-your-own-Android-Build-for-the-HD2
This has a list of files to be pulled. Hope this helps. BTW michy I need help with a kernel, know anyone?
I'm Having a problem using on Linix, when i use the unyaffs trough the terminal it extracts the rom but not the squashed contents, which in the main apps and frame work are at on thoughs roms. I do get a file that says squashed but empty. I tried on cyanogens 6.1 rom and everything extracted fine.but that rom does not have a squashed folder, am i doing something wrong?
1. If i unyaffs System.img and manually remove some programs/aplications then create System.img with yaffs, does it programs will appear in apps and does my rom will be caused a more memory for other programs for installation?
2. Is it possible to unyaffs Boot.img then replace zimage with newest kernel like MDJ or hastarin then yaffs to new Boot.img, After that i suppose then this Android OS will be on new kernel???
3. And... If i remove zimage and initrd.gz from Boot.img, create new Boot.img without these two files and these two files copy to SD card and define that two files in flash.cfg for find on SD. Does it works?
Sorry for bad English.
*** I TAKE NO CREDIT. I JUST MADE A GUIDE TO HELP YOU***
A STEP BY STEP TUTORIAL :
I find many people struggling with unpacking a boot image and expecially repacking it. So here is a simple guide to unpack and repack the boot image.
>You need some tools so make sure you download all these.
List : (links available at bottom of page
split_bootimg.pl
repack_bootimg.pl
dsixda kitchen (you need some files from here)
Not to mention, a linux based system
> First you need to make some correction to repack_bootimg file(if downloaded from other source) . open it using gedit or some editor.
> check third line from bottom which is starting with system...If it is ending with $ARGV[2] then make this change
Add --base 0x19200000 and then close with " .
This now should look like
$ARGV[2] --base 0x19200000");
> Save it and exit. Now place boot.img and the two files in a folder(create new one. Don't mess it up)
> Now go to dsixda kitchen folder >tools >mkboot and copy all the files to your working directory
> Now you have mkbootfs.c and mkbootimg.c files along with needed header files. You have to make them executable. For that, run this command
gcc -o mkbootfs mkbootfs.c
change the permissions
chmod a+x ....(path)/mkbootfs
Now do the same for mkbootimg.c
gcc -o mkbootimg mkbootimg.c
change the permissions
chmod a+x ....(path)/mkbootimg
Now you are ready to go. Just navigate to directory in command prompt and type
./split_bootimg.pl boot.img
(or)
perl split_bootimg.pl boot.img
you will get some files. one is kernel and other is ramdisk. extract ramdisk.gz. Now again extract ramdisk(cpio file) . Make necessary changes.
To repack, use this command
perl repack-bootimg.pl <kernel_name> ramdisk_directory_name boot.img
( you need mkbootimg for this to work)
Bingo you have a boot.img which is ready to test.
LINKS :
Split_bootimg.pl : http://www.mediafire.com/?i4omee9loaxawtk
Repack_bootimg.pl : http://www.mediafire.com/?sthhkkkkctdvb3d
dsixda kitchen : http://forum.xda-developers.com/showthread.php?t=633246
IS YOUR dsixda kitchen FIX FOR MOTO ?
duansindo said:
IS YOUR dsixda kitchen FIX FOR MOTO ?
Click to expand...
Click to collapse
If you are talking about using the kitchen for motorola, it supports only few devices.
Motorola Atrix (unconfirmed)
Motorola CLIQ / CLIQ XT
Motorola Droid (unconfirmed)
Motorola Milestone (unconfirmed) - you may need to remove the boot.img before building
here is moto list...If you are talking about repacking n stuff, it supports any vendor.
godson32
can sum1 plz help me.... i have evo root 2.2 i was trying to nandriod backup in restore . once i got done doing both i rebooted sys. all i get is the while htc evo screen oh ima noob, plz sum one help, oh im running clockworkmod recovery v2.6.0.1
godson32 said:
godson32
can sum1 plz help me.... i have evo root 2.2 i was trying to nandriod backup in restore . once i got done doing both i rebooted sys. all i get is the while htc evo screen oh ima noob, plz sum one help, oh im running clockworkmod recovery v2.6.0.1
Click to expand...
Click to collapse
Try the evo forum.
This is how I made ROM, I'll try to write the steps as simple as I can. For advanced users only!
Update 22/08/11:
Revised packaging steps.
Update 13/08/11:
Removed unwanted method for ROM cooking.
Update 04/08/11:
Modified extract and repack ROM guide and added extracting system.rfs guide.
Things you need:
Base firmware
Archiver software (7zip recommended)
Any Linux environment to build ROM or Cygwin
APK Manager to optimize and decompile *.apk files
MagicISO (Optional) if you want to extract system.rfs
And the last thing is... You need enough experience in android world
So, here is the steps to cook a ROM:
Flash your phone with your desired base firmware
Make required modifications
Pull system.rfs from your phone by running this command on adb shell or Terminal Emulator:
Code:
dd if=/dev/stl12 of=/sdcard/system.rfs
Extract any *.tar.md5 files from your base firmware to your working folder with 7zip
Replace the current system.rfs with your modified one
EDIT: Pack your ROM by running this code via terminal or just pack it with 7zip/WinRAR as *.tar
Code:
tar -H ustar -c * >> ROMNAME.tar
change ROMNAME to your desired, well, ROM name.
Here is (yet) useful guide to modify your ROM.
Extract system files on system.rfs to make modding easier:
Extract PDA file (*.tar.md5) files with 7zip
Open system.rfs with MagicISO
To extract it, just drag and drop
NOTE: Never edit your ROM with MagicISO because the file permissions will be ignored, use MagicISO only for extracting files from system.rfs
Deodex, and Zipalign (optimize) your ROM apk files:
Ready to use deodex + root for KPN: http://forum.xda-developers.com/showthread.php?t=1196230
Ready to use deodex + root for KPH and other firmware: http://forum.xda-developers.com/showthread.php?t=1118048
Open APK Manager
To zipalign your apk files, in apk manager folder /place-apk-here-to-batch-optimize put your:
framework-res.apk, twframework-res.apk and all system apk
but not these:
AxT9IME, Calculator, Camera, Email, MMS, Phone, Screen Capture, Settings, Swype, Thinkdroid, Voice search
Choose Choose option 15
Then choose both (zp)
Let it run and done.
Now put back the apk files where they belong in the ROM.
How to put these apk files to my ROM? Copy these files to appropriate locations, such as /system/app to your ROM's /system/app, and etc.
Another handy modification guide:
Unpack and repack boot.img - http://forum.xda-developers.com/showthread.php?t=1173427
Convert firmware filesystem to ext4 - http://forum.xda-developers.com/showthread.php?t=1202049
Overscroll glow for any firmware - http://forum.xda-developers.com/showthread.php?t=1215933"
Give thanks to all dev who made that possible!
If you have more guides to put here, please PM me.
Am I pertamax?
hehe..just kidding.
Nice Info....great share.
I would want the Fla.sh Rom :'(
Thats a gr8 share...Thank you...)
saiftheboss7 said:
I would want the Fla.sh Rom :'(
Click to expand...
Click to collapse
sorry... once again, I'm sorry, I can't continue my ROM
Helpful thread man!
Thanks!
Great job taking your time to make this! Unfortunately, i dont even know the basics but now I know where to check when I do
fla.sh said:
sorry... once again, I'm sorry, I can't continue my ROM
Click to expand...
Click to collapse
Hey!
THX man, nice thread. Very useful!
Just PM to MOD, that they close you previous thread, a bout fla.sh.ROM. Or ppl just waiting it and asking.
CHEERS!
i think the most troublesome problem i encounter is to repack system.rfs. yes it can be mounted in magiciso, but howto repack/compile it back?
an0nym0us_ said:
i think the most troublesome problem i encounter is to repack system.rfs. yes it can be mounted in magiciso, but howto repack/compile it back?
Click to expand...
Click to collapse
Just save it.
didnt work when i just save it. my device got bootloop
an0nym0us_ said:
didnt work when i just save it. my device got bootloop
Click to expand...
Click to collapse
What modification you've added to your ROM? Maybe that modification causing the problem...
fla.sh said:
What modification you've added to your ROM? Maybe that modification causing the problem...
Click to expand...
Click to collapse
As Linux, MagicISO read RFS image as a FAT filesystem. File permissions can not be maintained. A better way but need linux:
1. Mount system.rfs as FAT and mount it to /tmp/rfs
2. Make ext4 image, and mount it to /tmp/system
3. Copy /tmp/rfs contents to /tmp/system
4. Make modification inside /tmp/system
5. Fix file permissions inside /tmp/system
6. Umount both image
7. Make ODIN flashable image, contains system.rfs (now in ext4 format) and CF-Root-S5830 boot and recovery image (for ext4 support)
8. Boot to Windows and flash your new firmware using ODIN.
ketut.kumajaya said:
As Linux, MagicISO read RFS image as a FAT filesystem. File permissions can not be maintained. A better way but need linux:
1. Mount system.rfs as FAT and mount it to /tmp/rfs
2. Make ext4 image, and mount it to /tmp/system
3. Copy /tmp/rfs contents to /tmp/system
4. Make modification inside /tmp/system
5. Fix file permissions inside /tmp/system
6. Umount both image
7. Make ODIN flashable image, contains system.rfs (now in ext4 format) and CF-Root-S5830 boot and recovery image (for ext4 support)
8. Boot to Windows and flash your new firmware using ODIN.
Click to expand...
Click to collapse
I use this command to mount rfs:
Code:
mount -o loop system.rfs /some_dir
Can you share us the command?
now thats really informative. thanks
ROM unpacking and repacking gude has been corrected. Tested by me. If you have any problems, just ask here.
Thanks.
I think you should add the date of update in the title, so that everyone can know about the update...
BTW thanks for this amazing guide...
Love it!!!
After making changes to system.rfs, how to save it as .rfs again?
adiles said:
After making changes to system.rfs, how to save it as .rfs again?
Click to expand...
Click to collapse
Please take look at the first page, it's updated, you know?
After I created md5 file and selected it in odin, it says "invalid image type" and "invalid model binary". How to solve that? After that I continued, skipped these errors and flashed, my phone stopped at boot screen with text "Galaxy ACE....". Plz help me
Hi everyone.
I'm trying to increase data partition storage by using ph03n!x walkthru on Paranoid Android 1.992 and 2.0. I'm stuck at extracting boot.img in Working folder. The rom.zip itself don't have boot.img or boot folder so after extracting PA rom in dsixda kitchen i copied boot.img from Nandroid backup on SD. But while im trying to extract that boot.img there's an error
Code:
Working folder found
Android 'magic' header not found at start of boot.img
Cheching if it exists elsewhere ...
Warning: Android header not found in boot.img (unsupported format)
Error: kernel offset (page size) is 0
Press Enter to continue
So i took recovery.img from nandroid backup, renamed it to boot.img and extracting went fine, but there was some problems: could not find init.htcleo.rc file and "on fs" lines in init.rc file
Any suggestions how to do it? I think that real init.rc is placet in boot.img (not recovery.img), but how to extract it?
Do you have a working folder setup? If you do, then forget about the boot.img, just place the 'boot' directory from the ROM's zip (under /kernel/). If you do not have a Working folder setup, then follow my instructions to create a temporary ROM zip with the required folders - meta-inf, system and boot.
ph03n!x said:
just place the 'boot' directory from the ROM's zip (under /kernel/)
Click to expand...
Click to collapse
Thanks a lot ph03n!x. It worked And also thanks for this great mod (Initrd.gz was great, now its time for this new method )
I've updated the boot.img for paxb build 504 with TWRP to replace CWM. Some were asking how to do this.
Always keep a backup of a file known as working. If your device doesn't boot after flashing a modified file, just reflash that backup.
To perform this mod on your own follow these steps:
1. Download and unpack the Android Image Kitchen
2. Extract the boot.img from the downloaded ROM to the kitchen directory
3. Unpack the image:
Code:
unpackimg.bat boot_cwm_pabx_504.img
Output:
Code:
Android Image Kitchen - UnpackImg Script by osm0sis @ xda-developers
Supplied image: boot_cwm_pabx_504.img
Removing old work folders and files . . .
Setting up work folders . . .
Splitting image to "/split_img/" . . .
BOARD_KERNEL_CMDLINE androidboot.hardware=sony user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M
BOARD_KERNEL_BASE 80200000
BOARD_NAME
BOARD_PAGE_SIZE 2048
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 02000000
BOARD_TAGS_OFFSET 00000100
Unpacking ramdisk to "/ramdisk/" . . .
Compression used: gzip
9694 blocks
Done!
This process will overwrite previously extracted contents!!!
4. Create a directory for the original image content, e.g. "boot_cwm_pabx_504" and COPY the created directories "ramdisk" and "split_img" into it. This ensures you can recreate it if necessary or access its original contents
5. Repeat step 4 for a downloaded TWRP (or any other recovery) image, e.g. "openrecovery-twrp-2.8.0.1-yuga.img".
6. Locate the "*-ramdisk.cpio.gz" file in the dirs from step 5, most likely in "split_img".
7. Ensure the "ramdisk" and "split_img" directories in the kitchen root dir are those from the image you want to modify (i.e. copy back from the folder created in step 4. Then remove the "*.cpio" from the "ramdisk\recovery" directory
8. Extract the TWRP "*.cpio" file from the "*-ramdisk.cpio.gz" in step 6 to "ramdisk\recovery" and rename it to "ramdisk-recovery.cpio"
9. rebuilt the image with the updated content:
Code:
repackimg.bat
Output:
Code:
Android Image Kitchen - RepackImg Script
by osm0sis @ xda-developers
Packing ramdisk . . .
Using compression: gzip
Getting build information . . .
kernel = boot_cwm_pabx_504.img-zImage
cmdline = androidboot.hardware=sony user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M
board =
base = 80200000
pagesize = 2048
kernel_offset = 00008000
ramdisk_offset = 02000000
tags_offset = 00000100
Building image . . .
10. Step 9 creates a file called "image-new.img". Rename it to something more self-explanatory, i.e. "boot_twrp_2.8.0.1_pabx_504.img"
11. To flash the file flash it like any other file using the new name:
Code:
adb reboot bootloader
fastboot flash boot boot_twrp_2.8.0.1_pabx_504.img
fastboot reboot
That's it, enjoy your new recovery.
Note: I had issues getting TWRP 2.8.1.0 working, so I'm still using the predecessor 2.8.0.1.
The latest pabx "boot.img" modified with TWRP is attached.
Known issues
after restoring a Nandroid backup access to the internal storage isn't allowed anymore
Open a terminal or run through a adb shell:
Code:
restorecon -FR /data/media/0
Thank works dobře.TWRP I like long ....
cant understand what you mean in step 7 and 8..... i just unpacked boot.img (the img that i want to put a recovery on it) and then i created a folder and i copied split_img and ramdisk into it.....then i unpacked twrp.img and it replaced the previous split_img and ramdisk folders with the twrp ones..... i still have the folder i created with the original split_img and ramdisk folders from boot.img but i can understand what to do next....
well, sorry for that,...i think i got it now that i read it about 20 times..... one question though :
i copy ramdisk.cpio.gz from the twrp and i move it to the recovery folder of the boot img without extracting? just renaming it from ramdisk.cpio.gz to ramdisk-recovery.cpio ???
arismelachrinos said:
cant understand what you mean in step 7 and 8..... i just unpacked boot.img (the img that i want to put a recovery on it) and then i created a folder and i copied split_img and ramdisk into it.....then i unpacked twrp.img and it replaced the previous split_img and ramdisk folders with the twrp ones..... i still have the folder i created with the original split_img and ramdisk folders from boot.img but i can understand what to do next....
well, sorry for that,...i think i got it now that i read it about 20 times..... one question though :
i copy ramdisk.cpio.gz from the twrp and i move it to the recovery folder of the boot img without extracting? just renaming it from ramdisk.cpio.gz to ramdisk-recovery.cpio ???
Click to expand...
Click to collapse
Yeah I didn't fully understand that either, but i just tried it.
You delete ramdisk-recovery.cpio from /ramdisk.
You extract ramdisk.cpio.gz to the /ramdisk folder.
You rename it to ramdisk-recovery.cpio.
Repack image.
(note that when the kernel you use is already a dualrecovery kernel -lightning for example, cwm philz+twrp- and u want it to be multirom twrp, u need to edit init.sh also found in /ramdisk folder somewhere)
BTW thanks for this guide! I was messing with this a few days ago and I couldn't get it to work, thanks to you I now understand why!:thumbup:
I tried to put latest twrp into latest boot.IMG of Thomas lollipop 23/11/14 build and I thought it worked but I press volume up and down to enter the recovery and it does nothing....it doesn't boot,it just freezes with the led lighting.... please help I really want twrp to work with lollipop
arismelachrinos said:
I tried to put latest twrp into latest boot.IMG of Thomas lollipop 23/11/14 build and I thought it worked but I press volume up and down to enter the recovery and it does nothing....it doesn't boot,it just freezes with the led lighting.... please help I really want twrp to work with lollipop
Click to expand...
Click to collapse
Reread what I wrote.
You probably didn't extract ramdisk.cpio.gz, or you putted it into /split_img I think. Cuz I had that too, but if you follow the exact steps it will work!
no I did exactly what you said... I fully understood the instructions,I extracted it , I named it right and I moved it right... well, I will try again tomorrow but I don't think it will boot into it... Thomas boot.img has a cwm recovery ,does this have smthg to do with it?
arismelachrinos said:
no I did exactly what you said... I fully understood the instructions,I extracted it , I named it right and I moved it right... well, I will try again tomorrow but I don't think it will boot into it... Thomas boot.img has a cwm recovery ,does this have smthg to do with it?
Click to expand...
Click to collapse
What version of TWRP did you use? 2.8.1.0 will likely not work, use an older one instead.
arismelachrinos said:
cant understand what you mean in step 7 and 8..... i just unpacked boot.img (the img that i want to put a recovery on it) and then i created a folder and i copied split_img and ramdisk into it.....then i unpacked twrp.img and it replaced the previous split_img and ramdisk folders with the twrp ones..... i still have the folder i created with the original split_img and ramdisk folders from boot.img but i can understand what to do next....
well, sorry for that,...i think i got it now that i read it about 20 times..... one question though :
i copy ramdisk.cpio.gz from the twrp and i move it to the recovery folder of the boot img without extracting? just renaming it from ramdisk.cpio.gz to ramdisk-recovery.cpio ???
Click to expand...
Click to collapse
Adjusted the description of step 8, should be more clear now what to do.
I've also added a note to point out explicitly that each run of "unpackimg.bat" will overwrite existing data.
Thank you so much for the guide! Really appreciate it =D
mcfisch said:
What version of TWRP did you use? 2.8.1.0 will likely not work, use an older one instead.
Click to expand...
Click to collapse
I used the latest twrp...maybe that's why....I will try again and I will post here
thank you sooooo much.... i did it with the second try...the only thing i changed was that i downoaded a previous version of twrp because it wont work with the latest one...thanks a lot.... what about cwm? is it the same proccess?
CWM is included already. But you could split the latest cm boot.img and grab ramdisk-recovery.cpio from ramdisk/sbin to get the most up to date version
is this mean can add TWRP into .FTF files ?
that will be awesome
Can anyone share their twrp included boot.img for the latest thomas release?
i tried to do this on the cm12 expirimental build and the boot.img of that zip doesnt have a recovery folder inside ramdisk folder... i did create one just to see if it works and it didnt
arismelachrinos said:
i tried to do this on the cm12 expirimental build and the boot.img of that zip doesnt have a recovery folder inside ramdisk folder... i did create one just to see if it works and it didnt
Click to expand...
Click to collapse
Look for a *.cpio or *.cpio.gz file and replace that accordingly. The place doesn't really matter for you, the ROM knows where to find it. CM might expect it respectively at another place. Will take a look later if I can find something...
mcfisch said:
Look for a *.cpio or *.cpio.gz file and replace that accordingly. The place doesn't really matter for you, the ROM knows where to find it. CM might expect it respectively at another place. Will take a look later if I can find something...
Click to expand...
Click to collapse
can you please take look at this?because i did search all the ramdisk folder and i found nothing.... i uploaded the boot.img so that you dont have to download the rom zip
https://www.mediafire.com/?5d6swrdegr53iel
mcfisch said:
Look for a *.cpio or *.cpio.gz file and replace that accordingly. The place doesn't really matter for you, the ROM knows where to find it. CM might expect it respectively at another place. Will take a look later if I can find something...
Click to expand...
Click to collapse
Won't work like that. Needs a script to be inserted into the ramdisk, @pabx style, plus the recovery folder with ramdisk-recovery.cpio inside.
was thinking why the latest TWRP was not working, then realized that the TWRP is written to be loaded into the FotaKernal.
then it worked with TWRP flashed into FotaKernal.
have pabx_aosp_yuga-509 installed
1. Followed your steps exactly to create a new boot_pabx_aosp_yuga-509.img (with the latest TWRP image "recovery-twrp-2.8.4.1-yuga.img").
2. Flashed recovery-twrp-2.8.4.1-yuga.img into the FotaKernal.
3. Flashed the new boot_pabx_aosp_yuga-509.img
it works
Edit: On my Xperia Z c6002 (yuga)