yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Guys P is out

Changelog: upstreamed kernel to the latest

Upstreamed F2FS

Upstreamed sdfat driver

Upstreamed WiFi driver

Forced encryption now does not make the device get stuck at boot

Fixed an issue that would cause repetitive lockscreen crashes

You can now plug in usb drives formatted as fat/fat16/fat32/exfat and they will be recognised

Hardened fstab mount flags

F2FS is currently unsupported and it is unlikely that it will be added in a future release

Note: all op3 sources have been fully moved to https://github.com/GlassROM-devices including the kernel source

Instructions: just flash it

For users already on 8.1 dirty flash should work. No wiping is required
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
I released an update

Why? Because I felt like releasing one. Honestly I'm just bored

Changelog: more aggressive optimisation

Included all the upstream changes from lineage

By installing this ROM you agree to enjoy yourself
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Clarification about magisk:

You can use it but if you think that there is a bug please reflash the ROM and check if the bug exists without magisk installed

If the bug does not exist when magisk is not installed then please report it to the magisk developer and not to me
[OnePlus 3 & 3T Cross Device Development] abhibnl:
Out of curiosity, is there any reason you are implementing "force encryption" on this custom non-OOS ROM? While it's your ROM so your decisions but unless you feel there is something in this ROM that would require encryption, shouldn't it be a user's choice if they want to run an non-encrypted storage or encrypted one?
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Was never my intention to make a "custom" ROM

The best you can call it is something that's almost a stock ROM or "aftermarket firmware"

It behaves like a stock ROM in every way and has experimental support for booting off locked bootloaders
[OnePlus 3 & 3T Cross Device Development] abhibnl:
Thanks for sharing your vision. The project actually sounds way cooler now. Once I decide to jump ship to P roms, I would definitely try this one.
[OnePlus 3 & 3T Cross Device Development] TheMystic:
Hi!

Can you please assist:
[OnePlus 3 & 3T Cross Device Development] TheMystic:
[MENTION=5842226]anupritaisno1[/MENTION]

Please PM me. It’s urgent. Thanks.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
You definitely had F2FS

Support for F2FS is coming in the next build

Data recovery is possible through TWRP. Nandroid, backup to PC then format to ext4
[OnePlus 3 & 3T Cross Device Development] TheMystic:
Can you tell me if there is anything wrong with my data partition? I'm using my phone normally and there are no errors or problems whatsoever.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
TWRP does not open encrypted block devices with "allow-discards" and by default the Linux kernel forbids sending discards to an encrypted block device

You should run that command when you're booted into the system
[OnePlus 3 & 3T Cross Device Development] TheMystic:
It's been a while since I did clean flash of the ROM, but whenever I did, I have successfully run all 3 commands before the clean flash, and my device has always been encrypted, and always using TWRP.

Can I run this command from within the system without data loss?
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
I have never seen a proper fstrim binary on android. It's always some tiny version with busybox which is not exactly compliant to the standard

fstrim is part of util-linux

Will you have data loss? I cannot comment as I did not ship such a binary in the ROM to begin with
[OnePlus 3 & 3T Cross Device Development] AL2000EX:
There's nothing wrong with your data partition, you don't need to worry about fstrim as trim is already performed regularly on /data. Forcing trim from userspace isn't how it's meant to work anyway.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Updated

Changes:

Upstreamed F2FS to 5.1-rc1

F2FS is reenabled (but is on a separate build)

Enabled privileged access never emulation (PAN)

Made kernel text and rodata read-only

Kernel hardening (based on public grsecurity patches)

Fixed CVE-2019-8912 (severity rating by security researcher: anupritaisno1: HIGH, Atmos: CRITICAL)

Fixed a serious bug where using gestures when the phone has a screen lock would cause a system crash

Tripndroid is now the default I/O scheduler

Upstreamed lz4 driver. You can use a kernel manager program to manually use lz4 compression for zram. Other than that this currently has no use but it might in the future

Wireguard support. Note that ipv6 support on android is unreliable with the kernel module so confirm with ipv6.test-ipv6.com to make sure you aren't leaking ipv6 traffic when using wireguard. Note that glassrom does NOT recommend disabling ipv6 because you're literally cutting yourself off from a part of the internet by doing so

Kernel debugging is reenabled

Page table isolation (you might know it as KAISER) is enabled even if our CPU is not vulnerable to meltdown as it protects against several vulnerabilities other than meltdown

Upstream lineage changes: all the changes already included in the latest lineage nightly

The update adds 2 zips: op3_ext4.zip and op3_f2fs.zip

Both will only support one filesystem and not the other

