[Q] Creating .img Files for Cooking Custom Rom - Galaxy S I9000 Q&A, Help & Troubleshooting

Hello:
I'm interested in creating and maintaining a custom rom for the Samsung Galaxy S. I've read a ton of tutorials and guides - on site and off - but I'm unable to get started due to one small problem.
After downloading the base firmware I'd like to use (specifically UGJK3 - firmware for Bell Canada) and opening it, I see a .tar file, and within that I see the following files:
param.lfs, zImage, modem.bin, cache.rfs, factoryfs.rfs.
I've mounted the .rfs files, but I'm still unable to cook the rom due to the absence of the system.img and boot.img files. I'm using the HTC Android kitchen to cook the rom, and it requires these files (or an update.zip file, etc) in order to start cooking.
I've searched far and wide, but I'm unable to find an answer on how to create these two .img files from the stock firmware provided by Samsung.
Any help is appreciated.
Thanks.

So, I've done a bit more research and apparently the way Samsung handles their firmware is different than other manufacturers. This leads me to believe that I must convert their rom into a usuable format before attempting to import it in the HTC Kitchen.
However, I'm unsure how to exactly do this.

I'm going to try flashing the stock firmware then performing a nandroid backup, then using that to create my custom rom. It'd be much, much easier if I knew how to just create the .IMG files from the Samsung firmware.
Anyone have an idea on how to do this?

Last bump before I give up.

Related

[Q] Integrating a language with a ROM .zip?

Hi,
I have a ROM, for example Enomther's. and I also have the arabic language libs. how can I integrate the arabic libs into the ROM's zip file so I don't have to flash another zip for arabic libs? I have attached the arabic libs.
Bump! anyone?
Come on, what kind of answer do you expect?
Here's the answer: you need to substitute the files in the original ROM zip and resign it - that's it.
Now you're going to ask, how to do it, because you have no clue - and the explanation is a lot of work to try and put in one post, and setting up signing applications involves installing Java SDK and some knowledge. If you're asking the question you're asking - it seems like you're far from being skilled enough in Android depths to do what you're asking to do, and that's why you see no answer. After all, if you'd want to do it - you'd have to search anyway, Google "sign apk zip" and here you go, a lot of tutorials show up. And if you didn't search and posted instead - it speaks for itself.
By the way, there's no good reason to integrate the libs into a standard ROM, moreover - it's a bad idea. ROMs tend to be updated, and the work that needs to be done setting up the environment for signing APKs and ZIPs is way more than flashing one update right after updating the ROM to a newer version. And ROMs are updated quite often.
Yeah i'm not skilled. I'm trying to learn... I am trying to make my own customized ROM for my country's users. And I didn't mean editing ROM files, I was saying how to push the lib into the ROM zip so people don't have to flash the arabic zip lib when they flash my customized ROM. So I hope you haven't missunderstood my question...
Ah, I see, you want to customize and share the ROM. In that case, you have to have the setup I'm talking about. The update.zip contains folders and files, which directly replace the files in the same folders in ROM, so if you have a ROM zip - you need to replace those files. The easiest way would be just extracting your update.zip, opening a ROM zip in 7zip / WinZip / WinRar / etc, putting those extracted files from update.zip in the right place into ROM zip by drag-and-drop, and then resigning the ROM file.
Please do some googling as to how to sign ZIP and APK files. There are some pretty good tutorials.
I have done that before, and I replaced the lib file with the ROM default lib. it's libskia.so, but I think because I didn't know I have to sign it it gave me an error while flashing through recovery. so after I replace the lib I have to re-compress the file and then sign the zip right?
You don't have to re-compress if you replace the file without decompressing the original ROM archive, by dragging-and-dropping the file into the archive.
And yes, you have to re-sign the ZIP after any changes you make to anything inside it.

[Q] Creating a custom ROM

