[Q] [FOR DEVS] Cooking ROM mods directly into ROMs? [SOLVED] - EVO 4G Q&A, Help & Troubleshooting

I'm looking to get some assistance with a Sense ROM development question. I am a big fan of ca1ne's Sense 1.0 ROM modifications, mainly:
Quick Settings Notification: http://forum.xda-developers.com/showthread.php?t=1266626
-and-
Advanced Power Menu: http://forum.xda-developers.com/showthread.php?t=1314428
I've been working on a Sense 1.0 (stock) -based ROM and am trying to incorporate these mods directly into the build. So far I have only attempted the Quick Settings mod, but since I have not been successful, I have not moved forward yet with the other. Whenever I try to add the Quick Settings mod into the ROM, I lose the statusbar all together. I know that other devs have incorporated quick settings mods into their ROMs (Swagged Out comes to mind, IIRC), so I know that it is possible, but I have been unsuccessful.
Could anyone who has done this give me an idea of what I might be doing wrong? I've tried everything I can think of, from adding the SystemUI.apk directly to the ROM, pre-cook, to building a ROM from a NANDroid backup with the mod already installed. Each way it is the same result: no status bar. Same thing that happens if you don't allow the ROM to boot once before flashing the update.zip.
Kinda stumped! Thanks!

Perhaps this should be posted in the Development forum? Yes? No?
*bump*

I suggest pm'ing a dev about your question so you can get a direct response from them. Plus, they might be able to help you further into the development of your ROM. Just a suggestion
Sent from my PC36100 using xda premium

Not sure what your issue is. What is your starting base? A ruu or a compiled ota?
Here is a collection of EVO mods. click here
All of these came from my Rom, EVO classic. You should be able to cook any mod into a Rom. When testing, you need to perform fill wipes.
Also, are you using dsixda's kitchen to build zip?
Are you certain the apk you're testing works?
Do you know how to use apktool?
Which operating system do you work on?
These are just some general questions and troubleshooting technique.
Sent from my PC36100 using Tapatalk

tommytomatoe said:
Not sure what your issue is. What is your starting base? A ruu or a compiled ota?
Here is a collection of EVO mods. click here
All of these came from my Rom, EVO classic. You should be able to cook any mod into a Rom. When testing, you need to perform fill wipes.
Also, are you using dsixda's kitchen to build zip?
Are you certain the apk you're testing works?
Do you know how to use apktool?
Which operating system do you work on?
These are just some general questions and troubleshooting technique.
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
I tried a couple different starting bases. First I tried a RUU for 4.53.651.1 as pc36img.zip. Second a nandroid dump of 4.54.651 unrooted/modded installed via RUU and OTA on fresh SD card. Lastly, figuring I was messing up the base somehow, I used NinjaWolf's Rooted Stock 4.53.651.1.
I have been performing 3x cache, 3x dalvik and 1x userdata/factory reset wipes from recovery prior to each flash. Thing is that the rom that i end up with before trying to implement ca1ne's quick settings mod all flash properly and load perfectly. No issues at all. It's only after I try to combine the quick settings mod into any zip to flash that the issue arises. That being said, whenever I flash the mod over the custom rom, it works flawlessly. Just can't figure out how to get it cooked into the flashable zip.
Yes, I am using dsixda's kitchen for compiling the zips. I am still pretty new making roms, so I've not dived too far into the commands behind the scripts contained within.
To be honest, I've only used apktool a couple times. Mainly to decompile the stock SystemUI.apk and the one in ca1ne's zip, to diff. I would not say that I am fluent in it's use, by any means.
My primary machine is a Linux Mint Debian Edition box, with a Windows 7 Ultimate partition that I use for gaming and any time I need Windows (revonutionary.io, for example). Secondary is MacBook Pro (work machine), running 10.6, setup with dsixda's kitchen as per the tutorial. I work in IT/IS, so I am more than comfortable with each OS, I just prefer Linux/UNIX. I am also not a stranger to various programming and shell scripting languages, but I am not a master developer.
Hope that explains a bit more. Thanks, tommytomatoe, for your time. I really appreciate it! Also, I will take a look at your mods collection as soon as I get to my rig.

