tiann / KernelSU

A Kernel based root solution for Android
https://kernelsu.org
GNU General Public License v3.0
10.63k stars 1.74k forks source link

使用替换系统应用模块有概率无法使用? #494

Closed Womsxd closed 1 year ago

Womsxd commented 1 year ago

Describe the bug 使用一个替换com.android.packageinstaller的模块,在手机重启后出现替换失败or应用半丢失状态 在magisk环境下无问题

To Reproduce Steps to reproduce the behavior: 1.安装替换com.android.packageinstaller的模块 2.重启手机 3.安装apk进行检测 无动作or系统原来的安装器

Expected behavior 模块正常加载并进行替换

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

05-14 20:59:35.765  2494  3932 D BufferPoolAccessor2.0: evictor expired: 2, evicted: 2
05-14 20:59:35.765  3557  4591 W ResourcesManager: failed to preload asset path '/system/priv-app/PackageInstaller/PackageInstaller.apk'
05-14 20:59:35.765  3557  4591 W ResourcesManager: java.io.IOException: Failed to load asset path /system/priv-app/PackageInstaller/PackageInstaller.apk
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.content.res.ApkAssets.nativeLoad(Native Method)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.content.res.ApkAssets.<init>(ApkAssets.java:296)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.content.res.ApkAssets.loadFromPath(ApkAssets.java:145)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ResourcesManager.loadApkAssets(ResourcesManager.java:502)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ResourcesManager.-$$Nest$mloadApkAssets(Unknown Source:0)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ResourcesManager$ApkAssetsSupplier.load(ResourcesManager.java:171)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ResourcesManager.createApkAssetsSupplierNotLocked(ResourcesManager.java:1042)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ResourcesManager.getResources(ResourcesManager.java:1172)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:2627)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:2121)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:2107)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.app.ApplicationPackageManager.getText(ApplicationPackageManager.java:2434)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.content.pm.PackageItemInfo.loadUnsafeLabel(PackageItemInfo.java:234)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.content.pm.PackageItemInfo.loadLabel(PackageItemInfo.java:224)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at com.oplus.systemui.statusbar.notification.collection.NotificationResolverExImpl$updateAllPackageData$1.invoke(NotificationResolverExImpl.kt:85)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at com.oplus.systemui.statusbar.notification.collection.NotificationResolverExImpl$updateAllPackageData$1.invoke(NotificationResolverExImpl.kt:64)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at com.oplusos.systemui.common.util.ThreadManager.postInThread$lambda-0(ThreadManager.kt:62)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at com.oplusos.systemui.common.util.ThreadManager.$r8$lambda$-x_o3h3O6PBxDqR54YVzhT8JMMY(Unknown Source:0)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at com.oplusos.systemui.common.util.ThreadManager$$ExternalSyntheticLambda0.run(Unknown Source:2)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.os.Handler.handleCallback(Handler.java:942)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.os.Handler.dispatchMessage(Handler.java:99)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.os.Looper.loopOnce(Looper.java:240)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.os.Looper.loop(Looper.java:351)
05-14 20:59:35.765  3557  4591 W ResourcesManager:  at android.os.HandlerThread.run(HandlerThread.java:67)
05-14 20:59:35.765  3557  4591 W ziparchive: Unable to open '/system/priv-app/PackageInstaller/PackageInstaller.apk': No such file or directory
05-14 20:59:35.765  3557  4591 E ndroid.systemui: Failed to open APK '/system/priv-app/PackageInstaller/PackageInstaller.apk': I/O error
05-14 20:59:35.766  3557  4591 E ResourcesManager: failed to add asset path '/system/priv-app/PackageInstaller/PackageInstaller.apk'
05-14 20:59:35.766  3557  4591 E ResourcesManager: java.io.IOException: Failed to load asset path /system/priv-app/PackageInstaller/PackageInstaller.apk
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.content.res.ApkAssets.nativeLoad(Native Method)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.content.res.ApkAssets.<init>(ApkAssets.java:296)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.content.res.ApkAssets.loadFromPath(ApkAssets.java:145)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager.loadApkAssets(ResourcesManager.java:502)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager.-$$Nest$mloadApkAssets(Unknown Source:0)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager$ApkAssetsSupplier.load(ResourcesManager.java:171)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager.createAssetManager(ResourcesManager.java:578)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager.createResourcesImpl(ResourcesManager.java:675)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager.findOrCreateResourcesImplForKeyLocked(ResourcesManager.java:727)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager.createResources(ResourcesManager.java:1073)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ResourcesManager.getResources(ResourcesManager.java:1185)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:2627)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:2121)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:2107)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.app.ApplicationPackageManager.getText(ApplicationPackageManager.java:2434)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.content.pm.PackageItemInfo.loadUnsafeLabel(PackageItemInfo.java:234)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.content.pm.PackageItemInfo.loadLabel(PackageItemInfo.java:224)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at com.oplus.systemui.statusbar.notification.collection.NotificationResolverExImpl$updateAllPackageData$1.invoke(NotificationResolverExImpl.kt:85)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at com.oplus.systemui.statusbar.notification.collection.NotificationResolverExImpl$updateAllPackageData$1.invoke(NotificationResolverExImpl.kt:64)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at com.oplusos.systemui.common.util.ThreadManager.postInThread$lambda-0(ThreadManager.kt:62)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at com.oplusos.systemui.common.util.ThreadManager.$r8$lambda$-x_o3h3O6PBxDqR54YVzhT8JMMY(Unknown Source:0)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at com.oplusos.systemui.common.util.ThreadManager$$ExternalSyntheticLambda0.run(Unknown Source:2)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.os.Handler.handleCallback(Handler.java:942)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.os.Handler.dispatchMessage(Handler.java:99)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.os.Looper.loopOnce(Looper.java:240)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.os.Looper.loop(Looper.java:351)
05-14 20:59:35.766  3557  4591 E ResourcesManager:  at android.os.HandlerThread.run(HandlerThread.java:67)
05-14 20:59:35.766  3557  4591 W PackageManager: Failure retrieving resources for com.android.packageinstaller

KernelSU_bugreport_2023-05-14_21_00.tar.gz

Womsxd commented 1 year ago
01-29 13:37:17.672   932   932 I KernelSU: ksud::mount: mount overlayfs on /system, options=lowerdir=/data/adb/modules/GreenifyMoveToSystem/system:/data/adb/modules/zygisksu/system:/data/adb/modules/AOSPInstaller/system:/system

模块是加载挂载了AOSPInstaller

Womsxd commented 1 year ago

shamiko白名单问题(