Xposed
Xposed copied to clipboard
Bootloop Xiaomi MI8lite on Miui 10 (10.0.8.0) Oreo 8.1 (SDK27)
Device (vendor and model) Xiaomi Mi8lite global
ROM Xiaomi.eu multi MI8LITE V10.0.8.0.ODTCNFH_v10-8.1 (deodexed)
Xposed version Xposed-v90-sdk27-arm64-beta1 (flashed with TWRP)
Detailed description of the issue (including exact error messages if applicable) Device results in a bootloop Logcat shows: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.systemui.SystemUIApplication.startServicesIfNeeded()' on a null object reference followed by FATAL EXCEPTION IN SYSTEM PROCESS: android.ui java.lang.VerifyError: Rejecting class com.miui.internal.variable.v21.Android_View_View_class that attempts to sub-type erroneous class com.miui.internal.variable.v19.Android_View_View_class (declaration of 'com.miui.internal.variable.v21.Android_View_View_class' appears in /system/app/miui/miui.apk)
Things you have already tried to resolve it Wipe (dalvik) cache Tryed xposed-v90-sdk27-arm64-beta3 (TWRP) Tryed magisk module code inspection (lack of knowledge of the framework to resolve)
Steps to reproduce Clean rom (TWRP), Installed Magisk v18 (TWRP), Installed Xposed v90 sdk27 arm64 beta1 (TWRP)
Logs https://www.dropbox.com/s/1kkgnvtr9e0drkd/logcat.txt?dl=0
Extracted the com.android.systemuit.SystemUIService class from MiuiSystemUI.apk.
onCreate() function calls Super and ((Application) getApplication()).getSystemUIApplication().startServicesIfNeeded();
So ((Application) getApplication()) = null or getSystemUIApplication() returns null
Don't know why its returns null after Xposed is installed? Globals?
Did some research on the MiuiSystemUI package to understand how it works and to find out what is going wrong.
In com.android.systemui.SystemUIService (MIUI modified version) the onCreate is be called. Which execute (resulting nullpointer exception): ((Application) getApplication()).getSystemUIApplication().startServicesIfNeeded();
The getApplication() function is in base android.app.Service (extended by SystemUIService) it returns the attached application instance.
(Application) is a cast to com.android.systemui.Application (MIUI modified version) (extends miui.external.Application which extends android.app.Application).
The getSystemUIApplication() function is in com.android.systemui.Application (MIUI modified version) it must returns a SystemUIApplication instance (MIUI modified version). Therefore it calls getApplicationDelegate() a base function in miui.external.Application and returns a miui.external.ApplicationDelegate instance (extends ContextWrapper) which is casted to a SystemUIApplication (MIUI modified version).
The com.android.systemui.SystemUIApplication (extends ApplicationDelegate) (MIUI modified version) has the function startServicesIfNeeded() which can't be called because SystemUIApplication instance = null. This results in the nullpointerexception.
Likely the cause of the problem is because there are serveral default android classes modified by MIUI in de MiuiSystemUI. Maybe cast from wrong namespace or wrong context? Puzzeling further.
It also bootloops on my Huawei P10, but I don't know how to get the log. Maybe this is the same problem? Is the log even created if you install the zip before the apk?
the devs said it's bcoz the xiaomi devs always messed up the critical part of the system for no apparent reason...
It is a pity that it has been adjusted. But if someone can give some hints in the direction of a solution, I like to help.
Detailed explanation on #317
@CrescendoFang i looked the log's but the fatal exception is different.
then I dunno... hehehehe... I'm no expert at this but it surely will make your phone crawl, tried it before... It's due to the xposed called something nonexistent (changed by miui devs)...