XPrivacy for Android Lollipop – XDA Xposed Tuesday

Have you ever been on the Google Play Store and saw an app that you wanted to … more

How a HTC Droid Eris Changed a Members Life

Rarely can a member say that Android development or XDA had a profound effect on … more

XDA Office Space: Frankenstein’s Perfect IM Client?

The portal’s decentralized XDA office lies in a Hangouts chatroom, where … more

Which IM Client on Android is best?

With so many different messengers to choose from, it can be tough to find the best one for you and … more
Post Reply Subscribe to Thread Email Thread

[Tutorial] Xposed - Develop modules on your Android phone or tablet using Aide

5th February 2014, 06:55 AM |#1  
OP Junior Member
Thanks Meter: 10
All credit goes to Rovo89 and the original tutorial here at:

I would suggest reading that page first because it explains a lot of the background theory of how Xposed operates.

A brief overview of what has changed from Rovo89's original tutorial and the one presented in this thread:
  • Source code changed: none (pure copy and paste)
  • Files modified: XposedBridgeApi.jar - all the *.class files were deleted from this archive because Aide offers no elegant way to link the file into a project without including it in the final build. The problem that occurs if the .class files are not deleted is that all the classes are included in the final build of the module, and it causes fatal errors which prevented the module from executing.
  • Device settings modified: The heapsize on my Galaxy Note had to be increased from 256mb to 512mb because Aide was throwing "out of memory" errors and would freeze during compilation of the code.

If you can adapt those changes yourself, then you can follow Rovo89's original tutorial on your own. For everyone else, you can follow mine step by step until you understand it all. Permission for Rovo89 is granted to copy/paste any of my changes into his original tutorial if it would help to be all unified.

Here is how to adapt that tutorial so you can develop Xposed modules on your Android device, i.e, develop without using a PC.

Step 1 - Download the required apps onto your device from the Play Store:

Step 2 - Creating a new project

Open Aide
Create new project -> Android App -> Hello World
Name: MyApp
Package Name: com.mycompany.myapp

Step 3 - Adding the XposedBridge library

Download the XposedBridgeApi.jar file from here - as per usual, full credit goes to Rovo89
Using Arc File manager copy XposedBridgeApi.jar to the 'libs' folder in your MyApp project folder.
Open XposedBridgeApi.jar in Arc File Manager and delete every *.class file inside. Don't delete the *.java files
Exit Arc File Manager and uninstall it if you don't need it for anything else.

Step 4 - Make your project recognized by Xposed

Back in Aide again, open AndroidManifest.xml in your project's root folder.
Paste the following lines into the <Application> section
<meta-data android:value="true" android:name="xposedmodule"/>
        <meta-data android:value="2.4*" android:name="xposedminversion"/>
        <meta-data android:value="Demonstration of the Xposed framework.\nMakes the status bar clock red." android:name="xposeddescription"/>
As you can see I am using Xposed 2.4.x - if your version is different, adjust the above lines accordingly.
See Rovo89's original tutorial if you need more context.

Step 5 - Add your source code

In your Aide project navigate to src/com/mycompany/myapp
Click - Add new Class here...
Name: xposedhook
Copy and paste the following code into (also note, this is verbatim from Rovo89's tutorial)
package com.mycompany.myapp;

import static;
import android.widget.TextView;

public class Tutorial implements IXposedHookLoadPackage {
    public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
        if (!lpparam.packageName.equals(""))

        findAndHookMethod("", lpparam.classLoader, "updateClock", new XC_MethodHook() {
            protected void afterHookedMethod(MethodHookParam param) throws Throwable {
            TextView tv = (TextView) param.thisObject;
            String text = tv.getText().toString();
            tv.setText(text + " :)");
Step 6 - Adding the class entry point

In Aide navigate to the 'assets' folder and create a new file named 'xposed_init'
Paste into the xposed_init file the following line:
Step 7 (OPTIONAL) - increase the heap size of your device

I was getting "out of memory" errors when I tried to compile/run my app. So the solution was to increase the heap size using Build Prop Editor which you already installed from the play store.
Open Build Prop Editor and change 'dalvik.vm.heapsize' to at least 512m. Mine was 256 by default. If your's is already 512m or higher then you can skip this step.
Restart your device after this step, but save your progress in Aide first.

Step 8 - Congratulations, you made it! now its time to open your project in Aide again (if you restarted your device in the previous step) and hit "Run" from the menu. Aide will give you a Cancel/Install choice to which you will select Install. Your Module will now be in the Xposed modules list, but it will be unselected. Enable your module by opening Xposed installer and ticking the box next to your module.

Restart your device. If the clock is red, then you should be very happy; you just created your first Xposed module. Now you can have fun with building modules with Aide and Xposed
Last edited by t2107; 5th February 2014 at 07:19 AM.
The Following 10 Users Say Thank You to t2107 For This Useful Post: [ View ]
15th April 2014, 04:56 AM |#2  
neXus PRIME's Avatar
Recognized Contributor
Flag Lahore, Pakistan
Thanks Meter: 4,432
Great tutorial man.

I created some modules on my pc using a tutorial and those worked fine. Then after my phone had a firmware update, i tried them again but they didnt work.
I tried building again n again n again.... every other module by other ppl were working but the one i compiled didnt work.

Then i saw ur guide and made the test module on phone and it WORKED! !

Now i guess the problem on pc was that the IDEs were adding unnecessary files... or maybe the trick of deleting the class files inside the API jar was the one which worked.

Anyways, great help, now i can continue with my project.
The Following User Says Thank You to neXus PRIME For This Useful Post: [ View ]
3rd August 2014, 04:45 PM |#3  
Snapdragon815's Avatar
Senior Member
Flag mysore
Thanks Meter: 97
Step 5 I had this ..Name:  uploadfromtaptalk1407080694270.jpg
Views: 5232
Size:  49.7 KB

Sent from my GT-I9082 using Tapatalk
3rd September 2014, 11:00 PM |#4  
Junior Member
Flag Bridgend
Thanks Meter: 0
Originally Posted by wild firefire

Step 5 I had this ..Attachment 2882121

Sent from my GT-I9082 using Tapatalk

Get a fix for this? Tried it multiple times and I can't manage to get ride of them

Re-added the .jar file and knocked it down to only 1 error. (Below) Changing this name to the file name gets rid of the error and allows the app to compile and install. But then I can't get the app to show up in xposed...

Update 2: I got it working after I fixed a derp where I added the metadata.
Attached Images
File Type: jpg xposedModError.jpg - [Click for QR Code] (256.0 KB, 804 views)
Last edited by Rawritsdan; 3rd September 2014 at 11:50 PM. Reason: Update
15th February 2015, 09:45 AM |#5  
Senior Member
Thanks Meter: 91
Can you please guide me how to create xposed module for Facebook app(make most recent story as default)!!??
17th February 2015, 04:37 PM |#6  
bigsupersquid's Avatar
Senior Member
Flag BFE, MO
Thanks Meter: 466
Donate to Me
I was going round and round trying to figure out why the logs were throwing 'class resolved to unexpected implementation' no matter what source I built from.
Removing the .class files from the jar fixed it.
Since my desktop has been down for months, this trick is a saving grace.
Post Reply Subscribe to Thread

aide, create, module, modules, xposed
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes