yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Versions 3.3.1-6_ianmacd for the G97[035][FN] and 3.3.1-5_ianmacd for the G977B.

Changelog

v3.3.1-6_ianmacd for G97[035]F [inc. ASG8 kernel (which also works with ASH1 firmware)] and v3.3.1-5_ianmacd for G977B [inc. ASF5 kernel] (2019-08-18)

Use $ANDROID_ROOT to set the mount point for the system block device to /system_root on these system-as-root devices.

Solved infinite recursion of symbolic links when resolving /system paths.

The use of $ANDROID_ROOT to set the mount point for the system block device renders this and future TWRP releases incompatible with previous versions. Any existing zip file installer code that attempts to mount /system or expects the system block device to be mounted on /system will now fail under this new approach and require modification.

A common example of this is the widely used multi-disabler, which is flashed on newly rooted and freshly upgraded systems to remove file encryption and other problematic device protection. A new, backwards-compatible version (v1.3) of the multi-disabler has been released, which can be used with this new version of TWRP.

The decision to make this change has been carefully weighed and made only after consultation with core TWRP team members. While I am extremely reluctant to introduce any change that breaks existing code, there is only a relatively small amount of such code currently in the field, and it is very easily fixed. Instead of mounting /system or /system_root, installer scripts should now mount $ANDROID_ROOT. This will ensure that the correct mount point is used, regardless of whether the device is a system-as-root device or not.

Future versions of TWRP for other devices are expected to follow the practice adopted here.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Tech 4 9:
Apologies if this is off topic but I need some clarification. My goal is to end up on LOS. There seems to be multiple instructions and four twrps involved and I'm wondering if ianmacd twrp(1) is specific for staying on stock fw...? I see twrp instructions saying to download reg official twrp(2) to patch in magisk to yield the Magiskpatched twrp(3) which is what gets installed. Or is the ianmacd twrp ALREADY the Magisk patched?

If my goal is to flash LOS, do I follow these instructions to get ianmacd twrp installed in order to use it to flash the patched LOStwrp(4)?

I don't know which directions to follow or which twrps to use.

Official twrp

LOS twrp

Magisk patched twrp

Ianmacd twrp

Follow this threads instructions in order to have a twrp installed to then proceed with the twrp.me/LOS instructions?

Skip these instructions and follow the twrp.me/LOS instructions?

Skip the LOS instructions and install LOS from this twrp? (doesn't make sense as it specifies its own twrp)

The twrp.me instructions are almost identical to these instructions but then I don't know where the ianmacd twrp comes into it. It seems somehow 'special' or 'more correct' than the others..? But if I'm going to end up on LOS twrp anyway...

Fairly confused.

Thanks all.

Thnx ianmacd & Johnwu
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] yomikante:
hello [MENTION=7187684]ianmacd[/MENTION],

first thanx for your hard work and that yo u share it wth us.

when i make a backup, the system-partition will not be included because twrp can not find system.

how to solve this?

regards

yomi
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Tech 4 9:
So I just reread the twrp.me instructions...all the way to the bottom this time..having skipped over the 'changelog' part in the past. I was like, "!huh..that name looks familiar".

So..

Ianmacd is twrp is ianmacd.

Honestly, I really want to be, "Ohh. I get it now." but I alas..my question remains. Sorry for being dense and fully understand if my posts are cleaned but..

Which twrp and process do I use for LOS?

Am I reading identical things but interpreting them differently? (I can't be..there's two different twrps)(differently named anyway)

I guess whats confusing me now is, if ianmacd is twrp, and the LOS thread links us to a twrp that doesn't include the ianmacd in the title, but this thread encourages the ianmacd twrp then I'm back to...

Which twrp/process do I use for LOS?

Sorry again and thanks.

Thnx ianmacd & Johnwu
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] thevmax:
I had the same problem and my conclusion is the same as yours! Was on ASG8 WITH SM-G970F.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] root plus:
Great!!

