yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 & 3T Cross Device Development] BillGoss:
3.3.0.0 still has the bug I mentioned in https://xdaforums.com/oneplus-3/one...ial-twrp-touch-recovery-t3742894/post79046819

It doesn't recognise "system" as a parameter on the "wipe" command.

Edit: to avoid confusion, I'm NOT talking about the wipe menu options - they work just fine. I'm only talking about the Open Recovery Script command wipe system or its equivalent terminal command twrp wipe system.
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
[MENTION=5091734]dianlujitao[/MENTION]

About TWRP 3.3.0-0, do you know the changelog?
[OnePlus 3 & 3T Cross Device Development] habylab:
It uses Magisk to flash updates. Saw it on XDA Article section I believe.
[OnePlus 3 & 3T Cross Device Development] Paschfire:
Here's what I've found regarding the changelog for 3.3.0-0

XDA article https://www-xda--developers-com.cdn...errer=https://www.google.com&amp_tf=From %1$s
[OnePlus 3 & 3T Cross Device Development] Dirk:
Yeah, upsteam they're just adding new stuff to already broken builds. Better to stick to the downstream releases with fixes included.

I'm sure the OP will be the last person to even hear about the update, let alone know what version it was before the new stuff was added.... or even what stuff was added.... :p

Edit: I guess what happens now is it's back to the drawing board for the OP. Take the new build, find out which of the pre-existing issues are present and then patch them again.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
Yup, that's why I stick with fix-3. But I test new versions in the hope that they fix things. :)
[OnePlus 3 & 3T Cross Device Development] Dirk:
TWRP has become analagous with AOSP Android. New stuff gets added, but none of it works until a Device Maintainer gets their hands on it and hammers it into shape.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
Change log for 3.3.0.0

http://twrp.me/site/update/2019/04/15/twrp-3.3.0-0-released.html
[OnePlus 3 & 3T Cross Device Development] :
Staying with 3.2.3-10 is safe, no question about. But since the patch introduced with fix3 and present in 3.2.3-10 fixing the broken format (removing encryption footer) is FINALLY merged, I guess/ hope that 3.3.0-0 is a working release for op3/t.
[OnePlus 3 & 3T Cross Device Development] DarkSJ1998:
Still I suppose staying on an older & "confirmed" safe build will be beneficial for people who don't want to risk messing their devices up. [emoji14]

Let's wait if someone takes the leap of faith & experiments with this new release. ;)

I'm still sticking to the old v3.2.3-0. :cowboy:
[OnePlus 3 & 3T Cross Device Development] :
Using 3.3.0 with LOS, no encryption.

Working fine, no issues here.

And what is nice; wrong time issue in twrp is solved, finally I have the correct time back in twrp! :good:
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
For information :

Yesterday, I (too quickly) flashed TWRP 3.3.0-0 from 3.2.3-10 and then downgraded (to 3.2.3-10 ... of course)

A consequence: the date and time issue of TWRP 3.2.3-10 has been solved... :)
[OnePlus 3 & 3T Cross Device Development] DarkSJ1998:
Great! :)

And, what is nicer, is that I'm on v3.2.3-0 which never had the time bug [emoji14]
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
A new version: TWRP 3.3.0-1 ...

==> https://dl.twrp.me/oneplus3/twrp-3.3.0-1-oneplus3.img.html

Changelog:

dianlujitao

2019-04-16T09:49:38Z

op3: Advertise EDL mode Change-Id: I701407ead4b09d48b6245a506c0b8eed0da4f5c0

dianlujitao

2019-04-16T03:06:32Z

op3: Update prebuilt kernel * Based on LA.UM.7.5.r1-04300-8x96.0 * HEAD: LineageOS/android_kernel_oneplus_msm8996@4a6738221330474fb9c14d2f69daec4661f5e95f Change-Id: Ib39dd4bb04155dd9a317e99693a391635a9eb99e

dianlujitao

2019-03-29T03:06:52Z

op3: Update QSEE stack from OOS 9.0 Change-Id: Icf36729919bc7e579053d8d7748126cfc4e00e76

dianlujitao

2019-03-28T06:06:19Z

op3: Sign image with AOSP verity key * This allows booting TWRP with bootloader locked * OnePlus happens to use the same key to sign their own images and bootloader, so as a bonus there's even no 5s warning on boot. Change-Id: Icffbd4122af86a52a42a91f04998ec506f44661f

dianlujitao

2019-03-23T08:17:36Z

