-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
14 changed files
with
263 additions
and
618 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
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
224 changes: 0 additions & 224 deletions
224
app/src/main/java/five/ec1cff/myinjector/BilibiliXposedHandler.kt
This file was deleted.
Oops, something went wrong.
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
19 changes: 7 additions & 12 deletions
19
app/src/main/java/five/ec1cff/myinjector/FvXposedHandler.kt
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 |
---|---|---|
@@ -1,29 +1,24 @@ | ||
package five.ec1cff.myinjector | ||
|
||
import android.app.Activity | ||
import android.os.Process | ||
import android.view.View | ||
import com.github.kyuubiran.ezxhelper.init.EzXHelperInit | ||
import com.github.kyuubiran.ezxhelper.utils.Log | ||
import com.github.kyuubiran.ezxhelper.utils.findMethod | ||
import com.github.kyuubiran.ezxhelper.utils.hookAfter | ||
import android.util.Log | ||
import de.robv.android.xposed.IXposedHookLoadPackage | ||
import de.robv.android.xposed.XposedBridge | ||
import de.robv.android.xposed.XposedHelpers | ||
import de.robv.android.xposed.callbacks.XC_LoadPackage | ||
|
||
class FvXposedHandler : IXposedHookLoadPackage { | ||
companion object { | ||
private const val TAG = "MyInjector-fooview" | ||
} | ||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { | ||
if (lpparam.packageName != "com.fooview.android.fooview") return | ||
EzXHelperInit.initHandleLoadPackage(lpparam) | ||
EzXHelperInit.setLogTag("myinjector-fooview") | ||
Log.i("inject fv, pid=${Process.myPid()}, processName=${lpparam.processName}") | ||
Log.i(TAG, "inject fv, pid=${Process.myPid()}, processName=${lpparam.processName}") | ||
try { | ||
val c = XposedHelpers.findClass("dalvik.system.VMRuntime", lpparam.classLoader) | ||
XposedHelpers.callMethod(XposedHelpers.callStaticMethod(c, "getRuntime"), "setHiddenApiExemptions", arrayOf("L")); | ||
Log.d("success to bypass") | ||
Log.d(TAG, "success to bypass") | ||
} catch (t: Throwable) { | ||
Log.e("failed to bypass", t) | ||
Log.e(TAG, "failed to bypass", t) | ||
} | ||
} | ||
} |
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
Oops, something went wrong.