I5800XXJPF - Custom ROM not booting - Galaxy 3 General

Hello everyone,
I have an I5800 and tried to make a simply custom rom deleting some apps and adding others. I did:
- mount with loop device the factorsfs.rfs from PDA.tar
- delete / add some apps
- unmount
- repackaged factoryfs.rfs cache.rfs datafs.rfs zImage to PDA.tar
- md5 singned the tar package
- with ODIN flashed (PHONE, CSC and the new PDA)
Now the phone boots nomore and got stuck at GT-5800 logo.
What should I do? Can anyone help?
best regards

[Resolved ] I5800XXJPF - Custom ROM not booting
Hello eveyone,
It worked before I did a "Factory data reset" with the command
*#*#7780#*#*
best regards,

nsdroid said:
Hello everyone,
I have an I5800 and tried to make a simply custom rom deleting some apps and adding others. I did:
- mount with loop device the factorsfs.rfs from PDA.tar
- delete / add some apps
- unmount
- repackaged factoryfs.rfs cache.rfs datafs.rfs zImage to PDA.tar
- md5 singned the tar package
- with ODIN flashed (PHONE, CSC and the new PDA)
Now the phone boots nomore and got stuck at GT-5800 logo.
What should I do? Can anyone help?
best regards
Click to expand...
Click to collapse
Two questions.
How do you repackage the factoryfs.rfs?
How do you md5 sign the tar package?

The Dark Lestat said:
Two questions.
How do you repackage the factoryfs.rfs?
How do you md5 sign the tar package?
Click to expand...
Click to collapse
1. Pack to tar "PDA.tar" all the file from factoryfs.rfs (system):
tar -H ustar -c cache.rfs datafs.rfs factoryfs.rfs zImage > PDA.tar
where the factoryfs.rfs is the modified one and other three are the same as in the original JPF's PDA file.
2. Sign the tar (the same name):
md5sum -t PDA.tar >> PDA.tar
3. Rename the tar as a file with extention tar.md5
mv PDA.tar PDA.tar.md5
best regards

When you mounted the rfs, it was mounted as vfat, yes? I doubt that if you modify it as vfat, it will still be a valid rfs. After all, it never was a real vfat file system, as a fsck.vfat will point out (it will throw a lot of errors if you run it on any rfs image). So the result of your modifications will probably be some file system which is neither a valid vfat nor a valid rfs.

Hi,
Thank you. You're right. It's more simple:root the phone, modify all you want, with
dd make an rfs image of the /dev/block/stl6 (system) and pack into pda.tar...
This way the files are not corrupted anymore.
best regards

Related

[Q] NAND Backup i5800???

