Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,283 Members 38,497 Now Online
XDA Developers Android and Mobile Development Forum

Making "Stock" Custom ROMs Defunct (XposedFramework) - Tweaks for any ROM Version

Tip us?
 
RabidMonkeyOnCrack
Old
#851  
Member
Thanks Meter 7
Posts: 51
Join Date: Nov 2012
Location: Los Angeles
Quote:
Originally Posted by Froid View Post
The modules are apk's but certain browsers download as a zip. Just rename from .zip to .apk and install normally.
Weird... I've downloaded other apks on my phone using Chrome and they downloaded fine. That's for clearing that up though.
 
knightrocker
Old
#852  
Senior Member
Thanks Meter 139
Posts: 958
Join Date: Oct 2010
Location: Bangalore
Default Re: Making "Stock" Custom ROMs Defunct (XposedFramework) - Tweaks for any ROM Version

Quote:
Originally Posted by RabidMonkeyOnCrack View Post
Weird... I've downloaded other apks on my phone using Chrome and they downloaded fine. That's for clearing that up though.
Just happens sometimes :P happens with media fire sometime too

Sent from my GT-N7100 using xda premium
The Following User Says Thank You to knightrocker For This Useful Post: [ Click to Expand ]
 
geovas77
Old
#853  
geovas77's Avatar
Member
Thanks Meter 14
Posts: 56
Join Date: Aug 2012
Default 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.

Sent from my Galaxy Note II using Tapatalk 2
 
Darkshado
Old
#854  
Darkshado's Avatar
Senior Member
Thanks Meter 459
Posts: 986
Join Date: Apr 2011
Location: Montréal

 
DONATE TO ME
Has anyone considered implementing Openpdroid through this? Is it even possible?
My phones: Galaxy Note II SGH-T889V (with LTE enabled / ext4 SD card support on TouchWiz ROMs), Motorola XT-1045 Moto G LTE (TWRP)
Previous phones: Nexus S GT-I9020A, Galaxy Gio GT-S5660M (Arpeggiomod ROM / Discussion, stock rooted ROM), Motorola XT-1032 Moto G.
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, Motorola XT-1032 Moto G
 
rovo89
Old
#855  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter 14,112
Posts: 2,367
Join Date: Jan 2012
Default 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!
 
Scalee
Old
#856  
Scalee's Avatar
Senior Member
Thanks Meter 245
Posts: 184
Join Date: Aug 2009

 
DONATE TO ME
Hi guys,

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?