op3: Fix HW FDE when building with Pie tree * ro.board.platform is no longer part of recovery ramdisk on Pie, thus hw_get_module_by_class would fail to find the keystore module and HW FDE is broken. * To address the issue, use a property to specify the HAL class to make the HAL picked by libhardware. Change-Id: I2b09a06be34ca66a400e98fce8714226ae5f3d10
[OnePlus 3 & 3T Cross Device Development] aboodyaiman:
There's no 5s warning on boot after flashing stock ROM on unlocked bootloader or what?
[OnePlus 3 & 3T Cross Device Development] BillGoss:
It's about locked bootloader.
[OnePlus 3 & 3T Cross Device Development] abhibnl:
What? We can lock bootloader and still use TWRP to flash images/zip? I'm sorry to ask but is that really what it says?
[OnePlus 3 & 3T Cross Device Development] Paschfire:
Yes. If I'm understanding correctly of what's being discussed, you can boot TWRP recovery image apposed to flashing it onto the recovery partition, leaving the stock recovery image intact.

By using fastboot while the device is in bootloader mode, having a locked bootloader.

Using fastboot command;

fastboot boot recovery twrp.img
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
What I care about most is, TWRP 3.3 (both -0 and -1) has my crypto footer fix merged, i.e., you're able to encrypt data after format with official TWRP 3.3 thus my custom build is no longer needed and suggested.

The new -1 version is build against 9.0 tree, added the new reboot edl button (you can always unbrick your device when it boots to recovery so the feature is pointless tbh), and signed to work with locked bootloader.
[OnePlus 3 & 3T Cross Device Development] abhibnl:
You da MVP!
[OnePlus 3 & 3T Cross Device Development] NelMax:
Installed version TWRP 3.3.0 -1. Removed the phone lock password. Locked the bootloader. When you start the phone, it still asks you to enter the unlock password. I unlocked the bootloader again and the phone started up normally. How to block the bootloader without formatting?
[OnePlus 3 & 3T Cross Device Development] Paschfire:
Far as I'm aware, you cannot lock the bootloader without formating.
[OnePlus 3 & 3T Cross Device Development] NelMax:
Here is the author's quote:
[OnePlus 3 & 3T Cross Device Development] Dirk:
I've had some weirdness using 3.3.0-1 today. Two things i've done today:

1) Update to 3.3.0-1 (Reboot to new Recovery)

2) Dirty Flash new build of ROM using 3.3.0-1

When i flash any new ROM build there are a few additional zips i always add to the flash queue. (A couple of them i've used for over a year without issue):

1) Splash Screen. (Zip just moves logo.bin to /dev/block/bootdevice/by-name/LOGO )

2) Bootanimation. (Overwrites ROM default in System/Media)

3) IMS Mod to remove Notification. (Overwrites ims.apk in System/Priv-app)

Of those three, only the Splash screen worked. I was surprised to see the ROM default Bootanimation after flashing ROM, and on Homescreen the ims notification. So i rebooted and flashed the Bootanimation mod on it's own. It didn't work. Extracted the Bootanimation.zip from the mod and manually put it in place, set Permissions and rebooted. This time it worked.

So the ROM flashed fine. Splash screen mod was fine. Other two didn't work. (Of course, moron that i am i didn't think to get a TWRP log before downgrading Recovery back to 3.2.3-10). There were no errors or any signs that TWRP had issues with flashing those two zips in particular.

Using 3.2.3-10 i flashed the three mods which all worked fine.

Any ideas? [MENTION=4405529]nvertigo67[/MENTION]

I'll attach the Bootanimation in case there's something obvious. Perhaps the new TWRP requires a new Updater Binary in the mod, or something in the Script has been made obsolete?
[OnePlus 3 & 3T Cross Device Development] vishruthys:
Can u please share the ims mod to remove HD notification? Thanks
[OnePlus 3 & 3T Cross Device Development] :
Please save a recovery log, when doing this the next time.

Flash both not working zips manually and save a recovery log, please.

EDIT: do your zips use update-binary as binary for edity, or do they use a shell script as update-binary? If the first, maybe update-binary needs an update... (Guessing here)
[OnePlus 3 & 3T Cross Device Development] Dirk:
Search the LOS 16.0 thread or look for the magisk module 'crDroid HD remover'

Edity i think. I didn't create the Splash or Bootanimation zips, they were from the forum. Quite old i suspect. Splash worked though. Binary in both zips is same size. If new TWRP requires new binary, wouldn't all the existing ones be obsolete and no use? How to find a new working one?
[OnePlus 3 & 3T Cross Device Development] :
Definetly a point, but I'm guessing without logs. It was just an idea.
[OnePlus 3 & 3T Cross Device Development] Dirk:
Next time i'm flashing i'll update to latest TWRP again and repeat everything, getting logs. I'm sure by then other people will have run into the same problem. I can't see how they wouldn't. (Of course most are using Magisk Modules to install mods now rather than flashable scripts).
[OnePlus 3 & 3T Cross Device Development] Flounderist:
Hi all, I had the same issue flashing a custom bootanimation. I attached the recovery log, I hope it help.
[OnePlus 3 & 3T Cross Device Development] Dirk:
What a relief! (More for me than you i guess). At least i'm not going mad! Can you attach the zip too so i can compare?

I tried reverse engineering some more recent zips to see if i could get a more up to date Binary. Problem is, as i understand it, that could entail changes to the syntax of the update-script too. Something thats currently beyond my ken.

Just looking at the ones i tried and where the difference may lay. The two that failed both make modifications to /system. That's the only significant thing i can poke a finger at.

In my case, there was nothing during the flash itself that indicated a problem. No error message. The changes just didn't take. Was it the same for you?

Edit: [MENTION=4405529]nvertigo67[/MENTION] Thanks to Flounderist we have a log

[MENTION=5091734]dianlujitao[/MENTION] Something weird going on. Perhaps you can parse this information?
[OnePlus 3 & 3T Cross Device Development] BillGoss:
The problem is that the updater script uses busybox to mount /system:

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

Which gives an error:

run_program: execv failed: No such file or directory

because TWRP now doesn't use busybox but has discreet modules for the commands. You could edit the updater script to just call the mount command directly using:

run_program("/sbin/mount", "/system");
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
Exactly, busybox is dropped from omni9.0 based TWRP
[OnePlus 3 & 3T Cross Device Development] BillGoss:
And it's been replaced by toybox.

Which means that the updater scripts could be changed to just replace "busybox" with "toybox".
[OnePlus 3 & 3T Cross Device Development] :
Forgot about that screen/warning, thanks guys, this helped me out!
[OnePlus 3 & 3T Cross Device Development] tathagatab:
I'm somewhat confused about the compatibility issues discussed here. I'm on OxygenOS Nougat, and want to upgrade to Oreo. Should I flash the newest twrp or no? And should I do it before or after upgrading?
[OnePlus 3 & 3T Cross Device Development] isoladisegnata:
a little information for those who have recovery mod for multirom, I know that the post could be out of the question I wanted to ask only if anyone knows why with the latest kernel of rom based on oreo 8.1 get black screen .. for example up to kernel v.3.18.91 it works but from 3.18.92 no maybe something has changed in the structure of the kernel?
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
Unfortunately no one can say definitely at this point, I personally would backup internal storage and use latest available TWRP for flashing android Oreo... (but the mounting problem was rather a custom ROM issue and not a OOS one from what I observed, I upgraded OOS flawlessly even with previous TWRP, but I didn't come from Nougat, I also tried the recent TWRP on recent OOS without issues...)
[OnePlus 3 & 3T Cross Device Development] tk8lm6:
Confused. Using a OP3T

The OP link goes to twrp-3.2.1-0-oneplus3.img as the latest. This is apparently a cross platform build ... Unified, hosted on the twrp site.

The official twrp app, when I punch in that I'm on a OnePlus 3T, directs me to download a file hosted on the twrp site named twrp-3.2.1-0-oneplus3t.img

They both work. I guess I'm confused about why the app doesn't point @ the latest unified since presumably it is the most recent. Also I feel like the version numbering /file naming is not good/clear. twrp-3.2.1-0-oneplus3.img doesn't have anything in it's name that it supports 3t or is unified it implies only support for the OPT3.

Also, neither of those version back up the /modem partition and one other one (I forget which) when nandroiding .. it throws two errors. In 3.1.1-0 it backed up and recovered those two additional partitions.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
I agree it's confusing. On the TWRP devices page it lists the 3/3T as a single entry yet the are two different download sites, one for each device, and neither download sites list the same set of recovery images.

In fact, the two download pages have a different 3.2.1-0 version image!

Currently the OP3 download site has the latest (unified) version - check the date on it.
[OnePlus 3 & 3T Cross Device Development] mido25:
[MENTION=5091734]dianlujitao[/MENTION]

I've seen an interesting post in OnePlus 5 Lineage Thread from Codeworkx about February security patch and how it's going to affect encryption when 8.1 r11 gets merged in lineage.

https://xdaforums.com/oneplus-5t/de...os-15-1-oreo-oneplus-5t-t3730058/post75470782

So I suppose, we will also be affected by this change and would we need a new TWRP once 8.1 Feb patch is merged with Lineage?
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
I'm on encrypted data with default password, TWRP works. I'm not sure what happens if you use secure boot.
[OnePlus 3 & 3T Cross Device Development] :
f2fs on data

[MENTION=5091734]dianlujitao[/MENTION]: thanky you for sharing your work and keeping 3/T twrp up to date!!!

Disclaimer:

IMHO ext4 is the better tested, more evolved and morenstable fs. For daily drivers I recommend using ext4!

I use f2fs encrypted on data to catch all f2fs related isuues before publishing a rom.

I'm on op3t.

When I switched from n to o I replaced the "original 3.2.1-0" by the "new 3.2.1-0". As expected, the "new 3.2.1-0" wasn't able to decrypt my encrypted f2fs data partition. Next I formated data by hitting "formatmdata" button in twrp's wipe menu. Now I had a freshly ext4 formated data (for completeness: ob22 flashed and booted like charme - encryption working).

Next I tried to change data to f2fs: "new 3.2.1-0"->Wipe->Advanced->tick data->Change Filesystem->tap f2fs button->swipe to confirm: exited with -1. I the twrp log (which got lost during the next steps, sadly) said, mkfs.f2fs complained about "-r" is an unknown option...

I umounted data from the twrp mount menu, started a terminal and did a "mkfs.f2fs /dev/block/sda15", which worked out fine (and vanished the log... ;) ). I needed a reboot to make twrp know about the f2fs on data (change filesystem menu still showed ext4 untill reboot).