Is there some way i can make a backup of my firmware?? Tried using Clockworkmod and the sorts but seems it isn't compatible
You'll need to root your device.
and use dd to pull from the /dev/block/bml* devices and copy them to an SD card.. The main ones you'd want are the zImage, and factoryfs ones. The bootloader ones aren't so necessary.
bml5 = zImage
bml6 = factoryfs
bml7 = datafs
I'm pretty sure..
precurse said:
You'll need to root your device.
and use dd to pull from the /dev/block/bml* devices and copy them to an SD card.. The main ones you'd want are the zImage, and factoryfs ones. The bootloader ones aren't so necessary.
bml5 = zImage
bml6 = factoryfs
bml7 = datafs
I'm pretty sure..
Click to expand...
Click to collapse
and...for recovery would be adb push?
For recovery you can use ODIN. You put those files into a single tar file, and tell it to flash. Lots of documentation on this on the forums.
File names would be:
zImage
factoryfs.rfs
datafs.rfs
what exact commands i should use to back up everything from my phone? so that i could restore it if something happens...
#cat /dev/block/* > /sdcard/*.img
* for stl4, bml4, bml5, bml6, bml7 ??? more? how about imei/efs folder?
Any noob-friendly instructions for this? I'd like to flash 2.2 to my i5800 but would like to make a backup first. What commands should I use?
I've got terminal emulator and busybox installed, do they do any help?
Is this method of NAND Backup for i5800 really working?
Hi,
I just want to check if this method of NAND Backup for i5800 is really working?
I would like to save my ROM before I upgrade to JPF.
Is this way of saving safe?
And is the ODIN restore of these savings safe?
I wouldn't like to make my phone brick.
I made that backup, weight something about 400MB
I had an bootloop, and want to restore this. Putted zImage, factoryfs.rfs and datafs.rfs to one .tar file and choosed One Package option.
But it was uploading Datafs for about 10 minutes, and nothing.
The progress bar in download mode, was taking second round, and stopped at ~160% D)
Now I have only 5 apps installed because I am messing with editing system apps, and flashing my phone every hour haha
How can I upload this?
Lots of documentation on this - Where?
precurse said:
For recovery you can use ODIN. You put those files into a single tar file, and tell it to flash. Lots of documentation on this on the forums.
File names would be:
zImage
factoryfs.rfs
datafs.rfs
Click to expand...
Click to collapse
Please, help! I googled a lot and still do not know which partitions to save, how to make the tar, and how to restore it using ODIN.
If someone knows these info, share with me. Please!
Edit:
I was not able to save stl5:
# dd if=/dev/block/stl5 of=/sdcard/zImage
dd if=/dev/block/stl5 of=/sdcard/zImage
/dev/block/stl5: cannot open for read: Invalid argument
JoHnNy08PL said:
I made that backup, weight something about 400MB
I had an bootloop, and want to restore this. Putted zImage, factoryfs.rfs and datafs.rfs to one .tar file and choosed One Package option.
But it was uploading Datafs for about 10 minutes, and nothing.
The progress bar in download mode, was taking second round, and stopped at ~160% D)
Now I have only 5 apps installed because I am messing with editing system apps, and flashing my phone every hour haha
How can I upload this?
Click to expand...
Click to collapse
Im noob in this but i heard that 200 MB is maximum.
Sent from my GT-I5800

[Q] How to change the initrd.gz boot image?

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.

Help with datafs.rfs

Hi i want to first convert datafs.rfs to ext2 and then obtain it from for using this command dd if=/dev/block/stl7 of=/sdcard/datafs.rfs but whenever i do this i got datafs.rfs of 148mb when i flash this datafs.rfs, my fon memory goes 0.0B. Actual datafs.rfs is only 4.1mb. where i m doing wrong. How to obtain correct datafs.rfs?

[UPDATE 22/08/12] ROM Cooking Guide (One Package)

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

[Q] I9500 Repacked CSC can not be flashed via Odin

Hello All
I just start to work with Android files unpack and repack jobs, So I needed to extract the CSC file for I9500 model.
- I download the CSC tar file and then extract it using 7zip tool, Inside it i got two files cache.img and hidden.img
- I run this command :
/home/tools/simg2img /home/CSC/hidden.img system_.img
- After that i did this command to mount the img:
mount -o loop system_.img /mnt/system
- After that all is ok and i can check what is inside the img and add apk files or remove them.
- After I did what i needed I wanted to repack it to make it hidden.img again, So i run this command:
mkdir temp
/home/tools/mkuserimg.sh -s /mnt/system hidden.img temp 542xxxx (I puthere the original size of the system_.img using ll command)
- I got the hidden.img
- After that i repack it with the cache.img and get the CSC.tar file.
THE Problem is:
When I try to flash the repacked CSC.tar file it flashed the cache.img, but stop and failed at hidden.img
I looked here on the forum and found many post about i9500 repack steps, but all were talking about system.img or so, I only need to know the Right steps or order to repack the hidden.img of i9500 to be able to flash it via Odin flasher.
Notice: I use the same steps to unpack and repack hidden.img of S7582, S7562, and other models too, All were flashed ok with np.
I hope that someone can help me here.

Categories

Resources