MuntashirAkon / AppManager

A full-featured package manager and viewer for Android
https://muntashirakon.github.io/AppManager/
Other
5k stars 281 forks source link

new crash! #1288

Closed Bluscream closed 7 months ago

Bluscream commented 9 months ago

Please check before submitting an issue

Logs

java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
    at io.github.muntashirakon.AppManager.details.info.AppInfoViewModel.lambda$loadAppInfoInternal$5(AppInfoViewModel.java:386)
    at io.github.muntashirakon.AppManager.details.info.AppInfoViewModel$$ExternalSyntheticLambda5.run(Unknown Source:2)
    at android.os.Handler.handleCallback(Handler.java:958)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8248)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
   at j$.util.Objects.requireNonNull(Unknown Source:0)
   at io.github.muntashirakon.AppManager.ipc.ProxyBinder.<init>(ProxyBinder.java:50)
   at io.github.muntashirakon.AppManager.ipc.ProxyBinder.getService(ProxyBinder.java:34)
   at io.github.muntashirakon.AppManager.compat.SubscriptionManagerCompat.getSub(SubscriptionManagerCompat.java:64)
   at io.github.muntashirakon.AppManager.compat.SubscriptionManagerCompat.getActiveSubscriptionInfoList(SubscriptionManagerCompat.java:27)
   at io.github.muntashirakon.AppManager.usage.AppUsageStatsManager.getSubscriberIds(AppUsageStatsManager.java:432)
   at io.github.muntashirakon.AppManager.usage.AppUsageStatsManager.getDataUsageForPackage(AppUsageStatsManager.java:384)
   at io.github.muntashirakon.AppManager.details.info.AppInfoViewModel.loadAppInfoInternal(AppInfoViewModel.java:352)
   at io.github.muntashirakon.AppManager.details.info.AppInfoViewModel.lambda$loadAppInfo$4$io-github-muntashirakon-AppManager-details-info-AppInfoViewModel(AppInfoViewModel.java:316)
   at io.github.muntashirakon.AppManager.details.info.AppInfoViewModel$$ExternalSyntheticLambda4.run(Unknown Source:6)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
   at java.util.concurrent.FutureTask.run(FutureTask.java:264)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
   at java.lang.Thread.run(Thread.java:1012)

Device Info:

Key Value
App Version 4.0.0-alpha02
App Version Code 435
Android Build Version eng.ponces.20240105.171116
Android Release Version 14
Android SDK Version 34
Android Build ID treble_arm64_bgN-user 14 UQ1A.240105.004.A1 eng.ponces.20240105.171116 release-keys
Device Brand Lenovo
Device Manufacturer LENOVO
Device Name achilles6_row_wifi
Device Model Lenovo TB-X606F
Device Product Name full_achilles6_row_wifi
Device Hardware Name mt8768
ABIs arm64-v8a, armeabi-v7a, armeabi
ABIs (32bit) armeabi-v7a, armeabi
ABIs (64bit) arm64-v8a
System Language en-US
In-App Language auto
Mode root
Inferred Mode Root

To Reproduce

No response Open any app detail

Expected behavior

No response

Screenshots

No response

Additional context

No response

MuntashirAkon commented 9 months ago

Not sure why this error occurred. AOSP source code for Android 14 still has isub for ISub (subscription manager service). So, if the device has support for telephony, Context.getService("isub") should not return null.

Can you share the files /system/framework/framework.jar and /system/framework/services.jar?

Bluscream commented 9 months ago

Not sure why this error occurred. AOSP source code for Android 14 still has isub for ISub (subscription manager service). So, if the device has support for telephony, Context.getService("isub") should not return null.

Can you share the files /system/framework/framework.jar and /system/framework/services.jar?

This is a tablet without telephony. I'll get the files and attach them here later

EDIT: Framework_2.zip

MuntashirAkon commented 9 months ago

You said "phone", so I assumed it supporting telephony.

Bluscream commented 9 months ago

You said "phone", so I assumed it supporting telephony.

Yeah, sorry. I thought it was clear from the device info posted in the table

MuntashirAkon commented 7 months ago

I already have necessary checks for telephony. If the tablet supports telephony, how is it managed to bypass it? Can you check if the following features are available?

android.hardware.telephony
android.hardware.telephony.subscription

You can check them at App Manager > Settings > About the device.

Bluscream commented 7 months ago
OS version: 14
Bootloader: unknown, VM: ART
Kernel: 4.9.190+
Brand: Lenovo, Model: Lenovo TB-X606F
Board: achilles6_row_wifi, Manufacturer: LENOVO

SDK
Target: 34, Min: 28

Security
Root: true
SELinux: Enforcing
Encryption: Encrypted (FBE)
Patch level: February 5, 2023
Security providers: AndroidNSSP (v1.0), AndroidOpenSSL (v1.0), CertPathProvider (v1.0), AndroidKeyStoreBCWorkaround (v1.0), BC (v1.68), HarmonyJSSE (v1.0), AndroidKeyStore (v1.0), JKS (v1.0)