The recovery is available for G977N device?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
I don't blame you for being confused. Things are necessarily more complex on the S10 range where root and TWRP are concerned; and a certain amount of unnecessary complexity has been added.

The TWRP from this thread is the official one for the S10 range of devices. The builds tagged _ianmacd are my unofficial builds of that TWRP. They contain additional patches that have not yet made, and may never make it into the official TWRP tree. This TWRP is intended for use with all G970F, G973F and G975F devices and neither depends on nor favours stock firmware.

The issuer of Lineage for the S10 devices took it upon himself to release a second, incompatible version of TWRP a few days ago. That version took a different approach to presenting the S10's file-system to the user. He made this change so that two existing Lineage-related zips that had not been tailored to the S10 TWRP's view of the file-system would work without modification. Changing just those two zips to match the existing TWRP would have had a lesser impact, resulted in simpler Lineage installation instructions, and avoided two different, incompatible versions of TWRP from circulating, but that's not the path that was chosen.

So, this unfortunately meant that this new version couldn't be used to flash existing zips made for the S10, such as the widely used multi-disabler.

Having two incompatible strains of TWRP for the S10 in circulation seemed a highly undesirable and confusing situation to me, but at the same time, I was reluctant to adopt the change and break existing flashable zips for the S10. So, I sought the guidance of the core TWRP team. They told me that there's no agreed standard for how TWRP mounts the system block device on system-as-root devices, such as the S10 range.

After much consideration, I decided to adopt the change anyway, so yesterday's 6_ianmacd release brings the official TWRP's presentation of the system-as-root file-system in line with the one preferred by the S10 Lineage maintainer. It's possible that the Lineage version contains further changes I know nothing about, however, so caveat emptor.

Patching the images with Magisk is a separate issue. As explained in the OP, my TWRP images are always offered unpatched in accordance with the wishes of John Wu. Users are free to patch them with any version of Magisk they please.

Note that this new approach to presenting the file-system of system-as-root devices presents problems of its own. In particular, mount /system is an idiom that many installer scripts rely on. In this new TWRP, however, there is no /system file-system. /system is merely a symlink to $ANDROID_ROOT/system, which on these devices translates to /system_root/system. Authors and maintainers of flashable zip files for the S10 and other such system-as-root devices must take this into account and make the necessary modifications to their installers.

I hope this clarifies things somewhat.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Can you please make a fresh back-up of System on the new 6_ianmacd release and try to restore that? Let me know if the problem persists. There's a chance that this bug will have been fixed as a side-effect of the change made to how TWRP now mounts the system block device.

If the bug persists, you can work around it for now by making an image back-up of System, rather than a file-based back-up, and restoring that. That will ensure that the post-restoration file-system will be bit-for-bit the same as the original.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Tech 4 9:
Thank you for the reply.

I guess this means...to ensure proper LOS operation..I should follow that process with those files? Since they're possibly customized to all work together?

Thnx ianmacd & Johnwu
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Standard TWRP should work the same way now, but yes, if you want to be as sure as you can be, you should adhere to the letter of the Lineage instructions.

If someone could confirm that the standard TWRP now also works to install Lineage, though, that would be good knowledge to have.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Nextasy:
message deteled
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] tiho5:
Thank you.

I will testing report here. Just have to find some free time first.

[MENTION=6019013]thevmax[/MENTION]

If possible would you also report here if you test this. It would be great to be sure.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] TheUndertaker21:
twrp 6 doesn't work for me

flashing a new rom it just said failed to mount system or something and the rom doesn't flash after

because when i click recovery and then it says no os installed
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] vegetaleb:
I think you need the rom to be compatible with the new twrp
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] TheUndertaker21:
i flashed V5 lol

V6 doesnt have anything special
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] tiho5:
I haven't yet had the time to flash the latest TWRP and can't explore the paths when in it.

Please, allow me to ask.

Let's say I want to flash some media files. Are these examples:

