[Q][Dev Help] How to edit/modify feature.xml in a flashable zip? - Galaxy S 4 Q&A, Help & Troubleshooting

I've created a MOD and a flashable zip file to install it.
The issue, for which I cant seem to find any help on is:
On certain devices it is required to edit the /system/csc/feature.xml file.
I dont want to replace the file all together, but just add some lines (if the set isnt there) or edit the lines (if it already is there).
I figure its just some code i need to add into the updater-script, but dont know where to start?
Any help would be appreciated.
TIA.

dannyben said:
I've created a MOD and a flashable zip file to install it.
The issue, for which I cant seem to find any help on is:
On certain devices it is required to edit the /system/csc/feature.xml file.
I dont want to replace the file all together, but just add some lines (if the set isnt there) or edit the lines (if it already is there).
I figure its just some code i need to add into the updater-script, but dont know where to start?
Any help would be appreciated.
TIA.
Click to expand...
Click to collapse
If your trying to build a flashable zip , here's the link to help you to build one .http://forum.xda-developers.com/showthread.php?t=1721680 have a nice day.

Repulsa said:
If your trying to build a flashable zip , here's the link to help you to build one .http://forum.xda-developers.com/showthread.php?t=1721680 have a nice day.
Click to expand...
Click to collapse
Thanks for the reply.
I've already created a working flashable zip though.
My issue is that after someone flashes it, they then need to go into /system/etc/feature.xml and look for a few lines of code to edit or add.
What Im trying to do is to put those edits into my zip file so that the user won't need to manually edit the file afterwards.
I cant include the feature.xml along in my zip though, because in doing so it would completely overwrite the users current file --which has other important code inside of it.

Related

Do i need edit a Jar file?

Hi
Im trying to Mod a framework.zip file i downloaded (and am currently using)
I wanted to make the notification bar and pull down transperent (or nearly so)
i have edited the correct pngs and been able to re-pack and flash .zip file and it all boots ok but the bits i changed just show as a lightish grey rather than being transparent.....i read on another thread that in order for this to work you also need to edit a jar file, is this correct??
if so what do i change and what do i change it to !!!???!!!
any help or confirmation would help.....a lot !!
cheers
try with this service jar just its :http://leedroid.protogenlabs.com/#page-customization
chk13 said:
try with this service jar just its :http://leedroid.protogenlabs.com/#page-customization
Click to expand...
Click to collapse
Thank you
Frosty

[Q] Possible to change the Orange Selection Colour in Stock builds

