[AOSP ROM] [OFFICIAL] | Android 14 | GSI Install Instructions for Galaxy Tab S6 (SM-T860, SM-T865)

Search This thread

peppet

Senior Member
Dec 7, 2008
596
114
pisa
yes I tried but despite downloading the indicated kernel I had a bootloop, I must have the wrong version. Could you link to exactly the right one? Thank you
 

Sage

Senior Member
Dec 12, 2005
1,899
482
AU
Xiaomi Mi 11
  • Like
Reactions: pierro78

Reonz

New member
May 30, 2023
1
0
can you give me a link? just i want a13 or a14 for installing windows 11 arm on virtual machine.​
that is unlikely to happen because normal snapdragon soc don't allow pKVM etc.etc virtualization from factory, some machines come with Windows on ARM and still without virtualization support, e.g. Huawei Matebook e (snapdragon 850), while in fact 850 support VM, but it can't be turn on after being manufactured.
 

fonix232

Senior Member
Jun 20, 2009
1,220
729
London
Samsung Galaxy Tab S6
The crucial difference being that all the code you mentioned is 100% Open Source. It is developed, inspected and verified by large communities of FOSS contributors.
With the exception of Odin, but I'd personally recommend Heimdall anyway.

APKMirror offers no such transparency. You have to manually extract and decompile their files in order to check the source code, which is undoubtedly changed.

Obviously, you'll appreciate the massive disparity in security and transparency when comparing some website to established open source projects.

Please stop talking BS. APKMirror is ran by Illogical Robot LLC., a company created by Artem Russakovskii (aka ArtemR), a well respected Android expert and journalist. He's also the founder (albeit he does not work there anymore, as the site was sold) of Android Police.

As for your question... Yes, I've verified multiple APKs from there, and they're all intact, unchanged, and signed with the official keys. You can test this theory yourself, download an app from the Play Store, then try to install an APK update from APKMirror via ADB - if there was ANY kind of ****ery, the installation would fail due to different signing keys.


As for the work you've done on this tutorial, thank you. Albeit there are a few mistakes here and there:

  • The S-Pen does not detect screen rotation properly, and gets stuck in portrait mode, making it quite useless (claiming that it "works" is a bit of an overstatement)
  • Same goes for the touchpad on the official keyboard, exact same issue
  • After installing the system, TWRP is removed
  • It isn't just removed, but any subsequent flashing of TWRP will not be able to mount or access
    Code:
    /data
    or Internal Storage, even through MTP. Ideally, one should not need to go through the whole process of reflashing the latest OEM firmware, then TWRP, then the system image, just to update/change the OS.
  • Fingerprint reader is stated to be working ,however no AOSP image seems to recognise it.
  • Hall effect sensor also seems to be bugged - the official keyboard does not wake the screen upon opening.
  • Haptics/vibration seems to be VERY hit and miss. Even though it's enabled for e.g. keyboard and navigation and touches, I can only get it to vibrate when turning off.

On another note, just how possible/impossible would it be to get a "pure" Linux distro (e.g. Ubuntu, Arch, etc.) running on this tablet, in a GSI form?
 
  • Like
Reactions: pierro78

arvin2212

Senior Member
Jan 30, 2009
372
34
Failed to flash TWRP but this helped:

 
Last edited:

arvin2212

Senior Member
Jan 30, 2009
372
34
Hi,

I tried installing the latest version of Android 14, and also the beta version of Android 13 in this guide. Tried a few different GIs but the top speakers did not work for all.

I then tried flashing the latest version of Android 14 and also flashed the latest kernel here:

But when i do flash the kernel (flashed as boot) after flashing the system image (flashed as system) it results in a error that takes me to the donwload screen.

Need help on how to download and flash the kernel..

* I tried crDroid as well , and enabled the alternate audio for both samsung and qualcom, and enabled wide hall as someone mentioned here, but it made no difference. The top speakers did not work * which makes me assume that the issue is not fixed with the roms but the kernel.. tried all the builds that are on android 14 and everything that was said to have solved the speaker issue but none worked. My kernel is still the old kernel that came with the stock rom.


