Remove All Ads from XDA

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

2,585 posts
Thanks Meter: 81,710
 
By rovo89, Senior Recognized Developer on 31st March 2012, 02:55 PM
Thread Closed Email Thread
9th March 2014, 06:53 PM |#9501  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 81,710
 
Donate to Me
More
Quote:
Originally Posted by Falseclock

but getting error java.lang.NoClassDefFoundError: com.android.phone.widget.keypadbtn.HtcKeypadBgBtn

does it mean hooked package can't be imported and hooked simultaneously?

No, that means that the class couldn't be loaded. When classes are referenced like you did, they are loaded with the caller's classloader, which only includes the boot classes and your module's APK, not the ones of the loaded package. Actually the resources might also be loaded in the SystemUI etc. where those classes wouldn't be available at all. Even if you included the class in your APK, it wouldn't work. It could resolve the class, but it would be incompatible with the object you get from findViewById() because even though the classes have the same name, they have been loaded with a different classloader.

I don't think you can do this cast, but you probably don't even need to. You can do most things if you just leave it as View or another well-known superclass. If you need to call custom methods, you can use the XposedHelpers.
The Following 3 Users Say Thank You to rovo89 For This Useful Post: [ View ]
 
 
9th March 2014, 06:54 PM |#9502  
Senior Member
Flag XBerg36
Thanks Meter: 632
 
More
Quote:
Originally Posted by rovo89

Right, log 1b definitely shows that the XPrivacy is loaded. That's about as much as I can say, so everything looks fine to me. XPrivacy is a huge module and I know very little about how it works and what could go wrong. It might not even be the Xposed part of it, maybe the UI just didn't get everything right. I think only the module author can help you with this. I also had a quick look into the Github issue. I think he assumed that log 2) was taken after the reboot, at least that's what I thought at first. But that's not the case, it's loaded correctly in log 3.

Thx for your efforts.

Yes, i am sharing your assumption and just reported the issue to M66B again!

Keep on your excellent work!
The Following User Says Thank You to tycoo For This Useful Post: [ View ] Gift tycoo Ad-Free
9th March 2014, 07:05 PM |#9503  
Falseclock's Avatar
Senior Member
Flag Almaty
Thanks Meter: 367
 
Donate to Me
More
Quote:
Originally Posted by rovo89

You can do most things if you just leave it as View or another well-known superclass. If you need to call custom methods, you can use the XposedHelpers.

Exactly! Thanks! Did not surmise!
9th March 2014, 07:08 PM |#9504  
Senior Member
Flag Jacksonville, FL
Thanks Meter: 41
 
More
Quote:
Originally Posted by Joyslan

I am using it right now, on the latest SlimKat weekly!

Nexus 4 - Tapatalk

I can't get the Xposed Framework to reboot or install...When I try to install/reboot it gives me a blank error message >.<
Edit:Got it working with a flashable zip..
9th March 2014, 07:36 PM |#9505  
Junior Member
Thanks Meter: 0
 
More
Thanks!
Quote:
Originally Posted by rovo89

Some people had issues with "screen filter" software that placed a blind spot in exactly the place where the install button is. Or maybe Android is doing that by itself when you use such an app, one of the API demos is about "secure" parts of the UI that cannot be overlayed. Anyway, check if you are using such software and disable it temporarily.

Thanks rovo89, that was it!! Very odd - I guess I would have figured that out in the morning by happenstance (was a twilight filter), but good to know what it was so I can sleep at night!
10th March 2014, 03:17 AM |#9506  
ChicaAndroid's Avatar
Senior Member
Thanks Meter: 7
 
More
Quote:
Originally Posted by rovo89

Yes, could you try the attached version?

thank you so much for this, it fixes all my troubles
10th March 2014, 08:27 AM |#9507  
Inactive Recognized Developer
Flag Twin Cities
Thanks Meter: 631
 
Donate to Me
More
Question Development Question
Hi, I just got started on learning how to develop mods for Xposed, and I have finished the development tutorial with success. So I wanted to try something on my own that was simple... or so I thought. Anyways, can someone tell me what I'm doing wrong?

I am trying to hook into com.android.systemui.BatteryMeterView to change the battery text to a specific color. At default, it is white, and with the kitkat white icon. I am trying to hook into the draw() but it's not working and it's giving me this error:

"java.laang.NoSuchMethodError: com.android.systemui.BatteryMeterView#draw()#exact at ....(XposedHelpers.java:208)"

