Extract, modify and repack stock rom? - Galaxy S 4 Q&A, Help & Troubleshooting

Hey!
I really want to make a custom rom, a heavily debloated stock rom. At this stage I am not thinking about adding customization or anything just debloat the stock rom as much as possible, recompile it, and flash it!
I've searched everywhere on how to do this but have not found any relevant information.
COULD SOMEONE PLEASE POINT ME IN THE RIGHT DIRECTION?!?!?!
I have tried using sgs2toext4.jar to convert img.ex4 files from I9506 stock firmware and the mounting it in Linux Internals.
This does not work, as Internals does not show any files (0.00 bytes) even though the converted img.ext4.img file shows over 2.5gb in windows explorer.
How can I do this, what kind of tools do you DEVs use to extract, modify and finally repack it to a tar.md5 or flashable zip?
I am grateful for any response!
EDIT: Currently using windows 7 x64, I have access to a Linux/ubuntu if that is necessary. Also the device in question is I9506.
Regards,
mrd0pe

Related

Need a smaller boot.img

Hi All
Thank you for the great work however in order to enjoy the ROMS I will need to have a smaller boot.img in order to flash the roms.
The image must be 2.35 MB at most, A good example is the Enomther ROM that is flashable.
However the CM6 roms are not (except KANG O RAMA).
Since I dont think that someone is going to do it for me, can you at least explain how can I do that?
There are at least 10 more people that check this forum regulary looking for a solution.
Thank you.
CM6 boot image is just 2.25MB!!!
OHH yea.... checked it out on his site yesterday, then how come rodriguez's image is bigger?
He's most probably using another kernel for CM6, just like MicroMod uses another kernel for TheOfficial.
OK. How can I use those features with a smaller kernel? Is there a way?
1) Ask the kernel / ROM creator to "pack" it to fit in 2.5MB of space.
2) Compile your own kernel and make your own boot.img.
3) Try to mix your desired ROM (for example, Micromod's) with the kernel that fits your limited boot space (for example, Enomther's original). Or you could try to use rodriguez's ROM with CM kernel. To do that mix, replace the boot.img and the WiFi driver - bcm4329.ko - in their locations in the original ROM zip and resign the zip, then flash it.
Why the need for a smaller boot.img?
Sent from my Nexus One using XDA App
HTCinToronto said:
Why the need for a smaller boot.img?
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Many N1s do not allow kernels later than 2.4MB (or something like that)... the kernel does not flash because of bad MTD blocks...
Jack_R1 said:
1) Ask the kernel / ROM creator to "pack" it to fit in 2.5MB of space.
2) Compile your own kernel and make your own boot.img.
3) Try to mix your desired ROM (for example, Micromod's) with the kernel that fits your limited boot space (for example, Enomther's original). Or you could try to use rodriguez's ROM with CM kernel. To do that mix, replace the boot.img and the WiFi driver - bcm4329.ko - in their locations in the original ROM zip and resign the zip, then flash it.
Click to expand...
Click to collapse
OK. Thanks.
Can you send me a link with the instructions on how to change and resign roms?
[sorry for being a noob]
Unfortunately, I don't have any instructions available anywhere, but you can use some Google searching.
The boot.img resides in the root of the ZIP, the bcm4329.ko is in /system/lib/modules/.
Changing the files in the ROM is easy - ROM is just a ZIP file, you take a ROM you want to change, open it in WinZip / WinRar / your favorite freeware archiver, find the files you want to replace (the ones I've mentioned above), download the original ROM which is the base (Enomther for MicroMod, CM6 for Rodriguez), extract those files from there, drag&drop them into the ROM you're modifying, that's it.
Then you search Google for "android sign zip apk", and you get a couple of guides that show you how to sign ZIPs.
Then you load the ROM and hope it works.
does not sound complicated
thanks.... I will try that.
Yes, what you need is:
boot.img and everything in /system/lib/modules
It's important that you replace everything in /system/lib/modules with the correct content for the specific boot.img you're using and delete everything else.
My boot.img which is based on Wildmonks BFS 950 kernel supports apps2ext and 720p and should be sufficient for any CM6 rom. It's worth noting that the current one in Kang-o-rama 1.0 Final is not as stable as I would like and I'll be updating it soon.
Since this seems a bit challenging for some rom devs an alternative approach could be:
Create update.zip for small boot image (I can help with this)
Rom dev creates rom update.zip without a kernel (may not boot properly)
Install rom without kernel
Install small kernel update.zip
Or everyone could use Kang-o-rama...

Help with Cooking

I have a Samsung I-350
using
a method i was able to get a romdump.zip which i then dumped into a dump folder with all of its files inside
my question is what do i do now so i can cook roms with it, ive tried a variaty of tools and cant find what to do now... Im stuck with the contents of the rom in the dump folder
update:
was able to convert .raw to .nb using envious
link posted:
Download
anyone want to make a 6.5.3 rom for the intrepid?
and remove all the junky bloatware that sprint and samsung put on it...
its windows directory is cluttered with junk and factory testing tools from windows 6.0 and the i-7xx samsung phone....
It's not that simply, I think. Even if someone was to generate a ROM, it can't be flashed unless the phone allows it, which would require the phone to be unlocked(It's only sim unlocked). That being said, if somone IS able to do this, I'd love to make a ROM for it!
Sprint has an update tool to update the rom but obviously its just theirs...
could someone analyse the sprint update tool maybe?
i got the rom by changing a registry value i believe

[Q] Implementing features from other sources

I have the PAC source downloaded and now I want to figure out how to add other features from either github or wherever to it. There's some things from the xposed framework that I'd like to implement in the ROM but I'm not sure how to go about doing it. I'm new to android programming, just been porting PAC to my phones that don't have support. Any help is greatly appreciated.
Help injecting features or settings
I use file manager pro from cheeta mobile to open the rom.zip then copy and paste the system/file context/meta inf /and any other files in the zipped folder to the ExtSdcard1 root directory, then open the copied files which will be opened for modifications, then add the mods directly to the appropriate locations ( use this method(very slow) or use an apk decompiler to make your changes to apps. There are instructions for that on xda forums. But since the update to lollipop we have seen the new compression format change to system.new.dat file compression so if you want to modify lollipop roms you have to find (Optimized) version or use the dat file decompiler to translate the system.dat.new file or others in that format to readable/writable or understandable format. Let us know if this gets you on track or if you have solved this issue, thanks.

[Q] [HELP] Extracting a Stock ROM for modify it

Hello everyone.
I want to create my own Custom ROM. I want to make it based on Stock ROM, but I don't know how to extract it.
I downloaded the firmware from SamMobile, extracted the .tar.md5 file with 7-Zip and got the *.img files.
I read some guides about how to use Android Kitchen but I don't know how to start with the Stock ROM to make my ROM based on it, and then, use the Kitchen.
Sorry for my English.
Thanks in advance.
Greetings!
Same procedure. Extract the .img with 7zip.
Lennyz1988 said:
Same procedure. Extract the .img with 7zip.
Click to expand...
Click to collapse
It didn't work. I get a message saying "Can not open file as archive".
Any answer?
There's loads of guides around, maybe adjust your google search terms.
Seriously, there are a massive amount of guides for this, you can't be looking very hard

Unroot & Re-pack firmware?

I had 50pc japan version of s5(sc-04f), installed rom 'G900F.STOCK.FOR.SCL23.FULL.MINHQUAN'. The downside of this rom is that its pre-rooted. I managed to unroot it by goin in supersu & click 'full-unroot'. But i had multiple devices to flash, so is there a way for me to re-pack this firmware again after i unroot it? So that i could flash it to my other devices without root.
wee2000 said:
I had 50pc japan version of s5(sc-04f), installed rom 'G900F.STOCK.FOR.SCL23.FULL.MINHQUAN'. The downside of this rom is that its pre-rooted. I managed to unroot it by goin in supersu & click 'full-unroot'. But i had multiple devices to flash, so is there a way for me to re-pack this firmware again after i unroot it? So that i could flash it to my other devices without root.
Click to expand...
Click to collapse
Your best bet is to post this question within the following Q&A thread that's specific to your device.
https://forum.xda-developers.com/showthread.php?t=2700073
Good Luck!
~~~~~~~~~~~~~~~
I DO NOT provide support via PM unless asked/requested by myself. PLEASE keep it in the threads where everyone can share.
ok done, thx 4 the info
just in case if i missed the reply there, hope someone could reply me here?
when i extract the ZIP file, i got
METE-INF folder
boot.img
system.img
just in case if i missed the reply there, hope someone could reply me here?
when i extract the ZIP file, i got
METE-INF folder
boot.img
system.img
wee2000 said:
just in case if i missed the reply there, hope someone could reply me here?
when i extract the ZIP file, i got
METE-INF folder
boot.img
system.img
Click to expand...
Click to collapse
Should we search for this firmware or you can provide a link to its thread?
the link is here : https://choimobile.vn/threads/6-0-1-scl23-stock-rom-g900f-full-port-v3-by-huaminhquan93.37412/
wee2000 said:
the link is here : https://choimobile.vn/threads/6-0-1-scl23-stock-rom-g900f-full-port-v3-by-huaminhquan93.37412/
Click to expand...
Click to collapse
Generally, if it's 6.0.1 and rooted systemlessly, you need to replace boot.img with a stock one and remove SuperSU app from system.img.
This ROM intended to be flashed from TWRP, so it's an ext4 image.
You can mount it to a linux system on your PC and remove anything you want.
I havent done anything like this before. Could u give me some links or guides? My PC is running Windows 10.
wee2000 said:
I havent done anything like this before. Could u give me some links or guides? My PC is running Windows 10.
Click to expand...
Click to collapse
Ok, here' a simpler way:
1. Make changes on one phone.
2. Make a TWRP backup of boot and system partitions.
3. Restore this backup on other phones. They must have TWRP installed, a 6.0.1 bootloader and modem.
You'll have to rename backup's folder path and to wipe cache/data/system before restore.
can i use winrar to extract & compile the rom, without linux? So that i will have a much faster flashing process for all other units..
wee2000 said:
can i use winrar to extract & compile the rom, without linux? So that i will have a much faster flashing process for all other units..
Click to expand...
Click to collapse
Ok, I've managed to download that ROM at last.
The things look even simpler.
To prepare an "unrooted" ROM:
1. Download the zip form this post and unpack updater-script somewhere.
2. Make a copy of V3.G900F.STOCK.FOR.SCL23.FULL.MINHQUAN.zip, open it with Windows Explorer and replace V3.G900F.STOCK.FOR.SCL23.FULL.MINHQUAN.zip\META-INF\com\google\android\updater-script with the file you've unpacked from the attachment.
3. Try to flash ans see if it's what you need.
thx so much, already passed all units to the buyer. ill try that on next batch restock, may iknow if there's a way to get the service menu shortcode *#0*# to work again? This rom doesn't has the service menu.
bbsc said:
Ok, I've managed to download that ROM at last.
The things look even simpler.
To prepare an "unrooted" ROM:
1. Download the zip form this post and unpack updater-script somewhere.
2. Make a copy of V3.G900F.STOCK.FOR.SCL23.FULL.MINHQUAN.zip, open it with Windows Explorer and replace V3.G900F.STOCK.FOR.SCL23.FULL.MINHQUAN.zip\META-INF\com\google\android\updater-script with the file you've unpacked from the attachment.
3. Try to flash ans see if it's what you need.
Click to expand...
Click to collapse
I've replaced the updater-script in the zip file, but supersu is still there

Categories

Resources