Android

How to Build an Xposed Module 2019

How to Make an Xposed Module – Part 1

How to Make an Xposed Module – Part 2

How to Make an Xposed Module – Part 3

What is Xposed Framework?

Xposed is a framework that allows users to easily apply add-ons (called Modules) to the ROM. Rather than flashing a new ROM to get a specific feature, you can use Xposed to add individual features to whatever ROM you’re using, or even just the stock ROM.

In this tutorial, we are going to demonstrate the power of an Xposed module. We are going to be building an App that will be manipulated by an Xposed Module we are going to build.

We are going to be building two apps in total.

Xposed doesn’t work perfectly on every device and all versions of Android. The release of Android Nougat presented some problems for Xposed, but those have since been mostly ironed out. Xposed Modules work best on stock Android and can sometimes not work as intended on Samsung devices. With all that in mind, let’s learn a little more.

A lot of Xposed decline in popularity is due to Magisk, which offers a “systemless” approach. The Xposed Framework modifies the Android system, which triggers Google SafetyNet to disable things like Google Pay, Netflix, and Pokemon GO. Magisk, on the other hand, does not modify the system. It uses the boot partition instead of the system. When a system file is requested, Magisk overlays a “virtual file in its place.

Now here’s where things get interesting: Xposed can be used with Magisk. The Xposed Framework can be installed as a Magisk Module. This means Xposed can also be systemless and you can use the mods without triggering Google SafetyNet.

Before we proceed with this tutorial you need to install the Xposed framework on your device or better still on your Emulator.

How do I install the Xposed Framework on my Device?

For the purpose of this tutorial we are going to install the Xposed Framework on our Genymotion Android Emulator. as demonstrated in the video below.

To install Xposed Framework on your regular device, read the guide here -> Xposed Framework Hub 

Let’s get Started!

App 1 – Vulnerable App – Github

  1. Create new Project and name it Vulnerable App
  2. MainActivity.kt
    import android.os.Bundle
    import android.support.v7.app.AppCompatActivity
    import android.widget.Button
    import android.widget.Toast
    
    class MainActivity : AppCompatActivity() {
        private var i = 0
        private lateinit var btn: Button
        
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            setContentView(R.layout.activity_main)
    
            btn = findViewById(R.id.crackMe)
            btn.setOnClickListener({ v ->
                setOutput(i)
            })
        }
    
        private fun setOutput(i : Int){
            if (i==1)
                Toast.makeText(this, "Crack Successful", Toast.LENGTH_LONG).show()
            else
                Toast.makeText(this, "Not Cracked. You can not crack it!", Toast.LENGTH_LONG).show()
        }
    }
    
  3. activity_main.xml
    <?xml version="1.0" encoding="utf-8"?>
    <android.support.constraint.ConstraintLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            tools:context=".MainActivity">
    
        <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Crack Me"
                android:id="@+id/crackMe"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"/>
    
    </android.support.constraint.ConstraintLayout>

App 2 – Breach Vulnerable App

please watch the videos above on how it was built and for further explanation. or better still grab the source code on GitHub.

Assignment:

Modify the Android Status bar as demonstrated in this xposed module tutorial

Tags

Edge Developer

Hello there, my name is Opeyemi Olorunleke. I am a Software Developer (majorly Android, GitHub Profile), Digital Marketer, Udemy Instructor, Technical Writer, Blogger & Webmaster.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close
Close