[Q] I9500 Repacked CSC can not be flashed via Odin - Galaxy S 4 Q&A, Help & Troubleshooting

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.

Related

[Q] loop device

Sorry for the totally newbie question (for both android and linux).
I've rom images from legend ruu: android-info.txt, boot.img, hboot_legend_7227_1.01.0000_101108.nb0, radio.img, rcdata.img, recovery.img, splash1.nb0, system.img, userdata.img.
Is there any way to mount them (especially boot.img, recovery.img and system.img) on a linux box using a loop device?
The files boot.img and recovery.img are starting with magic word "ANDROID!°¨#", while I cannot recognize any string in system.img. What kind of file systems are these?
Thank you in advance,
TiceRex
system.img should just be a yaffs image and can be mounted loopback if you have the yaffs drivers installed. boot.img and recovery.img are ramdisk images which consist of a kernel and a cpio archive (containing the files for the root filesystem) bundled together in a package. HBOOT loads the kernel first, then unzips the cpio archive into a newly created ramdisk. Once all is loaded, execution is passed off to the kernel which has a nice ramdisk full of the init files needed for the remainder of the boot process. system and data images are then mounted to mountpoints in the ramdisk.
To extract and manipulate boot.img and recovery.img, see this thread:
http://forum.xda-developers.com/showthread.php?t=551711
Thank you very much.
Seeing into dsixda's rom kitchen scripts I was able to extract the boot.img and recovery.img files (and found the kernel and initrd).
I will look for the yaffs drivers.
Regards, TiceRex

I5800XXJPF - Custom ROM not booting

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

I9505X live demo unit how to recover, install rom

