I'm trying to hook a method (setBackgroundDrawable) in the android.support.v7.app.ActionBar class but I'm getting a ClassNotFound error. Here is my code:
Code:
Class<?> ab = findClass("[B]android.support.v7.app.ActionBar[/B]", lpparam.classLoader);
findAndHookMethod(ab, "setBackgroundDrawable", Drawable.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
});
Thanks for any insight
I see no reason why this shouldn't work. Are you sure that you're really executing this at the right place? Can you hook other classes from the same app?
By the way, this is equivalent:
Code:
findAndHookMethod("android.support.v7.app.ActionBar", lpparam.classLoader, "setBackgroundDrawable", Drawable.class, new XC_MethodHook() {
rovo89 said:
I see no reason why this shouldn't work. Are you sure that you're really executing this at the right place? Can you hook other classes from the same app?
By the way, this is equivalent:
Code:
findAndHookMethod("android.support.v7.app.ActionBar", lpparam.classLoader, "setBackgroundDrawable", Drawable.class, new XC_MethodHook() {
Click to expand...
Click to collapse
Thanks for your reply. I think I figured out my problem. I was trying to hook an abstract method and class . I gave you the wrong error message, otherwise you would have known right away. I apologize for that.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Can't really hook an abstract method?
Could you please show me some code, or example that related to abstract method?
undefman said:
Could you please show me some code, or example that related to abstract method?
Click to expand...
Click to collapse
You can't. But usually, you can work around it. (e.g dont hook Context.class, but ContextImpl, etc..)
Show us your code to help you better.
Thanks
Any help, please?
Related
plz can some1 e-mail me some html script on:
the Matrix/oracel!
i mean like this picture:
http://forum.xda-developers.com/files/matrix.gif[/img]
email =
[email protected]
Vishal:
You want to do the following
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
in "html script"?
Please describe what exactly you want it to do, how you want it presented, your level of skill, and why you spell the word "oracel" so ironically.
V
vijay555 said:
Vishal:
You want to do the following
in "html script"?
Please describe what exactly you want it to do, how you want it presented, your level of skill, and why you spell the word "oracel" so ironically.
V
Click to expand...
Click to collapse
yep sorry i was typin a bit quick n didnt bother recheckin what i'd typed!
ye i need the html codes on how to create this! can i also plz find a way to increase the size of the picture cuz its really small!!
vpbnt316: I still don't really get it. What level of experience do you have?
HTML is inherently NOT designed for graphical animation.
Maybe you want flash, or just gifs?
Do you just want falling characters?
Have you tried searching for "Ascii matrix" in google?
V
Here is a small tool I developed to help perform color swaps without referring back to a table or website every few minutes.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The clipboard function won't work unless it detects clip.exe somewhere in your path env. I'm pretty sure that cuts out anyone running XP-32, but it can always be added.
I tried to include as much screw-up detection as possible to avoid errors, but as always let me know if you find something I missed.
Nice Work! Very convenient.
I had contemplated adding in something for the hex format conversion (123456 to 563412) as well, and allowing a set of colors to be entered in rather than just one. As always, any suggestions are welcome.
THANK YOU SOOOOO MUCH!!!!!!!!
Amazing tool!!!!
Can't wait to try this, thanks!
Sent from my Wicked SGS3 using Wicked Green Tapatalk
Smali Color Converter apk
this is I found an apk version of this function. Hope the apk will help U all
Edit
If the apk in the attachment can not be installed, please download the newer version on the official Color Smali Converter apk blog, HERE.
The title says it all. Just post ur main home screen.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
There's already a thread for it.
http://forum.xda-developers.com/showthread.php?t=476483
veeman said:
There's already a thread for it.
http://forum.xda-developers.com/showthread.php?t=476483
Click to expand...
Click to collapse
Man, you are really good at that searching trick....
Definition of SEARCH
transitive verb
1 : to look into or over carefully or thoroughly in an effort to find or discover something
a : to examine in seeking something <searched the north field>
b : to look through or explore by inspecting possible places of concealment or investigating suspicious circumstances
c : to read thoroughly : check; especially : to examine a public record or register for information about <search land titles>
d : to examine for articles concealed on the person
e : to look at as if to discover or penetrate intention or nature
I'll just leave this here
Sent from your mom.
OMG...I moderate over there too but yeah, a thread like this is already in existence.
Sorry, I've got to close this.
Hey Guys
I'm trying to hook into my target app here, which I have decompiled to source and smali.
I am 99% sure that the method I want to hook into is called xxx.app.b.e.b.
Here is the (decompiled) source:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here is the smali:
Here is the app trace log indicating that is is being called:
When I try to call the code, I get the error (code in here too):
capfirepants said:
Hey Guys, I'm trying to hook into my target app here, which I have decompiled to source and smali... [/IMG]
Click to expand...
Click to collapse
I've never created a Module but, the following threads should, hopefully, be helpful for you.
https://forum.xda-developers.com/showthread.php?t=2709324
https://forum.xda-developers.com/showthread.php?t=2158652
https://forum.xda-developers.com/showthread.php?t=2855621
Good Luck!
~~~~~~~~~~~~~~~
I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.
PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
Thanks for the reply. I'm afraid I've seen all those links - my problem isn't that much the project setup, more finding out how the correct method is called...
As I see you forget to specify method args when hooking. So you are try to hook another (not existing) method.
Symptom
While developing a card, I used a pseudo-class for a component to implement a color changing effect. However, the color cannot be restored.
For example, the original background color was as follows.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This figure shows the new background color after using the pseudo-class.
In normal cases, the card’s background color is changed upon tapping, and will return to the original color when you lift your finger.
This problem is caused by incomplete pseudo-classes for cards supported by Huawei Quick App Loader. Even so, there’s still an easy solution.
Solution
Simply add a tap event to the component using the pseudo-class. No logic processing is needed.
Sample code:
CSS:
<div class="sitetype_box" widgetid="8e4bf1ca-f716-46f8-8614-16d1b35002c5" onclick="test">
</div>
CSS style:
.sitetype_box {
flex-direction: column;
background-color:#FFBF00;
padding: dpConvert(0) dpConvert($elementsMarginHorizontalL) dpConvert(0) dpConvert($elementsMarginHorizontalL);
}
/** Pseudo-class */
.sitetype_box :active{
background-color: #E40078;
}
Method:
JavaScript:
test(){
console.log("message");
}
Reference:
Pseudo-classes for quick apps:
https://developer.huawei.com/consumer/en/doc/development/quickApp-References/quickapp-style#h1-1578402521212