run_program("/sbin/toybox", "mount", "/system");

package_extract_dir("system", "/system");

set_perm(0, 0, 0755, "/system/system/media/audio");

run_program("/sbin/toybox", "umount", "/system");

To be changed like so?:

run_program("/sbin/toybox", "mount", "$ANDROID_ROOT");

package_extract_dir("system", "$ANDROID_ROOT");

set_perm(0, 0, 0755, "$ANDROID_ROOT/system/media/audio");

run_program("/sbin/toybox", "umount", "$ANDROID_ROOT");
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Almost.

This:

package_extract_dir("system", "$ANDROID_ROOT");

should change to this:

package_extract_dir("system", "$ANDROID_ROOT/system");

The rest is correct.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Versions 3.3.1-7_ianmacd for G97[035]F and 3.3.1-6_ianmacd for G977B

v3.3.1-6_ianmacd contained a regression, in that file-based back-up of System was no longer an option.

While there are currently reports circulating that restoring a file-based System back-up results in an unbootable device, the omission of this type of back-up was a regression and is corrected by this release.

Users are recommended to make image-based System back-ups until further notice.

v3.3.1-7_ianmacd for G97[035]F [inc. ASG8 kernel (which also works with ASH1 firmware)] and v3.3.1-6_ianmacd for G977B [inc. ASF5 kernel] (2019-08-20)

File-based System back-up option was missing in v3.3.1-6_ianmacd.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Carotix:
hi ian,

i tried many different tests to flash something with new system_root but i can't get it ..

can you make a complete zip to flash an app in priv-app (for example) ?

thanks
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
This is an Edify script, correct? Can Edify not read environment variables from its environment?

If not, you'll have to find another way to read the variable, or resort to hard-coding the new /system_root path in your scripts.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
if you initialize the variable $ANDROID_ROOT in this way ini_set( "system1",$ANDROID_ROOT) at the beginning of the script, replace in the script, anywhere, "system/system" with "system1/system", It might work ?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Saros2019:
Hi i have a G975F can i install TWRP without tripping the knox

i want to install a custom rom
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
No.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Player04:
Absolutely NO. Knox is like fort knox.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] thevmax:
Testing TWRP 3.3.1.7 using G970FXXS3ASH1 - Restore from backup

I will be testing tonight...after I get all my ducks in a row.

Back as soon as I know...

UPDATE: 08/20/2019 11:09PM CDT FULL RESTORE FROM YESTERDAY USING

G970FXXU3ASG8 OLDER TWRP BACKUP FILE WAS SUCCESSFUL!

08/20/2019 9:20PM CDT INITIAL RESULTS OF RESTORE FROM TWRP ARE POSITIVE!

I have restored from TWRP 3.3.1.7 and yes I have root. To be fair, I only re-rooted, re twrped my last setup with required disabler/wiping/format and rebooted. then went into twrp and backed up current setup. Finally, restored backup without wiping. BACKUP CONSISTED OF ALL AVAILABLE FILES IN TWRP. This amounted to a whopping 15.7GB !

08/20/2019 FILES USED TO CREATE ROOTED S10E:

-------------------------------------------------------------------------------------------------------

AP_G970FXXS3ASH1_CL16487948_QB25171304_REV01_user_low_ship_meta_OS9.tar.md5/SIZE]

-------------------------------------------------------------------------------------------------------

HOME_CSC_OMC_OXM_G970FOXM3ASG8_CL16487948_QB2498470_REV01_user_llow_ship_meta.tar.md5

-------------------------------------------------------------------------------------------------------

ODIN3-v3.1.3.3

multidisabler-g97x-1.2.zip

Magisk Manager 7.3.2 APK

Ian's twrp-beyond0lte-3.3.1.7_ ianmacd.img

Magisk 19.4

