Warning: Super long text ahead, be careful not to mess up your brain :))
The FIRST thing to do BEFORE doing ANYTHING is to backup your data!
Your warranty is now void. It might be vaild again if you flash stock firmware from Samsung Smart Switch or firmware from [samfw.com](https://samfw.com/), but I am NOT sure.
I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed. Please
do some research if you have any concerns about features included in this
kernel before flashing it! YOU are choosing to make these modifications, and if
you point the finger at me for messing up your device, I will laugh at you.
Disclaimer template credit: XDA forum :)
It worked!
I will soon update a new screenshot.
This is the stock kernel source for SM-A600G, originally from Samsung Opensource page with the file SM-A600G_SEA_PP_Opensource.zip
, and the source has been patched for KVM support (so you can run VMs on your phone with qemu-kvm
).
For running VMs on your phone, probably Windows 10/11 ARM :) , but we need to patch the guess OS first. See XDA thread.
Originally from @sleirsgoevy 's patch for SM-A600FN here
The XDA discussion can be found here
In case you don't want to build it yourself, I have built one for you in release
Trust me, there are absolutely no virus here :). Why should one insert a virus into an opensource project?
failed to hotplug cpu 4
. Maybe there is something I turn of by mistake when make menuconfig
. You might not face this.dtc
tool, you should refer to this comment to patch dtc
. A fix will be released in this repo later!You can use the precompiled and patched img file at release to skip Building :)
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 && cd aarch64-linux-android-4.9 && git checkout ndk-release-r19
. Also install bc
if you don't have it yet. On Debian-based distributions use sudo apt install bc
, on Redhat-based use sudo rpm install bc
cd .. && git clone https://github.com/raspiduino/a6lte-kvm && cd a6lte-kvm
export CROSS_COMPILE=../aarch64-linux-android-4.9/bin/aarch64-linux-android- ANDROID_MAJOR_VERSION=p ARCH=arm64
make exynos7870-a6lte_defconfig && make menuconfig
Boot options
and then turn off all options which has TIMA
and RKP
. CPU hotplug will not work, so you have to disable it by disable all hotplug config (you might want to open the .config
in editor and edit it manually). Then click exit to go back to main menu. Enable Virtualization
by pressing the space key. Goto Virtualization
menu and enable Kernel-based Virtual Machine (KVM) support
. After that, exit menuconfig and save .config
file.make Image -j8
to build. You can replace -j8
by -j[NUMBER OF THREAD TO RUN]
.apk
extension to .zip
. Extract zip and look into lib
here you can find the binary tools for your architecture. On PC you extract lib/x86/libmagiskboot.so
boot.img
from stock rom. You can get stock rom from samfw.com or from my release page :). Then use magiskboot unpack boot.img
, replace stock kernel with our compiled Image
in arch/arm64/boot/Image
and repack boot.img
using magiskboot repack boot.img new-boot.img
Or all in one line to build but not patch :). I will include the build script later...
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 && cd aarch64-linux-android-4.9 && git checkout ndk-release-r19 && sudo apt install bc && cd .. && git clone https://github.com/raspiduino/a6lte-kvm && cd a6lte-kvm && export CROSS_COMPILE=../aarch64-linux-android-4.9/bin/aarch64-linux-android- ANDROID_MAJOR_VERSION=p ARCH=arm64 && make exynos7870-a6lte_defconfig && make menuconfig && make Image -j8
After get the patched img file, it's now time for installing.
boot.img
. Add the file to tar using 7-zip or tar
command then load tar
file to AP in Odin. Flash your phone and when it says PASS!
, you are doing well!root
, set the password for it then enable SSH and VNC. Come back to main menu and click Install. Wait for 10 minutes and when it says "Deploy!", click the play button to deploy it. Note: you can also select the arch to be arm64, but this often failed with cannot find /system/bin/sh
(eventhough it's right there) or Bad system call
. So use armhf for sure :). Why this fail? Well, Samsung release this phone with aarch64 kernel but aarch32 Android system! See more at XDA thread.localhost:5900
. Enter the password you have set for root account. This should bring up a desktop environment. Open terminal, run dpkg --add-architecture arm64
then apt update
then apt install qemu-system-arm:arm64 -y
. Let it do its job for a few minutes. After installing, run chmod 666 /dev/kvm
.qemu-system-aarch64 -M virt -cpu host --enable-kvm -monitor stdio
. Then a QEMU monitor prompt should bring up. Type info kvm
. If it return kvm support: enabled
, then congratulation! You now have KVM on your phone!boot.img
to undo anything :)Remember: If you can get into Download mode in your Samsung phone, it will NEVER brick :) . I have reflashed my Samsung phone with stock rom 3 times when trying this :) so don't be panic, it WON'T help :)
This instruction will be updated later, so don't worry :)
/dev/kvm
chroot
, which will provide access to hardware so it will require root.
The opposite is Termux, it uses proot (emulate fake system call).See Linux's License here.