Hello Everybody!
I'm sure this has been covered but I haven't found a tutorial or guide for the samsung captivate. I had ACL surgery today and I've decided i have the time to invest in creating a rom based on the things I like from other roms. Where do I start this process? Can i just mix files from within the .zips from other roms? or is there a file that tells the rom which files to install/access?
I've really enjoyed a lot of the ROM's that I have been flashing on my phone but I keep running into the same problem on all of them except one. Text messages occasionally go to the wrong person...and this is scary and unacceptable for me.
Some links to other threads or websites would be greatly appreciated.
Thank you for your time.
sdp07d said:
Hello Everybody!
I'm sure this has been covered but I haven't found a tutorial or guide for the samsung captivate. I had ACL surgery today and I've decided i have the time to invest in creating a rom based on the things I like from other roms. Where do I start this process? Can i just mix files from within the .zips from other roms? or is there a file that tells the rom which files to install/access?
I've really enjoyed a lot of the ROM's that I have been flashing on my phone but I keep running into the same problem on all of them except one. Text messages occasionally go to the wrong person...and this is scary and unacceptable for me.
Some links to other threads or websites would be greatly appreciated.
Thank you for your time.
Click to expand...
Click to collapse
Well, rom cooking is pretty easy.
As long as you know that component x is compatible with rom y, all you need to do is open the ROM in winrar/7z and drop the new file in, replacing the old one. No reason to unpack / repack. The only thing that can be a problem is the update-script, which resides in META-INF/com/google/android. It's a script that tells the phone "this is what you're doing with all of the stuff in this zip", if you modify a ROM like Axura or Perception, the update-script shouldn't need to be changed.
If you DO want to unpack and repack it, that's fine. Make sure you don't compress them into a sub directory (Update.zip > update > updates/system/meta-inf). Compress the updates/system/meta-inf/data whatever into it's own folder named whatever.zip, then sign the .zip via SignApk;
Code:
java -jar Signapk.jar certification.pem key.pk8 update.zip updatesigned.zip
Then flash it with CWM. Be aware however that in order for kernels(zImage) and modems(Modem.bin) and SBL(secondary boot loader) to be installed via CWM, the redband_ua exploit must be present in the updates folder; and the necessary commands for red_band must be present in the update-script.

[Q] How exactly does flashing work?

Hi all,
My question is aimed to head deep into the Android OS and the flashing process itself. I know that if I flash my phone with a new ROM that system files are replaced and also some other files too. My question is how is this done? Is there an exact order in which the files have to be replaced, and are they "just" overwritten or are they deleted first and then the new ones put in place?
Forgive me if this question has already been answered. I really tried my best to find answers on Google and in here.
Thanks in advance for any enlightening comment.
Open up an update-script and your dilemma will be solved
Sent from my GT-I9000 using Tapatalk
Essentially, like the previous reply mentioned the android OS is heavily partitioned, but has a lot of sneaky mount points to hide this fact.
Really all a CWM flashable zip does is follow a script, easily readable in the zip, to copy files throughout the OS partition.
If you look in the zip you'll see a few things, the biggest thing here is the /System folder. It contains the entirety of the system partition that makes your ROM /Your ROM/. Also you'll see boot.img which is the kernel (and CWM). A modem.bin file is also present, but to my understanding is only flashed if one is not currently present.
When looking at CM9's zip, you'll see an updater.sh. This is the shell script that's run on using CWMs install function.
It's process checks a few environment things and installs (copys over /system) based on this.
Check out the script, it's really interesting.
Thanks to all of you
I will have a look inside a script then.

[Complete Guide] What Is Odex And Deodex In Android !

