This repository has been archived by the owner on Apr 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f9b066f
Showing
14 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Xposed Module Template for Android Studio | ||
----------------------------------------- | ||
|
||
Create a Xposed Module easily with Android Studio | ||
|
||
![](https://github.com/DVDAndroid/XposedModuleTemplate/blob/master/screenshot.png) | ||
|
||
# How to | ||
|
||
- [Download it](http://github.com/dvdandroid/XposedModuleTemplate/archive/master.zip) | ||
- Extract and copy the `XposedModule` folder to the template folder located in: | ||
`{Android Studio installation dir}\plugins\android\lib\templates\other\` | ||
|
||
# Usage | ||
|
||
If Android Studio is open, restart it. | ||
|
||
- Click **File > New > Other > Xposed Module** (or right click in the project) | ||
- Type your Xposed Description and your class name | ||
- Click **Finish** and wait for Gradle sync | ||
|
||
![](https://github.com/DVDAndroid/XposedModuleTemplate/blob/master/wizard.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<globals> | ||
<global id="projectOut" value="."/> | ||
<global id="manifestOut" value="${manifestDir}"/> | ||
<global id="srcOut" value="${srcDir}/${slashedPackageName(packageName)}"/> | ||
<global id="resOut" value="${resDir}"/> | ||
</globals> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
<recipe> | ||
|
||
<mkdir at="${escapeXmlAttribute(manifestOut)}/assets/"/> | ||
<mkdir at="${escapeXmlAttribute(projectOut)}/libs/"/> | ||
|
||
<copy from="root/libs/XposedBridge.jar" | ||
to="${escapeXmlAttribute(projectOut)}/libs/XposedBridge.jar"/> | ||
|
||
<merge from="root/AndroidManifest.xml.ftl" | ||
to="${escapeXmlAttribute(manifestOut)}/AndroidManifest.xml"/> | ||
|
||
<!-- no build.gradle changes - only a build sync --> | ||
<merge from="root/build.gradle.ftl" to="${escapeXmlAttribute(projectOut)}/build.gradle"/> | ||
|
||
<merge from="root/res/values/strings.xml.ftl" | ||
to="${escapeXmlAttribute(resOut)}/values/strings.xml"/> | ||
|
||
<instantiate from="root/assets/xposed_init.ftl" | ||
to="${escapeXmlAttribute(manifestOut)}/assets/xposed_init"/> | ||
|
||
<instantiate from="root/src/app_package/XposedMod.java.ftl" | ||
to="${escapeXmlAttribute(srcOut)}/${xposedModClass}.java"/> | ||
|
||
<open file="${escapeXmlAttribute(srcOut)}/${xposedModClass}.java"/> | ||
|
||
</recipe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" > | ||
|
||
<application> | ||
<meta-data | ||
android:name="xposedmodule" | ||
android:value="true"/> | ||
<meta-data | ||
android:name="xposedminversion" | ||
android:value="42+"/> | ||
<meta-data | ||
android:name="xposeddescription" | ||
android:value="@string/xposedDescription"/> | ||
</application> | ||
|
||
<!-- created with androidstudio template by dvdandroid --> | ||
<!-- http://github.com/dvdandroid/XposedModuleTemplate --> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
${packageName}.${xposedModClass} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="xposedDescription">${escapeXmlString(xposedDescription)}</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package ${packageName}; | ||
|
||
import de.robv.android.xposed.IXposedHookLoadPackage; | ||
import de.robv.android.xposed.XposedBridge; | ||
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; | ||
|
||
public class ${xposedModClass} implements IXposedHookLoadPackage { | ||
|
||
@Override | ||
public void handleLoadPackage(final LoadPackageParam lpparam) | ||
throws Throwable { | ||
XposedBridge.log("Loaded app: " + lpparam.packageName); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0"?> | ||
<template | ||
name="Xposed Module" | ||
description="Creates a new Xposed Module" | ||
format="3" | ||
minApi="15" | ||
minBuildApi="15" | ||
revision="2"> | ||
|
||
<category value="Other"/> | ||
|
||
<parameter | ||
name="Xposed Mod class" | ||
constraints="nonempty|unique" | ||
default="XposedMod" | ||
help="Class that contains Xposed code" | ||
id="xposedModClass" | ||
type="class "/> | ||
|
||
<parameter | ||
name="Xposed Description" | ||
constraints="nonempty" | ||
help="Description of Xposed Module" | ||
id="xposedDescription" | ||
type="string"/> | ||
|
||
<parameter | ||
name="Package name" | ||
constraints="package" | ||
default="com.mycompany.myapp.xposed" | ||
id="packageName" | ||
type="string"/> | ||
|
||
<thumbs> | ||
<thumb>template_xposed_module.png</thumb> | ||
</thumbs> | ||
|
||
<globals file="globals.xml.ftl"/> | ||
<execute file="recipe.xml.ftl"/> | ||
|
||
</template> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.