yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Tab S6 Guides, News, & Discussion] fonix232:
{Mod edit: Quoted post has been deleted. Oswald Boelcke, Senior Moderator}

It's not about offset loop mounts at all. A boot.img IS NOT MOUNTABLE. PERIOD. Because it's not a file system, or a partition set, it's a binary blob created by concatenating a number of other binary blobs, with a customised header that does NOT support dynamically moving bits. If you're mounting it in any manner, you're either not using the boot.img you've been talking about, or you have an unmentioned extra tool (which you yourself should've written, since a bootimg mount helper does not exist on the internet, which, might I remind you, you should've mentioned and provided, if that's the case).

Again, I invite you to prove your claims. Show me how you mounted that boot.img you grabbed off the Google CI. I'll wait. Or just run a binwalk on it and show me the output. Or show me the fdisk output. Anything to support your claims, as I'm asking, now for the what, fourth time?

I've already stated WHY it won't work. You can't even be arsed to actually read what people write, you just whip up a half-assed reply and think it's okay, on a TECHNICAL FORUM. When I've been asking, nicely and rudely, through about a dozen comments now, without any meaningful reply from you, might I add, beside deflection.

Just for your benefit, I've attached a few screenshots of what a legit boot.img looks like in various tools:

I'll await your rebuttal or proofs once you're done with name calling and acting like a baby.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] karandpr:
Thread cleaned.

Personal attacks or flaming are not allowed.

I would advise everyone to read the forum rules.

📚 XDA Developers Forum Rules 📚

XDA-Developers FORUM RULES List of Forum Moderators, click HERE Delete Your XDA Account HERE 1. Search before posting. Use one of our search functions before posting or creating a new thread. Whether you have a question or just something new...

xdaforums.com

- XDA Staff
[Samsung Galaxy Tab S6 Guides, News, & Discussion] samsungsux_xda:
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
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
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.

Releases · ponces/treble_build_pe

Script and patches for building PHH-Treble Pixel Experience - ponces/treble_build_pe

github.com
[Samsung Galaxy Tab S6 Guides, News, & Discussion] samsungsux_xda:
no problem. im trying to root the device but its so hard. every .img file i download windows wont open and says its corrupt. i run virtual machine linux to extract .img, but also corrupt. i downloded different boot.img and its all corrupt. why is that do u have the stable version android 13 t860 boot.img?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peeler8467:
If you want to get root privileges, you need to extract boot.img from galaxy's stok ROM and patch it.

Extract the AP and find boot.img.lz4.

Extract boot.img.lz4 using LZ4 TOOL or similar.

You should now have boot.img. Then apply the patch with magisk and flash the img to boot with twrp.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] samsungsux_xda:
ok i used 7-Zip-zstd to extract it and it worked. patched with magisk but it will show error upon opening magisk, but root priviledges work. still no USB transfer and it cant even read my SD card tho.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
Pretty much. On the Tab S6 you first flash the stock Samsung firmware. Then extract the boot.img from the firmware. Next unlock the bootloader and enable USB debugging. Then flash TWRP and vbmeta. (All described in the OP).

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. Then enter TWRP, wipe Dalvik, Cache, System and Data. Flash any GSI of your liking and then flash the patched boot.img in the Boot slot. Your ROM will be rooted. You can also add kernel files to the boot.img but depending on what OS you use, some beginners might find it difficult to extract/mount it.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peeler8467:
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
[Samsung Galaxy Tab S6 Guides, News, & Discussion] Airtioteclint:
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?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
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.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
You problem is that you're using dd. The resulting image will have no layering index.

Also repacking should be done from an r/w mount of an existing boot.img

For this you have to create a tmpfs overlay first, so you can get an offset value which is needed for the initial loop mount. This can be challenging though. Maybe just try gnome-disk-utility + Disk Mounter or just use Windows.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] fonix232:
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:

https://xdaforums.com/t/lineageos-20-android-13-gsi-install-instructions.4571805/post-88692787

https://xdaforums.com/t/lineageos-20-android-13-gsi-install-instructions.4571805/post-88696265

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://xdaforums.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).
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peeler8467:
tablet_seeker

fonix232

Thank you for the explanation.

Hmm, it's quite complex, isn't it!

I initially set up 14beta4.

However, I faced an issue with no sound from the Bluetooth speaker.

After trying out numerous GSI ROMs, I settled on evolution7.9.5.

Thanks to Phh Treble Settings, issues like dim brightness were resolved.

