Thursday, April 24, 2025

pixel 7(a/pro) supports 32 bit ABI apps

for some ungodly reason, the tensor G2 chip used in pixel devices shipped out around 2022-2023 include a bizarre manual block of armeabi and armeabi-v7a arch executables. pm will refuse to install them, and zygote itself does not support running them.

so why?

frankly, i don't know. preparation for armv9-a? maybe.

the problem with this is the simple fact that the tensor G2 isn't even armv9-a. it's arm64=v8a like most chips had been for the preceding 7-ish years. in consequence, the 32-bit executable block is entirely artificial. the chip can run 32-bit arm instructions natively. google just sucks.

if you want to enable it, check this xda thread (or this github repo if xda is dead) for how. it's basically a patched up version of magisk that fixes up your vendor prop.

inner machinations

the workings from what i read are quite simple. according to this diff, it just checks /vendor/build.prop to see if the in-use zygote (ro.zygote) is zygote64 (64-bit only zygote) and swaps it to zygote64_32. then it checks the if list of compatible ABIs (ro.vendor.product.cpu.abilist) only contains arm64-v8a, then changes it to arm64-v8a,armeabi-v7a,armeabi. lastly, it checks for a blank abilist32 (ro.vendor.product.cpu.abilist32) and sets it to armeabi-v7a,armeabi.

in short, these changes are made:

ro.zygote=zygote64_32

ro.vendor.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi

ro.vendor.product.cpu.abilist32=armeabi-v7a,armeabi

theoretically, one could patch their vendor.img manually and forgo the janky magisk method, and that should enable a way enable 32-bit ABIs on newer android versions, as the magisk version is quite old and unmaintained.

of course, you could just fork magisk and add the necessary patches again....but why?