yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Sly123:
Will there ever be a TWRP recovery for unlocked S10 Snapdragons (HK/CHC) in near future?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Assuming you are using Magisk, just root the TWRP image of any new version you want to flash and then flash it. No need to wipe data any more.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Qwizh:
Hi thanks for your great work! I am sorry if this is a stupid question, but I've read the whole thread and it's still not entirely clear to me. When people speak about updating the firmware, do they mean updating the Samsung ROM to the latest version? If not, how am to update my phone when custom binaries are installed? I read something about a tool which downloads the latest Samsung firmware (ROM?) which you then need to patch with magisk, right? I am on the S10e. Thanks in advance!
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Yes, when people talk about updating the firmware, they mean Samsung's updates.

Please refer to John Wu's instructions on patching the AP file. This is how you stay up to date without triggering any of the firmware's booby traps.

For even more detailed instructions, please see [MENTION=2022726]PiCkLeS[/MENTION]' instructions in posting #9 of this thread.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] hanspampel:
Did you tried it if deinstalling works for you?

Ive tried so many variants and nothing can be deinstalled. Ok tested only one /system/app, but i cant debloat it.

Tried it with

delete_recursive("/system_root/app/BBCAgent");

delete_recursive("/system_root/system/app/BBCAgent");

with different system mounts

run_program("/sbin/mount", "/system_root");

mount("ext4", "EMMC", "/dev/block/platform/13d60000.ufs/by-name/system", "/system_root/system");

Tried to convert updater-script to update-binary

#mount $ANDROID_ROOT
ui_print " - Mount system"
mount /system_root

ui_print " - Deinstall APK"
#rm -rf $ANDROID_ROOT/system/app/BBCAgent
rm -rf /system_root/system/app/BBCAgent

umount /system_root
ui_print " - Unmounting $ANDROID_ROOT..."
#umount $ANDROID_ROOT

or

#mount $ANDROID_ROOT
ui_print " - Mount system"
mount /system

ui_print " - Deinstall APK"
#rm -rf $ANDROID_ROOT/system/app/BBCAgent
rm -rf /system/app/BBCAgent

umount /system
ui_print " - Unmounting $ANDROID_ROOT..."
#umount $ANDROID_ROOT

and other variants. Look at the #.

When i try to flash it with update-binary, ill get a 127 error:

...
Prozess Updater endete mit FEHLER: 127
...

I cant debloat this app. Had the same with some other apps in older twrp versions. It seems we or its only me, didnt have full 100% root with the s10. This device fu**ed me really up. Thx Google and Samsung.:(

And btw. i didnt get my rom to boot. Every time i flash the rom, it bootloops. Didnt test it without a boot.img. Maybe there are some more problems here cause we dont see full roms, afaik 1, without a boot.img.

The same happens when i try to debloat with adb (root set to apps and adb via magisk). I cant debloat it. Ok didnt test it with the -7 version, but with -5 and below i cant debloat with my toolkit.

I never had so much issues with root or my roms/mods with all my other devices. You'll lose the fun in modding stuff.:(
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
try this:

delete_recursive("/system_root/system/system/app/BBCAgent");
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] hanspampel:
Hmm this one works. Dont understand atm why it should be system_root/system/system/... it means there are 3 system folders.:confused:
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
yes, this is the correct path...
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] tiho5:
This is strange. Then how come (like I posted here a couple of days ago) I can successfully test flash files with a script that has the path /system_root/system/media/audio?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
only the delete recursive needs that path to work
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] hanspampel:
This is what ive saw too. Ive installed to /system_root/system but removing files is only working with /system_root/system/system/... . But removing over adb still not working. Maybe its my script, but /system_root/system/... and /system_root/system/system/... not really working there.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] RemixDeluxe:
On my Galaxy S10 I installed TWRP img using Magisk Manager, but when I go into recovery mode it still looks like the original recovery mode. I thought TWRP was supposed to have a completely different interface, did I do anything wrong?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
proceed with this guide:

this guide has been translated from italian language with google translator

1- download the latest firmware, the latest TWRP and the latest version of the multidisabler

2- copy the AP file and the TWRP into the device

3- the multidisabler put it in the ext card if you have it then open Magisk Manager and check the 2 files

4- make sure that everything goes well the program must remain open and write "all done" at the end of the procedure

5- recover the 2 files from the download folder and copy them into the PC then unzip the file magisk_patched.tar with 7zip delete the file recovery.img from inside it and replace it with the image of the newly patched twrp always renaming it recovery.img

6- reassemble with 7zip all in a tar archive

7- turn off the device and put it in download mode with the bixby + vol down button and inserting the cable to the PC at this point open Odin remove the check mark from autoreboot

8- load the AP .tar file that you created together with the BL the CP and the HOME_CSC .... if you put the CSC you lose all the data

9- start the flash and wait

10- at the end you disconnect the phone from the cable and with the power + vol down keys force the switch off as soon as the screen goes black press the recovery vol + / bixby / power combo and don't leave the keys until you see the twrp screen, continue to keep the 3 keys pressed and wait for the recovery to start again

11- flash the multidisabler then from the main screen choose recovery reboot

12- If you do not have a Magisk Manager on reboot, you manually install it and start it and it will ask you to do the additional configuration confirmation yes and wait for it to do everything and restart the phone
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] RemixDeluxe:
I have patched the AP file and the TWRP file in Magisk Manager. I copied the files to my PC, unzipped the patched ap .tar folder, deleted the recovery file and renamed the patched TWRP file recovery and added it in there. I zipped it back up into a .tar file again. Opened Odin and loaded the .tar file into AP, then the BL, CP, and added Home_CSC.

Heres the problem though, after flashing it the phone is in download mode. I try to exit it by doing the restart. I try to go into recover mode but no matter what I do it keeps forcing back into download mode. No USB is plugged in either.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] bininga59:
Here is the detailed instructions:

https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root

The multidisabler needs to be on your SD - installs immediately after flashing TWRP (before booting!)
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] OsoAlgo:
Last time I performed a firmware upgrade I patched the AP file with magisk and used

$ tar f magisk_patched_twrp.tar --delete recovery.img && tar rf magisk_patched_twrp.tar recovery.img

as mentioned in the first post. However, this isn't working for me now; I can remove the stock recovery from the tar file, but when I try to add the patched one I get an error:

tar: Unexpected EOF in archive

I'm using firmware G970FXXS3ASH1_G970FOXM3ASG8_DBT (downloaded twice to make sure it wasn't corrupted) and recovery twrp-beyond0lte-3.3.1-7_ianmacd, using adb pull/push, and I've tried doing the above on both Linux and Windows. Is anyone else having this problem?

As a side note, the shown command could be more specific. The patched tar file comes from the AP file, not the TWRP file, and recovery.img is the magisk-patched TWRP image after renaming (right?).
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] RemixDeluxe:
I have patched the AP file and the TWRP file in Magisk Manager. I copied the files to my PC, unzipped the patched ap .tar folder, deleted the recovery file and renamed the patched TWRP file recovery and added it in there. I zipped it back up into a .tar file again. Opened Odin and loaded the .tar file into AP, then the BL, CP, and added Home_CSC. Except Odin closes whenever I hit start.

How else can I flash TWRP on my phone? I dont need a guide on installing Magisk. Thats not the problem here.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] bininga59:
Why did you delete the recovery from the AP?

Patched AP + BL + CP + CSC_Home with Odin, no reboot.

From there in the stock recovery and factory reset.

Roughly set up your mobile phone.

Patched TWRR with Odin flashing, no reboot.

From there with the keys to Recovery and Format Data and equal to the multidisable flash.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] OsoAlgo:
Which firmware version are you using? Maybe your problem is related to mine (see above)?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] RemixDeluxe:
I was following along perfectly what you are saying until this part.

So after I do the recovery flashing, then factory reset. Do I go back into download mode in order to flash the Patched TWRP?

Can you reword what you are asking on your last part. Thank you for explaining this to me.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] bininga59:
After flashing gep.AP + + + in the stock recovery a factory reset.

Then boot and set up the phone.