Hi Guys,
Is it possible to change the colour of the selection colour in Stock Android (I think it's already Green in Sense Roms)? But in Stock it's Orange, I want to know if there's a way to change it to Green?
I'm guessing i just need to alter a colour code in some xml file somewhere but absolutely no idea where to start looking!
Cheers
Paul
Its in the framework-res.apk in the /system/framework folder. There are png files that you need to edit.
Use APK Manager 4.9 to decompile the file, then edit with Photoshop and compile the file again.
Make a flashable CWM zip file and flash it.
Search on the board for the how-to's.
brainmaster said:
Its in the framework-res.apk in the /system/framework folder. There are png files that you need to edit.
Use APK Manager 4.9 to decompile the file, then edit with Photoshop and compile the file again.
Make a flashable CWM zip file and flash it.
Search on the board for the how-to's.
Click to expand...
Click to collapse
Cheers Brain - Exactly what i was after! I'll give this a go this evening!
Well...if you succeeded, would you mind sharing it with us? Thats one thing im searching for since using gingerbread.

Looking for a tutorial: how to cook a ROM?

I'm looking for a guide which tells how to make a own custom ROM from another one
I mean:
1. How to add/replace/remove apps in /system/app/?
1. a) Do they need to have special permission?
2. How to replace boot screen?
3. How to add custom kernel?
4. How to add Desire lockscreen/flip clock?
5. How to add transparent notofication area?
6. How to add Power menu?
I've been serching forum, but didn't find such tutorial. Would be very thanful to get this knowledge.
I think that will be very useful for maaaany android maniacs
1. Simple delete/copy apks in .zip file using 7-Zip or any other.
2. I belive you need to put bootanimation.zip in /data/local/ folder.
3. Idk
4. For Desire lockscreen you need edited HtcLockScreen.apk; for flip clock - HtcClockWidget.apk
5. Edited /system/framework-res.apk or /system/framework/com.htc.resources.apk. I'm not sure
6. You need edited /system/framework/android.policy.jar
69. Resign your zip file using Auto Sign
Attachment doesn't load, but I know about resigning ROM after everything is done
Ad. 1. As I thought, but do the need special permissions? And I also wonder one thing. Are they installed while flashing? Cuz they need to be in system registry, I think...
I have found this: http://wiki.android.com.pl/wiki/Kon...iana_instalowanych_aplikacji_razem_z_systemem
No any permissions etc.
Found this, too. Thanks.
to add a custom kernel you have to unpack the boot image and edit the ramdisk manually, although i think there is an option in dsixda's kitchen to unpack and repack the boot.img
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Edit:
Found nice guide there: update-script syntax
tomekk_nt said:
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Click to expand...
Click to collapse
The most important part of a recovery update zip is the update script. It will tell the recovery what to do. If you want an example of a basic update package, which replaces one file in the /system/framework (although a different one) can found here. Open this and read the META-INF/com/google/android/updater-script (or whatever its called). The syntax is pretty straight forward and I think its easiest to learn from the examples of updater scripts found here on XDA. For the simple case, of only replacing/adding files to the /system partition you can leave the updater script from the above example as is and only change the files under the /system directory in the zip.
Note, that the above example uses the newer upader-script (I hope I am writing this correctly, I am writing from memory) which also has a binary file in the same directory. Some update zips use the older "update-script" lone text script. For these kind of scripts, you can find a guide here.
Personally, I use RA recovery, and for this recovery you need to sign the update zips (last thing you do of course). At least for RA recovery, both the older "update-script" and the newer "updater-script" work fine, so its up to your personal preference which do you prefer.
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
I built a kernel tool long time ago, very easy to use (only for linux)
1: unzip the file, place it where you want it eg your desktop
2: place boot.img in the working directory
3: double-click the menu icon or launch from terminal
4: it creates a new directory named BOOT-EXTRACT,edit what you want in there or change the kernel etc.. and repack it again via the kernel tool
see screenshot. here for those how want the tool >>> http://www.elelinux.se/tools/kernel_tool.zip
Edit: Only for Hero
tomekk_nt said:
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
Click to expand...
Click to collapse
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
elelinux said:
I built a kernel tool long time ago, very easy to use (only for linux)
Click to expand...
Click to collapse
And that's a good reason to install newest Ubuntu Thanks!
riemervdzee said:
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
Click to expand...
Click to collapse
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
LOL, you've got help from every well known hero dev on xda, I'm sure you'll have all the info you need now to start building rom's. Good Luck!
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
tomekk_nt said:
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
Click to expand...
Click to collapse
But it is for MS Windows, or saw I wrong ? I have also built a tool to javasign files,but should probably write a manual first,it is easy to use but some dependencies maybe not so easy for a beginner with Linux.
tomekk_nt said:
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
Click to expand...
Click to collapse
Correcto

[Q] How to create an flashable .zip file

Hello all,
I am looking for a good comprehensive guide to creating my own .zip files to flash certain changes I like to make when flashing a rom or just adding files.
Now I have found a few good guides here on XDA but they seem to no longer apply as the update script needs to be in edify and not amend. This is the issue I am having so if anyone can point me to a walk through that explains this type of thing I would appreciate it.
Anyone?
lol, i dont think developers/people-with-knowledge would go into a Q&A sub-forum .
I'm neither on of them, however here is my would-be-successful attempt p) :
1- Make all your modifications and finalize them, the root folder must be /system/ .
2- use apktool to recompile as an apk (apktool b system)
3- sign that .apk.
4- rename extension to zip and violla
theoretically, it should work.
Not shure if this can help you, but i created a zip (original Script is from dungphp) to replace files on my device from CWM:
http://forum.xda-developers.com/showthread.php?t=1241244

Updater-script zenfone 3

How would I go about editing the updater-script on the stock rom that way TWRP can flash the zip to my phone? thanks in advance for any info on how I might do this trying to flash the 8.0 ota for Z012D
Bump anyone?
Any text editor will do to edit it, it's located in META-INF/com/google/android/. Be careful, there are two files in that directory, you want updater-script not updater-binary
Open the file, delete the first few lines, pretty much up to "ui_print....."
Save it back into the rom zip and flash it. I just did this a couple hours ago thru twrp, I'm on 1802.44 with no issues.
wang1chung said:
Any text editor will do to edit it, it's located in META-INF/com/google/android/. Be careful, there are two files in that directory, you want updater-script not updater-binary
Open the file, delete the first few lines, pretty much up to "ui_print....."
Save it back into the rom zip and flash it. I just did this a couple hours ago thru twrp, I'm on 1802.44 with no issues.
Click to expand...
Click to collapse
Are you able to tell me what to get rid of? Also do I use no verify 5.1? or is there a new one?
mastermarkofroms said:
Are you able to tell me what to get rid of? Also do I use no verify 5.1? or is there a new one?
Click to expand...
Click to collapse
take a pic of the script, every one is different.
No-verity file is required when you don't use magisk or supersu. I use magisk and no, there isn't a new one.

Categories

Resources