Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Thread Closed

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

OP rovo89

23rd March 2014, 01:03 PM   |  #9871  
Junior Member
Thanks Meter: 1
 
6 posts
Join Date:Joined: Mar 2014
Quote:
Originally Posted by rovo89

Just one correction: handleLoadPackage is executed very early when a package is started, but already in its process, with its permissions etc.

Thank you.

Quote:
Originally Posted by rovo89

Seems like you are missing the class name of the Activity/Application in the hook, or is the class named "test" in package "com.test"? Also, it's probably "onCreate".
To call methods not defined at compile time, you need to use reflection. There are many helpers for that in XposedHelpers.

No worries about the names was just using it as a example, hooking is working fine but it looks like i need to read up on reflection so i can continue on this path.

Quote:
Originally Posted by rovo89

I don't think that's possible. The static constructor is just some dummy method. I just checked in the code, it's even called whenever you try to look for any methods via reflection, so there would be no point in hooking it afterwards.

Thanks for clearing that up and taking time out to reply to me.
23rd March 2014, 01:11 PM   |  #9872  
kv1dr's Avatar
Senior Member
Flag Gornji Grad
Thanks Meter: 265
 
631 posts
Join Date:Joined: Dec 2010
Donate to Me
More
Is it possible to call setSystemWideReplacement when some settings changes? I am not sure if onXSharedPreferenceChanged even exists.
23rd March 2014, 01:19 PM   |  #9873  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 15,022
 
2,383 posts
Join Date:Joined: Jan 2012
More
Quote:
Originally Posted by kv1dr

Is it possible to call setSystemWideReplacement when some settings changes? I am not sure if onXSharedPreferenceChanged even exists.

No, that doesn't exist. It would require sending Intents or something like that to communicate across processes. Apart from that, you would need to do this in all running apps because "system wide" changes will only work as expected in initZygote, before apps have created their own process with their own copy of the memory.
The Following 2 Users Say Thank You to rovo89 For This Useful Post: [ View ]
23rd March 2014, 01:31 PM   |  #9874  
CoffeeCone's Avatar
Senior Member
:uo!ʇɐɔoႨ
Thanks Meter: 14
 
198 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Quote:
Originally Posted by rovo89

Mainly two things are required to make Xposed load a module.
1. The correct path must be in /data/data/de.robv.android.xposed.installer/conf/modules.list.
2. The path must be accessible during early boot.

Check the log section in the installer to see if the module loads correctly. The path is determined from the package manager by the installer app when you install or move an app, but maybe this tool doesn't notify the system about the change.

What constitutes as "early boot"? INT2EXT4+ is a script placed in init.d so I'm not sure if init.d is called before or after "early boot".

Upon checking the logs, it says:

Code:
---------
Mar 23, 2014 11:23:10 AM UTC
Loading Xposed v42 (for Zygote)...
---------
Mar 23, 2014 11:24:47 AM UTC
Loading Xposed v42 (for Zygote)...
Loading modules from /data/app/com.oasisfeng.greenify-1.apk
File does not exist
But I definitely have Greenify installed. I also went to that folder and verified that Greenify is indeed there.
Last edited by CoffeeCone; 23rd March 2014 at 01:34 PM.
23rd March 2014, 01:56 PM   |  #9875  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 15,022
 
2,383 posts
Join Date:Joined: Jan 2012
More
Quote:
Originally Posted by CoffeeCone

What constitutes as "early boot"? INT2EXT4+ is a script placed in init.d so I'm not sure if init.d is called before or after "early boot".

I don't know that either. It probably even depends on the kernel when init.d scripts are executed. If the file exists in the place mentioned in the log and is not just a symlink to a different location, then I assume that the init.d scripts are executed after the start of the Zygote service (app_process). If that is the case, there is nothing I can do for you.