Code:
	@Override
	public void handleInitPackageResources(InitPackageResourcesParam resparam) throws Throwable {
		if (!resparam.packageName.equals("com.sec.android.app.FlashBarService"))
			return;
		
		XposedBridge.log("Found flashbar");
		
		resparam.res.setReplacement("com.sec.android.app.FlashBarService", "dimen", "full_height", 10);
		resparam.res.setReplacement("com.sec.android.app.FlashBarService", "dimen", "applist_flashbar_full_height", 10);
		resparam.res.setReplacement("com.sec.android.app.FlashBarService", "dimen", "applist_scroll_view_height", 10);
		resparam.res.setReplacement("com.sec.android.app.FlashBarService", "dimen", "applist_flash_bar_height", 10);
		resparam.res.setReplacement("com.sec.android.app.FlashBarService", "dimen", "applist_appicon_item_height", 10);
	}
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <dimen name="center_bar_width">360.0dip</dimen>
    <dimen name="center_bar_height">20.0dip</dimen>
    <dimen name="center_bar_focus_width">16.0dip</dimen>
    <dimen name="center_bar_focus_height">15.0dip</dimen>
    <dimen name="center_bar_button_width">42.0dip</dimen>
    <dimen name="center_bar_button_height">42.0dip</dimen>
    <dimen name="center_bar_button_margin">12.0dip</dimen>
    <dimen name="center_combination_width">360.0dip</dimen>
    <dimen name="center_combination_height">224.0dip</dimen>
    <dimen name="center_bar_fling_first_left">0.0dip</dimen>
    <dimen name="center_bar_fling_first_top">66.0dip</dimen>
    <dimen name="center_bar_fling_first_right">360.0dip</dimen>
    <dimen name="center_bar_fling_first_bottom">82.0dip</dimen>
    <dimen name="center_bar_fling_second_left">0.0dip</dimen>
    <dimen name="center_bar_fling_second_top">582.0dip</dimen>
    <dimen name="center_bar_fling_second_right">360.0dip</dimen>
    <dimen name="center_bar_fling_second_bottom">602.0dip</dimen>
    <dimen name="center_bar_docking_margin">30.0dip</dimen>
    <dimen name="full_width">360.0dip</dimen>
    <dimen name="full_height">640.0dip</dimen>
    <dimen name="applist_indicator_space">25.0dip</dimen>
    <dimen name="applist_bar_text_size">6.0dip</dimen>
    <dimen name="applist_move_button_width">82.5dip</dimen>
    <dimen name="applist_move_button_height">27.0dip</dimen>
    <dimen name="applist_move_button_margin">75.0dip</dimen>
    <dimen name="applist_drawer_move">78.0dip</dimen>
    <dimen name="applist_scroll_view_bg_margin">24.0dip</dimen>
    <dimen name="applist_scroll_view_margin">27.0dip</dimen>
    <dimen name="applist_scroll_view_height">75.0dip</dimen>
    <dimen name="applist_scroll_view_padding">21.0dip</dimen>
    <dimen name="applist_appicon_item_width">75.0dip</dimen>
    <dimen name="applist_appicon_item_height">60.0dip</dimen>
    <dimen name="applist_appicon_item_margin">14.0dip</dimen>
    <dimen name="applist_appicon_image_width">36.0dip</dimen>
    <dimen name="applist_appicon_image_height">36.0dip</dimen>
    <dimen name="applist_appicon_text_width">70.0dip</dimen>
    <dimen name="applist_appicon_text_height">18.0dip</dimen>
    <dimen name="applist_flash_bar_height">102.0dip</dimen>
    <dimen name="applist_flashbar_full_width">360.0dip</dimen>
    <dimen name="applist_flashbar_full_height">615.0dip</dimen>
    <dimen name="edit_list_left_padding">11.0dip</dimen>
    <dimen name="edit_list_right_padding">12.0dip</dimen>
    <dimen name="edit_list_top_padding">41.0dip</dimen>
    <dimen name="edit_list_bottom_padding">41.0dip</dimen>
    <dimen name="edit_list_left_padding_h">15.0dip</dimen>
    <dimen name="edit_list_right_padding_h">15.0dip</dimen>
    <dimen name="edit_list_top_padding_h">12.0dip</dimen>
    <dimen name="edit_list_bottom_padding_h">11.0dip</dimen>
    <dimen name="edit_list_button_height">59.0dip</dimen>
    <dimen name="edit_list_button_width">80.0dip</dimen>
</resources>
Thanks
>> Support developers who don't force you to pay << >> My donation link <<
 
rovo89
Old
#857  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter 14,112
Posts: 2,367
Join Date: Jan 2012
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!
 
Tungstwenty
Old
#858  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter 4,382
Posts: 1,813
Join Date: Nov 2011

 
DONATE TO ME
Quote:
Originally Posted by Scalee View Post
So before i spend tons more hours fumbling about, Is it the application or am i replacing the resources incorrectly?
Code:
		resparam.res.setReplacement("com.sec.android.app.FlashBarService", "dimen", "applist_appicon_item_height", 10);
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?

Device: Xperia Z (C6603)
ROM: Stock 4.4.2 10.5.A.0.230
Locked bootloader, rooted, XZDualRecovery
Retired device: Samsung Galaxy S2 (GT-I9100)

My threads that you might find useful:

SUPERCOMPUTER: what it sounded like before you bought it
 
Scalee
Old
#859  
Scalee's Avatar
Senior Member
Thanks Meter 245
Posts: 184
Join Date: Aug 2009

 
DONATE TO ME
Good that i caved in then :P I also kind of stupid of me.
Because i did read that it only supported said datatypes, in one ear (eye?) out the other.

Will have another crack at it after dinner.
Thanks guys
>> Support developers who don't force you to pay << >> My donation link <<
 
rovo89
Old
#860  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter 14,112
Posts: 2,367
Join Date: Jan 2012
Quote:
Originally Posted by Tungstwenty View Post
@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:
Code:
resparam.res.setReplacement("com.sec.android.app.FlashBarService", "dimen", "applist_appicon_item_height", resparam.res.createDimensionReplacement(10.0f, COMPLEX_UNIT_DIP));
Easier to type:
Code:
resparam.res.setDimensionReplacement("com.sec.android.app.FlashBarService", "dimen", "applist_appicon_item_height", 10.0f, COMPLEX_UNIT_DIP);
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!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes