[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,895
481
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
86
60
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
86
60
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

  • There are no posts matching your filters.
  • 6
    Thread cleaned.
    Personal attacks or flaming are not allowed.
    I would advise everyone to read the forum rules.

    - XDA Staff
    3
    I have a T-860 and used the arm64 stable version (https://developer.android.com/topic/generic-system-image/releases#13-stable). i can confirm it works. u have to follow instructions step by step., battery drain is very little so far, but UI lacks major functionality like tap to wake, tap to sleep. accessibility doesnt have the interactive button, etc. when i connect to pc, cant even file transfer. its just like a plain stock barebone android. doesnt even have network speed display functionality. will root it later and see what happens
    Thanks for reporting. Tap to wake/sleep and full S-Pen functionality (among other features) is available with the Pixel Experience images. I'm forking ponces git to specifically include Samsung features for the Tab S6.
    A build guide + full images will be available shortly.
    1
    We used to have to flash an encryption disabler.

    Would that solve some of the issues some are facing, or is that no longer needed?
    I don't think there is one available for Android 14, but 13 disablers are around and working. I personally never used it because you can literally build GSIs with all the settings and prebuilt files in a matter of 1-2 hours now. No need for TWRP nandroid backups anymore.
    1
    Thanks for the important addition.
    By the way, even after flashing the boot.img with the kernel replaced, should I wipe Dalvik, Cache, System, Data in TWRP and then flash the system.img of GSI?
    Because I tried to change the kernel by following the procedure below, but it froze with a text in the upper left corner of the Samsun logo screen as if it was in download mode, and I cried and flashed the original boot.img to recover.
    1. extract the patched boot.img by magisk from the main unit
      adb shell
    dd if=/dev/block/bootdevice/by-name/boot$(getprop ro.boot.slot_suffix) of=/sdcard/boot.img
    2. unpack(boot.img D&D) in Android Image Kitchen
    split_img and ramdisk folders are created
    3. unpack boot.img obtained from aosp_kernel-common-android-mainline in the same way
    4. extract boot.img-kernel from split_img of aosp in 3 and replace it with boot.img-kernel of split_img of stok in 2.
    5. remove boot.img-kernel_offset from stok, because there was no boot.img-kernel_offset in aosp.
    *I also tried the pattern of not deleting it.
    6. repack with --origsize option
      Android Image Kitchen>repackimg.bat --origsize
    image-new.img and ramdisk-new.cpio are created.
    *I don't know what ramdisk-new.cpio does...
    7. Copy image-new.img to the main unit and flash to boot with TWRP
    →7. freeze at a screen that looks like a combination of Samsun logo screen and download mode screen.
    I did nothing that I did not write here.

    <It was in both boot.img's>.
    boot.img-cmdline
    boot.img-header_version
    boot.img-imgtype
    boot.img-kernel
    boot.img-origsize
    boot.img-os_patch_level
    boot.img-os_version
    boot.img-ramdiskcomp
    <only found in stok boot.img
    boot.img-base
    boot.img-board
    boot.img-hashtype
    boot.img-kernel_offset
    boot.img-pagesize
    boot.img-ramdisk_offset
    boot.img-second_offset
    boot.img-tags_offset
    boot.img-ramdisk.cpio
    <aosp boot.img was only found in boot.img>.
    boot.img-ramdisk.cpio.empty

    I honestly wouldn't bother with any of the kernel images on Google's CI. They're GKI, and the Tab S6, due to its age, never received that treatment from Qualcomm or Samsung. Latest kernel is 4.14, whereas GKI minimum was 4.19. Simply said, that kernel shouldn't boot at all, since it misses board definitions for the Tab S6, and the architecture required to successfully proceed with a GKI boot (you can read further on this here: https://source.android.com/docs/core/architecture/partitions/generic-boot). You'll note that the Tab S6 still uses Header V1 for the boot.img, whereas GKI will require the Header V3/V4. and the partition structure explained in the above document (beyond other things, it relies heavily on vendor_boot's ramdisk, and our device completely misses vendor_boot since it launched with Android 9).

    If you want to work with boot.img's I'd recommend you ditch these random, often unmaintaned tools (AIK hasn't been updated for nearly two years now, although osm0sis' bootimg tools should still be reliable), and stick with the stock mkbootimg and its Python wrappers. It's a bit more manual work, but at least you learn about the boot.img structure, unlike @tablet_seeker, who still pretends that there's some magical way to mount boot.img's on Linux, no matter how many irrelevant buzzwords he throws into his comments.

    You're also doing a few small details wrong in your boot.img patching! You should NEVER EVER remove the kernel_offset (and tags_offset, ramdisk_offset) information, as that is specific to the hardware. Also you've done the order in reverse - you created a frankenGKI from the AOSP image, but using the kernel ELF from the stock firmware. The goal here was the opposite, to use the GKI kernel ELF, but with the Tab S6 specific information (boot cmdline, kernel/tags/ramdisk offsets, etc.).

    I'd recommend you stick with Android 13 based GSIs (with Phh's Project Treble additions) as those are the most stable. And if you use a Project Treble variant from phh, it will have the extra "Phh Treble Settings" option where you can fine-tune some options that are Samsung/Qualcomm specific. In fact e.g. you can get the speakers working by turning on alternate audio policy and Samsung stereo fix:

    You might also want to check out some of these recommended settings (not the same device, but it is a Qualcomm based Samsung phone, so _some_ of the settings will apply): https://forum.xda-developers.com/t/how-to-configure-a-treble-gsi-properly.4564191/

    I think the fingerprint, camera, and BT fixes are applicable (but I wouldn't try the 120Hz fix as it isn't applicable to our display).
    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.
  • 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.