EDIT: You can simply try it yourself. Add something like "/system/bin/log zzzzzzzzzzzzzzzzz" to the init.d script. Then reboot, take a logcat and check which lines appear first, Xposed's or yours.
Last edited by rovo89; 23rd March 2014 at 01:59 PM.
The Following 2 Users Say Thank You to rovo89 For This Useful Post: [ View ]
23rd March 2014, 02:30 PM   |  #9876  
CoffeeCone's Avatar
Senior Member
:uo!ʇɐɔoႨ
Thanks Meter: 14
 
198 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Quote:
Originally Posted by rovo89

I assume that the init.d scripts are executed after the start of the Zygote service (app_process).

Dude thanks a lot for this! I realized that if the mount script is moving later than Xposed, I'd make Greenify a system app since system is already present on any given moment. And now it works! Now I guess if I have other modules to use, I just have to put them into the system partition.
23rd March 2014, 02:36 PM   |  #9877  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 15,022
 
2,383 posts
Join Date:Joined: Jan 2012
More
Quote:
Originally Posted by CoffeeCone

Dude thanks a lot for this! I realized that if the mount script is moving later than Xposed, I'd make Greenify a system app since system is already present on any given moment. And now it works! Now I guess if I have other modules to use, I just have to put them into the system partition.

Be careful though, you probably need to repeat this after every update, because updates of system apps are place in /data/app again.
The Following 2 Users Say Thank You to rovo89 For This Useful Post: [ View ]
23rd March 2014, 02:54 PM   |  #9878  
CoffeeCone's Avatar
Senior Member
:uo!ʇɐɔoႨ
Thanks Meter: 14
 
198 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Quote:
Originally Posted by rovo89

Be careful though, you probably need to repeat this after every update, because updates of system apps are place in /data/app again.

Yeah, I'll have to stay vigilant. Luckily I only update Greenify when something critical was fixed/added since the version I'm using works without problems.
23rd March 2014, 02:58 PM   |  #9879  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 15,022
 
2,383 posts
Join Date:Joined: Jan 2012
More
Xposed 2.5 final
This is Xposed version 2.5 (final). The main new features and fixes in this version are:
  • Rewritten framework installation/uninstallation
    • Uses interactive su (via libsuperuser) to provide improved compatibility with different Superuser apps
    • Better feedback when root access fails (doesn't freeze the app anymore)
    • Offers installation via custom recovery (CWM/TWRP), either flashing the file automatically or manually
  • Safemode to disable Xposed with hardware keys to get out of (most) bootloops
  • Compatibility with Sony/LG ROMs (4.3 and 4.4), Meizu ROMs (4.4)
  • Debug setting to disable resource hooking as a temporary workaround for incompatibilities with some theming engines (not all modules can be used in this mode)
There are also other improvements and fixes, especially many translations updates.
In case you get a message "Segmentation fault" during installation, you can now download an additional app which provides statically compiled versions of BusyBox (a lot bigger, but should work with every ROM). It's not needed otherwise.

Quick explanation of the safemode: It was developed by @Tungstwenty and makes it possible to disable Xposed by repeatedly pressing one of the hardware buttons during early startup. The phone will vibrate twice when the first key press has been detected. Then you have five seconds to press the same button four more times. Each key press will be confirmed with a short vibration; the final one with a long vibration. It creates /data/data/de.robv.android.xposed.installer/conf/disabled, which prevents most of Xposed's actions (e.g. no hooks are made and no modules are loaded). There's no 100% guarantee that this will get you out of a bootloop, but in most cases it should.

As always, you can download it via the in-app updater or from http://dl.xposed.info/latest.apk.
Last edited by rovo89; 25th March 2014 at 07:51 PM.
The Following 180 Users Say Thank You to rovo89 For This Useful Post: [ View ]
23rd March 2014, 03:07 PM   |  #9880  
hp420's Avatar
Senior Member
Flag NY
Thanks Meter: 882
 
1,769 posts
Join Date:Joined: Jul 2011
More
Awesome idea with safe mode!!! That's gonna be a huge life saver for a lot of people.

The Following User Says Thank You to hp420 For This Useful Post: [ View ]
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