PSA: You Can Optimize Your Note 4’s Recents Menu & RAM

The Note 4 never had the fastest Recents Menu, and despite its 3GB of RAM, … more

XDA Picks: Best Apps of the Week (July 25 – Aug 1)

Apps are at the front and center of any smartphone experience, and with over a … more

Voices Of XDA: Orbiting The Earth With Android

Editor’s note: This week’s feature has been written by forum … more

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

Xposed - Legacy thread. Don't panic, Xposed is still here.

2,455 posts
Thanks Meter: 37,146
 
By rovo89, Senior Recognized Developer on 31st March 2012, 02:55 PM
Thread Closed Subscribe to Thread Email Thread
16th April 2013, 05:03 AM |#1001  
ddmitcyber's Avatar
Junior Member
Thanks Meter: 1
 
More
Quote:

@Override
public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
XResources.setSystemWideReplacement("android", "drawable", "clock_dial",(R.drawable.new_clock));
}

this not work for me

thanks for reply
Last edited by ddmitcyber; 16th April 2013 at 05:08 AM.
 
 
16th April 2013, 05:11 AM |#1002  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 37,146
 
Donate to Me
More
You are trying to replace a drawable wih an integer? That can't work, neither for framework-res nor for SystemUI.

You can either use "new XResources.DrawableLoader { ... }" or the XModuleResources/modRes.fwd approach (as mentioned in the Github wiki page). If you bundle the new image with your module, the second option is probably better/easier.
The Following User Says Thank You to rovo89 For This Useful Post: [ View ]
16th April 2013, 05:29 AM |#1003  
ddmitcyber's Avatar
Junior Member
Thanks Meter: 1
 
More
please example code setReplacement for change icon in framework-res.apk or settings.apk

I promise not to ask this stupid question again
The Following User Says Thank You to ddmitcyber For This Useful Post: [ View ]
16th April 2013, 02:23 PM |#1004  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter: 4,473
 
Donate to Me
More
Quote:
Originally Posted by ddmitcyber

please example code setReplacement for change icon in framework-res.apk or settings.apk

If you want to change resources in the framework instead of a specific package, you need to do it in initZygote instead of handleInitPackageResources.

Here's an example that I'm using, to replace a dimension resource in the framework. You can do the same to fwd a drawable to a resource bundled in your module.
Code:
	public void initZygote(StartupParam startupParam) throws Throwable {
		prefs = new XSharedPreferences(MY_PACKAGE_NAME);
		modulePath = startupParam.modulePath;
		if (prefs.getBoolean("status_bar_180dpi", false)) {
			XModuleResources modRes = XModuleResources.createInstance(modulePath, null);
			XResources.setSystemWideReplacement("android", "dimen", "status_bar_height", modRes.fwd(R.dimen.status_bar_height));
			XResources.setSystemWideReplacement("android", "dimen", "status_bar_icon_size", modRes.fwd(R.dimen.status_bar_icon_size));
		}
	}
The Following 3 Users Say Thank You to Tungstwenty For This Useful Post: [ View ]
16th April 2013, 03:34 PM |#1005  
mtktauseef's Avatar
Member
Flag Kanpur
Thanks Meter: 114
 
Donate to Me
More
Thats A good App
Can I change My 2.3 Style ????
16th April 2013, 05:21 PM |#1006  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 37,146
 
Donate to Me
More
Quote:
Originally Posted by mtktauseef

Can I change My 2.3 Style ????

I don't understand the question. But if "2.3" refers to Android version 2.3 (Gingerbread), then this won't work for you. It requires 4.0 (ICS) or later (see FAQ in second post).
The Following User Says Thank You to rovo89 For This Useful Post: [ View ]
17th April 2013, 08:34 AM |#1007  
Member
Thanks Meter: 11
 
More
The disabler works only for clockworkmod? What if I got TWRP recovery?
17th April 2013, 09:32 AM |#1008  
m1l4droid's Avatar
Senior Member
Flag Tehran
Thanks Meter: 1,057
 
More
Quote:
Originally Posted by apex88

The disabler works only for clockworkmod? What if I got TWRP recovery?

Doesn't matter.

Sent from my GT-I9300 using Tapatalk 2
17th April 2013, 01:00 PM |#1009  
paulobrien's Avatar
Senior Member
Flag Norwich
Thanks Meter: 6,398
 
More
A follow up to the issue I was having with /mnt/asec installation.

I've actually worked around it by getting the module itself to check the app's sourceDir (via pm.getApplicationInfo) and if it's /mnt/asec, then to pop up an alert to the user followed by initiating an installation of the module's own APK which i'm bundling in the module itself.

Not ideal arguably, but it works pretty smoothly from a user perspective.

P
The Following 2 Users Say Thank You to paulobrien For This Useful Post: [ View ]
17th April 2013, 06:36 PM |#1010  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 37,146
 
Donate to Me
More
Ok, so it's basically the same APK that you are delivering inside itself? Probably with a different package name as it has to be unique? Or is the app basically the installer for your module, maybe with some additional options?
17th April 2013, 08:32 PM |#1011  
paulobrien's Avatar
Senior Member
Flag Norwich
Thanks Meter: 6,398
 
More
Quote:
Originally Posted by rovo89

Ok, so it's basically the same APK that you are delivering inside itself? Probably with a different package name as it has to be unique? Or is the app basically the installer for your module, maybe with some additional options?

It's delivering exactly the same APK which installs over the top of itself... But a regular install like that goes to /data/app rather than /mnt/asec so problem solved!

P

Sent from my HTC One using Tapatalk 2

Read More
Thread Closed Subscribe to Thread

Tags
don't ask questions about modules here!!!, framework, xposed
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes