yashsingh1/xdaforums huggingface dataset:
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] :
This is not true. If you give root-access to an app, this app can write the recovery partition. On a terminal type:

su
dd if=/path/to/recovery.img of=/dev/block/bootdevice/by-name/recovery

I use and have used this quite often.

Try it, if you don't belive. This can be done by any app with root permissions.

Sidenode: don't try this from a running rom for system, since the device youmare dding on is in use. Butnyou can flash system.img with a similar dd command from twrp's terminal.

---------- Post added at 19:45 ---------- Previous post was at 19:38 ----------

The more data on /data the longer it takes. Allready discussed a few pages back. If you fill your encypted f2fs partition with billions (aka really, really many) of one byte files, it will take for hours... the getattr call in f2fs is - euphemistic phrase follows ;) - not optimized for that. It's not about de-/encryption, it's about some - again: euphemistic - strange system call implementation in f2fs itself.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] djsubterrain:
It's due to F2FS, it's specifically mentioned in the first post. Well done for that reading! :D
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
I confess I had forgotten you can flash recovery out of the running system. Sure I believe you :)
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] :
Really? No idea why?

Hmm, for me it's this: the question for beta1 was so often asked, that #550 burned in my brain, but the permalink url is too long and difficult to memorize and and retype. So it's much more comfortable for me, to type "#550" then to open new tab, go to thread, go to page 50, right click on the postings number... If someone is to lazy to read and use search, why should I do the work, if simply typing "#550" does the same? So the short answer is: because I don't want to waste my time. Or in the words of Kernighan & Ritchie: shorter is better.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] Uumas:
And also from TWRP itself with install image option.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] woundman:
I disagree with this comment. I've definitely noticed real world differences between EXT4 and F2FS, not to mention F2FS doesn't need to be trimmed like EXT4. There is a reason benchmarks show a difference and read times actually aren't faster on EXT4 than F2FS. If anything, they're about the same. Honestly think this comment should be removed, since it's wrong... Biggest downside to F2FS is TWRP booting slowly, which will probably be fixed in the future.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] 954wrecker:
I disagree with you disagreeing. I've tested both for a few days and saw zero benefits with f2fs. Ext4 all the way with this phone, faster boot and more available storage. Don't care about people bringing benchmarks up. I trust my experience on both systems, not some numbers.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] knpk13:
Concerns with f2fs include stability (given it's not as old and well tested as ext4) and data loss. Those trade-offs (and uncertainty since it's not as well tested as ext4) for increased write speeds or other benefits (which some may not consider important) may not be worth it for some people. I don't think anyone doubts it's speed. You should probably create a thread in the general section and take this discussion there.

I have personally experienced data loss and filesystem problems on f2fs with early versions of Franco kernel for example. And the WhatsApp derp issue on bluspark was also because of f2fs. arter97 just published some stuff on f2fs in the SuperSU beta thread, so there's that too. Here: https://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133/post70492947

Its basically boils down to the fact that F2FS is young. It will progress and may eventually become the standard once everything is figured out. People who would prefer absolute minimum risk may want to stick with ext4 (not saying f2fs is dangerous, it's just younger and less tested), hence the backlash from some people. Always happens with new technologies, like USB type C.

That said, I'm currently on F2FS with Boeffla kernel. And the interesting part is Boeffla hates f2fs :D
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
It might be slightly lessened if we reverse the ignored files processing.

Currently we are scanning the data partition (every file) with lstat(), lstat() is instant on ext4 (< 1ms) but takes A WHOLE 50+ MILLISECONDS on f2fs and ignoring files that match the ignore list.

Our alternative option is to use df for the used size of all the files on the partition (instant) then scan only the ignored file list and subtract its size from the used size returned by df. (this is what we are looking into doing, not sure how feasible it will be)

The best option would be for a solution in the f2fs filesystem driver of the kernel, not in TWRP, to fix that insanely lengthy lstat() call.

I don't think that will come anytime soon.

By the way, the OS boots faster with ext4 as well, not just TWRP.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] lyall29:
I was finally able to get my phone running again using the unbrick tool (I had encryption problems). I then flashed twrp and RessurectionRemix. Now I have another problem, every time I reboot into twrp, and then reboot into the system, my phone has been factory reset, even the internal storage is wiped. This has happened 2 times today. What could be wrong?

Edit...I'm just going to flash back to stock and quit messing with this phone. For some reason this is the only phone I've ever had, that has given me so many problems with flashing via twrp. I like the stock rom anyhow.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] luusid:
So from what I have gathered, after doing an ota update to oos 4 all I need to do is use twrp beta 1 (from post 550), and then follow the original method to root and there won't be any problems?

Also, is encryption on by default in the phone?

Thanks
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] MrMeeseeks:
Yes and yes
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] saberzaid:
Why the recovery ask me for the password? Any solution for this ? I flash the recovery and my boot loader is unlocked also but when I boot to the recovery it ask for password
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] bxmoney181:
That implies you're encrypted. Enter your encryption password to allow decryption so twrp can access those encrypted partitions.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] luusid:
Just successfully installed the twrp beta from post 550 and rooted on Nougat. Worked like a charm with the only hiccup being every time I turn on the phone it shows a screen with "start" in the top right or use volume buttons to access other options. Should it show this every time? Thanks
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] MrMeeseeks:
Yeah, that's because the bootloader is unlocked. Everyone gets it and, no, there is no way to remove it. At least a public way to remove it. But all you have to do is press the power button so no big deal.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] luusid:
Thanks, it's not a big deal, initially I was just worried it there was a problem during root that made it always boot to this screen.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] soder:
I installed (updated from 4.0) OOS 4.0.1 and reflashed TWRP beta1. Then flashed 5.0 dm-verity disable zip followed by Magisk (and included ohh superuser). I got a unencrypted phone (since the first install when I wiped /data toget pass the password problem).

I see there is a 5.1 of the dm-verity zip out now. Should I try to flash that file for some reason? What are the pros?

Thanks.

/Söder
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] saberzaid:
I don't HV any encryption password for the recovery , how to reset or what to do to make the recovery not ask for password again
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] cultofluna:
Are you on 4.0 or 4.0.1?...Which twrp did you flashed..?

3.0.3.1 beta?...Give some more info....
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] uaiclout:
You have convinced me :cowboy:

How can I change file system without loosing data?

Is it possible to make a nandroid backup via TWRP, format data with ext4 and then restore backup?

Does this process wipe whole internal storage?

Is whole internal storage formated with f2fs or only data partition?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
Only data partition is f2fs. But you have to format it to change to ext4. That means you loose everything.

You could do a nandroid backup, then copy full contents of "sdcard" - including nandroid - to your computer, format to ext4, copy back from your computer and finally restore nandroid. That should get everything back running as it was before.

I still have to do this myself, but too lazy and no real issues with f2fs
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] lyall29:
I decided to give twrp one more try. I have a question...I was completely stock on the open beta OOS Nougat, locked bootloader and everything. I unlocked the bootloader and flashed twrp 3.0.3-1 beta 1. I then rebooted into twrp and flashed ResurrectionRemix 7.1. I then rebooted and was prompted to enter my password to boot into android, I never had a password to boot into android so I formatted userdata via fastboot and rebooted into twrp. I wanted to make sure I had the rom and gapps on my sdcard so I pressed the "keep read only" button in twrp. I was then able to load my rom onto my sdcard and flash the rom and gapps successfully without swiping right to allow modifications. I thought that in order to flash roms or anything, I had to swipe right to enable modifications in twrp. Whats going on here?

Edit...Its happening again, I started my phone up with ResurrectionRemix and entered all my info. Got to the home screen and decided to boot back into twrp to see if my phone would factory reset by itself again. Well, it did. The twrp splash screen showed up for a minute and then the screen went black with the white led. I held the power button for 5-10 seconds to reboot. My phone was completely wiped. What in the world can I do?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] uaiclout:
I'm running OOS 4.0.1 and I haven't use any custom ROM on this device.

I don't know if it does solve the problem but you may try the official version (not the beta)
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] LMcR92:
OT but there is more to f2fs than speed.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] 954wrecker:
Like increased storage usage?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] lyall29:
Thanks for the reply, but I tried that also.

Edit...I'm going to try un encrypting in twrp and see what that does.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
Seeking more input on beta5 which is supposed to use your system's encryption libraries and daemon to decrypt on all versions of OxygenOS.

Download: https://build.nethunter.com/test-builds/twrp/oneplus/twrp-3.0.3-1-beta5-oneplus3t.img

If you're stuck on the decryption screen, please provide the following things:

adb pull /tmp/recovery.log

adb exec-out dmesg > dmesg.log

(they will appear in your current directory)

adb shell

qseecomd

(it should give an error message here, I need that error message)

and finally, what is the exact version of OxygenOS or ROM you are running?

IF IT WORKS (you can mount encrypted data/password is accepted): I need the version of the ROM you are running, a recovery.log, and your sworn statement that it's working. :P
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] uaiclout:
Ask in the RR thread maybe someone of them had same issue and a solution
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
There is a lot of stuff at once you are doing. It even makes me dizzy reading it. What about you do it step by step, I.e. one step is getting encryption working both in ROM as in TWRP, next step flashing a custom ROM. Doing it all at once doesn't make it easier debugging.

Also make sure what encryption scheme your custom ROM uses and so which is the fitting version of TWRP to use.

Also, flashing dm-verity with optional encryption might solve your problem provided you want to stay unencrypted.

---------- Post added at 04:22 PM ---------- Previous post was at 03:59 PM ----------

@jcadduono

OOS 4.0.1, decryption hangs, qseecomd is not executable - couldn't figure out why.

~ # qseecomd
/sbin/sh: qseecomd: not found
~ # which qseecomd
/sbin/qseecomd
~ # ls -al /sbin/qseecomd
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
-rwx------ 1 root root 14864 Jan 28 05:25 /sbin/qseecomd
~ # id
uid=0(root) gid=0(root) groups=1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:su:s0
~ # /sbin/qseecomd
/sbin/sh: /sbin/qseecomd: not found

I did look at the file with less, it seemed legit. Saw an elf header, some procedure jump pointers. In absence of ldd and magic file I had no idea what else to do.

To complete the post, the logs

Recovery https://drive.google.com/file/d/0BxQj0GFNkzYhTkxmQ3NxYkZwSnc/view?usp=drivesdk

Dmesg https://drive.google.com/file/d/0BxQj0GFNkzYhYU00dVMtMXQ1aXM/view?usp=drivesdk
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] lyall29:
[MENTION=3044422]mad-murdock[/MENTION]...I was just trying to give all the steps i've tried since yesterday. I didn't try them all at once. I started this morning completely stock, locked bootloader and everything. This morning I unlocked my bootloader, flashed twrp and rebooted into the stock system. I then went back into twrp, flashed the RR rom and gapps and the phone booted up fine, so I put all my info in. I then rebooted into twrp and without touching anything else but reboot-system, my phone rebooted fully wiped. After that I tried formatting system in order to fully unencrypt. Still no go. So, you think I should return to stock and try rooting to see how that works?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
adb exec-out tar cz /sbin /vendor > sbinvendor.tar.gz

upload that somewhere for me please (when qseecomd wont start)

i should be able to ld check from it
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] lyall29:
I have to go to work now. I'll try something else later tonight and report back if I figure something out. For now I'm returning to stock so that I can use my phone. Thanks for the suggestions.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
The tgz: https://drive.google.com/file/d/0BxQj0GFNkzYhVXhXejZCWTNVWmM/view?usp=drivesdk

