Xposed - ROM modding without modifying APKs/flashing
In this thread, I'm presenting a framework which gives you the possibility to modify your ROM - without modifying any APK (developers) or flashing (users)!
Some technical details:
Instead, I extended the /system/bin/app_process executable to load a JAR file on startup. The classes of this file will sit in every process (including the system_server) and can act with their powers. And even more: I have implemented something that allows developers to replace any method in any class (may it be in the framework, systemui or a custom app). This makes Xposed very powerful, it is basically running in "god mode". You can change parameters for the method call, modify the return value or skip the call to the method completely - it's all up to you!
- No need to modify any APKs. This means:
- No need to decompile, change things in smali, compile, sign, ...
- It will work for odexed and deodexed ROMs.
- Your mod is not bound to a specific version of the ROM. Unless there is a major change in the methods called for a certain functionality, your mod will continue to work even when you upgrade your ROM. Hell, it will probably even work with different ROMs.
- Multiple mods can be installed at the same time, even if they change the same package. So you can use these battery icons and those quick toggles. Even hooking the same method twice is possible. Of course, this only works properly if the mods are not trying to do incompatible things.
- It does its magic at runtime. That means you can implement options to let the user decide if they prefer the bikeshed to be painted in red or blue. Or you can have some extra logic for certain ROMs without building different mod versions.
- It can be disabled easily without having to reflash.
- It's open source.
I have implemented a powerful framework and tested it (on stock LPQ). I have plans to further extend it to provide more helpers for developers, but you can already do many things. Therefore, I will try to involve a few interested developers and will also develop some mods myself.
A big tutorial on how to implement a module can be found What's up next:- Implement mod loading. Right now, the mods would have to be compiled into the Xposed jar file. Very soon, you should be able to create your own JAR file that will be loaded by Xposed. done!- Build a flashable archive. I currently use SSH/adb to push updates to my device. Alternative: Create an app that can install it and install mods (actually my preferred choice). done!- Find some interested mod developers to create some easy mods for Xposed.- Look into resource loading/replacing. Developers should get an easy way to replace e.g. icons, layouts etc. done! Source code: (the C++ part)
Read responses in forum.xda-developers.com