I decided to make this post to help people bring life back to the I9505X live demo unit. I know how conflicting some some sites are so I just wanted to write something all can follow step for step. Hope it helps like it helped me
1 Download rom from www.sammobile.com
2 Once file is downloaded you will have something looking like this I9505XXUAMDM_I9505OXXAMDB_BTU.zip (this is one i used) http://www.sammobile.com/firmwares/?page=1&model=GT-I9505&pcode=0#firmware
3 Extract the zip file
4 You will now have somthing like this I9505XXUAMDM_I9505OXXAMDB_I9505XXUAMDM_HOME.tar.md5
5 Rename file to samrom.tar
6 Place this file on your desktop (this will be the tar file we want to edit)
7 Download cygwin from here http://cygwin.com/setup.exe and install
8 Move the tar file to C:\cygwin\home
10 Open cygwin
11 We need to delete some files from the tar file. to do so i will list the commands below and files that need deleting. after typing each line command please wait while the action completes as it will look like its doing nothing. commands as follows
$ tar --delete --file=samrom.tar NON-HLOS.bin
$ tar --delete --file=samrom.tar modem.bin
12 Once the last command is done just close cygwin (depending on the rom you download there maybe other files that need deleting)
the files remaining should be
boot.img
cache.img.ext4
hidden.img.ext4
recovery.img
system.img.ext4
(you can check this by opening the samrom.tar file with winrar)
13 Download odin and install from http://www.android.gs/download-odin-3-07/
14 Make sure samsung drivers are installed if they are not download em from http://www.mediafire.com/download/d2h54mx7kt4uupt/SAMSUNG_USB_Driver_for_Mobile_Phones(3).exe
15 Open odin and connect your S4
16 Click on PDA and place the samrom.tar file in there and click start (it will flash)
17 after it has flashed install TWRP and install adams kernel explained here http://forum.xda-developers.com/showthread.php?t=2256252&page=14
i hope this helps people who are having trouble installing roms on there S4 live demo unit. if you would like to know anything or having trouble message me im happy to try help.
Thanks to marian_86 for helping me sort out this problem for me
If this helped you please hit thank me
Hi!
is everything works fine after you did this?
I have live demo unit, I'm afraid bricking it.
there is the possibility of making a video demo?
there is the possibility of making a video demo?
QUOTE=Sirus2012;43240081]I decided to make this post to help people bring life back to the I9505X live demo unit. I know how conflicting some some sites are so I just wanted to write something all can follow step for step. Hope it helps like it helped me
1 Download rom from www.sammobile.com
2 Once file is downloaded you will have something looking like this I9505XXUAMDM_I9505OXXAMDB_BTU.zip (this is one i used) http://www.sammobile.com/firmwares/?page=1&model=GT-I9505&pcode=0#firmware
3 Extract the zip file
4 You will now have somthing like this I9505XXUAMDM_I9505OXXAMDB_I9505XXUAMDM_HOME.tar.md5
5 Rename file to samrom.tar
6 Place this file on your desktop (this will be the tar file we want to edit)
7 Download cygwin from here http://cygwin.com/setup.exe and install
8 Move the tar file to C:\cygwin\home
10 Open cygwin
11 We need to delete some files from the tar file. to do so i will list the commands below and files that need deleting. after typing each line command please wait while the action completes as it will look like its doing nothing. commands as follows
$ tar --delete --file=samrom.tar NON-HLOS.bin
$ tar --delete --file=samrom.tar modem.bin
12 Once the last command is done just close cygwin (depending on the rom you download there maybe other files that need deleting)
the files remaining should be
boot.img
cache.img.ext4
hidden.img.ext4
recovery.img
system.img.ext4
(you can check this by opening the samrom.tar file with winrar)
13 Download odin and install from http://www.android.gs/download-odin-3-07/
14 Make sure samsung drivers are installed if they are not download em from http://www.mediafire.com/download/d2h54mx7kt4uupt/SAMSUNG_USB_Driver_for_Mobile_Phones(3).exe
15 Open odin and connect your S4
16 Click on PDA and place the samrom.tar file in there and click start (it will flash)
17 after it has flashed install TWRP and install adams kernel explained here http://forum.xda-developers.com/showthread.php?t=2256252&page=14
i hope this helps people who are having trouble installing roms on there S4 live demo unit. if you would like to know anything or having trouble message me im happy to try help.
Thanks to marian_86 for helping me sort out this problem for me
If this helped you please hit thank me [/QUOTE]
Pics pleas??
Verstuurd van mijn GT-I9505
Every thing is working fine for me only one prob.
when i reboot it . it stuck into the first logo. i have waited for more than 10 min.
than if i got recvoery and format the data. it boot than normally once.
Again if i had to reboot it. i have to goto recovery and format the data to boot the phone.
how to get rid of this?
br
s4 demo unit
Deduxma said:
there is the possibility of making a video demo?
QUOTE=Sirus2012;43240081]I decided to make this post to help people bring life back to the I9505X live demo unit. I know how conflicting some some sites are so I just wanted to write something all can follow step for step. Hope it helps like it helped me
1 Download rom from www.sammobile.com
2 Once file is downloaded you will have something looking like this I9505XXUAMDM_I9505OXXAMDB_BTU.zip (this is one i used) http://www.sammobile.com/firmwares/?page=1&model=GT-I9505&pcode=0#firmware
3 Extract the zip file
4 You will now have somthing like this I9505XXUAMDM_I9505OXXAMDB_I9505XXUAMDM_HOME.tar.md5
5 Rename file to samrom.tar
6 Place this file on your desktop (this will be the tar file we want to edit)
7 Download cygwin from here http://cygwin.com/setup.exe and install
8 Move the tar file to C:\cygwin\home
10 Open cygwin
11 We need to delete some files from the tar file. to do so i will list the commands below and files that need deleting. after typing each line command please wait while the action completes as it will look like its doing nothing. commands as follows
$ tar --delete --file=samrom.tar NON-HLOS.bin
$ tar --delete --file=samrom.tar modem.bin
12 Once the last command is done just close cygwin (depending on the rom you download there maybe other files that need deleting)
the files remaining should be
boot.img
cache.img.ext4
hidden.img.ext4
recovery.img
system.img.ext4
(you can check this by opening the samrom.tar file with winrar)
13 Download odin and install from http://www.android.gs/download-odin-3-07/
14 Make sure samsung drivers are installed if they are not download em from http://www.mediafire.com/download/d2h54mx7kt4uupt/SAMSUNG_USB_Driver_for_Mobile_Phones(3).exe
15 Open odin and connect your S4
16 Click on PDA and place the samrom.tar file in there and click start (it will flash)
17 after it has flashed install TWRP and install adams kernel explained here http://forum.xda-developers.com/showthread.php?t=2256252&page=14
i hope this helps people who are having trouble installing roms on there S4 live demo unit. if you would like to know anything or having trouble message me im happy to try help.
Thanks to marian_86 for helping me sort out this problem for me
If this helped you please hit thank me
Click to expand...
Click to collapse
[/QUOTE]
please dose it mean my live s4 live demo unit will now behave like a normal phone and make or receive calls? after intalling this rom?
Help!
Just picked up a i9505x live demo unit.....does this process still work??
Demos don't have imeis do they I know our 3 s4s don't so calls can't be made
Sent from my GT-I9505 using xda app-developers app
s4sajii said:
Every thing is working fine for me only one prob.
when i reboot it . it stuck into the first logo. i have waited for more than 10 min.
than if i got recvoery and format the data. it boot than normally once.
Again if i had to reboot it. i have to goto recovery and format the data to boot the phone.
how to get rid of this?
br
Click to expand...
Click to collapse
Flash edited stock rom
Yes
Already did that. As described in the first post.
Br
Works but...
Everything works as it should but no WiFi.When flash Adam Kernel just get a black screen and that's it
I follow all the steps from the first post but at the end of odin flash i get FAIL . Any ideas?
Sirus2012 said:
11 We need to delete some files from the tar file. to do so i will list the commands below and files that need deleting. after typing each line command please wait while the action completes as it will look like its doing nothing. commands as follows
$ tar --delete --file=samrom.tar NON-HLOS.bin
$ tar --delete --file=samrom.tar modem.bin
Click to expand...
Click to collapse
i did it but i got this
Dj [email protected]ib ~
$ tar --delete --file=samrom.tar NON-HLOS.bin
tar: NON-HLOS.bin: Not found in archive
tar: Exiting with failure status due to previous errors
Dj [email protected] ~
$ tar --delete --file=samrom.tar modem.bin
tar: modem.bin: Not found in archive
tar: Exiting with failure status due to previous errors
Dj [email protected] ~
so sir what to do ???
mastro:° said:
i did it but i got this
Dj [email protected] ~
$ tar --delete --file=samrom.tar NON-HLOS.bin
tar: NON-HLOS.bin: Not found in archive
tar: Exiting with failure status due to previous errors
Dj [email protected] ~
$ tar --delete --file=samrom.tar modem.bin
tar: modem.bin: Not found in archive
tar: Exiting with failure status due to previous errors
Dj [email protected] ~
so sir what to do ???
Click to expand...
Click to collapse
same problem here.....seems like the command is not written in the right way
EDIT: I noticedd that when you start the program, it creates a folder inside 'cygwin-home' which is your user name and you have to place the samrom.tar in there in order to delete the two files!
btw the command lines are correct! cheers!!
stergios89 said:
same problem here.....seems like the command is not written in the right way
EDIT: I noticedd that when you start the program, it creates a folder inside 'cygwin-home' which is your user name and you have to place the samrom.tar in there in order to delete the two files!
btw the command lines are correct! cheers!!
Click to expand...
Click to collapse
So what`s the status of your phone, I was given an S4 LDU and I`d love to get rid of the demo all together, I`m not to bothered that I won`t be able to use it as a phone.
mloc33 said:
So what`s the status of your phone, I was given an S4 LDU and I`d love to get rid of the demo all together, I`m not to bothered that I won`t be able to use it as a phone.
Click to expand...
Click to collapse
Well, based on the stock ROM I downloaded it (I9505XXUAMDM_I9505OXXAMDB_I9505XXUAMDM_HOME.tar.md5),I deleted the the files sirus2012 was referring to and I am stuck at a point were the Odin says fail while flashing the ROM....
Trying to figure out if I need to delete another more file from the .TAR
After the FAIL status in Odin, I disconnected the phone, removed battery and placed it again and I had an error saying 'Firmware needs to be recovered via Kies'
I, once then, flashed again the stock ROM(without the deleted files) and noticed there was no WiFi....
So I either have a phone with no WIFI, or an error and phone can't boot
Hope I can find a way out of this!
stergios89 said:
Well, based on the stock ROM I downloaded it (I9505XXUAMDM_I9505OXXAMDB_I9505XXUAMDM_HOME.tar.md5),I deleted the the files sirus2012 was referring to and I am stuck at a point were the Odin says fail while flashing the ROM....
Trying to figure out if I need to delete another more file from the .TAR
After the FAIL status in Odin, I disconnected the phone, removed battery and placed it again and I had an error saying 'Firmware needs to be recovered via Kies'
I, once then, flashed again the stock ROM(without the deleted files) and noticed there was no WiFi....
So I either have a phone with no WIFI, or an error and phone can't boot
Hope I can find a way out of this!
Click to expand...
Click to collapse
Seems that there`s no real method or solution, pity, it`s a waste of a phone the way it is..
mloc33 said:
Seems that there`s no real method or solution, pity, it`s a waste of a phone the way it is..
Click to expand...
Click to collapse
Don't give up on that.....I think there will be a solution sooner or later....(I'll try to find it asap) because this 'phone' is really good
Or it could be something really small that we can't see and do it wrong.
stergios89 said:
Don't give up on that.....I think there will be a solution sooner or later....(I'll try to find it asap) because this 'phone' is really good
Or it could be something really small that we can't see and do it wrong.
Click to expand...
Click to collapse
True man, fingers crossed I suppose
mloc33 said:
Seems that there`s no real method or solution, pity, it`s a waste of a phone the way it is..
Click to expand...
Click to collapse
Sirus2012 said:
I decided to make this post to help people bring life back to the I9505X live demo unit. I know how conflicting some some sites are so I just wanted to write something all can follow step for step. Hope it helps like it helped me
1 Download rom from www.sammobile.com
2 Once file is downloaded you will have something looking like this I9505XXUAMDM_I9505OXXAMDB_BTU.zip (this is one i used) http://www.sammobile.com/firmwares/?page=1&model=GT-I9505&pcode=0#firmware
3 Extract the zip file
4 You will now have somthing like this I9505XXUAMDM_I9505OXXAMDB_I9505XXUAMDM_HOME.tar.md5
5 Rename file to samrom.tar
6 Place this file on your desktop (this will be the tar file we want to edit)
7 Download cygwin from here http://cygwin.com/setup.exe and install
8 Move the tar file to C:\cygwin\home
10 Open cygwin
11 We need to delete some files from the tar file. to do so i will list the commands below and files that need deleting. after typing each line command please wait while the action completes as it will look like its doing nothing. commands as follows
$ tar --delete --file=samrom.tar NON-HLOS.bin
$ tar --delete --file=samrom.tar modem.bin
12 Once the last command is done just close cygwin (depending on the rom you download there maybe other files that need deleting)
the files remaining should be
boot.img
cache.img.ext4
hidden.img.ext4
recovery.img
system.img.ext4
(you can check this by opening the samrom.tar file with winrar)
13 Download odin and install from http://www.android.gs/download-odin-3-07/
14 Make sure samsung drivers are installed if they are not download em from http://www.mediafire.com/download/d2h54mx7kt4uupt/SAMSUNG_USB_Driver_for_Mobile_Phones(3).exe
15 Open odin and connect your S4
16 Click on PDA and place the samrom.tar file in there and click start (it will flash)
17 after it has flashed install TWRP and install adams kernel explained here http://forum.xda-developers.com/showthread.php?t=2256252&page=14
i hope this helps people who are having trouble installing roms on there S4 live demo unit. if you would like to know anything or having trouble message me im happy to try help.
Thanks to marian_86 for helping me sort out this problem for me
If this helped you please hit thank me
Click to expand...
Click to collapse
Well I think I figured it out with my S4 demo unit to make WiFi work.
All the steps were followed BUT...
I DIDN'T delete the two files(modem and NON-hlos) and continued with the procedure
The most important step was .17 which redirects you to another thread about TWRP and Adams Kernel...
Following the steps there where enough to solve my issue.
And now my WiFi works pretty good(so far so good at least for the last 2-3 hours )
Let me know if it worked for you too!
Cheers!

[Q] system.img.ext4 not found while doing the URDLV method.

I got my firmware from sammobile and extracted this
N9005ZHUBMI7_N9005ZZHBMI7_N9005XXUBMI5_HOME.tar.md5
Using this method:
http://forum.xda-developers.com/showthread.php?t=2498850&highlight=n9005zhubmi7&page=84
Since it was a huge file it took hours for me to download and I got all the other necessary prerequisites ( Sammmobile firmware, URDLV, Cygwin and Odin) and as I opened up cygwin started to do the full method and things go smoothly. then when I execute the URDLV.sh this happens
Code:
Mode: full
Filename: N9005ZHUBMI7_N9005ZZHBMI7_N9005XXUBMI5_HOME
Extension: md5
Extracting Firmware...
system.img.ext4 NOT found!
Using the CSC method I get this error
Code:
Mode: csc
Filename: N9005ZHUBMI7_N9005ZZHBMI7_N9005XXUBMI5_HOME
Extension: md5
Extracting Firmware...
cache.img.ext4 NOT found!
So, I'm stuck. I don't know what I did wrong.
I checked the MD5 file(opened with winamp) and the files were there
Hi Mathmango, wondering if you managed to figure this out? I'm getting exactly the same error.
Cheers
Anthony
mathmango said:
I opened up cygwin started to do the full method and things go smoothly. then when I execute the URDLV.sh this happens
Code:
Mode: full
Filename: N9005ZHUBMI7_N9005ZZHBMI7_N9005XXUBMI5_HOME
Extension: md5
Extracting Firmware...
system.img.ext4 NOT found!
Using the CSC method I get this error
Code:
Mode: csc
Filename: N9005ZHUBMI7_N9005ZZHBMI7_N9005XXUBMI5_HOME
Extension: md5
Extracting Firmware...
cache.img.ext4 NOT found!
So, I'm stuck. I don't know what I did wrong.
I checked the MD5 file(opened with winamp) and the files were there
Click to expand...
Click to collapse
You have to place the image in the same folder where you have URDLV.sh;
For example C:/Root/Universal-RDLV_v0.5/
Output dir
tools dir
License.txt
N9005XXUENB3_N9005OXXENB1_N9005XXUENB1_HOME.tar
SS_DL.dll
URDLV.sh
this worked for me . First i had the same error but after i copied the firmware in the same director fixed the problem.

