topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.6k stars 12.09k forks source link

MagiskHide is not hiding quickly enough. #2403

Closed androidacy-user closed 4 years ago

androidacy-user commented 4 years ago

When trying to login to my Google play games account the following and similar messages starting spamming logcat:

Failed to open APK '/system/app/_android.SwiftBlack.Pink.OxygenOS.apk' I/O error

From com.google.android.gms.unstable (the default hide target I may note).

Also seeing:

Found duplicated class when checking oat files: 'La;' in /data/app/com.google.android.gms-ckXu1DSSsy8vrziQOpmkNQ==/base.apk and /data/app/com.google.android.gms-ckXu1DSSsy8vrziQOpmkNQ==/base.apk

The I/O error would seem to indicate at some point the hidden app is aware of the files it's not supposed to see. The duplicate class error is one that's been seen before but in a different scenario with incorrect /product handling. The Google play games app also refuses to work and times out while the duplicate classes error spams logcat.

Logcat: https://drive.google.com/file/d/12uD5MCNmcsjNE22y6DzUfBJgaox3SfGU/view?usp=drivesdk

Magisk: 20.4-ed58cf95

Fox2Code commented 4 years ago

In fact, the problem is the system process tell that /system/app/_android.SwiftBlack.Pink.OxygenOS.apk should be used as a them to the application but since the file is hidden because of MagiskHide the app don't see the file and said the file doesn't exist (And in fact show that MagiskHide work correctly) In fact, this error can't be fixed because it requires to modify how the system process to fully hide theses messages (Appling magisk hide on system server will break almost all modules including themes (Substratum) or modules that add system apps

The Found duplicated class when checking oat files: 'La;' in /data/app/com.google.android.gms-ckXu1DSSsy8vrziQOpmkNQ==/base.apk and /data/app/com.google.android.gms-ckXu1DSSsy8vrziQOpmkNQ==/base.apk don't seem to be linked to MagiskHide or to Magisk at all

This is not an issue and should be closed because there nothing to fix here

androidacy-user commented 4 years ago

@Fox2Code neither issue occurs if magiskhide is disabled for that process. So I'm open to anything you can suggest that is causing it.

androidacy-user commented 4 years ago

@Fox2Code also since when did a theme for every single other app apply to GMS? That was merely the example I gave

topjohnwu commented 4 years ago

The only explanation is that the theme APK is loaded into the process before the application starts. There is no way Magisk can hide that.