Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,460 Members 40,279 Now Online
XDA Developers Android and Mobile Development Forum

How to get package, which calls X function?

Tip us?
 
pyler
Old
#1  
Senior Member - OP
Thanks Meter 288
Posts: 228
Join Date: Jan 2013
Default How to get package, which calls X function?

Hello,

I wrote module XInternalSD. Here is java source: http://pastebin.com/VJ8CT5UR. But many people have asked for feature to change path to internal SD per app. I agree with them but I simply have no idea how to do it. I was thinking about small check > check which app calls getExternalStorageDirectory() and if this app is in whitelist, function will be hooked. But I am not sure if this is possible and/or the best way how to do it.

Have you any ideas how this can be done?
 
rovo89
Old
#2  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter 13668
Posts: 2,367
Join Date: Jan 2012
Try AndroidAppHelper.currentPackageName().
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 User Says Thank You to rovo89 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes