yashsingh1/xdaforums huggingface dataset:
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xperia_c4_hater:
I decided to flash v 46 since it's stable. This was after only unlocking the bootloader. I kept everything else as is. I never set up a pin/password, and TWRP only asked me to swipe to unlock. I made a backup with every single option checked off. 1) Is that useful, by the way? Or should I have left something out to make it more useful for others to use that backup in the future?

I checked off the options to install a TWRP app as an official system app to get updates and rebooted the phone to the system. At that point, TWRP was no longer installed as far as I could tell. It was 1+'s own recovery that came up with I held the power and volume down buttons together.

Oh, by the way, I am using Debian and used my USB 3.0 port on my laptop, and it worked just fine for me. I only installed adb and fastboot using terminal and didn't install the whole 1.5 GB dev kit.

2) How do I install it so that it doesn't get deleted by 1+ when I boot into the system?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] c_86:
Please research. This has been talked about and said in many of the other threads in this section of the forum

You need to either flash supersu, magisk, or dm verity.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
As long as you give proper credits, it's ok, but if they start stealing, delete it.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
So the fastboot max file size error seems to be related to the actual platform it runs on and on the fastboot version. According to reports by reports, it seems to work just fine on windows, but fail on linux. Also if you have the wrong fastboot version it could fail as well.

I could blame OnePlus for this, as other devices work just fine. As I already said often enough, the bootloader is horrible.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Abhiroxx:
is it compulsory to format partition type to f2fs? as I am using default format ext4 and don't want to transfer data n all
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xperia_c4_hater:
Thanks! This is another confirmation that v 46 is working. I flashed SuperSU, and it stayed. I had backed up the first stock before root, and it's surprisingly still on my phone, so I have a backup just after flashing TWRP and a backup just after flashing SuperSU, both stock with no other changes (not even brightness, time, etc.).

I know there were some comments about brightness. With v 46, my phone's screen turned off (as it does when I'm using the system) after a few seconds. I just pushed the power button and swiped to unlock it, and TWRP continued working just fine.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Funk Wizard:
Not needed, ext4 works fine.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Abhiroxx:
Thanks man.

Actually I got op5,unlocked its bootloader and then setted up all apps and transferred files from old device. If I flash twrp and root my phone I won't lose data right?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Funk Wizard:
No data loss, we are just flashing on recovery partition, your data, apps and internal is safe :good:
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Pho3nX:
Thanks all for your work, especially [MENTION=6584600]xdvs23[/MENTION] !
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] joe2k01:
Shouldn't you add an ifdef there? Just to use that part of code only for op5
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
I don't know if teamwin/omni accepts such hackery just for one device.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] joe2k01:
Well, if it's the only way to get decryption working, they should accept it
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
That's the point, there has to be another way.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
To clarify what is wrong:

TWRP detects that encryption is supported but it does not actually detect the data partition as encrypted. Hence it does not install the keyring, set the properties and start qseecomd which is supposed to manage encryption.

To workaround this issue, I added the install_keyring keyword to init in system/core and called that from an init script. That will install the keyring. Then I set the properties needed for encryption to work more or less properly and then I start qseecomd which manages the encryption and makes decryption happen.

So the goal is to get twrp to find out about encryption automatically and do all the rest by itself.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] :
What about the OnePlus 3 , No more updates to Halogen OS?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Krasendo:
Hello I have a problem. I have bricked my phone. I can get into fastboot and TWRP, but data is encrypted in TWRP, becuase I had phone blocked with password.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Pho3nX:
Good H.S man, here it's the OP5 forum, the TWRP thread, not the OP3/T forum and above all not the HalogenOS thread :confused:

[MENTION=6584600]xdvs23[/MENTION] there a problem with the latest TWRP, look my screenshot. Strange with this TWRP (build 46 cheeseburger) i can't install offcial H²O rom because recovery don't know/recognize my device model ""

When i reflash the chinese TWRP, all is fine
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Gonna fix that up, thanks for reporting.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] minieod:
Reporting my experience. 46 worked great, I first tried 50 and it wouldn't challenge me for unlock pattern, but just the initial "swipe to allow modifications" and then acted as if I failed encryption password (showed storage as 0mb, nothing in folders, etc)

I flashed 46 over 50, swiped to allow mods, and had no issue. Flashed magisk and TWRP stayed :)
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
As [MENTION=5308099]Pho3nX[/MENTION] already said, this is not the thread for discussing that. There will be an update.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Good to know
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Pho3nX:
You are not bricked, don't worry lol, but you are in the wrong thread

Use the TWRP backup 4.5.1 from here or if you have make a Nandroid (i think not) use your backup.

You can also install official OP5 rom HydrogenOS 3.5 (but only chinese/english & you must debloat, install google play by yourself). OxygenOS 4.5.1 full rom is not available for the moment on the oneplus official site, so HydrogenOS is a good way for wait^^[/QUOTE]
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Vatumb:
Here is the guide to Root Oneplus 5

http://www.technobuzz.net/root-oneplus-5/
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Krasendo:
I tried to do that, but data is encrypted in twrp, and I cant boot into system. And when i try to boot, on display is wrote "Your device is corrupt"
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] rav101:
Have you tried formatting data after using my TWRP backup? If not, remember you will lose all data but it is better losing data and getting phone back rather than having to wait a currently unknown amount of time for a potential version of TWRP that can decrypt data properly.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] El Montezuma:
Install the cheeseburger + magix, it works smoothly [emoji41]

Many thanks!

Just one question: how can I deleted the "error" message at boot regarding unlocked bootloader?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] deserthouse:
Does this version support F2FS? 0.0
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] saccentekennedy:
Just mentioning not being able to mount USB OTG again... On TWRP Cheeseburger-46. Any ideas?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
You can't, that was on the 3/3T also, it's a requirement from Google now to let users know their device might have been tampered with.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] El Montezuma:
Sad...

Ok thanks.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Flying Fox:
I think I´ve read the solution somewhere but can´t find it anymore: I flashed cheesecake 46 and latest su-file, but I cannot restore my nandroids. I had the same issue with the chinese build, so it seems that I´m doing something wrong. What could it be? Thx for help
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] freakzapster:
i flashed 46 chesseburger but many stupid file names i cannot find super su zip how to flasgh super su ???
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Seems that it's ok to use this commit for TWRP, so that's what we are gonna do.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
New image for testing

Did some cleanup and adapted encryption for going official.

Please test it and report. Give logs if necessary (see first post).
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] freakzapster:
only twrp splash screen comming cannot enter

sprry cant give logs it says no device found
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
Stuck on splash screen with this build, I did use the previous version to flash it, log attached
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] rwallhtc:
Sounds defeatist. My m7, m8 and HTC 10 had this also but within weeks we had it gone. I think we just used modded hboot but s-off was needed I think.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] wowkazmir:
I believe this may be the thread you were referring too?

https://xdaforums.com/oneplus-one/development/mod-reset-unlock-tamper-bit-t2820912

Would be awesome if we can have it working on our new devices too! :)
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Flying Fox:
no, just cannot restore my backups. Am I the only one with this issue? I always end up in the set up assistent menu.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] rwallhtc:
Nah I've had the same. Seems you can't restore data (excl. Storage).

If I do restore that partition it never boots.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] jpossi:
Same here. After a data restore, the phone forces TWRP to do "recovery" by wiping cache AND data.

As long as i cancel TWRP-data mount, it always reboots to recovery to do so.

Only then it boots to system and starts the welcome wizard.

Edit: This was Backuped and restored with an older "twrp-3.1.1-0-oneplus5.img". Sorry, I'm currently unsure where i got it and wich version this was.

With cheeseburger-46 restoring the same backup results same as:
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] wowkazmir:
Forgive me, i wasn't actually referring to your issue. I was talking about hiding the boot loader reset Unlock & Tamper Bit.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] noncomjd:
If you don't know how to return back to a working state if something is broken, please think twice before flashing this.

I've been rooting my phones for a while, I usually jump right into root and installing recovery without regard to backing up the original phone/ROM. But I usually got the phone and rooted long after the phone was out and everything was established. The OP5 is the first phone I got on opening day and as suggested I think I should back it all up, the question is how?

What is the best way to backup the phone?

I looked around XDA and found this https://xdaforums.com/showthread.php?t=1964607 and this https://xdaforums.com/wiki/How_to_backup_Original_ROM

any suggestions?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] tristaoeast:
I'm new to the encryption scene on Android and i'm feeling a bit confused here.

The OnePlus 5 comes encrypted by default, right? And from what I understood the default encryption password used is "default_password".

What I don't understand is which is that pin that people are talking about: is it the one that we use for the lockscreen that is also used by OOS/TWRP to retrieve the encryption key? If not, where do I set it?

What if I'm using a pattern instead of a pin, then the password is still "default_password"?

Also, what if I want my device to stay encrypted, is any of this relevant to me at all?

Also, how does this impact the ability to backup and restore a Nandroid Backup of Stock ROM?

I'm asking this because on this thread "https://xdaforums.com/oneplus-5/how-to/oneplus-5-unlock-bootloader-flash-twrp-t3624877" the OP is advising to remove any Lockscreen before doing a Backup with TWRP in order to be able to restore the data partition.

PS. Sorry if this has been answered somewhere else, but I've been reading the posts of this thread and all this talk about the PIN got me me really confused.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Ok, new image coming up.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Yes it comes encrypted by default and the pin/password/gesture is the same as on your lockscreen.

I'm not sure why you cant restore the data partition but yeah that is the case.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
New working image

Cleaned up and encryption is fixed. Have fun!

Also H2OS install is fixed.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
Not sure if it changes anything (regarding sources) but the 4.5.2 update has been released
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Not for TWRP atm. OnePlus' encryption blobs are not even working so I am using the ones from Mi 6 which work fine.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] jpossi:
Thanks for the fix update, but it doesn't seem to change anything for me. After restoring the data-Partition the system doesn't start, as it always redirects to recovery.

Snip from last_log:

Bootloader arg "--wipe_data" ignored because TWRP was compiled with TW_IGNORE_MISC_WIPE_DATA
Got arguments from boot message
Startup Commands: '--reason=set_policy_failed:/data/local'set_policy_failed:/data/local

I'm currently on 4.5.2 System. Now trying to do my full recovery (4.5.0, the backup of the data partition).

Is there anything I can support you? e.g. Discord?

Edit: Full Restore of 4.5.0 data,system,boot also goes to the wipe afterwards. If you can't help my /data is lost :(
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Thank you, I'm fixing that.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
Same chipset?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Yep. Almost same specs. SD835, 6 GB RAM, dual camera, ...
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
New image

Removed the TW_IGNORE_MISC_WIPE_DATA flag to fix problem with data partition.

Please test this. Make sure you have backups of important data, as this is untested.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
Just uploaded the full 4.5.2 OTA for anyone who gets into trouble:

https://www.androidfilehost.com/?fid=889764386195911431
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Thanks I needed this

(I am limited to 8 thanks per day otherwise would have used the thanks button)
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
Worked fine for me, prompted for encryption pin and was able to browse files once decrypted.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Yeah I guess people restoring data backups and flashing stock roms should try this.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] jpossi:
Well, now it does what I feared: After restoring my data-partition the system directs to recovery --wip-data and so the data-partition gets wiped.

=> I can't restore a data-backup.

Looks like I have to live with that and start over again :(
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Would it be possible for you to make a data backup and send it to me?

Maybe I can then find out what exactly went wrong and fix that.

Also send me a screenshot of how it looks like when you go into /data in TWRP file manager.

I hope you have backed up important data as I said before.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] TheColin21:
Has anyone been able to successfully flash TWRP Materialised 3.1.1-X?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Which TWRP do you mean
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Donald Nice:
I uploaded 4.5.2 - OnePlus5Oxygen_23_OTA_006_all_1706241458_e550.zip for you guys if need it. Thx for all your work here.

https://drive.google.com/file/d/0B9akRuOVMY4GdUNUa0FINEdHUTA/view?usp=sharing
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] TheColin21:
i mean this theme https://xdaforums.com/android/themes/theme-twrp-materialised-dark-light-play-t2915584

Whenever I try to flash it it says, that the TWRP Version and the version of the theme would not be identical, althouth TWRP is version 3.1.1 and the Theme is made for 3.1.1
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Already have it :) https://www.androidfilehost.com/?fid=889764386195911431
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Can you tell me which exact zip you used, what you did and the exact error?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] jpossi:
I sure have the TitaniumBackup from Friday when switching to OP5. But I would like to restore my /data-Backup from today.