But I wanted to have auto brightness and the latest OS.

I thought, "If I update the kernel to the latest version, it might fix the Bluetooth speaker issue and allow for Android 14."

Ever since then, I've been curious about how to update the kernel, and it's kept me up at night! lol

I tried various things, but it seems my skills weren't enough.

I'll practice more and give it another shot.

A big thanks for everyone's incredible knowledge, contributions, and discussions!
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
Sure, no problem! It's pretty straightforward, honestly. The OP has a section detailing how to update the kernel. Should you get lost along the way, please feel free to plea for help here or check out one of the many guides available online.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] fonix232:
The kernel itself won't resolve the BT issues - those are "systemspace" settings and extra code that needs to be present in the ROM, not the kernel, to be working (that doesn't mean that certain kernel settings aren't also needed! But it is all done from userspace). For these issues you need the various overlays and settings the Phh Treble builds provide.

Not to mention that Android 14 is an unfinished, alpha product at this moment. Even the TrebleDroid repos haven't been brought up to it (I expect it to happen once 14 is officially released).
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peppet:
I have a question: some gsi files have the wording vndklite; the ones that have no indication are vndk?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
vndklite roms have system partitions that are r/w.

With root access you can modify and delete any files on it while mounted. You can't do this with any other version because system will be ready only.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
Hey, were you able to figure out how to flash the kernel? I'd be happy to give you more detailed instructions.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] hman360:
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?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
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.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] hman360:
Building seems like a lot of work, so I'll probably wait for a prebuilt image release.

When you say I need to copy the kernel headers and kernel image from the mainline kernel boot.img to the SM-T860's boot.img, which specific files are those? boot.img-kernel makes sense for the kernel, but the only file referencing a header is boot.img-header_version, is that the kernel header file to copy? I'm using the Android Image Kitchen tool.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
Yeah the headers aren't included with those, but you don't need them anyway in this case. Just the image is fine.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peeler8467:
No, I have no idea! I have no idea!

I mounted a folder created by ubuntu with tmpfs and put boot.img in it....

I tried this method, but I could not get the boot.img out of the folder mounted with tmpfs, and the folder was empty even after unmounting the tmpfs, which should surely be there.

So I'm going to give up on the kernel update and try 14.0-Beta5.3 as well.

Hoping to get sound from the bluetooth speaker....
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peppet:
hi, I don't know if it helps but can you try flashing this rom VNDK and tell us if all the speakers work? LeOS-VNDK-arm64_bvN-19.1

Proton Drive

Securely store, share, and access your important files and photos. Anytime, anywhere.

drive.proton.me
[Samsung Galaxy Tab S6 Guides, News, & Discussion] hman360:
I can't get it to work, sadly. Every time I try flashing the modified boot.img, the tablet goes into some broken download mode, and I have to reflash the old boot.img.

I'd really rather not downgrade to Android 12.1
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peppet:
Android 13 is fine too, it's important that it's vndk. let us know
[Samsung Galaxy Tab S6 Guides, News, & Discussion] fonix232:
Yeah, it's confusing because tablet_seeker is talking out of his arse. You CAN NOT mount a boot.img because it isn't a file system, it's a concatenated binary blob with a very specific header. You'll need mkbootimg and its accompanying scripts to unpack it, then repack with the same parameters (parameters are incredibly important, since they literally tell the kernel how to handle your device, and also the bootloader where to find the kernel and where to load it).

Also, you used tmpfs? What for? As the name suggests... It's a TEMPORARY file system. It is used on Linux when you're creating a temporary space (e.g. /tmp) that you do not care about if the data is lost, since you're just temporarily store them (such as logs, downloads when you're updating packages, and so on). It stores files in memory, and actively discards them when memory is running low - and the moment you unmount it, the data is gone. Irrecoverably.

It's because that's a GKI kernel, and our tablet has absolutely no support for GKI. You'll need either a stock kernel, or compile your own from Samsung's sources (Google's won't work because it doesn't include changes made by Samsung, and GKI won't work because the Tab S6 lacks the environment to successfully boot a GKI image).
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
What do you mean by "mounting with tmpfs"?

The tmpfs is the filesystem of the overlay. Like for example a toram boot in Linux. You have two filesystems, the overlay which is r/w and squashfs which is read only. That's exactly how you mount a boot.img.

This can be complicated for Linux noobs, please just extract the img, replace all necessary files and repack it. You don't have to mount it.

Top speakers don't work with any GSI roms on our device, it's Kernel issue.

