Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Latest commit

 

History

History
83 lines (70 loc) · 3.8 KB

PITCHME.md

File metadata and controls

83 lines (70 loc) · 3.8 KB

Android and Xposed Framework

XDA Developers
conflogo xdalogo


What is Xposed

  • Developed by XDA Senior Recognized Developer rovo89
  • System patch allowing user apps to hook into any Android JAVA call, any application
  • Requires patched system, including dalvik, Zygote, etc.
  • Allows hooking all types of apps, included system and Play Store apps
  • Allows replacing resources to affect look and layout - on the fly

Note: Xposed is a system patch that allows user applications to hook into any Android java call in any application. It requires a patched system, including dalvik, Zygote etc. Due to the way it's implemented, it allows hooking all types of apps, including system and playstore apps. Furthermore, it allows replacing resources in apps to change the way they look and are layouted.

+++

Getting Started with Xposed

Note: The hardest part of writing an Xposed Module is actually finding the right place to change the application. Now, if the application is open source, this is no issue, but what do you do when it's a proprietary application or a system application? The solution has multiple steps:

+++

Getting the apk

  • Requires ADB setup and working in your Android terminal
  • Get exact package name
    • use ADB shell if not known

+++

$ adb shell pm list packages
$ adb shell pm path com.android.systemui
package:/system/priv-app/SystemUI/SystemUI.apk
$ adb pull /system/priv-app/SystemUI/SystemUI.apk

Note: For those who aren't familiar with the process, getting the APK from an android device is rather simple First make sure you have ADB setup and available in your favourite commandline terminal. If you don't know the exact package name of the target application, there are some steps to perform to find the package and then pull it.

+++

Decompiling

+++

Hooking

  • Xposed presents a few ways to hook:
    • beforeHookedMethod
      • called before the real function
      • allows modifying e.g. arguments passed, changing objects etc.
    • afterHookedMethod
      • called after the real function
      • allows affecting objects after the real code run
    • replaceHookedMethod
      • completely replaces the real function to replace functionality

Note: Xposed has a few different ways to hook functions:

beforeHookedMethod is called before the real function is called and allows modifying e.g. arguments passed, changing objects etc. afterHookedMethod is called after the real function is called and allows affect objects after the real code has been run, modify return value of function etc. replaceHookedMethod which completely replaces the real function and allows to completely replace functionality.


Resources


Q&A

xdalogo