Hi,
I have written a module which records the occurrence of specific system APIs in the log file, using "XposedHelpers.findAndHookMethod". My hooked methods simply prints the name of API into the log file. My module works perfectly fine, unless I try to run an app which is instrumented by Emma, in order to measure the code coverage. The problem is that I get "Instrumentation detected, disabling framework for app" error message in the log file.
I decided to change the XposedBridge.java and replace the new XposedBridge.jar with the old one. However, it breaks the Xposed framework and my virtual machine never starts after reboot.
How can I resolve this issue?
Is there any way safe to change XposedBridge.java and replace the XposedBridge.jar?
Thanks.
Related
Simple question. I want to start my own service from my package with the same permissions as the package i am hooking. Does anybody know how i could do this? I know if i use android:sharedUserId="android.uid.systemui" in the manifest, but it prevents it based off of signature mismatch. Could i use xposed to grant my app the sharedUserId?
Simple question. I want to start my own service from my package with the same permissions as the package i am hooking.
Click to expand...
Click to collapse
I don't think that is possible. I haven't worked with services yet, but as far as I understood, you have to declare them in your manifest (in contrast to BroadcastReceivers, which can also be registered at runtime). Theoretically again, you could try to modify the manifest parsing and try to inject additional entries there.
elesbb said:
Could i use xposed to grant my app the sharedUserId?
Click to expand...
Click to collapse
Theoretically, I think yes, you could hook the package manager to ignore the signature mismatch etc. But I think it will be quite fragile.
What do you want to achieve with this?
rovo89 said:
I don't think that is possible. I haven't worked with services yet, but as far as I understood, you have to declare them in your manifest (in contrast to BroadcastReceivers, which can also be registered at runtime). Theoretically again, you could try to modify the manifest parsing and try to inject additional entries there.
Theoretically, I think yes, you could hook the package manager to ignore the signature mismatch etc. But I think it will be quite fragile.
What do you want to achieve with this?
Click to expand...
Click to collapse
I hate how Samsung removed widgets from the lockscreen. So i figured i'll create my own lockscreen and have it loaded by the system. I might just skip the whole service thing (which would make my lockscreen easier to write by having classes that extend things like FrameLayout as the stock lockscreen does) but i found where the lockscreen is actually shown. i may just inflate my own xml of the lockscreen using xposed resources and then adding it with windowmanager. Then the inflated view will follow the same permissions as the stock lockscreen and allow me to handle key presses and still preserve the security behind it.
Thanks rovo for the reply!
@rovo89
If i am inflating my own view inside a hooked method, how can i get the ids of my layout? I tried XModuleResources myRes; myRes.getIdentifier() but it returned null.
Be careful, Resources.getIdentifier() expects the arguments in a different order than Xposed, like getIdentifier("mystring", "string", "my.package.name").
Apart from that, simply use R.layout.my_layout.
hi all.
Is there a module that can trace everything about a process?
i want to know everything about an app, since the start(such as every method invoked, every file that it tries to open or it tries to run). Is there a xposed module that can do this? Or something else that can log me the whole life of an application run?
me too!
please any one know .how to make xposed changes permanent??
that is it remains there ..... even we uninstall xposed...
AS far as my understanding goes, xposed redirects specific function calls at runtime to other functions with the intend to run different code than the app would normally do. That said, redirecting those calls can not work without xposed framework or without the xposed modules as no changes are made to the apps directly.
Correct me if I'm wrong.
You are absolutely no wrong, however if we decompile the apk that is being modded via some specific module and we change the code of the redirected functions to the one included within module and recompile the apk, we should get an apk working exactly the same as if it was hooked via xposed+module.
Please note that a lot of modules has been originally created basing on reverse idea: first someone made a mod by changing the java/smali code of some apks, then someone wrote a module making same changes but via xposed, on-the-fly.
In my opinion such an automated tool to recompile the apks and change their code basing on the code included in a xposed module IS possible.
No one made it yet, tho...
Definitely not possible. You cannot simply redirect code from one app to another. With xposed, you are always running within app that's being modded.
esgie said:
You are absolutely no wrong, however if we decompile the apk that is being modded via some specific module and we change the code of the redirected functions to the one included within module and recompile the apk, we should get an apk working exactly the same as if it was hooked via xposed+module.
Please note that a lot of modules has been originally created basing on reverse idea: first someone made a mod by changing the java/smali code of some apks, then someone wrote a module making same changes but via xposed, on-the-fly.
In my opinion such an automated tool to recompile the apks and change their code basing on the code included in a xposed module IS possible.
No one made it yet, tho...
Click to expand...
Click to collapse
Im with this guy, and if you read on xposed... yes its code being "injected" into the stock apk ...
What xposed does is creates side files (ran by zygote)
They get copied to /system/bin as app_process(xposed)
Or app_process(origional)
These files act as Init.d scripting... to inject this code...
I assume they make both these copies for reverting back to stock (disable the module)
It IS possible to make these changes permanent and re-compile the apk...
However ... de-coding the module ... to find out what is getting injected where... THATS where im at so far ...
Arter 97 has proven this possible with adaway as a standalone apk in conjuction with his youtube apk... im assuming hes using code to call upon the adaway apk files , and still using it like xposed... but merely without xposed..
If anyone with more experience could point us on how to track down how to find exactly WHAT code is being injected and where... it would be EXTREMELY helpful to many people not wanting to run 3rd party applications to get their desired functions...
Anyone feel free to chime in
Hi all; pardon my lack of knowledge in this subject.
I tried to make a magisk module out of the blackberry productivity edge port found here: https://forum.xda-developers.com/android/apps-games/blackberry-productivity-tab-devices-t3606967
So I tried using the magisk 1500 template and followed the instructions that I found; and the module installs and works fine via TWRP (and magisk recognizes it), but causes the device to lag. And when I try to install it via magisk, I get "installation failed" with no other logs whatsoever. All the module is supposed to do is to mount a few files to the app and priv-app directory in the system. I edited the module.prop and the config.sh. Could anyone check if I had missed something or did a mistake? Thanks in advance.
The module is located here in case anyone wanted to assist:
https://1drv.ms/u/s!AvW_5k8Bkea9sU0SVteHqOoII5N_
Hadi99 said:
Hi all; pardon my lack of knowledge in this subject.
I tried to make a magisk module out of the blackberry productivity edge port found here: https://forum.xda-developers.com/android/apps-games/blackberry-productivity-tab-devices-t3606967
So I tried using the magisk 1500 template and followed the instructions that I found; and the module installs and works fine via TWRP (and magisk recognizes it), but causes the device to lag. And when I try to install it via magisk, I get "installation failed" with no other logs whatsoever. All the module is supposed to do is to mount a few files to the app and priv-app directory in the system. I edited the module.prop and the config.sh. Could anyone check if I had missed something or did a mistake? Thanks in advance.
The module is located here in case anyone wanted to assist:
https://1drv.ms/u/s!AvW_5k8Bkea9sU0SVteHqOoII5N_
Click to expand...
Click to collapse
Nothing looks wrong with the module itself, but you may be missing some libraries or odex/vdex files for the apps you're trying to install. Make sure the entire tree under system/app or system/priv-app is included in the module. The first link you sent tasks about oat subdirectories that are not included in your module.
Hello!
I'm currently playing around with Java and Xposed development and I have created a simple Android app that creates a .txt file in a folder.
What I would like to do is create a Xposed module that can automatically detect when I create said .txt file, I have 2 ideas on how I could achieve that but I'm not sure what might be the best:
Idea #1:
Create some sort of background service that will always be runnning and check if there are any or new files in said folder or maybe use the FileObserver method.
Idea #2:
Hook into the app and run a function inside my Xposed module that checks with regular interval if there are any files in the folder.
I have never really done any Java or Xposed development before so all this is quite new, but I would love to know what would be the best aproach or if anyone has some better suggestions!
Thank you all!
I don't see a xposed requirement here. File change observation is easily done by automation apps like Tasker(event->file->file modified), doesn't need xposed for it. Xposed framework better used for modifications to system or apps.
As per second requirement of performing user actions on a app, you can use Xposed edge(xposed plugin) inject gestures / AutoInput(tasker plugin)