If you're using the ruu or pc36img you ate playing with odex. Ca1ne's uploaded systemui is deodex. That could explain the lack.of status bar.
Sent from my PC36100 using Tapatalk

tommytomatoe said:
If you're using the ruu or pc36img you ate playing with odex. Ca1ne's uploaded systemui is deodex. That could explain the lack.of status bar.
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
Yeah, I saw that was one of the requirements, but I always deodex /system/framework and /system/app on my personal builds so that the .apks can be modded or themed, should I desire to do so. When using the RUU and pc36img, I let it boot, do the OTA updates, then sync a test google account and update apps through the market. After that is done, I boot into recovery (after flashing it back with fastboot... thank you HTC) and do a nandroid backup to use as a pure stock base. Once I have the system.img and boot.img I take it to the kitchen to root, deodex, etc..
I am wondering, though, why the effect is the same if you extract the SystemUI.apk manually and drop it into the ROM as it does if you immediatly flash the quick settings zip directly after a fresh rom flash, without allowing the rom to boot up completely first. I can see a minor coorelation, but if I can figure out whatever dependancy I am missing, then I know I should be able to get it to work.

grayn0de said:
Yeah, I saw that was one of the requirements, but I always deodex /system/framework and /system/app on my personal builds so that the .apks can be modded or themed, should I desire to do so. When using the RUU and pc36img, I let it boot, do the OTA updates, then sync a test google account and update apps through the market. After that is done, I boot into recovery (after flashing it back with fastboot... thank you HTC) and do a nandroid backup to use as a pure stock base. Once I have the system.img and boot.img I take it to the kitchen to root, deodex, etc..
I am wondering, though, why the effect is the same if you extract the SystemUI.apk manually and drop it into the ROM as it does if you immediatly flash the quick settings zip directly after a fresh rom flash, without allowing the rom to boot up completely first. I can see a minor coorelation, but if I can figure out whatever dependancy I am missing, then I know I should be able to get it to work.
Click to expand...
Click to collapse
Why use the nandroid images? Just use the pc36img.zip
If the file itself gives you that issue then I would recommend duplicating that mod on your own systemui. There are always traces of signature and permissions issues using a different file than your own, unless you know how to disable signature verification.
I don't ever recommend creating roms from nandroid image. Just stick with the pc36img
Lastly. And I truly wish this rumor was never created. Odex can be themed, modded, and customized just like deodex
Sent from my PC36100 using Tapatalk

Not clear on how exactly to apply the OTA patches to the pc36img without going the route I have been taking. Although, I really don't think there was much to this latest OTA security update that actually benefits the user anyway, so I might just stick with the 4.53 base for now. At least until I figure out this quick settings stuff.
I'll decompile the two apks and diff them to see if I can duplicate the mod, as you suggest.
You know I kinda thought that it was odd that people said that, as there have been themes since early ADP1 days. Guess I figured it was just something to chalk up to changes across OS versions. So is deodex just easier to theme/mod, since the dex file is recompiled into the apk? One less piece, so to speak?

Look here.
http://forum.xda-developers.com/showthread.php?t=1320660
Pull those files from the 4.54 ota. Use the pc36img from latest available, 4.53. In kitchen, select the pc36img.zip as your working rom. Then apply the changes as laid out in the thread I linked you. Hope that helps.
Sent from my PC36100 using Tapatalk

Seems simple enough. Thank you!.
I found this while looking for something else and gave it a shot hoping that it would, on the off chance work, but no love:
http://forum.xda-developers.com/showthread.php?t=1290753
I'm still digging into the original and modded SystemUI.apk files to see what I need to do to duplicate the quick settings. Also, I've been checking out your android-utility. Awesome work, man!

