Magisk Installation Issue: Ramdisk Detection Failure on Android 12 x86_64
in Post with 0 comment

Magisk, a powerful tool for Android root access, encounters a peculiar issue when patching boot images on Android 12 x86_64 devices emulating MEmu. This article details the problem, its impact, potential causes, and steps to reproduce it.

**The Problem:**

In Magisk versions 27.1 and above, the installation process incorrectly flags the Ramdisk as 'No', preventing successful patching of the boot image (boot.img). This results in an 'Installation failed' error, specifically when writing the patched image (magisk_patched.img). This behavior is observed only on MEmu emulators running Android 12 (x86_64), suggesting a compatibility issue.

**Impact:**

This issue hinders users from gaining root access on their Android 12 x86_64 devices using Magisk, impacting their ability to customize and modify their system.

**Steps to Reproduce:**

1. Use MEmu emulator version 9.2.0 with Android 12 (x86_64).
2.Install Magisk 28.1 debug build.
3. Attempt to patch the boot.img using Magisk Manager.
4. Observe the error 'Ramdisk: No' and 'magisk_patched.img write error'.
5. Compare results with Magisk 27.0, which works correctly on the same setup.

**Possible Causes:**

- A bug in MagiskInstallImpl.kt introduced after version 27.0, affecting x86_64 detection and Ramdisk identification.
- Incorrect handling of storage paths during the patching process, leading to write failures.

**Environment Specifics:**

The issue appears limited to MEmu emulators with Android 12 (x86_64). Magisk 28.1 successfully patches boot images on MEmu with Android 9 (x86_64), indicating the problem is specific to the Android 12 x86_64 environment.

**Further Investigation:**

Exploring changes made to Magisk after version 27.0, focusing on x86_64 compatibility and handling of the Ramdisk. Analyzing MagiskManager logs and the boot image in question may provide further clues.

The article has been posted for too long and comments have been automatically closed.