great findings. so correct me if I'm wrong, but our main issue is repartitioning and not bricking the phone by doing that.
But: there is an option to repartition in Odin. So my question would be - if we have a NANDROID backup of EFS etc., and we do **** up at repartitioning the phone, couldn't we restore it by reflashing the stock software in Odin with repartitioning enabled and then flashing EFS etc?
It's true. Odin way is more safe, but the PIT file needs to be carefully crafted. On some cases, even official binaries HARD BRICKED the phone when re-partition was checked in odin. So yeah, it is an issue. I remember when I did nand erase all on J7 prime 32 gb and it became 16 gb. Flashing again fixed the issue, but there are countless stories of people hard bricking phones just because re-partition was ticked. You can't do anything at that point. There is a possibility of a recovery from such situation, but has not been confirmed. I've read that people recovered their devices by flashing 200mb of nand at start of the memory (of working donor device, has to be the same model as bricked) to sdcard and booting to download mode from that and Re-partitioning internal storage again with odin. I know SOME snapdragon devices can be recovered from a hard brick, but the issue is if exynos device gets bricked it won't be detected via odin, and won't power on (of course odin does not detect hard bricked snapdragon also, but snapdragon has special software for that situation).
As far as I know, there is no software to flash hard bricked exynos from computer (as of now), and the only CHANCE someone has is with sdcard.
There was an option in odin long time ago called "T Flash" and what it does is it creates a debrick sdcard from official firmware without you using someone else's device image. T Flash flashes bootloader to sdcard, and when you try to power on the phone with that sdcard, you'll be able to recover it.
So yes, possible if carefully done, very dangeorus if mistake is made (costs a new motherboard, or you taking your device to be JTAG-ed (very hard to find files for that these days)).
As for porting treble itself, android oreo is a full rebase of OS, regardless if it is project treble compatible or not. So that means that all the drivers had to be re-worked from ground up. Currently with our oreo update, if you somehow re-pitted your device to have 500mb vendor, and moved all files from /system/vendor to /vendor partition , it would work, right?
WRONG.
Those files inside /system/vendor have no idea that they are not in /system folder, and will of course try to load things from the folder in which vendor is. But since it is in a different partition it's a little problem?
That's where hex editing comes to play.
You can edit EVERY SINGLE FILE from vendor to load things from /system , and THEN move them to new partition. What now? Let's flash GSI and see if it works right?
WRONG AGAIN!
You need to create a kernel that supports treble, and loads /vendor as a partition, or else it would just be invisible to the system, and we would be at the start again.
Ok. We've got the kernel, the partition, all edited files, can we NOW boot a GSI?
SURE
If it doesn't boot then check logs and see where you messed up. If it boots, don't expect it to be "bugless" ROM like the S9. But that's what treble is right?
Yes, but there is a catch...
When a treble device software goes trought cretification, it NEEDS to be able to boot Google's android GSI with bare functionality working.
So, if it didn't need to go trough test, why would they bother fixing the drivers?
They would not.
So that's why it's hard to port treble.
And if there are any devs out there, I doubt they will start porting treble with android 8.0 on Note8.
It's better to wait for 9.0 and see what it has in stored.
Congrats to dev who figures it out and actually dedicates time to do so.
P.S. I don't think ANY samsung device got ported treble just yet (at least not publicly). There was a screenshot of dev porting treble to A5 2017 and booting GSI on it. I think that dev will also try to port treble to Note8, but I can't speak for others. It's purely his choice.
Regardless...those are difficulties about bringing treble unofficially to our Note8.
Most likely will see it after android 9.0 update. Would make more sence. Samsung is not gonna port it btw. And also today we got leaked firmware for snapdragon Note8, android 9.0.
Not much longer guys be patient, that's literally all we can do.