use https://github.com/xBZZZZ/android_7.1.1_x86_64_libhoudini_magisk because it works with enforcing selinux
Note: you will need to replace paths in commands in this tuturial.
ramdisk.img, system.img are located inside ~/Android/Sdk/system-images/android-25/default/x86_64 (25 is API level of Android 7.1.1, you can see it in SDK Manager).
You will need fakeroot, fuse2fs, cpio, gzip, find, fusermount3, unzip. If you are using Ubuntu you can install these using apt:
pkexec apt install fakeroot fuse2fs cpio gzip findutils fuse3 unzip
fakerootNote: Download I downloaded I mounted mkdir /tmp/system.img_mount
fuse2fs -o fakeroot \
~/Android/Sdk/system-images/android-25/default/x86_64/system.img \
/tmp/system.img_mountNote: unzip /tmp/houdini_7.1.1a_y.49564.zip -x README.txt -d /tmp/system.img_mountNote: chmod +x \
/tmp/system.img_mount/bin/enable_nativebridge \
/tmp/system.img_mount/bin/houdini \
/tmp/system.img_mount/lib/arm/houdiniI used nano /tmp/system.img_mount/build.propDo these edits:
Save and exit. cd /
fusermount3 -u /tmp/system.img_mountNote: Note: ignore the Note: I extracted mkdir /tmp/ramdisk.img_extracted
gzip -cd ~/Android/Sdk/system-images/android-25/default/x86_64/ramdisk.img |
cpio --no-absolute-filenames -iH newc -D /tmp/ramdisk.img_extractedI used nano /tmp/ramdisk.img_extracted/default.propDo these edits:
Save and exit. cd /tmp/ramdisk.img_extracted
find -print0 | cpio -o0H newc |
gzip -c9 > ~/Android/Sdk/system-images/android-25/default/x86_64/ramdisk.imgcd /
rmdir /tmp/system.img_mount
rm -r /tmp/ramdisk.img_extractedNote: exit |
Note: need to start emulator with -selinux permissive or -selinux disabled for armeabi and armeabi-v7a apps to not crash at startup.
Note: -selinux disabled is same as -selinux permissive if you see SELinux 'disabled' is no longer supported starting with API level 23, switching to 'permissive' in terminal when starting emulator.
Note: it's possible to use houdini without -selinux permissive by setting extended attribute (attr -Ss selinux -V 'u:object_r:system_file:s0' $FILE_HERE) on all houdini files but extended attributes don't work in fuse2fs.
Thanks https://zhsj.me/blog/view/anbox-and-houdini for saying which files need to edit.
Also see https://projectproto.blogspot.com/2019/12/tvplus-go-on-laptop.html!