ob22 flashed, booted and encrypted like charme.

When checking mkfs.f2fs and mkfs.ext4, I found "-r" is used for ext4 to specify the filesystem revision, but mkfs.f2fs has no "-r". I guess it's just a little cut'n'paste error. Most propably (take with a grind of salt, I'm not used to twrp sources): https://github.com/omnirom/android_...a6bde66e1a51e8460aaf3c7e7/partition.cpp#L2227

An other observation: on "new 3.2.1-0" I'm able to format data and install an N rom (ob15), but as soon as oos is booted once (and therefore encryption is setup with default passwd), "new 3.2.1-0" is not able to decrypt - I need to flash "original 3.2.1-0" to access data from recovery again. This is completely ok for me, since I have copys of both 3.2.1-0 on my disk, but I think the "original 3.2.1-0" should be available for download on the twrp pages (perhaps as "3.2.1-0-N" to make the versions different).
[OnePlus 3 & 3T Cross Device Development] BillGoss:
Interesting. I am using this version of TWRP https://dl.twrp.me/oneplus3/twrp-3.2.1-0-oneplus3.img.html which I believe is what you call "new 3.2.1-0".

I'm on encrypted f2fs and have been since I got the phone new. I have set an on-boot password many times and I've never had a problem decrypting the data partition in TWRP and I've used quite a few different versions.
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
Same here!
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
f2fs is always semi-finished, it has bad backward compatibility, I'm not surprising at all when you cannot decrypt f2fs data. ext4 is always recommended.
[OnePlus 3 & 3T Cross Device Development] :
Absolutly! See the disclaimer. I don't complain about missing backward compatibility.

But changing to f2fs should at least be possible. The "-r" issue has nothing to do with stability, completeness or even f2fs itself, it's just the mkfs.f2fs bin has no "-r". Since "format data" always makes an ext4 fs, we should be able to change to f2fs.
[OnePlus 3 & 3T Cross Device Development] johnverita:
TWRP (v3.1.1-2 & v3.2.1-0) seems to display wrong data partition size on my OnePlus 3T: over 150 gigabytes!

The /data partition is encrypted, but it really isn't an issue because I was able to make backups a few months ago. I can't think of any reason why it displays the wrong size.

I am unable to backup my data because of this, even if I select "Disable free space check before backup". It starts the backup proces and progresses until at least 92%.

Perhaps there is a file that displays as unimaginably large? Perhaps I borked some permissions? Anyone have any ideas? Thanks!

Here are some interesting screenshots:
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
The only time I had "CreateTarFork error 255" where backup failed at around 90% was when only 1 or 2 GB of internal storage was available / free. Deleting some stuff to have at least 5 GB free solved it back then but if the information from your screenshot is reliable this should be the problem for you...

You can delete the hidden .twrps folder in /sdcard/twrp, this will reset all TWRP settings, just to make sure it's not a messed setting of any sort, to start fresh again...

Also if it keeps failing post a recovery log for the maintainer, after failing go to main TWRP menu, advanced, recovery log to safe it, upload it to G-drive and share the link...
[OnePlus 3 & 3T Cross Device Development] johnverita:
I had some free time on my hands and decided to take a quick peek into the TWRP source code to solve my issue. Huge thanks to [MENTION=5123642]lj50036[/MENTION] for minimal-manifest-twrp, it was a breeze to set everything up.

