refactor: remove legacy BlackBox app shell

This commit is contained in:
Mahdi Karzari
2026-07-20 04:25:09 +03:30
parent 165c014d75
commit bf5f73e07a
154 changed files with 217 additions and 7140 deletions
@@ -0,0 +1,36 @@
package com.qm4rs.fridabox
import android.app.Application
import android.content.Context
import android.util.Log
import top.niunaijun.blackbox.BlackBoxCore
class FridaBoxApplication : Application() {
override fun attachBaseContext(base: Context) {
super.attachBaseContext(base)
appContext = base
runCatching { BlackBoxCore.get().closeCodeInit() }
.onFailure { Log.e(TAG, "Native bootstrap failed", it) }
runCatching { BlackBoxCore.get().onBeforeMainApplicationAttach(this, base) }
.onFailure { Log.e(TAG, "Pre-attach hook failed", it) }
FridaBoxRuntime.attach(base)
runCatching { BlackBoxCore.get().onAfterMainApplicationAttach(this, base) }
.onFailure { Log.e(TAG, "Post-attach hook failed", it) }
}
override fun onCreate() {
super.onCreate()
FridaBoxRuntime.create()
}
companion object {
private const val TAG = "FridaBox.Application"
@Volatile
lateinit var appContext: Context
private set
}
}