I also try to get to IRC, which isn't easy since my internet is broken. Only internet by phone currently. And phone needs to reboot to recovery regularly. Trying to get online with an old phone, but no promises.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] TXRangerXDA:
Thank You! I downloaded Beta 5, unlocked the bootloader, flashed beta 5, booted beta 5, copied no-verity-opt-encrypt-5.1.zip to my internal storage and flashed it (not sure if this was necessary?), then I installed Resurrection Remix and booted up with no issues at all.

I was completely stock on OOS 4.0.1, stock recovery, locked bootloader.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] B3501:
I did this on Beta 1 with no problems.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
Beta 5 is broken encryption wise. Don't use it. There should be beta 7 or 8 soon that works. I spent some time on IRC, testing for [MENTION=5672995]jcadduono[/MENTION]
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] saberzaid:
Im on 4.0 , and twrp 3.0.3
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
https://build.nethunter.com/test-builds/twrp/oneplus/twrp-3.0.3-1-beta8-oneplus3t.img

does this boot? if so, can anyone provide a dmesg for me & let me know how it works?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
Does boot, does decrypt.

Cannot give you logs. NFL playoffs and tipsy. No PC.

Is this the one? Curious to hear from OOS 3.x users.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] MrMeeseeks:
Seems to work fine. OOS 3.5.4 with my own custom kernel.

dmesg.log

recovery.log
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
your dmesg is cut off at the start, not enough to be useful :(
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] MrMeeseeks:
It got cut off somehow. Maybe this will be more useful.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
looks great to me, i guess test as much as you can, everything working as expected? if so, will have new builds up tomorrow on twrp.me

i'll go send a build off to the OP3 users now too :)
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] spireweb:
[MENTION=5672995]jcadduono[/MENTION] beta 8 worked with no problems I was able to flash OOS 4.0.1 without a hitch! thanks for your hard work! :)
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] uaiclout:
I'm sorry - maybe it's the wrong thread

I've done - I'm on ext4 - thanks to [MENTION=3044422]mad-murdock[/MENTION]

Since I'm on ext4 no app is able to download anything - I can't download something via browser - I can't download media via WhatsApp...

Is this caused by ext4 :confused:

Edit: is it possible that the permission are wrong (read only or something like this)
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] elchmartin:
stuck at twrp boot screen!

my 3t seems to not do anything after 'adb boot twrp.img' (using 3.0.3-1beta8)

even waiting for somewhat 15minutes seems not help.

any ideas?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] cultofluna:
Boot manually to twrp....
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] uaiclout:
adb boot twrp.img?!?!

I know this with fastboot:

fastboot boot twrp.img
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] elchmartin:
yeah, sorry. meant 'fastboot boot twrp.img' ...

also, booting manually (power+vol down) only gets me to stock recovery? seems my 'fastboot flash recovery twrp.img' was no meant to last?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
What ROM are you using and where are the logs?

At community, overall only one guy had posted logs yet. A developer who maintains 50 different devices and asks for help gets.... Next to nothing. Shame upon us.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] elchmartin:
Yeah, you are right.

here are the logs:

dmesg.log

recovery.log

running unlocked Oneplus 3T, A3003, OOS 4.0.1 (latest OTA)

hope it helps?

i can reboot via 'adb reboot', after that it returns to normal.

when i try to reboot again to recovery (doesnt matter how) it start up the stock-recovery. no sign in TWRP?
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] liver20:
Me boot properly , i flashed with "Install Image" from TWRP 3.0.3.0 Official

Installed 4.0.1. Firmware + Modem

and Boot in Validus Rom
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] luusid:
I know other's have replied but I had this issue yesterday when doing exactly what you are. I simply turned the phone off by holding the power button and then when turning on it shows a screen with an option to "start" or use volume buttons for other actions. Use the volume buttons and hit on recovery. Then just let the phone restart and it boots into TWRP after approx 15 sec.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] elchmartin:
ok now tried again:

- adb reboot bootloader

- fastboot flash recovery twrp.img

- fastboot reboot-bootloader

after some minutes (!) TWRP booted properly.

will backup now and try supersu first.