I figured it out the issue.
I decompiled both the original and modded apk files, then used DiffMerge to diff the project folders for the apks. This brought up a list of files that had been modified, one of which was:
res/drawable-hdpi/statusbar_background_transparent.9.png
After merging changes in all of the .smali files, this file was the only one that remained to be modified but, since it is a binary png, I could not do so. The first time I tried to reconstruct the mod, I simply copied the modded .png file into the proper spot of my SystemUI.apk, then recompiled with original META-INF, signed it and dropped it into the ROM's working folder. Failure...
Second time around, I simply omitted the .png and tested. Worked perfectly!
tommytomatoe: Thanks a ton for all of your insight and advice (in this thread and others). It has really helped me out. Now that this little hurdle has been leaped, I can continue on with the ROM revisions!

Related

rom editing question

so basically i have flashed cm6 on my incredible and a theme and i want to know if there is a way i can make a rom of what i have on my phone now of if i can combine the zips to make a working rom i can further edit. i have a rom kitchen set up and i am still trying to learn all the in's and out's of it.
undeclared said:
so basically i have flashed cm6 on my incredible and a theme and i want to know if there is a way i can make a rom of what i have on my phone now of if i can combine the zips to make a working rom i can further edit. i have a rom kitchen set up and i am still trying to learn all the in's and out's of it.
Click to expand...
Click to collapse
I would say that is what alot of people are doing right now with incredible rom's.....that is why people are releasing patches and fixes after seeing them working in other roms.
......I have a rather easy question that applies to this subject also....
before loading a rom to my phone, can i go into the zip file and remove some 3rd party app apk files that i don't want before running it and will it still be ok ?
JustinD,
U can not just unzip it change things and rezip. It needs a signiture. Use the basic htc kitchen that's posted in chef central, it will unzip it into a working folder allowing u to change things at your will, u also use the kitchen to rezip and sign.
Sent from my ADR6300 using XDA App
tcberg2010 said:
JustinD,
U can not just unzip it change things and rezip. It needs a signiture. Use the basic htc kitchen that's posted in chef central, it will unzip it into a working folder allowing u to change things at your will, u also use the kitchen to rezip and sign.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Excellent. Thank you. I figured it wasn't as simple as I put it, but I just wanted to make sure before I did something stupid.
Or use 7zip to manipulate files in the archive without even having to unzip it.
Sent from my Incredible using XDA App
mini_monsta said:
Or use 7zip to manipulate files in the archive without even having to unzip it.
Sent from my Incredible using XDA App
Click to expand...
Click to collapse
No. Changing even 1 byte will change the signature needed. You need to use the kitchen so you can resign the ROM and flash it.
Even if u did just unzip, rezip, and flash it would just throw back an invalid signature error and return u to recovery menu. No real harm done.
Sent from my ADR6300 using XDA App
Clockwordmod has signature validation disabled by default. So it will still flash if you change a kb or remove an app.

Delete apps from rom

When I have downloaded a rom is there a way to edit the zip file before I flash it. I want a sense hd rom but they all have alot of stuff I dont want . I would like a sense hd rom that is almost bare. Thanks
Sent from my PC36100 using XDA App
Maybe this is what you are looking for http://forum.xda-developers.com/showthread.php?t=758197
I think you posted in the wrong section, so if you post gets moved check Q & A or General section.
Sacs has a sense hd rom and calkulin has one too but they both have alot of apps that I dont want. Is there a way to unzip rom and remove stuff before I flash it to phone.
Sent from my PC36100 using XDA App
Step 1 Setup Android Kitchen
Step 2 Create a Custom Rom
OR....How to Creat Custom Rom on Android
Thanks alot
Sent from my PC36100 using XDA App
No Problem. Good luck bro. You are a braver man than me to try this. I have thought about making my own Rom because every one I try I like some things but not everything. I would be cool to combine features or implement features from other Rom's and take out the things you don't like and have one happy Rom that you created and use designed especially for you! Anyway, let me know the results and how difficult it is and maybe I'll give it a shot.
Alternatively, you can use apps like System App Remover to remove apps though you would have to remove each app individually...
or you could just open the zip file with any zip application and remove the files you want and then flash
ZIP
after unzipping and removing apps does the zip need to be signed before flashing or will it be ok ?
Kingmac38 said:
after unzipping and removing apps does the zip need to be signed before flashing or will it be ok ?
Click to expand...
Click to collapse
It depends witch recovery are you using with Amon-Ra you need signed zips but with Clockwork you can flash unsigned zips.
gmramirez1973 said:
It depends witch recovery are you using with Amon-Ra you need signed zips but with Clockwork you can flash unsigned zips.
Click to expand...
Click to collapse
download Regaw's zip signer if you are unsure
just open the zip file in winrar, then delete the apks you dont wont. No need to resign. NOTICE I DID NOT SAY UNZIP the file.

