$ show Unicorn369/HookEuicc
This is an Android Xposed module (using LSPosed/libxposed API) that hooks system APIs to bypass eSIM (Embedded SIM / eUICC) support checks and intercept activation codes. It forces `PackageManager.hasSystemFeature` for eUICC to return true, returns a fake EuiccService in query results, and captures activation codes from `DownloadableSubscription.forActivationCode` or `getEncodedActivationCode`, copying them to the clipboard and offering to share via an Intent. Additionally, it provides an OMAPI bypass by hooking `com.android.se.security.AccessControlEnforcer` to disable ARF/ARA access control, enabling OMAPI access without proper ARA rules. The module targets specific packages listed in `scope.list` (com.android.se, com.miui.euicc, app.septs.euiccprobe). The code is a single Java class (`HookEuicc.java`) that extends `XposedModule` and installs hooks in `onPackageReady`. It demonstrates solid reflection-based hooking patterns and includes a reusable utility method for setting boolean fields via reflection across the class hierarchy. The build system uses Gradle with Android Gradle Plugin 8.6.0 and targets Android SDK 35.
The LLM identified 1 files worth highlighting for reuse:
The `setBooleanField` private static method is a reusable reflection utility that sets a boolean field on an object by traversing the class hierarchy until the field is found. It handles `NoSuchFieldException` by checking superclasses, sets the field accessible, and performs the set. This pattern is generic and can be extracted to a utility class for any reflection-based field manipulation, independent of Android or Xposed.