-------------------------------------------------------------------------------------------------------
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] robbo1947:
Good luck:rolleyes:
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] SumDum YunGuy:
Confirmed. I'm back on OneUI again tho. No magisk and the most important item of all, the camera, is severely lacking... Imho. Outside of that, it appears to be competent, you CAN root, so all is not lost, but it's not my cup of tea at the moment
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Did you restore System as an image- or file-based back-up?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Thanks for confirming. Yes, it's not something I would ever want to install either, but it's good to know that no special version of TWRP is required by those who do.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Carotix:
the problem is that if you don't find the right script to install the whole system or just some part of it, no roms or mods will come out anymore
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] thevmax:
Image based created through TWRP
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] sonyxperiazp:
Is there any TWRP available for G977n?
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
Well, you're right about that, but there certainly are alternatives.

I write all of my installers in shell, which means 90% code reuse from zip to zip and just a small amount of original code each time. It's so much more flexible than Edify, which is really only good for OTA updates and other such very simple scripts.

I don't know how people can still use Edify. It's just so limited in what it can do, and debugging Edify scripts is a huge pain in the arse.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] tiho5:
OK, I can report. I tested a number of times:

3.3.1-5: cannot restore system file based (the phone can't boot afterwards). It can however restore system as image backups without problems.

3.3.1-6: I didn't test this version.

3.3.1-7: can restore both file based system and system image backups.

As for the scripts for flashable zips:

I didn't manage to make this work with $ANDROID_ROOT in the paths. I therefore resorted to use /system_root paths, which works alright. I wish that someone posts a sample script that flashes something in system...
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
tiho5 thanks to your information I succeeded to run the flashable zip file.

set_progress(0.01);
ui_print(" ");
ui_print("@G97X MODS by Carotix");
ui_print(" ");
set_progress(0.02);

############ Preparing Partitions ############

ui_print(" ");
ui_print("@Preparing Partitions");
ui_print(" ");
ui_print("Unmount partitions if mounted");
ifelse(is_mounted("/system_root/system"), unmount("/system_root/system"));
ifelse(is_mounted("/system_root/product"), unmount("/system_root/product"));
ifelse(is_mounted("/system_root/vendor"), unmount("/system_root/vendor"));

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

set_progress(0.50);

delete_recursive("/system_root/system/app/XXXXX");
delete_recursive("/system_root/system/priv-app/1prova");
delete_recursive("/system_root/system/priv-app/xxxxx");

assert(package_extract_dir("system", "/system_root/system"));
assert(package_extract_dir("vendor", "/system_root/vendor"));
assert(package_extract_dir("product", "/system_root/product"));

ui_print("@Done");
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] ianmacd:
I'm happy that -7 works for file-based back-ups, too, but still unsure why -5 did not. Yes, $ANDROID_ROOT was defined differently there, but that should make no difference to TWRP itself.

Just for clarity's sake, which version of TWRP was used to create the back-up? The same version used to test the restore, or an earlier one?

My own libsecure_storage companion zip does it with a line like this:

unzip -od $ANDROID_ROOT $ZIPFILE system/lib/libsecure_storage.so system/lib64/libsecure_storage.so

This will copy the 2 .so files to the correct location, whether the System block device is mounted under /system or /system_root.

Basically, all paths that would normally point to /system just need to be prefixed with $ANDROID_ROOT. For example:

chmod 0 $ANDROID_ROOT/system/bin/vaultkeeperd

This is a line of code from the updated multi-disabler.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] tiho5:
Thank you too, however the script you've posted uses the /system_root path. When I made my script this way it also worked. My problem was that I was unable to make it work if I use $ANDROID_ROOT.

Every TWRP version was tested to first produce a backup and then restore this (its own) backup. I see what you mean, but I can't say if the 3.3.1-5 is having a problem of backing up or the restore part.

Right here I want to thank you for always being patient to help, watching your threads and that you take care to reply and explain. We are lucky to have you.

I didn't think to explore the libsecure_storage zip. I did take a look at the multidisabler zip. When I flashed the 3.3.1-7 I explored the paths when in TWRP and quickly did this (to flash some media files for example):

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