Adding APKs

Is there any way to unzip a ROM, and add the APKs for the apps that I want? Like for instance, a ROM may not come with Google voice, so I wanna add that in and make it like a system app. Is this possible, or do I have to just download it, along with the rest of the apps I want?
Sent from my rooted MIUI Dinc2
I'm not quite sure but there's a program that is supposed to zip the rom into a .zip and do the opposite so I don't see why you cannot unzip a rom, add the apk's u want and then rezip and flash. I would be careful though these developers put alot of work into these roms so who knows you could accidentaly remove something crucial to the system, look into the Android software developement area, there's alot of information on how to make roms and such. I tried learning what I needed to to make a rom but got lost about 3 hours into reading lol. In the main forum area under android developement/hacking should be a noob corner somewhere
What's the point of doing what you're asking anyway? Just to have all your apps installed as you install the rom?
Sent from my Incredible 2 using Tapatalk
yeah, so then I don't have to go find them. Lol more of a vanity thing. I'm not worried about taking stuff out, just adding to.
Sent from my rooted MIUI Dinc2
You don't have to unzip the ROM if you have winrar or 7zip right click on the ROM open as archive find system/app put the apk files in that folder close the ROM zip out and then do as you normally would to flash the ROM it will instal what you add
You can adb pull the .apk files you want them add to the zip it isn't suggested to unzip sometimes it corrupts the zip file
Sent from my VS910 4G using xda premium
That's a good suggestion. Can't you also just do a batch backup with titanium and then do a batch restore once you flash your new rom?
Sent from my Incredible 2 using Tapatalk
Yeah, but then there's the long process of letting the apps install and all that... its just a pain. I mean, I don't mind doing it, I was just asking if it'd be easier to do that
Sent from my rooted MIUI Dinc2
I used to do this in the past to remove and install Apks before flashing a new rom. Kind of personalize it for what I wanted and what I use. I haven't been doing this lately though. I just do a batch restore with Titanium backup now. It's pretty quick, and has worked well.

How can I add softkeys WITHOUT using a rom? (only rooted nothing else)

