FP4 Root Access is possible, maybe a bit risky

OK, I had a look at the logcat and the point it crashes isn’t hard to find

01-19 12:54:27.950  4611  5154 I opjohnwu.magis: Starting a blocking GC Alloc
01-19 12:54:27.967  4611  5154 I opjohnwu.magis: Alloc concurrent copying GC freed 636(24KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6038KB/11MB, paused 20us total 16.674ms
01-19 12:54:27.967  4611  5154 W opjohnwu.magis: Throwing OutOfMemoryError "Failed to allocate a 50126864 byte allocation with 6183141 free bytes and 30MB until OOM, target footprint 12366285, growth limit 37748736" (VmSize 13313768 kB)
01-19 12:54:27.969  4611  4611 E ThreadGroup: java.lang.OutOfMemoryError: Failed to allocate a 50126864 byte allocation with 6183141 free bytes and 30MB until OOM, target footprint 12366285, growth limit 37748736
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at java.util.Arrays.copyOf(Arrays.java:3161)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at com.topjohnwu.signing.SignBoot.verifySignature(Unknown Source:23)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at a.fs0.j(Unknown Source:2)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at a.ks0.i(Unknown Source:8)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at a.bs0.g(Unknown Source:28)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at a.oo1.d(Unknown Source:3)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at a.vt1.run(Unknown Source:2)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at a.zw1.j0(Unknown Source:0)
01-19 12:54:27.969  4611  4611 E ThreadGroup: 	at a.yw1.run(Unknown Source:7)
01-19 12:54:27.971  4611  4611 I opjohnwu.magis: System.exit called, status: 1

The closest bug report i could find for Magisk is #3876, but in that case Magisk wanted a order of magnitude more memory. On /e/ it’s killed for not even 50MB, that doesn’t make sense.
The only other pointers, compared to my logcat (on vanilla FPOS, working), were some irregularities between how the files get opened. But that can just as easily be caused by the boot.img apparently being read from SD in your case (and you tried all the other ways as well). But maybe, just maybe this is somehow related to the DocumentsUI / Media Provider shipped with /e/.

I’m not a java developer and the problem isn’t obvious enough for me to grasp at the moment, so someone on /e/ will have to report this in the Magisk bug tracker, sorry :see_no_evil:
I’ll switch to /e/ on one device in the future, maybe the problem becomes more apparent if I can reproduce it myself.

Until this is resolved I’ll provide patched boot.imgs for people who need them.


Edit: So the problem seems to be not exclusive to Magisk and will be fixed in the next update, according to

3 Likes