mercredi 29 juillet 2015

Making Your Own Xposed Modules Is Easier Than You Think

Xposed Installer v3.0 alpha 2 (for Android 5.1 only!)

Close to the heart of XDA is the Xposed Framework by Rovo89. Most of us will have used it but you may feel that the module repository is missing something. We have the solution with several guides aimed at getting you started to build your own modules, something that may be daunting but can open an entire new field of development with a little time and effort.

 

 

Github xposed

Where better to start than at the beginning? Rovo89 has created a straight forward tutorial for getting started with development for Xposed. In what is the equivalent of a “hello world” program when starting to learn to develop with any medium, this guide teaches you how to build a basic module to change your clock’s color to red. Not only does the page discuss the process by which you can start, it also covers how Xposed works within the Android system by “hooking” method calls and allowing you to inject code before and after methods. Starting with changing an app’s metadata to flag it as a module and finishing with executing your code, this really has all the basics you could need to understand and implement your first module. You can find his guide here.

 

“Alright.. you want to learn how you can create a new module for Xposed? Then read this tutorial (or let’s rather call it “extensive essay”) and learn how to approach this” – Rovo89

 

Screenshot 2015-07-26 at 23.58.50Expanding upon Rovo89’s work, forum member hamzahrmalik has made many great additions to the tutorial, including step by step images from within Windows for those of us who prefer visual aids when learning. Another improvement over the original article is the inclusion of a second module that changes the height of your status bar. With instructions on how to set-up your project before you begin, this thread allows both new and experienced developers alike to begin or brush up on their skills. This time the article is split up into nine separate  lessons each covering new challenges and scenarios you may face on your journey. For those wishing to save time, hamzahrmalik has also included a link to his tool that will take your class, project, package and app names as well as your minimum API levels and then generate an Eclipse project ready for your module. As it is written in Java there a is a level of cross-platform compatibility including Windows and Linux. You can find the original thread here and his set-up tool here.

 

“Of course this was easy, but depending on exactly what you want your module to do, you may have to hook many methods. If you’ve ever modded APK’s, you’ll know what I mean” – hamzahrmalik

 

AIDEAlternatively, you may prefer to create your modules inside Android itself allowing for development on the go. That was the reason behind t2107‘s thread on developing for Xposed inside AIDE which is an integrated development environment for Android. Besides the OS you are developing on there are several other differences between this and the original tutorial posted by Rovo89; these including the deletion of all the *.class files to prevent fatal errors and the possibly required step of increasing your devices heap size to prevent memory issues as was seen on t2107’s Galaxy Note. If you are familiar with AIDE or feel that you could handle the small issues that come with it, you may find yourself better off starting with the original guide.

 

“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” – t2107
You should now find that you have the means and the knowledge to begin creating your own modules. With a little time and energy, it should not take you long before you can alter many of the elements within Android and apps in both appearance and function. As always, if you create something that may be of use to others, share it in the forums for others to benefit from!

Have you created Xposed Modules before? Leave a comment below!



from xda-developers http://ift.tt/1IKg3ex
via IFTTT

Aucun commentaire:

Enregistrer un commentaire