CPU
Hardware: MT8768WT
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Cores: 8

Graphics
OpenGL ES version: 3.2

Memory
4.00 GB

Battery
Capacity: 5000.0mAh

Screen
Density: hdpi (240 DPI)
Scaling factor: 1.5
Size: 1920px × 1200px
Window size: 1920px × 1200px
Refresh rate: 60.0 Hz

Languages
English (United States)

Users
1 (Owner)

Apps
User: Owner (0)
   Total: 285, User: 71, System: 214

Features
android.hardware.audio.low_latency
android.hardware.audio.output
android.hardware.biometrics.face
android.hardware.bluetooth
android.hardware.bluetooth_le
android.hardware.camera
android.hardware.camera.any
android.hardware.camera.autofocus
android.hardware.camera.capability.manual_sensor
android.hardware.camera.front
android.hardware.faketouch
android.hardware.location
android.hardware.location.gps
android.hardware.location.network
android.hardware.microphone
android.hardware.opengles.aep
android.hardware.ram.normal
android.hardware.screen.landscape
android.hardware.screen.portrait
android.hardware.sensor.accelerometer
android.hardware.sensor.light
android.hardware.sensor.proximity
android.hardware.sensor.stepcounter
android.hardware.sensor.stepdetector
android.hardware.telephony
android.hardware.telephony.calling
android.hardware.telephony.data
android.hardware.telephony.gsm
android.hardware.telephony.ims
android.hardware.telephony.messaging
android.hardware.telephony.radio.access
android.hardware.telephony.subscription
android.hardware.touchscreen
android.hardware.touchscreen.multitouch
android.hardware.touchscreen.multitouch.distinct
android.hardware.touchscreen.multitouch.jazzhand
android.hardware.usb.accessory
android.hardware.usb.host
android.hardware.vulkan.compute
android.hardware.vulkan.level
android.hardware.vulkan.version (v4198400)
android.hardware.wifi
android.hardware.wifi.direct
android.hardware.wifi.passpoint
android.software.activities_on_secondary_displays
android.software.adoptable_storage
android.software.app_enumeration
android.software.app_widgets
android.software.autofill
android.software.backup
android.software.cant_save_state
android.software.companion_device_setup
android.software.controls
android.software.cts
android.software.device_admin
android.software.device_lock
android.software.file_based_encryption
android.software.game_service
android.software.home_screen
android.software.input_methods
android.software.ipsec_tunnels
android.software.managed_users
android.software.midi
android.software.picture_in_picture
android.software.print
android.software.sdksandbox.sdk_install_work_profile
android.software.secure_lock_screen
android.software.securely_removes_users
android.software.sip
android.software.sip.voip
android.software.telecom
android.software.verified_boot
android.software.virtualization_framework
android.software.voice_recognizers
android.software.webview
android.software.window_magnification
com.google.android.apps.dialer.call_recording_audio
com.google.android.apps.dialer.SUPPORTED
com.google.android.apps.photos.NEXUS_PRELOAD
com.google.android.apps.photos.nexus_preload
com.google.android.feature.D2D_CABLE_MIGRATION_FEATURE
com.google.android.feature.GMS_GAME_SERVICE
com.google.android.feature.GOOGLE_BUILD
com.google.android.feature.GOOGLE_EXPERIENCE
com.google.android.feature.WELLBEING
MuntashirAkon commented 7 months ago

Weird. It says you have all the telephony features.

Bluscream commented 7 months ago

Maybe because it's a GSI firmware? Which is for more than just one device. You can look up the model number on google and will see the tablet doesnt have a SIM slot

Also fyi, the latest debug build (6661 or smth) does not crash but hangs and shows ANR after showing app details

MuntashirAkon commented 7 months ago

Maybe because it's a GSI firmware? Which is for more than just one device. You can look up the model number on google and will see the tablet doesnt have a SIM slot

Even then, if it says telephony exists, it should return something. Otherwise, it will break compatibility like the example above. The anything is possible scenario could very much be a nightmare for everybody.

Also fyi, the latest debug build (6661 or smth) does not crash but hangs and shows ANR after showing app details

An ANR is expected for now, especially in the debug builds. You need to ignore them by clicking on the wait button.

Bluscream commented 7 months ago

Also fyi, the latest debug build (6661 or smth) does not crash but hangs and shows ANR after showing app details

It didnt recover after dismissing 10 ANR dialogs

Bluscream commented 7 months ago

Even then, if it says telephony exists, it should return something. Otherwise, it will break compatibility like the example above. The anything is possible scenario could very much be a nightmare for everybody.

I asked the GSI maintainer and it seems to be a huawei thing?

https://t.me/phhtreble/795572 Screenshot_20240327-171835_Plus.png

MuntashirAkon commented 7 months ago

Fixed in f7888880d14b635ae73e1d8f6b18645fba0ea6a5