1686327597073.png
 
Last edited:

tablet_seeker

Senior Member
Apr 3, 2023
93
62
Hi,

I tried installing the latest version of Android 14, and also the beta version of Android 13 in this guide. Tried a few different GIs but the top speakers did not work for all.

I then tried flashing the latest version of Android 14 and also flashed the latest kernel here:

But when i do flash the kernel (flashed as boot) after flashing the system image (flashed as system) it results in a error that takes me to the donwload screen.

Need help on how to download and flash the kernel..

* I tried crDroid as well , and enabled the alternate audio for both samsung and qualcom, and enabled wide hall as someone mentioned here, but it made no difference. The top speakers did not work * which makes me assume that the issue is not fixed with the roms but the kernel.. tried all the builds that are on android 14 and everything that was said to have solved the speaker issue but none worked. My kernel is still the old kernel that came with the stock rom.


View attachment 5929301
This happens when you don't flash the vbmeta tar in the correct slot with TWRP. Please make sure to follow the OP exactly. It's extremely detailed on purpose, so that everyone with the same device will have the exact same outcome.
 
  • Like
Reactions: pierro78

arvin2212

Senior Member
Jan 30, 2009
372
34
This happens when you don't flash the vbmeta tar in the correct slot with TWRP. Please make sure to follow the OP exactly. It's extremely detailed on purpose, so that everyone with the same device will have the exact same outcome.

Thank you for your reply.

I did..

TWRP in the AP , and vbmeta in the CP right?

Flashing any android build works fine with that. I can boot in AOSP and different roms without any error.

The error only occurs (as shown in the pic above) when I flash the kernel (boot.img).

This is how it looks like before flashing:

1686409931023.png



This is the boot.img that i used:

boot.img on branch aosp_kernel-common-android14-6.1 on target kernel_aarch64 at 10298368

https://storage.googleapis.com/android-build/builds/aosp_kernel-common-android14-6.1-linux-kernel_aarch64/10298368/68a2e1a7b6bbb44c798c92dbf5fc6d67c883a54d3af6e8edd5bc99bf52d6426f/boot.img?GoogleAccessId=gcs-sign@android-builds-project.google.com.iam.gserviceaccount.com&Expires=1686397236&Signature=ikmm687R70V4S0y8/FKVNVCzomAuyaj2KwxZWpj18/5OZ3WA1O/WhEXXMNKg+7LXJz95gt45wlFVBjQ4lOrP6PVDjRawYw8qQQF4u8qTmLKxQEwAU/YUOpyCWBCJ8uJzZ74GoBzrZ30DRLJ2+GEFWR2YjVeGloCV01MIghEgoWmpYujnstFxFDyZ6Fp2oXEfJjkckMKgk1g1lZym4+mHEuYtsVelFnqI5VqMJI5NUgYepYY1ue3XBLfcqDRSlNeRyZNl1r2QusQIgMkSumnCuePBAzGXb0MZfFEI6ubwV7rDH3sMKnfOt7vbtb9xVhCGSeaXY3PLDAqYQqGLMDhP5g==
 
Last edited:

tablet_seeker

Senior Member
Apr 3, 2023
93
62
Did you patch the legacy boot.img prior to flashing?
You need to extract that boot.img, copy only the kernel files and add them to your original boot.img. That's what you flash via TWRP.
 

stuie1952

Senior Member
Feb 2, 2013
61
33
Smart Watches
Did you patch the legacy boot.img prior to flashing?
You need to extract that boot.img, copy only the kernel files and add them to your original boot.img. That's what you flash via TWRP.
Thanks to the OP for all his efforts on this project. It is quite a job to respond to the myriad queries and questions and remain calm, cool and collected at the same time.

My question relates to the above statement.

Please correct me if i am wrong but as i understand it the boot image is an executable and does not contain kernel files that can be accessed. I would therefore be grateful if you could clarify the above statement for me. My understanding is that i need to use the patched boot image, not the original. Is there more to it than that?

Many thanks
 

Lehner82

Member
Nov 26, 2014
29
2
Are there any non source bugs ? Used GSI roms in the past and they had unstable Bluetooth with crackling here and there
 
  • Wow
Reactions: pierro78

fonix232

Senior Member
Jun 20, 2009
1,220
729
London
Samsung Galaxy Tab S6
Thanks to the OP for all his efforts on this project. It is quite a job to respond to the myriad queries and questions and remain calm, cool and collected at the same time.

My question relates to the above statement.

Please correct me if i am wrong but as i understand it the boot image is an executable and does not contain kernel files that can be accessed. I would therefore be grateful if you could clarify the above statement for me. My understanding is that i need to use the patched boot image, not the original. Is there more to it than that?

Many thanks
Standard Android boot.img's are actually a combination binary of an ELF standard kernel image, and an initrd file. Presumably, there are some device-specific init sequences in that initrd, hence why you can replace the kernel image itself, but still need to repack the boot.img.
 
  • Like
Reactions: stuie1952

Top Liked Posts

  • 2
    Thread cleaned again

    - XDA Staff
    1
    is there a proper Desktop mode in any of the more recent versions?
    Good question, I don't think so. Sure would be awesome though.
    I've been decompiling Samsung apps all week, trying to trick the auth check. Porting Dex would be incredible. There must be something on GitHub, I'll have a look.
    I tried reflashing vbmeta but it refused to accept it and just kept giving me that error.

    The new kernel didn't seem to do anything when it did boot; I had those settings enabled and tried reflashing boot, recovery, and vbmeta together, which got me back in once, but even though those settings were enabled it didn't do anything.

    I wasn't even testing apps, I was just testing the system sounds.

    Also, your magisk instructions don't seem to make sense. The boot.img has no ramdisk, so if you want to install Magisk on the Tab S6, you have to use a patched recovery, which means you can't have TWRP and root at the same time.
    What is the specific version of your Samsung Firmware that you extracted the boot.img from?

    Of course you'll have to try some apps. I can confirm that VLC and YouTube on Firefox worked.

    You're wrong about Magisk. Extract your Firmware's boot.img and patch it with the Magisk app. After flashing it in the Boot slot your device is rooted. That is the universally prescribed method, read any guide.
  • 2
    Thread cleaned again

    - XDA Staff
    1
    Hey there, I gave the guide a try and have the latest ponces PE+ image (https://github.com/ponces/treble_build_pe/releases/tag/v2023.08.21-plus) working mostly fine on my SM-T860, but even with the specific phh settings enabled, I can't get the top speakers working; only the bottom ones.
    I have enabled:
    Qualcomm - alternate audio
    Samsung - alternate audio, enable stereo audio
    Misc - enable system wide BT HAL

    I've tried every combination of those settings enabled and disabled, and it doesn't do anything for me. Any ideas?
    Hi there! Yes, top speakers are an issue without the latest kernel. You need to reflash your boot.img with the latest mainline kernel. You can find the instructions in the OP.

    I have written a patch for Ponce's Pixel Experience GSI git that fixes the issue without the need for the latest kernel. I'll commit it soon, but if you wanna build right now I could copy/paste it for you here. You just add it to the patches folder and make sure you change line 13 in the apply_patches.sh to say "git am apply $patch || true". This ensures that the script doesn't exit on a failed patch, because of "set -e", thus the return value of the command is always true.
    1
    Apologies once again but my tablet isn't bootlooping anymore but it does show a weird hybrid between the download page and starting screen. This time around I factory reset and followed the guide to revert back to stock rom, and followed the original guide and flashed the kernel replacing the boot.img-header_version and the boot.img-imgtype using android image kitchen to unpack and proceeded to modify with magisk and flash into twrp after the system.img.
    1
    I managed to get it to boot once using that kernel, but as soon as I reboot after first boot, I end up on the download screen overlaid with an error message about being unable to verify vbmeta.

    Either way, the kernel you linked didn't seem to fix the speaker issue, even with those specific phh settings enabled. Any advice?
    Yes, I get the vbmeta error too after flashing a new kernel. You just have to reflash vbmeta. I also flashed a new GSI and wiped system, dalvik/cache before that, not sure if that's related.

    With the new kernel all phh settings should take effect now.

    You have to enable the alternate audio policy in the qualcomm settings and alternate audio + stereo in the Samsung settings. That's it.

    It's possible that some apps may not be optimized. I'm using VLC and all four speakers work.

    Firefox works sometimes but Chrome doesn't. I think this can be fixed by modifying the apk. I am checking the smali code rn.
    1
    is there a proper Desktop mode in any of the more recent versions?
    Good question, I don't think so. Sure would be awesome though.
    I've been decompiling Samsung apps all week, trying to trick the auth check. Porting Dex would be incredible. There must be something on GitHub, I'll have a look.
    I tried reflashing vbmeta but it refused to accept it and just kept giving me that error.

    The new kernel didn't seem to do anything when it did boot; I had those settings enabled and tried reflashing boot, recovery, and vbmeta together, which got me back in once, but even though those settings were enabled it didn't do anything.

    I wasn't even testing apps, I was just testing the system sounds.

    Also, your magisk instructions don't seem to make sense. The boot.img has no ramdisk, so if you want to install Magisk on the Tab S6, you have to use a patched recovery, which means you can't have TWRP and root at the same time.
    What is the specific version of your Samsung Firmware that you extracted the boot.img from?

    Of course you'll have to try some apps. I can confirm that VLC and YouTube on Firefox worked.

    You're wrong about Magisk. Extract your Firmware's boot.img and patch it with the Magisk app. After flashing it in the Boot slot your device is rooted. That is the universally prescribed method, read any guide.
  • 9
    Android-Open-Source-Project.jpg


    Hi everybody, I have been looking for a way to get an official version of Vanilla Android 14 on the Tab S6 for and wanted to make sure the community finally had access to a fully working and sufficiently detailed guide.

    This ROM improves battery life by 200%, it's absolutely insane.
    Every source, link or file referenced in this guide is 100% official and safe.

    Cheers!

    Download Firmware + Extract:

    • Install SamFirm and download the latest firmware for the Tab S6.
    • (You will also need to install Visual Studio C++ 8 & 9 for this software to function properly)
    • Install 7Zip and extract the firmware zip.
    • Then open the CSC file with 7zip and extract the PIT.

    Unlock Bootloader
    • Enable Developer Options and turn on OEM Unlocking
    • Disconnect USB/power cables and turn your device OFF
    • Hold both Volume buttons (do not press Power) and plug in the USB cord connected to your PC
    • The download/unlock screen should come up immediately. Select the option for device unlock mode.

    Download TWRP:
    Download Official AOSP / Android 14 Image:
    Flashing Firmware with Odin
    • Download Odin Flash Tool from a safe source.
    • Put the Tab S6 in Download Mode by pressing both Volume Up + Volume Down, while simultaneously connecting the USB cable. (The tablet needs to be off)
    • Open Odin and add the Firmware Files to the appropriate slots
    • BL > BL , AP > AP, CSC > CSC
    • Then click on PIT and add the previously extracted PIT file
    • Lastly click options and select Nand Erase, Re-Partition, while unselecting Auto Reboot
    Flashing TWRP & vbmeta with Odin
    • After successfully flashing hold down Power Button + Volume Down for 7 seconds but be ready to immediately hold down Volume up + Volume Down to re-enter Download Mode.
    • (USB Cable needs to be connected at all times)
    • (If you missed your chance and it's booting, hold down Power Button + Volume down to reset and try again)
    • Once back in Download Mode click Reset in Odin
    • Deselect Auto Reboot in the Options again
    • Then add the TWRP image in AP and vbmeta.tar in the CP slot.
    Rooting with Magisk
    • Extract the boot.img from the firmware.
    • Download the official Magisk APK from here: https://github.com/topjohnwu/Magisk/releases , install it on your device and patch the boot.img with it.
    • After you have wiped all the necessary partitions and installed a GSI (see below) you subsequently flash the patched boot.img in the Boot Slot and the Room will be rooted.
    Wiping Cache & Partitions
    • After flashing hold down Power Button + Volume for 7 seconds and immediately hold down Power Button + Volume Up the entire time until you see TWRP.
    • Once inside TWRP wipe Dalvik Cache and Cache in the Advanced Wipe menu. Subsequently re-enter the wipe menu, select Format Data and type yes.
    • After this (USB cable still connected) make sure the Internal Storage is mounted and transfer the system.img (extracted from the AOSP GSI zip) to the tablet
    Finishing Up
    • In TWRP click Install, select the system.img and choose system image.
    • Flash it, Reboot to System and your DONE!

    Kernel Flashing Guide:

    The latest release of the official Android 14 GSI has been causing boot loop issues for some users. Installing the latest mainline or stable kernels > 4.16 seems to fix that.
    • Navigate to https://ci.android.com/builds/branches/aosp-main/grid
    • Enter "kernel" in the text box and choose whichever version you prefer
    • Personally I would recommend the aosp mainline kernel: https://ci.android.com/builds/branches/aosp_kernel-common-android-mainline/grid?legacy=1
    • Choose kernel_aarch64 which will redirect you to the artifacts page.
    • Here you'll find a file named "boot.img" which contains the kernel files. Download it.
    • Use any preferred software to extract the image's contents. Linux users can use the following command to mount the image: mount -o loop boot.img /mnt ( you can find the offset value with fdisk )
    • The files you need to copy are the kernel headers and kernel image
    • Now get your device's boot.img which can be extracted from the AP portion of the Samsung firmware.
    • Replace the two aforementioned files (kernel image and kernel headers) with the old kernel files in your device's boot image. You can either mount it r/w or simply extract, replace and repack.
    • If you require root, you can simply patch this modified boot.img with Magisk like always.
    • Flash the updated boot.img with TWRP, selecting the Boot Image option.
    • That's it!

    Current build - Android 14:
    Date: April 12, 2023
    Build: UPB1.230309.014
    Build type: experimental
    Security patch level: April 2023
    Google Play Services: 23.09.12

    Working:
    • Fingerprint
    • Hardware Buttons
    • SDCard
    • Wifi
    • Bluetooth
    • Gapps and Google Setup
    • Tablet is very fast!
    • Charging
    • USB File Transfer
    • Audio
    • Video out for USB-C
    • Auto-rotate
    • GPS
    • Official Samsung Keyboard Physically attached working fine too!
    • Themes
    • Colours
    • Mic
    • SPen
    Not Working:
    • Top Speakers
    This issue has already been fixed in the Beta Version which will soon be moved to stable.

    Current build - Android 13 (Beta):
    (at the time of writing this)
    Date: March 29, 2023
    Build: T3B2.230316.003
    Build type: experimental
    Security patch level: March 2023
    Google Play Services: 23.02.14
    6
    Thread cleaned.
    Personal attacks or flaming are not allowed.
    I would advise everyone to read the forum rules.

    - XDA Staff
    4
    Is there any way to use Samsung Apps like SNotes?
    Thats the only thing I would need from OneUI

    If you still want to keep using Samsung apps under a different OS like this one (AOSP, A14) install the Magisk module " Xmlpak a road to vendor apps".

    After reboot, the Samsung apps you want to use again should show up in the app store for you to install. If not you can use APKMirror to download the APKs. Contrary to what a user posted above, this site is more than safe and verified.
    4
    yes, but there is an error at the start. also freezes the tray very quickly. that's why I'm looking for a more up-to-date one with the Google apps
    The error at the beginning is expected, but nobody else has reported any major stability issues so far.
    Something I have done, which I'll add to the OP shortly, is to install the AOSP stable kernel 4.19 after flashing the 14 GSI. That makes it pretty much rock stable. You can find it here: https://ci.android.com/builds/branches/aosp_kernel-common-android-4.19-stable/grid?legacy=1

    If its not working for you, simply download the latest completed build from the master branch here: https://ci.android.com/builds/branches/aosp-master/grid?legacy=1

    With this you're getting all the bleeding edge features as it literally represents the code that's being developed right this second.
    4
    AOSP GSI with Android 14 has just been released! You can flash it right now with this guide.