anyway, my issue seems to be resolved.

sorry for not trying often enough before.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] El-Lobo68:
What i do....

with adb reboot-bootloader go in fastboot mode

fastboot flash recovery twrp-3.0.3-1beta8-oneplus3t.img

after that step select reboot recovery and it boot correctly into twrp recovery

My actually setup OOS 4.0.1 no-force encryption

data format f2fs and seems to work fine.SuperSU 2.79

Don´t know it is useful or helps here my log files recovery and kernel

https://drive.google.com/file/d/0BxrkWsVIqJABcEJaT1VUOEwzYms/view?usp=sharing

https://drive.google.com/file/d/0BxrkWsVIqJABTGRRZnZsbGo0RjA/view?usp=sharing
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] Ed St John:
Yeah I saw that just wasn't expecting it to do it for 45mins... Something was wrong but fixed now boots in a couple of secs
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] mad-murdock:
Finally my head stopped spinning and I can use computers again.

OOS 4.0.1 - TWRP beta 8 - decryption working - USB needs reconnect to get adb working.

Recovery.log https://drive.google.com/file/d/0BxQj0GFNkzYhUlFBZnIwTlNOYTg/view?usp=drivesdk

Dmesg https://drive.google.com/file/d/0BxQj0GFNkzYhMTd4dEFKbnV4NkU/view?usp=drivesdk

---------- Post added at 03:53 PM ---------- Previous post was at 03:47 PM ----------

This is not sure to ext4. From all I know and read here, ext4 is working the same as f2fs does. Maybe something else went wrong. Encryption not allowing the system to access data partition for example.

---------- Post added at 03:56 PM ---------- Previous post was at 03:53 PM ----------

Then something with your ROM is other than expected. If you supply logs, the dev might help. Without logs you just waste our time.

Also use beta 8 and provide logs for that. 3.0.3 non beta is kinda outdated
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] uaiclout:
I solved with:

cd sdcard

chmod -R 777 *

Maybe 777 is not necessary

Do you know which permission are needed
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
in adb shell:

find /sdcard -type d -exec chmod 0775 {} +
find /sdcard -type f -exec chmod 0664 {} +
chown -R media_rw:media_rw /sdcard
chcon -R "u:object_r:media_rw_data_file:s0" /sdcard

This will reset metadata of all your internal storage to what Android expects.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] danieldmm:
[MENTION=5672995]jcadduono[/MENTION],what about DT2W on twrp for OP3T? It work on OPO but not on OP3T.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
Really? In TWRP? You DT2W people astonish me!

No, I don't expect to support it. It's not a stock feature from what I can tell.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] knpk13:
[MENTION=7272481]woundman[/MENTION] one more

https://xdaforums.com/oneplus-3t/development/kernel-t3516012/post70556372
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] thepetro95:
How to Fix Twrp asking encryption password in oos 4.0.1 what need do
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] sebfar:
You must format data
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
use https://build.nethunter.com/test-builds/twrp/oneplus/twrp-3.0.3-1-rc1-oneplus3t.img and if it doesn't decrypt then provide a dmesg and recovery.log (see signature for commands)

don't format your data unless you absolutely need to (can't boot, etc)

the beta8/rc1 (basically the same build, just rebuilt with new tag) are using the latest upstream f2fs drivers, let me know if they really are interfering with the rom, they do have all the known fixes. i see no reason for it to interfere with f2fs made by older filesystems at this point.
[OnePlus 3T ROMs, Kernels, Recoveries, & Other Deve] eng.stk:
I don't know if using those f2fs backports are a good idea.

I encountered issues when using stock kernel, should the panics arise if TWRP stars touching rw files in data and upgrading to new upstream structure.

This will help people in custom ROMs with those backport upstreams but probably will bring issues to people on stock with just TWRP installed.

I think maybe if all kind of inlining & extent_cache is disabled on recovery mount options this can be avoided, but didn't tested yet.

For the moment, I decided to revert those in sake of compatibility with stock ROM.

What are you using atm?