Edit custom ROM - system folder blank?! - Android Software Development

I am using Android Image Kitchen from this thread, and I don't understand what I'm doing.
Basically, what I'm trying to accomplish, is editing this ROM so that it is compatible with my sm-G386W (ROM is for the sm-G386T). The recents fix doesn't work on my phone (security settings still crashes), so I got the keymaster files from my old ROM on my phone (kitkat), and pasted them after I flashed the new ROM, all using FX File Explorer. Fixed the recents issue perfectly.
So now I want to edit the CM 12.1 ROM to put the keymaster files right on there, and that is where I get lost.
I am able to successfully unpack the boot.img that I got from the flashable zip for the CM 12.1 ROM, but when I go to \ramdisk\system, the system folder is blank. Where in the world can I find system\vendor\firmware\keymaster and the keymaster files so I can replace them?
Like I said, I'm new, so I'm sure I'm missing something obvious. If someone can point me in the right direction on how to properly edit a custom ROM, that would be great!

Problem Solved. I use MTK THAI Development Tools unpacker/packer. Can be downloaded directly here.

Related

Creating ROMs

If I pull a system dump from any stock phone, can I just replace the system folder in the working folder (from a ROM that I already had) in my Kitchen with the system folder that I pulled from the stock phone, then add root permissions? Will I then have to build another boot.img? Will this even work, or am I barking up the wrong tree?

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...

[Q] How to merge external files with rom files?

Hey guys,
I just started the long journey of android rom development/cooking using an app called Android Kitchen, and I'm looking for some help from the more experienced. I extracted a custom rom folders (for personal use), and started to edit some of the extracted files (replacing and deleting), but I'm quite lost when it comes to merging flashable .zip folders (like lockscreens and mods) with the extracted rom file.Should I copy and paste whats inside the flashable zip into the rom file? Or should I use note editor to copy what's inside the mod file itself, copy the text, and add it to the original one? I really want to add these mods through this app rather than recovery mode. And can I emulate edited roms on my computer rather than risking my phone?
Thnx...

[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] Understanding Meta-Inf folder

So i pulled stock system folder and deodexed, zipaligned and signed.
Wanted to try flash it by twrp. So i copied one of custom roms meta inf folder but i get sysmapfile error.
Created certificates with signapk but there is no update-binary and update-script file. So i searched and learnt sth about update-script but what is exactly update-binary do? How can i edit for my rom or create one? can i use one of them with all devices rom?
Btw editing update-script didnt solve my sysmapfile error. Can someone guide me about meta-inf folder? All other articles just tells using another roms meta inf but it simply didnt work for me.
The update-binary file is different from one ROM to the next. For example, a CyanogenMod binary will be different from one in a custom ROM based off stock. In general, look at http://wiki.cyanogenmod.org/w/Doc:_About_Edify for an explanation of what the binary is. You will need to pull a binary from a custom ROM based off stock, preferably from the same version of Android.

Categories

Resources