Dynamically Hooking Static Methods - Xposed Framework Development

I'm Hooking methods dynamically based off a entered class by the user and logging the results. But the problem I'm running into is that I can hook the static methods fine no problem and log the return value. But I have no way during the hook to get the static class name.
Normally I would use this in the hook to get the class name.
log(String.format("Class: %s", param.thisObject.getClass().getName() )
The problem comes in with Static Classes the object is always null, as it should. Is there anyway to either hold the information from when the hook is created and display the appropriate class even if there are multiple classes and methods?
Or is there a Xposed Helper that can get this information from within the hook even if the class is static?

Figured it out, Just looked at the Stack.

Related

I connected the XDA to LAN and WAN without a PC

Soon after buying the T-Mobile MDA, it became painfully obvious that the performance of GPRS connectivity – at least in my area – is plain horrible! My guess is that I’m not alone, since a common question posted in XDA-related sites is how to WiFi with the XDA.
Well, there is no SDIO slot in the XDA that will support the SD WiFi cards, so the only way of getting connected to a LAN or WAN without schlepping your PC to act as a proxy server for pass-through would be to use a LAN/WAN-to-RS232 converter that could be plugged to the serial port socket on the XDA. I have tried a few RS232 I/O adapters with the XDA. and my results are available at:
http://mywebpages.comcast.net/prutchi/xda_connectivity.doc
(you can also try http://mywebpages.comcast.net/prutchi/xda_connectivity.htm, but I'm having some trouble with the figures)
You'll notice that I manage to communicate with resources on the net via a terminal, but haven't been able to trick IE into accepting my RS232 feed. If you try any of these interfaces and manage to open a socket, please let all of us know how.
Cheers,
David
Excellent work David,
I was able to replilcate your setup well! I am playing with a USB WAP and working on the DLLs to make it recognizable in Pocket IE. Working on understanding the connections and interface methods.
Used a GPS protocol as source and am doing some tweaks. I will post any updates or success! The only issue I am finding with this solutions is the size of the devices, but once we figure out the connection details we can port it over to smaller, power efficient devices.
Take care
Hi Ronin!
Any progress?
My intention was to use a RS232 wireless “wire” (two wireless RS232 dongles that transparently simulate an RS232 cable) to establish a wireless sync passthrough on the mean time.
Today I tried connecting via RS232 900MHz “Ticks” by Data Hunter ( The "Tick" is a complete data radio that parasitically draws all of its operating power from the RS232 data interface). However, I wasn't able to make it work
I'm pretty sure that I'm using the correct pinout configuration, but the XDA doesn't actively turn on COM1. Instead, it passively listens for activity from the PC. This leaves the Tick without power, and the PC sees no response. I'll try tickling the data ready lines to see if I can get it to establish the wireless link before actually establishing a sync connection.
Cheers,
David
Anyone tried to use the HW of a wireless Mouse?
I do not have one, so I don't know if there is only one Chip for movements and W-connections.
Maybe its possible to rewrite the mouse driver to access the data stream or just use the HW to build up a receiver.
And: The mouse-HW is LOW-POWER and small
Seems to be a real good idea Hopefully it will work
What about a USB-WLAN-Stick?
There're lots of USB-WLAN-Sticks on the market and a Driver should not be impossible to write!
I just opend the XDA-Connector (charging adapter) and found out that is every pin available! A USB-Adapter is easy to build!
Does anyone have some exp. with drivers? Can someone write a USB-devicedriver for WLAN?
Any Ideas?
ok, forget about it.
I'm still collecting information and I forgot about USB-Slave....
Well, I would like to see more results and solutions for this topic!
McNugget

[Q] Program to send Hex codes to phone through USB?

I have been using a program to monitor the URB packets sent between the PC and the phone to see if I can figure out what is unlocking the drive. Does anyone know of a program where I can manually send a packet to the phone through USB so that I can test? It would be super helpful!
Thanks
Revskills looks pretty dangerous. Start it and use the mobile ports.
Revskills is the name of the program.
I got what unlocks the phone logged (from monitors), and i do have a program to send the Usb raw data (that i mentioned on other topic).
Can't giveaway the program as i use it on linux, and is development-wise handmade from scratch by me (not gui, needs compilation each time i try something, etc).
Unfortunately, i can't operate with my device to test it (need to be ON and on the kin normal mode).
If someone want to sell me one, i may gratefully pay for a second hand one hehe.
Are you implying you can access the picture storage areas and pull them off the phone?
i'm implying that i have a program to send bulk hex code to the device or control transfer data too.
The "unlock" thing about the storage nand you wonder about is a mixture of both things, modifying device USB properties needed when it's needed.
Protocol used is MTP-like (which is "open") with several variations, so they called it MTPz ("z"une protocol for MTP).
And also I imply that the Zune usb monitoring is futile, as it uses Janus Drm (i always said it) and it's a response challege with cryptography used (not doable).
Nothing more, nothing less.

RAVPower FileHub (RP-WD02)

The RAVPower FileHub (RP-WD02) seems to pitch 3 major features: WiFI Router, Media Sharing and Power Bank. I tested these main features, and as you can see below the device seems to do what it advertises.
- Media Sharing
I loaded a few different MP4 movies on my FileHub (microSD card) and started to stream from other devices, adding one at a time but keeping the prior device still running. I also chose a different video for each device. As a side note, I was able to copy a file directly from a USB thumb drive to the microSD card and the transfer was handled by the FileHub itself.
Devices:
NOTE: FileHub was connected (via wireless) to my home router for internet access.
1) Xbox 360 connected directly to my Linksys router and access the FileHub (via DLNA).
2) Laptop connected to the FileHub via wireless..
3) Nexus 7 connected to the FileHub via wireless.
4) Moto X connected to the FileHub via wireless.
The only time devices 2,3 and 4 had any sort of hiccup was when another devices was first starting to load a movie but it would smooth out quickly. Once the movies were all playing, the 3 devices (#2, #3 and #4 all connected directly to the FileHub via wireless) had no problem streaming 3 different videos at the same time. Device #1 had the most issues but it wasn’t directly connected to the FileHub via wireless -- it was going through another device (older Linksys router) which is likely part of the reason it had issues. Once I stopped devices 2-4, the Xbox (device #1) played the movie with no problem again.
I consider the above a “stress” test, normal use (one or two devices) shouldn’t be a problem at all especially if you connect via wireless directly to the FileHub. I didn't test MP3s or anything else -- if it can handle multiple movie streams, I am sure music / other files aren't an issue.
- WiFi Router / AP / Bridge
I connected the FileHub device directly (via ethernet cable) to my home wifi (Linksys router). Next, I used the Ookla Speedtest.net application on my Nexus 7 tablet and did 3 tests on my home wifi, and 3 test on the filehub. The download speeds, upload speeds and ping time were all within the same variance so the FileHub had no noticeable impact.
In addition to connecting to an Ethernet network, the FileHub can connect to a wireless network that way any devices connected to the FileHub via wireless can still have a connection to the Internet. If you travel this could be a useful way to setup your own wireless network in a hotel.
One thing I did notice, there isn’t really an option to set this up as a true wireless access point where it simply acts as a media converter so that you can connect your wireless device to a wired network. This device always acts as a router/AP combo, so your wireless clients are on an internal (10.10.10.X by default) network. If this device truly could act just as an access point, your wireless client would pick up an IP address from whatever network was on the other side (for my Linksys it would be a 192.168.1.X address). While this may not matter for the average user, I figure I would point it out. I contacted RAVPower support to see if maybe I am missing something.
- PowerBank
Not much to test here, it acts as a 6000 mAh powerbank. Once interesting feature that I didn’t find in the manual, if the device was off and I gave the power button a short press the battery light would turn on and the device would act as a PowerBank without the other capabilities. This could be useful if you want to charge your phone without the device itself being on (which I would assume reduces the power consumption).
Overall I am impressed so far, but am still playing with the device. If you have any questions, or can think of any tests I should consider, please let me know.
Hello.
Thanks for your review.
It's not mentioned ,but it's compatible with microSDXC , it work with my SanDisk Ultra 64 Go UHS-I SDSDQUA-064G-U46A :good:
Hi, nice review
I have a question :
What transfer speeds do you get when copying from a sd-card to a USB connected device? My wd02 takes about 10 min to copy 1 Gb...
Thanks for answering
dope649 said:
Hi, nice review
I have a question :
What transfer speeds do you get when copying from a sd-card to a USB connected device? My wd02 takes about 10 min to copy 1 Gb...
Thanks for answering
Click to expand...
Click to collapse
I am no longer using a standard firmware (don't ask lol) so it really wouldn't be good for me to compare times. Are you doing the internal microSD to USB? Should be quick (in theory) since it is all on the same device.
cookiemonster79 said:
I am no longer using a standard firmware (don't ask lol)
Click to expand...
Click to collapse
As the latest (2.000.014) fw seems to have broken some things (compared to 2.000.002 which was preinstalled), I'm asking... Want to share something mouth-watering?
steve8x8 said:
As the latest (2.000.014) fw seems to have broken some things (compared to 2.000.002 which was preinstalled), I'm asking... Want to share something mouth-watering?
Click to expand...
Click to collapse
Ah nothing too interesting, I think I had a copy of the 2.000.014 before it was released. What broke on it for you?
2.000.014 apparently preserved passwords set on 2.000.002 but I had to hard reset the device. After that, I found that the "passwd" command would modify /etc/shadow while the "telnetd" would continue using /etc/passwd contents. Bad busybox?
Trying to get my hands on the GPL release now (if such a thing exists).
Shouldn't there be a .030 (for the WD01 there was a .014 too before)? How to get older fw versions?
steve8x8 said:
2.000.014 apparently preserved passwords set on 2.000.002 but I had to hard reset the device. After that, I found that the "passwd" command would modify /etc/shadow while the "telnetd" would continue using /etc/passwd contents. Bad busybox?
Trying to get my hands on the GPL release now (if such a thing exists).
Shouldn't there be a .030 (for the WD01 there was a .014 too before)? How to get older fw versions?
Click to expand...
Click to collapse
I wish they did a changelog for updates, I will see if I have an older copy somewhere on one of my drives but other than that I don't know how to get them.
cookiemonster79 said:
I wish they did a changelog for updates, I will see if I have an older copy somewhere on one of my drives but other than that I don't know how to get them.
Click to expand...
Click to collapse
I'll try to get in touch with them (Twitter? E-mail?) to get access to older FW and GPL sources. Over-optimistic, perhaps.
steve8x8 said:
I'll try to get in touch with them (Twitter? E-mail?) to get access to older FW and GPL sources. Over-optimistic, perhaps.
Click to expand...
Click to collapse
What are you trying to get from the old one? Just curious. I haven't tested the new one much is it broken?
As setting the root password did work with the old FW, and I first took it over to the new one successfully (only to lose it to a factory reset), there clearly must be a difference. I know I cannot easily replace the new busybox with the old one while keeping the rest of the FW, but having the option to downgrade (for science) is somewhat appealing.
Whoa! This thing is super neat! Thanks for the heads up and review!
Few Questions...
I just got one of these and am trying to bend it to my whims. Running into a few problems, though...
1) I can't change the device's IP address to something in the 192.168.0.xxx range. If it could be done, this would ease the issue you mentioned of it not acting as a 'true' router, since it would at least be issuing IP Addresses on the right subnet as the rest of my network. I tried changing the DHCP settings, but that resulted in a hard reset since it wouldn't let me also change the IP address.
2) I'm not sure if this is specific to Xperia devices or not, but in the Storage settings, there's a feature for 'Remote Share' that basically mounts a network share as a folder in the Android file system, so it can be treated as 'local'. I've not had any luck setting the FileHub to play nice with this as of yet. It'd be great to be able to shift my music collection to the FileHub and still have it playable in the usual music players.
3) Most of the time I'm using this on-the-go. How can I maintain my LTE data connection while simultaneously connecting to the FileHub via WiFi?
4) You mentioned not using stock firmware... Where can I find other options? The built-in stuff is servicable, but limited. Might even remedy the IP Address config issue.
While I probably cannot answer your questions, I have another one myself: is there a way to add a USB 3G stick to make the device aware of mobile data networks? (I haven't found any confirmation it could, only a single hint that the WD01 wasn't able - with an older fw.)
steve8x8 said:
While I probably cannot answer your questions, I have another one myself: is there a way to add a USB 3G stick to make the device aware of mobile data networks? (I haven't found any confirmation it could, only a single hint that the WD01 wasn't able - with an older fw.)
Click to expand...
Click to collapse
I just tried a 3G/4G stick on my Filehub, and while it powered up and appared to obtain a signal, there's really no way for the FileHub to know it's there or what to do with it. Good Idea, though... That'd be a great feature for them to add in the future!
Before connecting, run "lsusb" and "lsmod" as root. Repeat after having connected the USB device. The USB id may give us an idea about what will be needed; I'd not expect support for 3G devices in the kernel, and we might need GPL code from RAV before we can modify the system accordingly.
I vaguely remember a report of attempts to run OpenWRT on the device, but cannot find it anymore. (Was it real at all?)
Nice review. I just purchased this handy little device and put it through some heavy usage for testing and it works great. Only thing I cannot figure out is how to update the firmware or if there even is an update for the firmware. I am currently running on ver 2.000.002. Could anyone else confirm if this is the latest and if not how to update it? TIA
I have 2.000.014 on my WD02 (installed from a FW file d/l'd from RAV), but haven't seen any advantage. If I had access to a flashable 2.000.002 firmware I'd certainly go back!
Note that in the WD01 thread, someone reported a .030 (?) FW that even broke telnet access. RAV is trying to close holes that have been used to improve the device, it seems.
TesseractE said:
I just got one of these and am trying to bend it to my whims. Running into a few problems, though...
1) I can't change the device's IP address to something in the 192.168.0.xxx range. If it could be done, this would ease the issue you mentioned of it not acting as a 'true' router, since it would at least be issuing IP Addresses on the right subnet as the rest of my network. I tried changing the DHCP settings, but that resulted in a hard reset since it wouldn't let me also change the IP address.
2) I'm not sure if this is specific to Xperia devices or not, but in the Storage settings, there's a feature for 'Remote Share' that basically mounts a network share as a folder in the Android file system, so it can be treated as 'local'. I've not had any luck setting the FileHub to play nice with this as of yet. It'd be great to be able to shift my music collection to the FileHub and still have it playable in the usual music players.
3) Most of the time I'm using this on-the-go. How can I maintain my LTE data connection while simultaneously connecting to the FileHub via WiFi?
4) You mentioned not using stock firmware... Where can I find other options? The built-in stuff is servicable, but limited. Might even remedy the IP Address config issue.
Click to expand...
Click to collapse
1) If the wifi network you are connecting the filehub to is on the 192.168.0.xx range then your internal network probably can't be the same because basically the filehub would have two networks on two interfaces.
2) I think that is an Xperia setting I don't recall seeing it on my devices.
3) As far as I know you can't since putting it on wifi makes it use that for network connectivity.
4) Best you can do is try to find the older firmware which you can actually telnet to and make config changes on if you know how.
Re older FW: Can someone try and get RAV to publish all of their FW releases, *plus* the overdue GPL pack they have to provide?

