Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,949 Members 43,753 Now Online
XDA Developers Android and Mobile Development Forum

How to get package, which calls X function?

Tip us?
Senior Member - OP
Thanks Meter 439
Posts: 356
Join Date: Jan 2013
Default How to get package, which calls X function?


I wrote module XInternalSD. Here is java source: 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's Avatar
Senior Recognized Developer
Thanks Meter 14,081
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