How to solve the problem of “use of unauthorized apps” by BlueArchive after installing Magisk.

Here’s the translation:


Please take full responsibility for your actions!
Blue Archive is a game that is very likely to ban accounts of users who engage in unauthorized activities!
(If you play normally without tampering with game data, the risk is low.)

Use of Unauthorized Apps

Recently, after switching my phone’s OS from OxygenOS to LineageOS, Blue Archive started giving me the “use of unauthorized apps” error and wouldn’t launch.

I’ve set up the basic root detection bypass configurations with Magisk.
(Using Zygisk, Hide My Applist… that’s all, right?)

Here’s what Momo and Applist Detector show:

After searching online, I couldn’t find much helpful information, so I started to think Momo detecting the custom ROM might be the issue compared to OxygenOS. Upon further investigation, I discovered that a specific file was being detected, causing the app not to launch!

Addon.d

To get straight to the point:

The culprit was the ~magisk.sh file in the system/addon.d folder in the root directory!

Apparently, custom ROMs like LineageOS create an Addon.d folder where packages for registered add-ons, such as Gapps and Magisk, are stored.

The issue was that when I flashed Magisk onto LineageOS, the ~magisk.sh file was created in addon.d. However, if I had just flashed it onto boot.img and installed the Magisk manager, this detection wouldn’t have occurred (sweats).

Solution: If you can flash Magisk to boot.img, you should be able to delete ~magisk.sh without any issues. (Be careful not to delete files like gapps.sh, as doing so might prevent Google apps from running at startup.)

While deleting the addon.d folder would prevent Momo from detecting the custom ROM altogether, it’s too risky, so I gave up on that idea. If you just want to launch Blue Archive, deleting ~magisk.sh should be enough!


Can’t Delete!

To delete this file, you’ll need a file manager with root privileges.

I granted root permission to Mixplorer and deleted the file that way.
If you have TWRP, you can use it to delete the file too.