manager: Bump MMRL and possible fix #384 (#391)

* manager: bump mmrl to 346470abb8

- Possible fix a bug where IUserManager.getUsers(ZZZ) are not defined in the framework.jar
- Refactored WebUI X to meet the new WXInterface
- Only fetch the app from the current user and not all users

* manager: remove unused AIDL interfaces
This commit is contained in:
Der_Googler
2025-05-18 12:50:51 +02:00
committed by GitHub
parent b8c2660996
commit e07a6fb3ff
5 changed files with 7 additions and 22 deletions

View File

@@ -34,7 +34,6 @@ android {
}
buildFeatures {
aidl = true
buildConfig = true
compose = true
prefab = true

View File

@@ -1,9 +0,0 @@
// IKsuInterface.aidl
package com.rifsxd.ksunext;
import android.content.pm.PackageInfo;
import rikka.parcelablelist.ParcelableListSlice;
interface IKsuInterface {
ParcelableListSlice<PackageInfo> getPackages(int flags);
}

View File

@@ -109,14 +109,9 @@ class SuperUserViewModel : ViewModel() {
val pm = ksuApp.packageManager
val start = SystemClock.elapsedRealtime()
val userInfos = Platform.userManager.getUsers()
val packages = mutableListOf<PackageInfo>()
val userManager = Platform.userManager
val packageManager = Platform.packageManager
for (userInfo in userInfos) {
Log.i(TAG, "fetchAppList: ${userInfo.id}")
packages.addAll(packageManager.getInstalledPackages(0, userInfo.id))
}
val packages = packageManager.getInstalledPackages(0, userManager.myUserId)
apps = packages.map {
val appInfo = it.applicationInfo

View File

@@ -9,8 +9,8 @@ import android.webkit.JavascriptInterface
import android.widget.Toast
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import com.dergoogler.mmrl.webui.interfaces.WXInterface
import com.dergoogler.mmrl.webui.interfaces.WXOptions
import com.dergoogler.mmrl.webui.interfaces.WebUIInterface
import com.dergoogler.mmrl.webui.model.JavaScriptInterface
import com.topjohnwu.superuser.CallbackList
import com.topjohnwu.superuser.ShellUtils
@@ -25,7 +25,7 @@ import java.util.concurrent.CompletableFuture
class WebViewInterface(
wxOptions: WXOptions,
) : WebUIInterface(wxOptions) {
) : WXInterface(wxOptions) {
override var name: String = "ksu"
companion object {
@@ -185,7 +185,7 @@ class WebViewInterface(
@JavascriptInterface
fun moduleInfo(): String {
val moduleInfos = JSONArray(listModules())
var currentModuleInfo = JSONObject()
val currentModuleInfo = JSONObject()
currentModuleInfo.put("moduleDir", modDir)
val moduleId = File(modDir).getName()
for (i in 0 until moduleInfos.length()) {
@@ -195,7 +195,7 @@ class WebViewInterface(
continue
}
var keys = currentInfo.keys()
val keys = currentInfo.keys()
for (key in keys) {
currentModuleInfo.put(key, currentInfo.get(key))
}

View File

@@ -17,7 +17,7 @@ parcelablelist = "2.0.1"
libsu = "6.0.0"
apksign = "1.4"
cmaker = "1.2"
mmrl = "v33560"
mmrl = "346470abb8"
[plugins]
agp-app = { id = "com.android.application", version.ref = "agp" }