Then flashing the TWRP and doing format data there and confirm with yes. Immediately install the multidisabler and then boot. When restarting in TWRP, select> Recovery <.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Yes, I have run into this, too, on the last couple of firmware upgrades. I'm guessing that it's Magisk-related.

The work-around is to reverse the order of the operations: Add the TWRP recovery.img first, so that there are 2 identically named files in the archive, then delete the first one (i.e. stock recovery.img), leaving behind just the TWRP image.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] OsoAlgo:
I would've never guessed that was valid. Unfortunately, it still doesn't work on my end. I've now tried with both G970FXXS3ASH1_G970FOXM3ASG8_DBT and G970FXXU3ASG8_G970FOXM3ASG8_DBT, but in both cases I get:

tar: magisk_patched.tar: Cannot read: Bad file descriptor
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

Simply extracting files does work, so I'm not sure what's going on. My magisk manager is v7.3.2

EDIT: the above was on Windows, and at some point I did manage to add the patched recovery.img, but not delete the stock one. I tried again on Linux and this time it did work.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] RemixDeluxe:
I'm really sorry if this is off topic but I've been at this for nearly the entire day trying to get this right installing TWRP but I end up boot looping my phone or bricking it what feels like my 10th attempt in a row. I have a feeling the firmware ROM may be corrupt and preventing me from being able to complete this.

For anyone living in the United States, what firmware build do you recommend so there is no branding during bootup or any bloatware. I am using a Galaxy S10 G973F.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] nuno.ripper:
Guys, help me out please, maybe i am missing something or missread a step.

I followed john wu tutorial: https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root

unlocked bootloader, went through the setup, verified OEM UNLOCK is greyd out an unlocked

downloaded right firmware, patched magisk, flash AP (magisk_patched.tar) +BL+ CP + HOME_CSC:

then:

11. This time, we can finally boot to the system with Magisk. Select Reboot system now, and immediately press Power + Bixby + Volume Up. After seeing the bootloader warning screen, release all buttons so it can boot to the system.

---- pressed

12. the device will automatically reboot for the first time it boots. This is completely normal and done by design. ---- yes it does. but am I suposed to stil be pressing Power + Bixby + Volume Up at this time?

13. After the device is booted up, do the usual initial setup. The following steps will need internet connection. ---- it does boot. did initial setup, connected to internet. phone is working.

Now:

no magisk app. installed magisk app, says installed, go to magisk and enable root to app "root explorer". I have rooted the terminal.

15. Magisk Manager will ask to do additional setups. Let it do its job and the app will automatically reboot your device --- didnt ask me anything, did not reboot phone

I reboot the phone, and no more phone/recovery/whatsoever, only "Only official released binaries are allowed to be flashed" and bootloop, KG state= Prenormal.

I am aware of this, but only thing I can do is return to download mode and flashofficial

(Powering up normally) → (System with NO Magisk)

(OEM Recovery Key Combo) → (Splash screen) → (Release all buttons) → (System with Magisk)

(OEM Recovery Key Combo) → (Splash screen) → (Keep pressing volume up) → (Actual recovery)

thanks in advance
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Evil...:
Worked, but i lost the mtp usb
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] nuno.ripper:
Thank you.

Worked like a charm.

After first boot, intalled magisk, requested to do more configurations and rebooted.

This time, everything ok.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] k3mot:
Hi i have problem with:

If you insist on proceeding with installing TWRP to a stock device without Magisk, you will need — at a minimum — to flash a vbmeta.img with verity disabled or you will render your device unable to boot. You can construct such an image using the following command:

Code:

$ avbtool make_vbmeta_image --out vbmeta.img

Ok i'm idiot :) this but this command not work in adb shell... write: beyond1:/ $ avbtool make_vbmeta_image --out vbmeta.img

/system/bin/sh: avbtool: not found

127|beyond1:/ $

Alternatively, if you don't have a copy of avbtool at hand, the following piece of shell code will do the trick:

Code:

h=$(printf '4156423%08d1%0240d617662746f6f6c20312e312e3%0230d')

d=''

for ((i=0; i<${#h}; i+=2)); do

d="$d\x${h:$i:2}"

done

printf "$d" > vbmeta.img

Next, flash this to the vbmeta partition, using either Heimdall or Odin.

I have this:

127|beyond1:/ $ h=$(printf '4156423%08d1%0240d617662746f6f6c20312e312e3%0230d')

'

for ((i=0; i<${#h}; i+=2)); do

d="$beyond1:/ $ d=''

beyond1:/ $ for ((i=0; i<${#h}; i+=2)); do

/system/bin/sh: syntax error: unexpected '(('

d\x${1|beyond1:/ $ d="$d\x${h:$i:2}"

beyond1:/ $ done

/system/bin/sh: syntax error: unexpected 'done'

1|beyond1:/ $ printf "$d" > vbmeta.img

/system/bin/sh: can't create vbmeta.img: Read-only file system

1|beyond1:/ $

What i do wrong? Can somebody help?

And i have G973FXXU1ASBA Firmware so i can flash new TWRP or can only old TWRP? Or update firmware first and then new TWRP?

Thanks for answer :)
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] k3mot:
Can somebody help to install TWRP on this device? I have installed Full Magisk Manager as decribed https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root but i want install TWRP on this device with magisk. Next i want back to stock and install TWRP without magisk. I want check two options. Thanks for answer :)
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] cameronkelley28:
Just a heads up for anyone wondering, 3.3.1-7 is still working just fine for me on the latest ASH6 firmware.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] elmkzgirxp:
[MENTION=7187684]ianmacd[/MENTION] When I try to flash GSIs, the system partition doesn't use the full partition size (5.8GB) but only half of it or less (varies with different GSIs). The "Resize partition" option doesn't work too (throws an error).

I don't know if it has always been like this with the previous versions, I just noticed it now.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Is the System partition itself its normal size or has it been changed?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] dr460nf1r3:
Whats the state of Gsis right now? Some critical bugs?

What roms did you test?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] elmkzgirxp:
With the stock ROM, the system partition size is around ~5 GB, which is the normal size, /proc/partitions also report the same. But when I flash Phh Treble GSI, the system partition size shrank to around only 2 GB, and 1.5 GB for AOSP GSI.

Like I said previously, "Resize partition" doesn't work. I also tried using dd for flashing the system image, but then it won't mount. The only thing I haven't tried is flashing through Odin, but I'm not too sure if it's safe.

---------- Post added at 06:54 PM ---------- Previous post was at 06:38 PM ----------

Just Phh AOSP 9.0. Phh has most of the features working, such as a partially working fingerprint sensor. It's pretty stable to be a daily driver IMO. There are a few issues here and there, but the dev makes S10 fixes often.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] thevmax:
It's ASH1
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] hanspampel:
Nope, there is a firmware named ash6.;)
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] k3mot:
Why nobody want help me? :( My question is only where put this command:

$ avbtool make_vbmeta_image --out vbmeta.img

if I put this command in ABD shell said :

/system/bin/sh: avbtool: not found

and where put this:

h=$(printf '4156423%08d1%0240d617662746f6f6c20312e312e3%0230d')

d=''

for ((i=0; i<${#h}; i+=2)); do

d="$d\x${h:$i:2}"

done

printf "$d" > vbmeta.img

at this command i have syntax error when i write in ADB Shell:

or ((i=0; i<${#h}; i+=2)); do

d="$beyond1:/ $ d=''

beyond1:/ $ for ((i=0; i<${#h}; i+=2)); do

/system/bin/sh: syntax error: unexpected '(('

d\x${1|beyond1:/ $ d="$d\x${h:$i:2}"

beyond1:/ $ done

/system/bin/sh: syntax error: unexpected 'done'

1|beyond1:/ $ printf "$d" > vbmeta.img

/system/bin/sh: can't create vbmeta.img: Read-only file system

1|beyond1:/ $

Please help me with this
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] m0b:
Any workaround to keep encryption enabled with TWRP?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] elmkzgirxp:
Add "_interactive" at the end of the filename of the multidisabler (i.e. "multidisabler-g97x-1.3_interactive.zip") to choose what you want to enable/disable.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] m0b:
But will TWRP work with enabled encryption?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] kkrraazzyy:
[MENTION=7187684]ianmacd[/MENTION]

after installing twrp in my s10e i am not able to get root via magisk

even after pressing the combo key ( vol. up key +bixby key + power key ) and am getting the 255 error while creating the phone backup can you kindly shed some light why i am getting this error

thankyou
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] kp.nikhil:
i flashed the wrong twrp on s10 plus twrpx instead of twrp twrp2lte and now the phone is tuck in bootloop even the bootloader isnt showing up..any help?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
No harm done.

Boot into download mode and flash the correct image. All will be well again.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] kp.nikhil:
for some reason im not able to login to the download mode.the key combo doesnt work
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
It will work, but it could take you quite some time to get into it. Don't forget to plug the USB cable in while holding the key combination. It's finicky, but it will eventually work.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] kp.nikhil:
thanks it worked.can i use odin and install only twrp?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] BLANEUR:
i installed root in my phone, can you show me how to install twrp
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Player04:
Magisk patched twrp, load it in odin AP slot, now hold the combo keys ( bixby, volume up, and power) until u see twrp loading screen, now wipe, format, flash multidisabler, go back to main menu, reboot, recovery. Hold the combo keys until u see the bootloader screen and let go
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Yes, see the OP. Just rename TWRP recovery.img, tar it and flash it with Odin.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Version 3.3.1-8_ianmacd released for G97[035]F.

Changelog

v3.3.1-8_ianmacd for G97[035]F [inc. ASH6 kernel (which also works with ASH1 firmware)] (2019-09-06)

Kernel rebased on Samsung's ASH6 source code.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] vegetaleb:
Thanks

Can't wait for roms to follow
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Magendanz:
[MENTION=7187684]ianmacd[/MENTION], I managed to fix MTP support on the 2019 Galaxy Tab A 10.1 for both TWRP and my custom ROM, and I suspect this will work for the Galaxy S10 too. The trick was in setting CONFIG_SEC_FACTORY in the kernel defconfig. (This does the same thing as commenting out CONFIG_USB_ANDROID_SAMSUNG_MTP in older Samsung kernels.)
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] hanspampel:
As ive read, mtp can be fixxed but then it doesnt work on system. Did you checked it if mtp works well on booted system?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Are you sure that MTP then still works when you boot Android with it? You mention that it works with your custom ROM, so I'm just asking to be absolutely sure.

I'll compile a kernel with that setting enabled and give it to an interested party to test.

Thanks very much for the tip. I'll let you know if it works for the S10 and Note 10.

UPDATE:

I've distributed a test kernel to some users. Now I'm waiting for them to report back.

2ND UPDATE:

Toggling that setting turns out to have a very different effect on the S10+ (Exynos) than on the Tab S5e: All 3 testers report the inability to boot their device to either TWRP or Android after installing that kernel.

Oh well. Back to the drawing board...
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Magendanz:
Well, even on the Tab A that setting (described in the Kconfig as "SAMSUNG Factory build option" to "Include some codes for Factory binary") affects other Samsung proprietary features, such as the Music Manager (MUIC), antenna jack switch (Arizona), NAD Balancer, and some sensor and security settings. For the SM-T510, this really hasn't struck me as a problem yet, but it could be for other devices.

Really, the only thing we care about is this switch in the USB gadget makefile (drivers/usb/gadget/function/Makefile):

ifeq ($(CONFIG_SEC_FACTORY),y)
usb_f_mtp-y := f_mtp.o
obj-$(CONFIG_USB_F_MTP) += usb_f_mtp.o
else
usb_f_mtp_samsung-y := f_mtp_samsung.o
obj-$(CONFIG_USB_F_MTP) += usb_f_mtp_samsung.o
endif

That's what fixed MTP for me, for both AOSP GSI system and TWRP. You can review the commit here.

UPDATE: Looks like [MENTION=6424744]tomatolei[/MENTION] has already blazed this trail for the S9 here.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
I've always heard that making this change in the kernel will fix MTP for TWRP, but break it for stock firmware, where it already works without this change. AOSP is different, I believe, where the change is also needed to get MTP to work in Android.