As I can't send you that one, I've done a Test-Backup (https://www.dropbox.com/s/jaw76nw92w3thts/test-backup-restore.rar?dl=0).

What I've done:

* recovery: cheeseburger-57, system: OxygenOS 4.5.0 with SuperSU

* Started after Factory-Reset and done the Welcome Wizard. Left a Note in the Launcher

* Restarted to recovery

* Backuped Data

* Wiped Data

* Reboot to System -> Welcome Wizard again as expected

* Restarted to recovery

* Restored the Backup

* Screenshots of /data after Restore: https://www.dropbox.com/s/2iwq2v8pm5z45oj/Screenshot_2017-06-25-16-20-33.png?dl=0

* Reboot to System

* System Image redirects to recovery --wipe-data as before

* Twrp wipes data and restarts automaticly

* System boots with wiped data -> Welcome Wizard again :(

Conclusion: /data-Backups are currently useless, aren't they?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] astracd:
Is this full version, or flashable, as I already root my phone. Don't want to re-root again.

Thanks
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Yes, it's the full flashable OOS 4.5.2
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] jai krishna:
https://www.youtube.com/watch?v=ojutTvpLgeI&t=27s
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] TheColin21:
https://www.androidfilehost.com/?fid=889764386195907620
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] maddler:
When I try to flash with TWRP (46) it says

E3004: This package is for "Oneplus 5" devices this is a "".

Am I missing anything?

---------- Post added at 15:57 ---------- Previous post was at 15:57 ----------

When I try to flash with TWRP (46) it says

E3004: This package is for "Oneplus 5" devices this is a "".

Am I missing anything?

Does anyone has a origilan recovery dump by any chance?

Forgot to dump mine before flashing TWRP!

Thanks!
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Use version 56 or newer.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Can you tell me what exactly you did and the exact error ?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] TheColin21:
I tried to flash the zip on three different versions of TWRP, up to version 56. It says the same thing every time: "Custom theme version does not match TWRP version. Using stock theme."
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] hibby50:
Having a couple issues flashing roms. The experience ROM would not boot, it hung at the animation (i feel like it's probably a rom issue though not recovery, but the a guy on telegram got it to boot flashing with the chinese TWRP). Then when I flashed the new ota from your AFH link, on reboot TWRP warned no OS installed. I'm waiting to see if it boots, I can get the logs if you think it'll help,

EDIT: stock firmware booted despite the no os installed warning
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Hmm that's very strange... have a log?
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] TheColin21:
after XDA refused to upload the log like three times.. here it is...

thats my complete recovery log, the important part begins at line 736
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
So the theme is actually outdated.

Open the ui.xml file in the zip and replace

<themeversion>2</themeversion>

with

<themeversion>3</themeversion>

and try again.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] TheColin21:
I read the log file (yes, I know, should have done this before) and came to the same idea. Trying it now.

EDIT: it works, thanks, especially for the log idea
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Great!
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] maddler:
Cheers,

will give it a try.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Seen already ;)
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
Thanks for that info, currently using this theme after your fix:

Original is here:

https://www.androidfilehost.com/?fid=817550096634777638

I've uploaded the edited version here:

https://www.androidfilehost.com/?fid=817550096634781609

Just flash the zip file with TWRP and it'll automatically apply the theme and restart back into TWRP
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Looks good to me!
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xgerryx:
Is anyone able to use OTG drive in recovery? Trying to figure out if it's the TWRP version or the SD card, or, something else. It's not being recognized on version 50, 56, 57.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] saccentekennedy:
+1 for me too! Anyone got any ideas?!

---------- Post added at 06:31 PM ---------- Previous post was at 06:29 PM ----------

+1 for me too! Has anyone got any ideas? This is driving me crazy
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] djsubterrain:
Have you tried it in OOS? There's a setting in the Settings>Advanced menu to enable OTG Storage, probably nothing to do with TWRP but it'll let you know if it's being recognised properly. I know OnePlus sells their own OTG cable so it might be required?

https://oneplus.net/uk/oneplus-type-c-otg-cable
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
Hmm it worked before iirc. Lemme change something on quick.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xgerryx:
It's recognized fine while the phone is booted up though, and fine by my pc as well. The variable is the recovery. I've tried two different cards now.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] Krasendo:
How long we need to wait for twrp? I cant live without root xD
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] saccentekennedy:
Getting TWRP to stick

So, if the rebuilding of stock recovery from boot is standard behavior, how do I get TWRP to stick? I'll have to try again when I get home and want to do it right! Thanks everyone.
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
try deleting /system/recovery-from-boot.p (make a backup of it first just in case)
[OnePlus 5 ROMs, Kernels, Recoveries, & Other Devel] xdvs23:
In case someone wants it now: https://drive.google.com/open?id=0B0RUo8rOkvfNUkIyUF9TTXE0Tmc

Source is up here: https://github.com/xdevs23/android_device_oneplus_oneplus5-twrp

Kernel here: https://github.com/halogenOS/android_kernel_oneplus_msm8998

TWRP sources themselves come from omni

Not breaking the open source deal ;)