John Wu Profile picture
Creator of Magisk. Hacking Android since 2016. Android @Google. ex-Apple. Tweets are my own.

Feb 19, 2020, 19 tweets

Just flashed Android 11 on my Pixel 4 XL, there's a new partition named system_ext, which I think is part of early boot partitions. Would need to update MagiskInit for that...

Great, device won't boot. If partial source code is out, will check that, otherwise time for some very "fun" trial and error since pre-init is basically impossible to properly debug 😂

Hats off to Android engineers who gave me this kind of excitement every year LOL. Gonna head out to do some real world crap, will continue hacking after heading back home throughout this whole day.

Back home, USB hooked up, open Android Studio, full mug of milk (not 🍺 LOL), and let's go baby!

Managed to nuke my data by basically doing nothing, thanks. Man this Android 11 is fragile... I hate it when the development phone is also my main phone.

Progress update: For some reason the logical partition setup for system_ext will be messed up after MagiskInit's fstab patches, causing the partition fail to be early mounted. Still have no idea how this can happen.

Building Pixel 4 XL kernel from scratch to enable KernelSU 😭. Gonna need some kind of root access to dig deeper what's going on. No TWRP on this device really is inconvenient 😅

Finally managed to get the device booting with MagiskInit, but I just found out that Google removed /sbin from root directory duh. It will be a HUGE PAIN IN THE ASS to workaround that. I guess someone at Google really IS trying to make my life hell LOL

I really wanna rage quit at this point 😂

Got custom SELinux loaded into the kernel, continue chugging my way through....

Oh great, Google also removed init.rc from root directory! Happy times you know 😂

So on Android 11 Google moved /init.rc to /system/etc/init/hw/init.rc. Dunno why they do this though, maybe just to give me more headache I guess 🤪

Well finally at least something worked!

I just found a bug in MagiskInit that wasted me at least 10 hours trying to figure out what's up. It is so stupid that I want to throw my laptop out of the window.

Changes in Android 11 is too significant that it'll take quite some time to refactor things. These changes will come in phases, so don't expect things to get ready in the near future. The current plan is to slowly convert existing code to what will eventually work on Android 11.

I'll end this Twitter thread here. Now I basically know how Android 11 behaves at early boot from inside out. The rest of the work is basically redesigning lots of stuff and just keep grinding!

Reviving this old thread back, cause you know what's up 😉. We are now infinitely closer to the goal!
github.com/topjohnwu/Magi…

Android 11 moved the Android runtime portion of the com.android.runtime APEX module into com.android.art. Didn't expect this change to affect Magisk, but well I fixed it anyways 🤷‍♂️

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling