App does not work when prebuilt with Android OS as system app
Description:
When installing com.cakewallet.cake_wallet, the install process completes and PackageManager reports the package as REPLACED, but the app never appears in the launcher. Upon checking logcat, it shows that the package does not have legacy storage and it's missing application info.
logs:
V StorageManagerService: Package com.cakewallet.cake_wallet does not have legacy storage Package [com.cakewallet.cake_wallet] reported as REPLACED, but missing application info. Assuming REMOVED.
The problem occurs because /system/app/hmesh-com.cakewallet.cake_wallet is missing its base.apk (or the APK is otherwise invalid).
If the affected package is marked as required or a core app in the system’s framework-res or packages.xml (e.g., a default wallet, core service, or preinstalled dependency), this missing base.apk will cause PackageManager to fail during the early boot phase. This prevents the system from completing the package scan, leading to a continuous bootloop.
Expected behavior:
The package should remain installed and functional after replacing the stub, and the system should boot normally.
logs: https://katb.in/ugepodixepa
I'm curious how did cake wallet end up being a system app and why? Do you have steps to reproduce the issue, or ideally required patches to lineageos (ideally working on 22.2's sdk_phone_arm64 target) so I can test this on my end?
It's for a customized Android for a business customer. We found the issue. The app uses an outdated way of signing. The solution is to resign the app with the plattform keys of the customized Android.