यह गाइड बिना Xposed टैग वाले अनुकूलित native image के लिए है। यह open-source Xposed लाइब्रेरी से होने वाली जोखिम-नियंत्रण समस्याओं से बचने के लिए native Xposed activation component का उपयोग करती है।
1. दायरा
इस गाइड से FoxPhone द्वारा समर्थित native image में Xposed service preloading या companion capability को integrate करें। वर्तमान में ये Android सिस्टम समर्थित हैं:
- AOSP 10
- AOSP 12
एक साथ किसी अन्य open-source Xposed Bridge dependency को न जोड़ें। यहां दिया गया AAR platform-adapted API namespace का उपयोग करता है; किसी अन्य Bridge library को मिलाने से class conflict, load failure या अतिरिक्त risk-control संकेत हो सकते हैं।
2. इंटीग्रेशन डिपेंडेंसी डाउनलोड करें
प्लेटफ़ॉर्म द्वारा दिया गया AAR डाउनलोड करें और फ़ाइल नाम रखें xposed-bridge-debug.aar:
xposed-bridge-debug.aar 264.87 KB
- फ़ाइल आकार: 271231 bytes (लगभग 264.87 KB)
- SHA-256:
D9DC538315E875D83357B3986CC27D1F7535BE17D9F3F6E69C2F327C9A23FC98 - न्यूनतम Android API: 26
3. Android डेमो इंटीग्रेशन
चरण 1: Android प्रोजेक्ट बनाएं
- Android Studio में Android प्रोजेक्ट बनाएं।
- Choose the No Activity template to avoid generating unrelated screen code.
- The example can use Java; when using Kotlin, implement the entry class with the same interfaces.

चरण 2: AAR जोड़ें
- Create a
libsdirectory under the App module. - Place
xposed-bridge-debug.aarinapp/libs/. - Reference it with
compileOnlyinapp/build.gradle.ktsso the Bridge implementation is not packaged into the APK again.
dependencies {
compileOnly(files("libs/xposed-bridge-debug.aar"))
}
For projects using the Groovy DSL, configure it in app/build.gradle:
dependencies {
compileOnly files('libs/xposed-bridge-debug.aar')
}
चरण 3: मॉड्यूल एंट्री पॉइंट कॉन्फ़िगर करें
- Create an
assetsdirectory underapp/src/main/. - इस डायरेक्टरी में बिना extension वाली फ़ाइल बनाएं
xposed_init。 - हर पंक्ति में एक entry class का पूरा नाम लिखें। उदाहरण:
com.example.myapplication.Main
The package and class name in xposed_init must exactly match the source code; otherwise the native component cannot find the entry class.
चरण 4: एंट्री क्लास लागू करें
The API package in the AAR is de.robv.android.examed, not the de.robv.android.xposed package commonly used by open-source Xposed libraries. Entry class example:
package com.example.myapplication;
import de.robv.android.examed.IXposedHookLoadPackage;
import de.robv.android.examed.XposedBridge;
import de.robv.android.examed.callbacks.XC_LoadPackage;
public class Main implements IXposedHookLoadPackage {
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam)
throws Throwable {
// 必须先限制目标包,避免在所有应用进程中执行初始化逻辑。
if (!"com.example.target".equals(loadPackageParam.packageName)) {
return;
}
XposedBridge.log("Native Xposed module loaded: "
+ loadPackageParam.packageName);
// 在此处实现经过授权的服务预启或伴随逻辑。
}
}
Replace com.example.target with the actual target application package, and keep business logic limited to authorized applications and scenarios.
चरण 5: प्रोजेक्ट संरचना जांचें
कॉन्फ़िगरेशन के बाद प्रोजेक्ट में कम से कम ये फ़ाइलें होनी चाहिए:
app/libs/xposed-bridge-debug.aarapp/src/main/assets/xposed_initapp/src/main/java/.../Main.javaor the corresponding Kotlin fileapp/src/main/AndroidManifest.xmlapp/build.gradle.ktsorapp/build.gradle

चरण 6: ऑब्फ़स्केशन नियम कॉन्फ़िगर करें
यदि release build में R8 या ProGuard सक्षम है, तो entry class को सुरक्षित रखें ताकि उसका नाम बदला या हटाया न जाए:
-keep class com.example.myapplication.Main { *; }
यदि entry class का package name बदलें, तो इसे भी अपडेट करें xposed_init and the obfuscation rules.。
चरण 7: बिल्ड और सत्यापन
- Gradle Sync चलाएं और पुष्टि करें कि AAR dependency सही तरीके से resolve हो रही है।
- Build the APK and confirm that it contains
assets/xposed_init. - Install the APK on a supported native image instance.
- Enable the module through the FoxPhone native Xposed activation component.
- Launch the target application, check the logs for entry-class output, and verify that the business logic runs only in the target package.
4. सामान्य प्रश्न
1. मॉड्यूल इंस्टॉल करने के बाद नहीं चलता
Confirm that the instance uses a supported AOSP 10 or AOSP 12 native image, that the module is activated by the native component, and that the fully qualified class name in xposed_init is correct.
2. कंपाइल करते समय Xposed इंटरफ़ेस नहीं मिलता
Check that the AAR is in app/libs/, verify the path in the Gradle file, and confirm that the de.robv.android.examed namespace is imported.
3. Release पैकेज इंस्टॉल होता है, लेकिन एंट्री नहीं चलती
Check whether R8 or ProGuard changed or removed the entry class, and verify that the obfuscation rules match xposed_init.
4. रनटाइम पर डुप्लिकेट क्लास या Bridge संघर्ष
Remove other Xposed Bridge dependencies and confirm that the platform AAR is added with compileOnly and is not packaged into the APK twice.
5. मॉड्यूल गैर-लक्ष्य ऐप को प्रभावित करता है
Filter by packageName at the very start of the entry method and return immediately for non-target processes.