[Q] How to unpack system.img and modify it for Pixel4?

Hi all,
Is there a tool that can unpack system.img for the Pixel 4 (that actually works..) ?
What I want is to create a system.img that will have the following change:
Replace the below apex zip file:
`/system/apex/com.android.runtime.release.apex`
to an extracted version of it:
`/system/apex/com.android.runtime.release`
I've tried most of the online tools and tutorials with no luck.
So I unzip the ` flame-qd1a.190821.007` factory image, and then unzip the `image-flame-qd1a.190821.007` within in.
This gives me many .img files, including system.img, system_other.img, and super_empty.img.
I guess in some phones super.img had included the system.img, but that's not the case with `flame`.
imjtool can extract the `system.img` using:
Code:
imjtool system.img extract
With the below warning:
Warning: system.img is likely truncated or still compressed
Sparse image v1.0 detected, 196053 blocks of 4096 bytes
196053 blocks of 4096 bytes compressed into 15 chunks (1% compressed)
Click to expand...
Click to collapse
Then `extract/image.img` cannot be further recognized by the tool:
Code:
imjtool extracted/image.img
extracted/image.img is not a recognized image. Sorry
Click to expand...
Click to collapse
I've also tried simg2img to convert a sparse android img to a normal one,
but then mounting failed, in both Linux and mac.
Paschalis said:
Hi all,
Is there a tool that can unpack system.img for the Pixel 4 (that actually works..) ?
What I want is to create a system.img that will have the following change:
Replace the below apex zip file:
`/system/apex/com.android.runtime.release.apex`
to an extracted version of it:
`/system/apex/com.android.runtime.release`
I've tried most of the online tools and tutorials with no luck.
So I unzip the ` flame-qd1a.190821.007` factory image, and then unzip the `image-flame-qd1a.190821.007` within in.
This gives me many .img files, including system.img, system_other.img, and super_empty.img.
I guess in some phones super.img had included the system.img, but that's not the case with `flame`.
imjtool can extract the `system.img` using:
Code:
imjtool system.img extract
With the below warning:
Then `extract/image.img` cannot be further recognized by the tool:
Code:
imjtool extracted/image.img
I've also tried simg2img to convert a sparse android img to a normal one,
but then mounting failed, in both Linux and mac.
Click to expand...
Click to collapse
I use SuperR Kitchen
It unpacks everything. You must then use Apktool or third party software (ticklemyandroid) to decompile and recompile apks for editing. I don't have a way to edit a .apex file.
Here is the file in question. Just rename it by taking off the .zip. only way I could upload it.
https://www.androidfilehost.com/?fid=8889791610682898672
The full Android SDK. But it's definitely not a beginner friendly process. If you have to ask how to do it then you probably shouldn't try it until you learn more. ?

Categories

Resources