Re: Making "Stock" Custom ROMs Defunct (XposedFramework) - Tweaks for any ROM Version
This is an amazing mod with huge potential for the future. I installed it recently to play with per app settings and it is just wonderful to have so much customisation power at my fingertips.
I am sure there are more awesome modules I will get to try and limitless possibilities for future modules.
Has anyone considered implementing Openpdroid through this? Is it even possible?
My phones: Galaxy Note II SGH-T889V (with LTE enabled), Nexus S GT-I9020A
Previous phones: Galaxy Gio GT-S5660M (Arpeggiomod ROM / Discussion, stock rooted ROM).
Phones for which I play "tech support" for family and friends: Galaxy Nexus GT-I9250, Galaxy Q SGH-T589R, Galaxy 551 GT-I5510M, LG C-800G Eclypse
AW: Making "Stock" Custom ROMs Defunct (XposedFramework) - Tweaks for any ROM Version
I think it should get possible, at least to a certain extent. However, I assume that many modifications are necessary, which means it will be quite some effort. Probably many of the changes have to be implemented differently in an Xposed module than when modifying the source code directly. Sometimes, this will make it easier, but in other places you might need more code to do the same. Definitely not an easy project. If someone wants to give it a try, go ahead. I can assist a bit with specific implementation questions, but you should already be an experienced developer.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
Today i got a request of somebody wanting to mod the multiwindow bar to 240DPI. But doing this will make the bar not fill fullscreen.
So spent pretty much my whole sunday, on this and pretty much came up empty.
Question time, so looked into the resources and found a table of dimensions. (dimens.xml)
So i tried overwriting all which have height in them, to a smaller value and see if anything changes.
But nothing happens at all, The only thing i can think of is that i am using the wrong datatype somehow.
Either that or application doesn't use it's resources for sizes, but then why did they even make the resources.
So before i spend tons more hours fumbling about, Is it the application or am i replacing the resources incorrectly?
At the moment, this kind of "simple" replacement is only possible for: Boolean, Color, Integer, int[], String and String[].
Dimensions can be replaced anyway, but currently only by forwarding them to your own module. See the section "Complex resources" on this page: https://github.com/rovo89/XposedBrid...cing-resources
That said, I think directly replacing dimensions would be nice, so it will add it to my list for future versions. But don't expect that anytime soon, so better use the forwarding approach for now, which basically means you need to add a dimens.xml to your module with those dimensions you want to change and then set the replacements in your code with a reference to them as described on the wiki page.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
Unfortunately dimensions values can't be replaced directly like that.
Check the documentation here and the code here.
Notice that unlike what happens for Boolean, Color, etc. (the documented "simple" types), any potential stored replacement is only used if it's a forwarded.
You'll need to create the resources in you mod and set a forwarder.
@rovo89, this is something which I don't know if it makes sense to analyze. Should it be possible (and is it feasible) to provide the float value directly, in case the mod's author wants to handle a large number of resources and/or dynamic values AND he's willing to do the dpi math himself?
@rovo89, this is something which I don't know if it makes sense to analyze. Should it be possible (and is it feasible) to provide the float value directly, in case the mod's author wants to handle a large number of resources and/or dynamic values AND he's willing to do the dpi math himself?
I think our posting times overlapped. I thought about using the method "public static float applyDimension(int unit, float value, DisplayMetrics metrics)" in the TypedValue class. The metrics come from the Resources instance, whereas the unit (e.g. COMPLEX_UNIT_PX, COMPLEX_UNIT_DIP) and the value are the replacement. I'm not sure what the API for this could look like to be able to store two pieces of information, probably an instance of a to-be-created class would be necessary. One possibility:
But we already have 6 set[SystemWide]Replacement methods... to be consistent, I would need to add another 6 of them. Or maybe accept float replacements (= pixels) and strings (to be split into value and unit)? But then, if you want to set the replacement dynamically, you would need to compose a string, which the framework would need to split again...
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
From HTML to LEDs or Android to Arduino, Hardware Hacking is a pastime of many people … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?