I want to be 100% stock but still add a search and menu softkeys to my navigation bar. I don't want to have to flash a rom. Most of the softkey threads I looked through assume you are already on a rom and I am not.
How can I do this without a rom?
ap3604 said:
I want to be 100% stock but still add a search and menu softkeys to my navigation bar. I don't want to have to flash a rom. Most of the softkey threads I looked through assume you are already on a rom and I am not.
How can I do this without a rom?
Click to expand...
Click to collapse
If you modify your system files, you are no longer 100% stock. OTA updates will not apply correctly in the future, FYI.
To modify your softkeys you need to modify your systemui.apk. The process shouldn't be much different than doing it on a rom.
Extract the files using root explorer, replace them, then repackage them.
ap3604 said:
I want to be 100% stock but still add a search and menu softkeys to my navigation bar. I don't want to have to flash a rom. Most of the softkey threads I looked through assume you are already on a rom and I am not.
How can I do this without a rom?
Click to expand...
Click to collapse
Then is not 100% stock lol
Sent from my Galaxy Nexus using xda premium
ap3604 said:
I want to be 100% stock but still add a search and menu softkeys to my navigation bar. I don't want to have to flash a rom. Most of the softkey threads I looked through assume you are already on a rom and I am not.
How can I do this without a rom?
Click to expand...
Click to collapse
The softkey .png files are in this location:
/system/app/SystemUI/res/drawable-xhdpi
You should then be able to push using adb.
But yeah, as others have said, don't do it if you want to remain 100% stock.
Use the vrtheme system. It will modify just the images, and backup whatever it modifies.
I did this on stock before. Just pull the systemUI from a rom that has what you want and flash it to your phone. You're good to go and still stock rom.
Wow, some funny responses here.
Well first off to add search and menu keys will require more than just adding images to systemUI. It will also need to have the additions of the commands added to xml and java files within systemUI.
And I would also NOT recommend just yanking a systemUI.apk from any old rom and pushing it to your device while running a stock rom with odex files.
Grow some balls and flash a rom and enjoy.
good day.
chopper the dog said:
Wow, some funny responses here.
Well first off to add search and menu keys will require more than just adding images to systemUI. It will also need to have the additions of the commands added to xml and java files within systemUI.
And I would also NOT recommend just yanking a systemUI.apk from any old rom and pushing it to your device while running a stock rom with odex files.
Grow some balls and flash a rom and enjoy.
good day.
Click to expand...
Click to collapse
Yeah you have to delete the system ui odex file too. But I've done this already and it works no problem.

[MOD] H To 4G Icon (All Roms)

This mod is a flashable zip which was created by biohazrd51 and I. It changes the 'H' icon in the status bar to the '4G' one. See below for all devices.
Note that it works for Mimicry only. Also, you will lose this mod every time you update the rom. I will take no responsibility if you magically transform your phone into a new device, the HTC paperweight
That said, all you need to do is:
1. Download the attached update-signed.zip to the root of your sd card.
2. Reboot into recovery, and make a nandroid backup, incase anything goes wrong. (It shouldn't)
3. Then, select install from sd card, and click on the update-signed.zip.
4. Reboot and enjoy.
Any questions,feel free to ask.
*Edit* blk_jack has put together a flashable zip that'll modify the H icon to 4G on any ROM (hdpi only). This also works in JB.This doesn't actually replace the SystemUI.apk, it just replaces the icons inside it and re-zip/zipaligns it.
Download and flash through recovery:
http://mimic.ca/~jeff/h_to_4g-blk.zip
If we have helped you, don't forget to press thanks!
blk_jack said:
Hm, which SystemUI.apk are you guys using for the base? The reason I ask is because mimicry contains many SystemUI changes that other cm9 based roms don't have. Replacing that file will break things for sure.
There are definitely better ways of doing this than providing a SystemUI.apk to flash over, though. I'll see what I can do.
EDIT:
Alright I just put together a flashable zip that'll modify the H icon to 4G on any ROM (hdpi only). This should also work in JB, though I haven't tested it. This doesn't actually replace the SystemUI.apk, it just replaces the icons inside it and re-zip/zipaligns it.
http://mimic.ca/~jeff/h_to_4g-blk.zip
Click to expand...
Click to collapse
unless you updated it from the general section
dragon-son said:
unless you updated it from the general section
Click to expand...
Click to collapse
Added blk_jack's mod.
Sent from my HTC Vision using xda app-developers app
masterleron said:
Also, you will lose this mod every time you update the rom.
Click to expand...
Click to collapse
It won't do that if you add addon.d support for it in /system/addon.d/ to preserve the SystemUI.apk app during updates. (course it would be better to perform the update and simply flash the zip back over it due to the type of app being modified).
Though instead what you could do is have a script in /etc/init.d/ to swap out the icons on bootup, and use the addon.d script to preserve that init script. That'll keep without having to reflash it all the time, like is already don't with google apps, or my dataswap/sd-ext enabler.
*Edit*
This also works in Jelly Bean, tested not too long ago.
Sent from my HTC Vision using xda app-developers app

Categories

Resources