I have written a patch for Ponce's aosp and pixel experience gits that doesn't require the newer kernel.

I'll upload the treble_arm64 ab image in MediaFire today. Build instructions will be included in a new thread.

I can upload my boot.img for you if you like.

Did you make sure to download the latest Samsung firmware, from which you extracted your boot.img?

The reason why you don't need the extra headers is because the latest firmware already has those packages. If there's a mismatch that could cause an error during flashing.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] fonix232:
Dude, there's absolutely no overlay or squashfs in our boot.img's. It's literally a kernel blob in standard Image format, and the standard Android bootimg header on top. You don't mount it. You literally can't. It's not a file system.

Please publish those patches then.

Please do. I really want to see that boot.img and compare to my own experiments with your "method" (as well as the standard approach). Also please provide screenshots proving it boots on the Tab S6. Simply the About device page where the kernel info is visible would be enough.

You never needed the kernel headers. Those are only required for development, to "soft" link against (e.g. how DKMS modules on Linux work, they don't link against the kernel object, but use the headers to ensure interface compatibility).
[Samsung Galaxy Tab S6 Guides, News, & Discussion] Deadman2496:
So I was able to get android 14 working from with this version https://developer.android.com/about/versions/14/gsi-release-notes however once I reverted back and attempted to perform the gms version it no longer worked and consistently bootlooped until I loaded the stock rom. Any idea what I did wrong?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] fonix232:
Did you FORMAT /data between the flashes? IIRC Android since around 12 enforces file based encryption on the /data partition, and it is keyed to the ROM/system partition if I'm not mistaken. Meaning the moment you replace /system, you need to format /data.

Alternatively the only other thing I can think of is that there's a /vendor or /product script that modifies things and won't let a different system image boot. I've been encountering the "recovery reset" bug too, where the stock recovery is restored over TWRP, even on a non-Samsung GSI, making me think that the script was moved from /system to either of the aforementioned two partitions, and the GSI runs said scripts.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] Deadman2496:
I did. unfortunately it appears that after the first attempt only the stock rom worked. I do wish I was a little bit better at understanding this to be able to figure it out better. but I will continue tinkering around to figure this out.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] Deadman2496:
I do notice that when it turns on during the loop it flashes a little message up top that says"Set warranty Bit:Vbmeta. does that mean anything?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
Please follow the guide when reverting.

Enter TWRP, perform a factory reset + wipe Dalvik, Data, System and Cache.

Flash any GSI, but reboot into recovery first, not system. Only after rebooting into recovery, select reboot system.

Everything should be in order again.

After flashing the stock rom, you will have to reflash TWRP and vbmeta.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] Deadman2496:
I attempted that with this build https://ci.android.com/builds/submitted/10448490/aosp_arm64-userdebug/latest and the link on the 1st post but no luck also when I attempt to wipe it gives me that access is denied for /data files and thus fails only after rebooting to recovery a couple times does it work
[Samsung Galaxy Tab S6 Guides, News, & Discussion] peppet:
Try to format data using another file system then reformat to f2fs
[Samsung Galaxy Tab S6 Guides, News, & Discussion] Deadman2496:
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.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] kv77:
Could you please upload the modified boot.img file, I don't know how to modify it on my own.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
What device are you using?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] kv77:
I'm using Galaxy Tab S6 with android 13 (PixelEperience). I have problem with speakers (only two work). From what I've read, the solution is kernel update (boot.img). After the update, I will also be able to upload Android 14.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] tablet_seeker:
Which version of the stock firmware did you download? This is why some people have had issues with the kernel. You have to make sure the kernel version you're downloading matches the one in your firmware, because of the headers.

Even I didn't consider this at first, gonna update the OP shortly.
[Samsung Galaxy Tab S6 Guides, News, & Discussion] kv77:
I downloaded this version of the firmware using SamFirm

SM-T860_4_20230815141540_hthj06yy90_fac.zip

T860XXS5DWH1/T860OXM5DWH1/T860XXS5DWH1/T860XXS5DWH1

How can I check if the kernel versions match?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] Deadman2496:
So the kernel version of the boot.img for android 14 needs to match samsung's firmware? Or the android 14 system image we download?
[Samsung Galaxy Tab S6 Guides, News, & Discussion] hman360:
I'd appreciate that, yes please.

Yes, I downloaded the latest Samsung FW to extract the boot.img. ponce's PE+ image I'm flashing is Android 13, not 14, I don't know if that makes a difference in what kernel I should use.