HCE/APDU-sniffing problem

Here's my problem: I want to be able to primitively emulate some function of a Desfire EV1 card by playing back the APDUs it receives/sends to a card reader. The problem is I don't know what kind of APDUs the reader is sending out.
I can't use KitKat because KK HCE requires the app to specify the SELECT AID APDU that the reader sends out, and I have no idea what that is or whether the reader is even sending a SELECT AID out.
I figured I could use Eddie Lee's NFCProxy on a modified build of CM9 to analyze the card/reader interactions, but every time I put my phone up to the reader, it says "invalid card."
My guess is that the reader is picking up some other NFC signal from the phone, possibly Android Beam-related. In fact, if I try to run a card emulation app on 1 phone and have another phone try to read it, both of the phones start buzzing. Even though I have Android Beam turned off, the OS's NFC scanning cycle is set to detect other Android peer-to-peer devices regardless.
Modifying the app's manifest for android.nfc.disable_beam_default doesn't disable it either.
Does anybody know what I have to modify in the CM source code to disable peer-to-peer NFC completely? Then I could build a version of CM with proper emulation. OR, does anybody have any other ideas?
I've been tearing my hair out with this one lol

[Q] Is hooking private static method possible?

Hi,
Is hooking of private static method possible in Lollipop? I'm trying but nothing works. No error, no exception... looks like findAndHookMethod is completely ignored...

Categories

Resources