It took a while for me to realize that there are several places where the sizes of the partitions are calculated . Most evident are `TWPartition::Get_Size_Via_statfs()` and `TWPartition::Get_Size_Via_df()` in `partition.cpp`. However, the data partition needs a different method of calculating its size because it has /sdcard storage data.

The real issue occured inside the `TWExclude::Get_Folder_Size()` function which is called by `TWPartition::Update_Size()`. This function traverses the entire filesystem and sums up the sizes of all the files, excluding special folders. Apparently, the `lstat()` kernel syscall can return a borked `st_size` struct field for some reason. Perhaps the device powered off abruptly which corrupted the filesystem, or an application was nasty.

At any rate, it was trivial to find out which file was the issue. It was reported as 172807 MB in size. Oh dear!

I uninstalled the application and TWRP now correctly reports the size of the partition.

Cheers!
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
Thanks for sharing this interesting findings, would you mind to share what specific application it was, just for my own curiosity... :)
[OnePlus 3 & 3T Cross Device Development] johnverita:
Yeah, it was Coinomi Wallet app. If I recall correctly it was a file storing the ethereum blockchain data.
[OnePlus 3 & 3T Cross Device Development] OSheden:
I installed the latest version of this recovery (coming from blu twrp) and I used it to flash OmniROM 8.1.0.

While making a nandroid backup, I get several errors messages: "Unable to locate..."

Unable to locate '/aboot' partition for backup calculations.
Unable to locate '/modem' partition for backup calculations.

Unable to locate partition by backup name: 'aboot'
Unable to locate partition by backup name: 'cmnlib64'
Unable to locate partition by backup name: 'cmnlib'
Unable to locate partition by backup name: 'hyp'
Unable to locate partition by backup name: 'pmic'
Unable to locate partition by backup name: 'tz'
Unable to locate partition by backup name: 'rpm'
Unable to locate partition by backup name: 'keymaster'
Unable to locate partition by backup name: 'devcfg'
Unable to locate partition by backup name: 'xbl'
Unable to locate partition by backup name: 'modem'
Unable to locate partition by backup name: 'bluetooth'
Unable to locate partition by backup name: 'dsp'

Recovery log

Does it break the nandroid backup? I'd like to test some mods so I'll probably need this backup soon.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
Those are firmware partitions. I've never backed them up in all my years of having Android phones.

The only partitions you need to back up or restore are boot, data, and system.
[OnePlus 3 & 3T Cross Device Development] Dirk:
Bless you BG. Don't know what i'd do without you!

Does run_program("/sbin/mount", "/system"); work on both old and new TWRP, and in all cases? i.e Adding Bootanimation/Deleting Font/Overwriting .apk?

Thanks.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
I didn't try it out, but I don't see why it shouldn't.

Also see my post directly above yours, in reply to dianlujitao.
[OnePlus 3 & 3T Cross Device Development] Flounderist:
Hello! I lost most of the conversation due to time zone and we already found the culprit, it seems.

Can't share the zip at the moment because the awesome XDA app cannot load it :p I will try from a PC later on, if needed.
[OnePlus 3 & 3T Cross Device Development] Dirk:
I assume using the 'Toybox' edit in place of 'Busybox' in this case would make the zips only work in the new TWRP, whereas i'm hoping for an edit that works on any TWRP.

Bear in mind half the flashable zip mods on XDA invoke Busybox for mounting system, and just stopped working overnight. :D

If the Busybox part of the script wasn't needed to mount system, i wonder why was it used that way for so long?

Actually, if you don't mind could you try the attached Splash & Bootanimation zip on the new TWRP for me? If it works okay i'll edit yours for you so you can continue to use it in future.

[MENTION=7193743]Flounderist[/MENTION]
[OnePlus 3 & 3T Cross Device Development] Dirk:
Thought it would be something like that. Many people working off of Templates to create new zips too, or just modifying existing ones. Half the zips i've seen invoke bb to mount system. Guess their days are numbered! :p

Thanks for that post. A wealth of great information! I'm off to bed. Hopefully Flounderist or someone else can confirm that the edited zip above works on new TWRP. Be useful to know what to do when creating new mods in future. :good:

Thanks everybody.
[OnePlus 3 & 3T Cross Device Development] :
When reading through the lineageos scripts for mounting, I found it's the most compatible way of mounting: it considers different system partitions as well as A/B partitioning. To have a zip, that flashes on really ALL devices (from old ones to up to date ones) with all 3.x.x-x twrps (and for 2.x.x-x, too) the lineageos scripts are the way to go for current and future templates.