If you use ext4 then /data and /cache MUST be ext4

If you use f2fs then /data and /cache MUST be f2fs
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
The main issue is that I have never found a compliant fstrim binary that actually works like the one on a GNU system on android

It's always some tiny busybox or some other applet which is not standards compliant

So how exactly can I guarantee that the command will not break stuff?
[OnePlus 3 & 3T Cross Device Development] TheMystic:
[MENTION=5842226]anupritaisno1[/MENTION]

I just rebooted my phone and it takes me to the same Decryption Unsuccessful screen. I don’t even have a nandroid backup now, unlike last time.

There were some important communications that I had on WhatsApp today, and unfortunately it isn’t backed up either.

Is there a way to somehow boot into the system successfully?
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Nandroid in TWRP then backup internal storage

Please read the instructions carefully and flash the correct variant
[OnePlus 3 & 3T Cross Device Development] TheMystic:
Thanks. I was thinking since data partition is corrupt, I won't be able to create a Nandroid backup.

But what exactly did your ROM do to cause this error? I have never faced such a problem ever since I got into into custom ROMs, rooting and mods.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Custom kernels will not work at all with the f2fs variant. This is because this ROM uses an F2FS feature that was added very recently to mainline and custom kernels are really slow at updating these things

Also did you format /cache as F2FS?
[OnePlus 3 & 3T Cross Device Development] TheMystic:
I am on Havoc at the moment. Like I told you previously, I got the error after flashing GlassROM, so I had to clean flash OOS (which too did not boot with the same Decryption Unsuccessful error), rebooted to OOS recovery (since OOS replaces custom recovery with its own), do a system settings reset (factory reset), boot into system, flash TWRP and restore nandroid backup.

Now, I was using Havoc for the last 4 days without any issues. Yesterday, I just rebooted my phone and was greeted with Decryption Unsuccessful error. So I am repeating the above process again to restore nandroid backup. I will then backup everything i want and format my data partition to get rid of that error. Then clean flash the rom.

All this is an unnecessary headache because I think GlassROM was trying to format the data partition in ext4 (on my already encrypted phone) and I wish there were sufficient warnings in place on what could happen.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
They warnings are already in place

The first post did mention at one point that F2FS was totally unsupported

The first post now says that there's a separate variant that only supports one and that both /data and /cache must be formatted with that variant

The warnings are in place. Please read carefully

As for custom kernels: I'm not really adding a warning. It is your responsibility if you use a custom kernel and something goes wrong. Such bugs should be reported to the person who developed that kernel
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Also the ROM doesn't format if an existing filesystem is present. It shows decryption failed because it does not know how to mount it and stops at that screen to prevent data loss

You can fix it by attempting to restore your crypto footer

To backup your crypto footer:

Run blockdev --getsz /path/to/data

Subtract 16384 from this number

dd bs=1 skip=(the number you got in the previous step) count=16384 if=/path/to/data of=/sdcard/crypto_footer.img iflag=fullblock

To restore the crypto footer just flip the if and the of without changing the rest of the command
[OnePlus 3 & 3T Cross Device Development] TheMystic:
They are in place, but not in a language everyone understands.

As expected, you are always defensive and not open to criticisms.

When you make a product, your instruction manual should be written for the target users, in the most simple and easy to understand manner, and you should assume that your audience have only a very basic understanding of the products. You shouldn’t expect your audience to be at par with your level of knowledge because they are not necessarily in the same field as you.

Please note that this in no way undermines the audience. I’m just pointing to the fact that people come from different backgrounds and are good in the things they do, which may have nothing to do with tech.

---------- Post added at 12:51 ---------- Previous post was at 12:49 ----------

I am not a developer and I don’t know how to execute the above.

But I will thank you for the fact that my data is intact fortunately. It is the process that is long to restore it.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
This was already talked about in https://xdaforums.com/showpost.php?p=78374543&postcount=4

There is nobody at glassrom to write documentation and the current developers (myself included) lack any and all knowledge on how to present xda threads

Also do note: you're the only one here to even have a problem in the first place with F2FS. Nobody else has reported an issue about F2FS. Please read the thread carefully

So unless somebody wants to volunteer there is no way to get a full guide out
[OnePlus 3 & 3T Cross Device Development] abhibnl:
I just read this and found it totally ridiculous. First, the instructions are in English language, and are posted in a rather simple language. Can you go through the first post and let me know which part is "but not in a language everyone understands"?

Second, this is a custom ROM. It's not a product, and its out of his sheer free time and interest in developing and building a ROM. Any user, who expects to unlock bootloaders, root their devices, and flash custom firmware on their device, I don't think the "a very basic understanding of the products" rule applies here.