As an Android newbie, what bothered me most was coming across terminology beyond my comprehension. Not coming from a Linux background it became hard to keep up with the oh-so-commonly-used words spread all across the development community. Likewise, since I didn’t understand the terms, consequently I was unable to determine is something was of any use to me or not. From what I have seen, this problem extends to many novice and even average users.
One commonly occurring word when playing with custom ROMs and firmware, and even themes is deodexed and odexed. Most users fail to understand what these terms actually imply, and while developers would boast again and again about their themes and ROMs being deodexed, the average user is left clueless as to what is going on.
WHAT IS AN ODEX FILE?
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity.
HOW THIS WORKS
For the more geeky amongst us, Android OS uses a Java-based virtual machine for running applications, called the Dalvik Virtual Machine. A deodexed, or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK. An .odex file, on the other hand, is an optimized version of this same .dex file that is stored next to the APK as opposed to inside it. Android applies this technique by default to all the system applications.
Now, when an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages. Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
ADVANTAGES & DISADVANTAGES
The advantage of deodexing is in modification possibilities. This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first, since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times. However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used. Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
For a casual user, the main implication is in theming possibilities. Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Was this article helpful? If you are confused with some other terms and want us to help explain them, please let us know in the comments.
Screen Shots
Reserved 2.
Help for getting the deodexed files onto Galaxy Tab S 8.4
I have deodexed the 'app', 'priv-app', and 'framework' folders and the build.prop file using the JoelDroid batch deodexer tool (as outlined in this thread). I am looking for help for getting the deodexed files onto my Samsung Galaxy Tab S 8.4 (running Lollipop 5.0.2). My ROM is currently rooted with Knox 0x0 and I used FlashFire to get my device rooted and updated to lollipop (as outlined in this thread) - and as a result - I don't have a custom recovery such as TWRP installed. I read this guide that calls for deleting the old 'app', 'priv-app', and 'framework' folders and (via recovery) copying the new folders (with the deodexed files) to /system.
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
I think the only way is by installing Custom Recovery,
but, i will look for a way.
UPDATE: use your deodexer tool while following this steps without using the tool given there, the only downside is you need TWRP installed.
link : http://forum.xda-developers.com/galaxy-tab-s/themes-apps/how-to-deodex-stock-rom-t3254734
rob.allen78 said:
I have deodexed the 'app', 'priv-app', and 'framework' folders and the build.prop file using the JoelDroid batch deodexer tool (as outlined in this thread). I am looking for help for getting the deodexed files onto my Samsung Galaxy Tab S 8.4 (running Lollipop 5.0.2). My ROM is currently rooted with Knox 0x0 and I used FlashFire to get my device rooted and updated to lollipop (as outlined in this thread) - and as a result - I don't have a custom recovery such as TWRP installed. I read this guide that calls for deleting the old 'app', 'priv-app', and 'framework' folders and (via recovery) copying the new folders (with the deodexed files) to /system.
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
Click to expand...
Click to collapse
Thank you so much! I recently started to explore things like custom ROMs on my SM-T800. I can definitely use a crash course in things like this. Especially since I have not (yet) been able to get Xposed on CM 12.1, pacman-ROM and Phoenix-ROM.
Thanks!
rob.allen78 said:
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
Click to expand...
Click to collapse
Either create a flashable zip with those files or unpack the whole system image and replace those files/folders and create a flashable zip from that. Flash with flashfire.
You will need to set the correct permissions so best to use something like archi kitchen to automate it.
However considering there are a plethora of deodex roms currently available why bother?
DUHAlgerianSkills said:
I think the only way is by installing Custom Recovery,
but, i will look for a way.
UPDATE: use your deodexer tool while following this steps without using the tool given there, the only downside is you need TWRP installed.
link : http://forum.xda-developers.com/galaxy-tab-s/themes-apps/how-to-deodex-stock-rom-t3254734
Click to expand...
Click to collapse
Thank you for the reply. I was hoping that there was a way to do it without having a custom recovery. If I am not mistaken, flashing a custom recovery will trip Knox correct?
---------- Post added at 10:45 AM ---------- Previous post was at 10:34 AM ----------
ashyx said:
Either create a flashable zip with those files or unpack the whole system image and replace those files/folders and create a flashable zip from that. Flash with flashfire.
You will need to set the correct permissions so best to use something like archi kitchen to automate it.
However considering there are a plethora of deodex roms currently available why bother?
Click to expand...
Click to collapse
I may explore creating a flashable zip (any links for newbie to creating flashable zips?) The reason being is that there aren't any deodexed ROMS (stock tw) running the latest official build for my tablet (I am running bulld LRX22G. T700XXU1BOI1)
Thanks for these explanations
Create a flashable zip for your tab using this
https://play.google.com/store/apps/details?id=zip.me
i donno how it works but seems legit, check it out.
rob.allen78 said:
Thank you for the reply. I was hoping that there was a way to do it without having a custom recovery. If I am not mistaken, flashing a custom recovery will trip Knox correct?
---------- Post added at 10:45 AM ---------- Previous post was at 10:34 AM ----------
I may explore creating a flashable zip (any links for newbie to creating flashable zips?) The reason being is that there aren't any deodexed ROMS (stock tw) running the latest official build for my tablet (I am running bulld LRX22G. T700XXU1BOI1)
Click to expand...
Click to collapse

[VE]Problem creating a custom rom

Hello community,
I'm currently trying to modify the stock rom for my GT-I8200n. I didn't find cwm for the S III mini VE, and the version of twrp I found was very buggy. So I need an odin-compatible flash file for my rom. I tried to modify the stock rom by downloading the .tar.md5 from sammobile, unpacked it with winrar and copied the system.img into an ubuntu-VM. After that I created a sys.img (or sys.raw, same problem) out of system.img using the simg2img-file I found somewhere here on xda, mounted sys.img (or sys.raw) and modified it. Then I unmounted it and used img2simg to create my system_new.img. Copied it to my windows system, into the unpacked stock rom folder, renamed it to system.img, overwriting the old system.img and packed everything into a .tar file using ZArc. Now while flashing my ROM, odin works on the system.img for some minutes and then shows a fail.
Does anyone know what I'm doing wrong?
P.S.: I tried simply using simg2img on my stock system.img and then - without mounting and modifying - used img2simg kn the sys.img file. Same problem with odin and I noticed that my new system.img is approximately 50 mb smaller than the stock img, although I didn't modify it.
I hope I described my problem well (I'm not an english native speaker, but did my best to make this text understandable )
Any ideas or hints that could maybe solve this problem are welcome.
Thank you,
Chris
I have the same problem
any solution ?

Categories

Resources