Modify Board and CPU Info in Android-x86
Published:
In this post I’ll introduce how to make your Android-x86 more like a real device by changing its board and CPU configurations. I’ll use the configurations of Samsung Galaxy S20 Ultra as example.
1) Modify the device information part of init_misc
at device/generic/common/init.sh
to the following.
setprop ro.product.manufacturer "samsung"
setprop ro.product.model "SM-G988N"
setprop ro.serialno "15c4e1ebc491"
2) Modify the on fs
part at device/generic/common/init_x86.rc
to mount_all /fstab.android_x86_64
.
3) Modify the export_kernel_boot_props
at system/core/init/init.cpp
by changing ro.hardware
’s value to exynos8895
.
4) Modify ${ro.hardware}
to android_x86_64
at bootable/recovery/etc/init.rc
.
5) Make the same modification to system/core/rootdir/init.rc
.
6) Modify the following parameters at build/tools/buildinfo.sh
.
echo "ro.product.model=SM-G988N"
echo "ro.product.brand=samsung"
echo "ro.product.name=z3qksx"
echo "ro.product.device=z3q"
7) Modify build/tools/vendor_buildinfo.sh
to the following.
#!/bin/bash
echo "# begin build properties"
echo "# autogenerated by vendor_buildinfo.sh"
echo "ro.product.board=SM-G988N"
echo "ro.board.platform=exynos9"
echo "ro.product.vendor.manufacturer=samsung"
echo "ro.product.vendor.model=SM-G988N"
echo "ro.product.vendor.brand=samsung"
echo "ro.product.vendor.name=SM-G988N"
echo "ro.product.vendor.device=SM-G988N"
echo "# end build properties"