I have read the OP twice and it actually has alot of warnings and things to remember before flashing.

So rather than teaching the developer of this ROM "how to post product instructions", please try to read the OP of every ROM you flash and check last 5-10 pages. I read it on day one and immediately asked him about his forced encryption method. So, be polite, respect developers here, and read OP next time before blindly flashing a custom ROM and flashing your favorite kernel on top of it.

And as always, every single custom ROM comes with a .01% possibility of data loss. It's always your responsibility to back up your data before flashing. Happy Flashing for future! :)
[OnePlus 3 & 3T Cross Device Development] TheMystic:
There is a background to our discussion that you are not aware of, so I am not surprised you found it ridiculous. But I wasn't being rude to him (although it may appear so when out of context).

I have been flashing custom ROMs for the last 3 years, and this is the first time (not first instance) something like this happened. More importantly, the error popped up despite the fact that I successfully restored my backup previously. He was aware of how I did that and my guess is he too didn't expect this error.

I do appreciate the efforts developers put in and don't for once think that I don't have gratitude for them.
[OnePlus 3 & 3T Cross Device Development] kenny_cfc:
The way you put words in the previous reply looks to me like you playing a blame game (even though you state you are not). So you see written communication is sometimes confusing. So we have to be careful before and during the process of flashing and also when we post msgs.
[OnePlus 3 & 3T Cross Device Development] Oswald Boelcke:
Ladies & gentlemen, I'm convinced we all appreciate vivid discussions and the exchange of information and experiences in a development thread - as long as they are on topic!

That what I'm monitoring in this thread for a few days clearly deviates from this expectation. Please don't trigger off-topic discussions with your posts. Currently I'm refraining from cleaning the thread unless the OP asks me so but if it continues I'd to proceed with different actions.

Thanks very much for your understanding.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
I'm not really against off-topic in my threads but if you think something is going out of hand feel free to act as desired
[OnePlus 3 & 3T Cross Device Development] Oswald Boelcke:
Thanks very much for providing your point of view to me and all the other members interested in your thread.

You are the OP, and you decide what's happening in your thread. If you accept off-topic posts it's not on me to complain or to act. We are not censoring on XDA.

The only really issue is that I care if the Forum Rules are followed especially the provided guidance, what "type" of language is not acceptable.
[OnePlus 3 & 3T Cross Device Development] abhibnl:
[MENTION=5842226]anupritaisno1[/MENTION]

If you want, I can flash the ext4 version to test it out for you this weekend and provide a step by step guide for those who already have their bootloader unlocked and have basic knowledge of how flashing ROMs works in TWRP.

I am currently using a custom recovery by HolyAngel which is TWRP version 3.2.3-0 I believe. I have flashed many Pie ROMs and all of them have flashed successfully on my encrypted /data partition.

I am very happy with the current OOS 5.0.8 + EAS Kernel setup I have because I can play PubG on a smooth frame-rate and non-OOS ROMs currently do not have this kernel support, not the version that I am running. So I can't run your ROM on daily basis but I can make a guide and if possible, a video tutorial for interested users. Let me know if you'd like that.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
There are no issues with booting off an already encrypted data partition

The real mess starts when you start encryption on a custom ROM

To encrypt with dm-req-crypt you need 16kb of free space at the end of the partition

And by "free space" I mean that even the filesystem should not use that region. The last 16kb should not be visible or usable by the filesystem at all

What TWRP does is that it goes ahead and just formats data without reserving this space and ROMs do not have resize capability

This will cause a phone to get stuck at the bootanimation if you try to encrypt and this is the reason lineageos has a special TWRP build for op3 when you read their instructions

As for the video guide yeah sure if you want to
[OnePlus 3 & 3T Cross Device Development] abhibnl:
hmm, seems like I won't be of much help in that case. Because my /data partition was also formatted using TWRP and then encrypted by OOS.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
This is what forced encryption attempts to fix. Glassrom supports resizing the data partition and can reserve the correct space before attempting encryption

Glassrom is not affected by this issue
[OnePlus 3 & 3T Cross Device Development] xRyzer:
Interesting Rom, I'will give it a try :highfive:
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
3.18.137 is out and will be available with the next update

Edit: 3.18.137 source has been pushed to github

Edit: 3.18.137 has been successfully compiled
[OnePlus 3 & 3T Cross Device Development] TheMystic:
Firstly, "users" need not know what is happening behind the scenes, if everything works well. As with enthusiasts, while it does help understanding how things work, at no point would anyone prefer complexity over simplicity. Simplicity is always preferred and you really have to keep everything as simple as possible.

