Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,786,517 Members 36,930 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Bob1732
Old
#9871  
Junior Member
Thanks Meter 1
Posts: 6
Join Date: Mar 2014
Quote:
Originally Posted by rovo89 View Post
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 View Post
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 View Post
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.
 
kv1dr
Old
#9872  
kv1dr's Avatar
Senior Member
Thanks Meter 235
Posts: 576
Join Date: Dec 2010
Location: Gornji Grad
Is it possible to call setSystemWideReplacement when some settings changes? I am not sure if onXSharedPreferenceChanged even exists.

Current phone: Nexus 5
ParanoidAndroid 4.4@franco.Kernel
Previous phones:
Sony Ericsson Xperia Mini Pro (CM11) (LED, headphones and front camera are dead)
Samsung Galaxy Pro (Stock ROM, rooted) (Lost at the Zrće Beach )
Motorola Milestione (CM7) (Bricked)
Other non-touchscreen phones I currently don't remember their names

Get 20GB free place on copy.com: https://copy.com?r=DF4zl2
 
rovo89
Old
#9873  
rovo89's Avatar
Senior Recognized Developer - OP
Thanks Meter 13,963
Posts: 2,367
Join Date: Jan 2012
Quote:
Originally Posted by kv1dr View Post
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.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
The Following 2 Users Say Thank You to rovo89 For This Useful Post: [ Click to Expand ]
 
CoffeeCone
Old
(Last edited by CoffeeCone; 23rd March 2014 at 12:34 PM.)
#9874  
CoffeeCone's Avatar
Senior Member
Thanks Meter 14
Posts: 198
Join Date: Apr 2012
Location: :uo!ʇɐɔoႨ

 
DONATE TO ME
Quote:
Originally Posted by rovo89 View Post
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.
 
rovo89
Old
(Last edited by rovo89; 23rd March 2014 at 12:59 PM.)
#9875  
rovo89's Avatar
Senior Recognized Developer - OP
Thanks Meter 13,963
Posts: 2,367
Join Date: Jan 2012
Quote:
Originally Posted by CoffeeCone View Post
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.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
The Following 2 Users Say Thank You to rovo89 For This Useful Post: [ Click to Expand ]
 
CoffeeCone
Old
#9876  
CoffeeCone's Avatar
Senior Member
Thanks Meter 14
Posts: 198
Join Date: Apr 2012
Location: :uo!ʇɐɔoႨ

 
DONATE TO ME
Quote:
Originally Posted by rovo89 View Post
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.
 
rovo89
Old
#9877  
rovo89's Avatar
Senior Recognized Developer - OP
Thanks Meter 13,963
Posts: 2,367
Join Date: Jan 2012
Quote:
Originally Posted by CoffeeCone View Post
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.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
The Following 2 Users Say Thank You to rovo89 For This Useful Post: [ Click to Expand ]
 
CoffeeCone
Old
#9878  
CoffeeCone's Avatar
Senior Member
Thanks Meter 14
Posts: 198
Join Date: Apr 2012
Location: :uo!ʇɐɔoႨ

 
DONATE TO ME
Quote:
Originally Posted by rovo89 View Post
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.
 
rovo89
Old
(Last edited by rovo89; 25th March 2014 at 06:51 PM.)
#9879  
rovo89's Avatar
Senior Recognized Developer - OP
Thanks Meter 13,963
Posts: 2,367
Join Date: Jan 2012
Default 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.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
The Following 177 Users Say Thank You to rovo89 For This Useful Post: [ Click to Expand ]
 
hp420
Old
#9880  
hp420's Avatar
Senior Member
Thanks Meter 859
Posts: 1,684
Join Date: Jul 2011
Location: NY
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: [ Click to Expand ]
Tags
don't ask questions about modules here!!!, framework, xposed
THREAD CLOSED
Subscribe
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes