├── Magisk-v25.2_patched.apk ├── README.md ├── magisk_v243.apk └── patch.diff /Magisk-v25.2_patched.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasKing2014/Pixel7_32bit_helper/1b26ff45225f865d468bd73083532b8bb9fd6e30/Magisk-v25.2_patched.apk -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pixel 7 32-bit mode helper 2 | 3 | ## Introduction 4 | 5 | According to this post - [Pixel 7, the first 64-bit-only Android phone](https://android-developers.googleblog.com/2022/10/64-bit-only-devices.html), Pixel 7 and Pixel 7 Pro are the first Android phones to support only 64-bit apps. This truth is that all the 32-bit dynamic libraries are built, and it's nothing different with Pixel 6. That means Pixel 7 can support 32-bit apps. The only step is to turn the related switch on. 6 | 7 | Use the custom Magisk to patch the stock init_boot image. You can follow those [steps](https://www.xda-developers.com/how-to-unlock-bootloader-root-magisk-google-pixel-7-pro). 8 | 9 | After rebooting, the zygote 32-bit process can be found. Now you can install the 32-bit-only apps! 10 | 11 | panther:/data/local/tmp $ ps -ef |grep zygote 12 | root 979 1 0 17:45:52 ? 00:00:02 zygote64 13 | root 1066 1 0 17:45:53 ? 00:00:01 zygote 14 | webview_zygote 1980 979 0 17:45:57 ? 00:00:00 webview_zygote 15 | shell 9453 9447 36 20:53:25 pts/0 00:00:00 grep zygote 16 | 17 | As the project is experimental, I do not try to solve other issues. 18 | 19 | ## Details 20 | 21 | The switch is "ro.zygote" property. To spawn the zygote 32-bit process, it requires setting the value to "ro.zygote=zygote64_32". And it also requires adding the 32-bit abi to both "ro.vendor.product.cpu.abilist" and "ro.vendor.product.cpu.abilist32" properties. 22 | 23 | The patch.diff file is for [Magisk](https://github.com/topjohnwu/Magisk). 24 | 25 | ## License 26 | 27 | This program is distributed in the hope that it will be useful, 28 | but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | GNU General Public License for more details. 31 | 32 | You should have received a copy of the GNU General Public License 33 | along with this program. If not, see . 34 | -------------------------------------------------------------------------------- /magisk_v243.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasKing2014/Pixel7_32bit_helper/1b26ff45225f865d468bd73083532b8bb9fd6e30/magisk_v243.apk -------------------------------------------------------------------------------- /patch.diff: -------------------------------------------------------------------------------- 1 | diff --git a/native/jni/init/rootdir.cpp b/native/jni/init/rootdir.cpp 2 | index 2e04d2452..09a2f67d4 100644 3 | --- a/native/jni/init/rootdir.cpp 4 | +++ b/native/jni/init/rootdir.cpp 5 | @@ -52,6 +52,39 @@ static void patch_init_rc(const char *src, const char *dest, const char *tmp_dir 6 | } 7 | rc_list.clear(); 8 | 9 | + if (access("/vendor/build.prop", F_OK) == 0) { 10 | + 11 | + xmkdirs(dirname(ROOTOVL "/vendor/build.prop"), 0755); 12 | + FILE *tmp = xfopen(ROOTOVL "/vendor/build.prop", "we"); 13 | + if (!tmp) { 14 | + fprintf(rc, "\tsetprop ro.patch_status failed\n"); 15 | + } else { 16 | + file_readline("/vendor/build.prop", [=](string_view line) -> bool { 17 | + if (str_starts(line, "ro.zygote=zygote64")) { 18 | + fprintf(tmp, "ro.zygote=zygote64_32\n"); 19 | + return true; 20 | + } 21 | + 22 | + if (str_starts(line, "ro.vendor.product.cpu.abilist=arm64-v8a")) { 23 | + fprintf(tmp, "ro.vendor.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi\n"); 24 | + return true; 25 | + } 26 | + 27 | + if (str_starts(line, "ro.vendor.product.cpu.abilist32=")) { 28 | + fprintf(tmp, "ro.vendor.product.cpu.abilist32=armeabi-v7a,armeabi\n"); 29 | + return true; 30 | + } 31 | + 32 | + fprintf(tmp, "%s", line.data()); 33 | + return true; 34 | + }); 35 | + fclose(tmp); 36 | + clone_attr("/vendor/build.prop", ROOTOVL "/vendor/build.prop"); 37 | + } 38 | + } 39 | + 40 | // Inject Magisk rc scripts 41 | char pfd_svc[16], ls_svc[16], bc_svc[16]; 42 | gen_rand_str(pfd_svc, sizeof(pfd_svc)); 43 | --------------------------------------------------------------------------------