I guess this is in response to some other comment, as it has nothing to do with mine.

Please understand, people who try different ROMs know very little about ROM development and how these things work behind the scenes.

My question is this - why did the "decryption unsuccessful" message pop up on boot? My data partition was already encrypted and I clean flashed your ROM, just like I do other ROMs. Your ROM is probably the only ROM that uses ext4 for data, whilst most other popular custom ROMs, and even stock ROMs, format data partition in f2fs. Sure you have your reasons to stick with ext4, but there should be a mechanism to warn user when flashing on a different formatted partition.

Also, I told you that I had to wipe all partitions (except internal storage) clean, flash OOS, boot to get the same "decryption unsuccessful" error, reboot to recovery (this time OOS recovery because OOS replaces custom recovery with it's own), wipe system settings to do a factory reset, boot to system, flash twrp and then restore my nandroid backup. Now everything was working fine until I just rebooted my phone. This gave me the same "decryption unsuccessful" error and I had to repeat the above process again. So what exactly did GlassROM do for this to happen?

The ROM doesn't have to read my mind to format it as per my requirements (if there is one). It just has to warn the user before proceeding so the user can do the needful beforehand.

Why would you make a stock-like ROM? I find that useful only when my OEM stops supporting my device, and in that case a stock-like custom ROM would at least keep my device updated to the latest Android version and latest security patch. Other than that, I really don't see the point of making the switch. Even then, why would someone choose your ROM over others that come with many more perks?

We really appreciate the fact that you put in a lot of efforts to keep the project alive free of cost.

As with documentation, look at the first page of other custom ROMs on XDA. There is a lot more info there on what to expect from the ROM. I'm talking about that. Also, personally while I would be happy to help you with the necessary documentation, I am limited by my own knowledge on the technical front, and I am not the correct person for this job. Even if I make an attempt, I would keep getting back to you with questions and clarifications, so you might as well feel that you are better off doing it on your own.

Do note that none of this is meant to be a personal attack or a reflection of an unthankful attitude. You and I are seeing things from a different position and with a different perspective as a result of that. Hope you take it positively. Thanks.
[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
1) Every heard of this document called "The arch way"?

Sadly this document was long lost and all I have is a copy of this from a very long time ago so I can't give you a link

This is pretty much what glassrom is about

It is also in-line with some of torvald's philosophy:

Kernel "security" should not break the system or require massive changes

Kernel "security" should not intentionally break parts of the system everyone uses

Kernel "security" should not make the system unstable

And if you're not satisfied the source code is out there ready for you to use

2) Yes that's in response to another comment

3) unlocking a bootloader by definition is only for developers who want to test their code before locking it again. By unlocking the bootloader you accept that you have sufficient knowledge before you proceed to do so. The official bootloader unlock guide by Google is only aimed at developers and warns you about the risks that are involved. In no way is it the developer's fault if you do something strange on an unlocked bootloader

Also do note: XDA isn't a forum for users. It is a forum for developers, by developers. The "I'm just a user argument doesn't work here"

Read zelendel's famous quote here: https://xdaforums.com/showpost.php?p=16682226

4), 5) and 6) instructions have been provided in the first post. Please format your filesystem correctly

"There should be a mechanism to warn the user" -> there IS, it IS the "decryption failed" screen. The ROM stops at that screen to warn you that something is wrong. I could have made it ignore the fact that data is incorrectly formatted and told it to go and format data. Users would have lost a lot of data had I done that

"I clean flashed and wiped"

You've messaged me before on the oneplus forums and I've told you that "wipe" and "format" are different things. Wiping != Formatting

"Your ROM is the only one to use ext4"

No, most ROMs use something called a "multimount fstab". Fstabs by design are multimount. If you specify the same device/image and the same mount point multiple times then it evaluates all entries and "breaks" (here, break is used in the sense of a switch statement) once one of the entries are successful. I've already explained in the post you've quoted as to why this is a very bad idea and I won't be doing this

7) maybe because I want to? There's no argument here.

Glassrom does NOT update your device to the latest android version. Check oneplus 2 which will be supported in extended long term support for 5 years but will NEVER go beyond 8.1. Why? This is because 8.1 was the last android version to be stable on the oneplus 2

The same will happen with op3. Glassrom might get Q and maybe even R but at one point you are not going to see "updates to the latest Android version". All you'll get is monthly security patches

This is not a custom ROM where I introduce hacks just so that you can run the latest and greatest android version. If it's unstable the device will be dropped into extended long term support

8) and 9) no, just no

10) I never took it that way