My device is a T-Mobile Note 3 with latest KitKat. Stock SystemUI.apk

Here is the URL to the com.android.systemui.BatteryMeterView class on google:

https://android.googlesource.com/pla...MeterView.java

This worked (no error):
Code:
        findAndHookMethod("com.android.systemui.statusbar.policy.Clock", lpparam.classLoader, "updateClock", new XC_MethodHook() {
            @Override
            protected void afterHookedMethod(MethodHookParam param) throws Throwable {
            	XposedBridge.log("Test!");
            }
        });
This didn't (NoSuchMethodError above):
Code:
        findAndHookMethod("com.android.systemui.BatteryMeterView", lpparam.classLoader, "draw", new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
            	XposedBridge.log("Test!");
            }
        });
I would be grateful if someone could explain to me what I am doing wrong, and also tell me what the best strategy is to implement what I am trying to do.

By the way, thank you, rovo89, for all your work! This is such a powerful tool!
10th March 2014, 08:35 AM |#9508  
C3C076's Avatar
Recognized Contributor
Flag Bratislava
Thanks Meter: 23,666
 
Donate to Me
More
You forgot about the fact that the method has parameter (Canvas).
You should specify that in findAndHookMethod

Code:
        findAndHookMethod("com.android.systemui.BatteryMeterView", lpparam.classLoader, "draw", Canvas.class, new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
            	XposedBridge.log("Test!");
            }
        });
The Following User Says Thank You to C3C076 For This Useful Post: [ View ] Gift C3C076 Ad-Free
10th March 2014, 08:35 AM |#9509  
Quinny899's Avatar
Recognized Developer / Recognized Contributor
Flag Salford, Greater Manchester, UK
Thanks Meter: 6,644
 
Donate to Me
More
Quote:
Originally Posted by AssassinsLament

Hi, I just got started on learning how to develop mods for Xposed, and I have finished the development tutorial with success. So I wanted to try something on my own that was simple... or so I thought. Anyways, can someone tell me what I'm doing wrong?

I am trying to hook into com.android.systemui.BatteryMeterView to change the battery text to a specific color. At default, it is white, and with the kitkat white icon. I am trying to hook into the draw() but it's not working and it's giving me this error:

"java.laang.NoSuchMethodError: com.android.systemui.BatteryMeterView#draw()#exact at ....(XposedHelpers.java:208)"

My device is a T-Mobile Note 3 with latest KitKat. Stock SystemUI.apk

Here is the URL to the com.android.systemui.BatteryMeterView class on google:

https://android.googlesource.com/pla...MeterView.java

This worked (no error):

Code:
        findAndHookMethod("com.android.systemui.statusbar.policy.Clock", lpparam.classLoader, "updateClock", new XC_MethodHook() {
            @Override
            protected void afterHookedMethod(MethodHookParam param) throws Throwable {
            XposedBridge.log("Test!");
            }
        });
This didn't (NoSuchMethodError above):
Code:
        findAndHookMethod("com.android.systemui.BatteryMeterView", lpparam.classLoader, "draw", new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
            XposedBridge.log("Test!");
            }
        });
I would be grateful if someone could explain to me what I am doing wrong, and also tell me what the best strategy is to implement what I am trying to do.

By the way, thank you, rovo89, for all your work! This is such a powerful tool!

I don't think that BatteryMeterView method exists in KitKat, didn't they change it for the new battery which is drawn rather than loaded from drawables?

Sent from my Nexus 5 using Tapatalk
10th March 2014, 09:36 AM |#9510  
dk_zero-cool's Avatar
Senior Member
Flag Horsens
Thanks Meter: 5,045
 
More
Quote:
Originally Posted by rovo89

I just hope this isn't another fork that is just renamed.

Well I would have to say that it is, at least it looks like it from logs like this

Code:
at miui.dexspy.DexspyInstaller.invokeOriginalMethodNative(Native Method)
at miui.dexspy.DexspyInstaller.invokeOriginalMethod(DexspyInstaller.java:490)
at miui.dexspy.DexspyInstaller.handleHookedMethod(DexspyInstaller.java:404)
This seams very familiar.

But would this not be overwritten if you install Xposed? I mean there can only be one binary.
10th March 2014, 10:59 AM |#9511  
Senior Member
Thanks Meter: 17
 
More
<empty>
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