package_extract_dir("system_root", "/system_root");

set_perm(0, 0, 0755, "/system_root/system/media/audio");

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

(the root folder in this zip was of coarse /system_root/system/media/audio)

And it worked.

Then to test the $ANDROID_ROOT, I just only replaced /system_root with $ANDROID_ROOT like this:

run_program("/sbin/mount", "/$ANDROID_ROOT");

package_extract_dir("system_root", "/$ANDROID_ROOT");

set_perm(0, 0, 0755, "/$ANDROID_ROOT/system/media/audio");

run_program("/sbin/umount", "/$ANDROID_ROOT");

So that, as you said, all paths that would normally point to /system are prefixed with $ANDROID_ROOT

But it didn't work...

My knowledge is nowhere near yours and I can't figure out why.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
$Android_root represents the contents of the variable while in the script, in the quotation marks, the value cannot be displayed

=======================================

edit:

however I think the syntax should be:

run_program("/sbin/mount", "$ANDROID_ROOT");

package_extract_dir("system_root", "$ANDROID_ROOT");

set_perm(0, 0, 0755, "$ANDROID_ROOT/system/media/audio");

run_program("/sbin/umount", "$ANDROID_ROOT");
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] tiho5:
I was also doubting the syntax

I'll try and report.

Thanks

---------- Post added at 18:36 ---------- Previous post was at 17:57 ----------

I tested this (although I think I already have tried it before myself) and it didn't work unfortunately.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] sorena2:
I used twrp-beyond2lte-3.3.1-7_ianmacd.img

everything seems fine but camera doesn't work and fails every time.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] usitaly:
I repeat... for me:

$Android_root represents the contents of the variable while in the script, in the quotation marks, the value cannot be displayed

thanks for your verification
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Waleedaligomaa:
finally managed to get twrp after alot of tries .. thanks alot all who helped ... now lets get to actions how can i install edxposed .. i tried to install it but says fail on twrp ... any specific instructions? and shall i go for edxposed or normal one
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] PiCkLeS:
Fail on twrp? It's .module zip you install in Magisk Manager, don't try to flash it in twrp.

Riru core and edxposed are both Magisk modules.

/P
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Waleedaligomaa:
well i restarted phone then moved them to internal (was trying to flash them from otg) ... rebooted to twrp and flashed them successfully ... got all working now ... any recommended xposed modules ?

thanks alot for ur help man
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] derekclee:
I recommend gravitybox and the firefields modules... There is also a thread speccifically listing modules known to be working on pie.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] N1ldo:
waiting for snapdragon
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] dynospectrum:
See you in a year.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Geekser:
Sorry for the off topic but wondered if you would mind shareing the link to the EDXposed you are using on the S10+ ? thanks for the help....
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Potatothief:
I managed to install TWRP and boot to it as well as verify that magisk was working, the problem I had was that Fingerprints as well as the Camera (front and back) did not work.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] chronzz:
twrp is out https://twrp.me/samsung/samsunggalaxys10plus.html
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] hanspampel:
Is the same as this one cause Ian is the new s10 twrp maintainer.;)
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Geekser:
Right, but it's nice to know that it is finally "Official" - thanks to IAN and the original TWRP Dev for the S10+ for all their work....
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] rafalubo:
Hello good morning then we will touch update to this new version that would correct the errors that have been talking.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Jmakhdoom:
deleted.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] Ralph.Lemarechal:
So.

Had magisk working fine. Decided to setup TWRP using the 'official' app. Worked fine.

I can let it boot by itself and it goes into system without magisk. But if I try power + vol up + bixby I always get back into TWRP, even if I release super quickly after the logo/warning screen. Basically I can't boot rooted anymore.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] rafalubo:
Hello First you have to patch the file with the Magisk application.
[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] mercifool:
I have 3.3.0.0. If i update do i need to wipe data? N start fresh.