yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Technical:
Thank you, but if I need to restore stock each time, how can I move to a custom ROM and use encryption?
[Android Software Development] Technerd360:
Hi, I'm having the same issue as yourself, did you find the correct way to do it so it's custom ROM, root but with encryption?, Installed stock twice now

Cheers
[Android Software Development] Technical:
No, I didn't find a solution. Maybe with GSI ROMs, but I think that once we format data to install any ROM (even GSI), encryption is gone.

I don't know how to circumvent this. :(:crying:
[Android Software Development] Technerd360:
How frustrating. I'll keep looking into this and keep you in the loop, cheers.
[Android Software Development] kramer04:
[MENTION=6037748]Zackptg5[/MENTION]

link to download doesn't work

Have you an another link

Edit: Don't worry i get it from github
[Android Software Development] Zackptg5:
Thanks for the heads up. I just contacted my hosting provider about it, it's something on their end (my entire site is down) :(

Edit: one of their servers is down, should be back up by tomorrow at the latest
[Android Software Development] Technerd360:
Hi mate I got pixel experience installed successfully with root. encryption and DM Verity enabled.

1. Install TWRP via fastboot, don't bother with vbmeta.img.

2. Wipe all except internal storage and then install PE zip.

3. Format data then reboot to fresh pixel experience install.

4. Set up and check encryption is enabled then reboot to TWRP.

5. Install magisk 20.3 zip, check it says encryption and DM Verity is enabled in the log of that install (will be during the flash process)

6. Boot to pixel experience and open the magisk manager APK, check safety net test and if failed then install safety net v3 patch from repositories and reboot.

7. Enjoy and job done! :D
[Android Software Development] Technical:
Which is your phone? On step 3, if I format data, I cannot encrypt Xiaomi Mi A3 anymore and, if I don't format data, I can't boot PE (or any other AOSP Rom). :(
[Android Software Development] Technerd360:
Mine is Redmi note 8. It's shame yours doesn't boot. Thought I'd cracked it as well. Sorry mate :(

---------- Post added at 07:46 PM ---------- Previous post was at 07:37 PM ----------

You could always try flashing vbmeta.img using this command fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img but take out the --disable-verity bit, I think that should work but please do this at your own risk, I'm not responsible for a bricked device.

Sorry I couldn't help more.

---------- Post added at 07:56 PM ---------- Previous post was at 07:46 PM ----------

Read some more and it seems mi a3 is a slot device so has A and B which is obviously different to the redmi note 8. I'm frustrated for you mate.

Cheers
[Android Software Development] eyaw:
Where can i find the file..

Trying 2 find..it..but says error..
[Android Software Development] Zackptg5:
My hosting provider had a major server outage, should be back up now :)
[Android Software Development] mauam:
Hi Zack,

The Disable_Dm-Verity_ForceEncrypt_01.19.2020.zip is the latest stable as on your site right!? Not the 02/02/2020zip, that can be found here.
[Android Software Development] eyaw:
Thank u very much..

Now i can try this method..

???
[Android Software Development] eyaw:
Can anyone help me..

After i flash the latest Magisk

Then flash the Dm-verity, forceEncrypt,Disk Quota Disabler

I got this mesage..

"Failed to mount '/odm' (No such file or directory)

Im using s9+ with Q version

Thank you in advance
[Android Software Development] Peter1212:
[MENTION=6037748]Zackptg5[/MENTION] At what point do you exactly mean by last? As I can understand that this zip is meant to be installed at last, but last when? Let's say, one is experimenting out with a new rom, he might install stuff a number of times during that installation and even after that for a while. Changing kernels or adding magisk/xposed modules here and there. So, at what point is last supposed to be?

Can no more modules (magisk/exposed) be installed afterwards? Or maybe the stuff outside of magisk/exposed (if any) is not able to be installed afterwards? I'd like an explanation into it if possible. I think after the magisk it should be fine, but for safety reasons after getting exposed working if anyone wants to, it should be safe to use this patch and any subsequent modules for xposed/magisk can be installed afterwards. I'm not the dev of the module so can't say for sure. Please explain it a little more thoroughly.

---------- Post added at 09:03 PM ---------- Previous post was at 09:03 PM ----------

[/COLOR [MENTION=6037748]Zackptg5[/MENTION] At what point do you exactly mean by last? As I can understand that this zip is meant to be installed at last, but last when? Let's say, one is experimenting out with a new rom, he might install stuff a number of times during that installation and even after that for a while. Changing kernels or adding magisk/xposed modules here and there. So, at what point is last supposed to be?

Can no more modules (magisk/exposed) be installed afterwards? Or maybe the stuff outside of magisk/exposed (if any) is not able to be installed afterwards? I'd like an explanation into it if possible. I think after the magisk it should be fine, but for safety reasons after getting exposed working if anyone wants to, it should be safe to use this patch and any subsequent modules for xposed/magisk can be installed afterwards. I'm not the dev of the module so can't say for sure. Please explain it a little more thoroughly.
[Android Software Development] eyaw:
[MENTION=6037748]Zackptg5[/MENTION]

After I update my Samsung S9+ to Android 10/Q stock ROM

I want to root it so i tried this method of yours:

1. Flash TWRP via Odin & booted up to TWRP

2. Format Data & reboot to Recovery

3. Install latest Magisk

4. Install your Zip (definitely the last to flash)

Everything works fine until the "updating partition" definitely the last part..

I recieved this mesage

"Failed to mount '/odm' (No such file or directory)

Got any idea with this?

Thank you in advance
[Android Software Development] AshhRED:
Not sure but try this..

Only Flash DMverity+FE_disabler.zip don't add disk quota ... make sure /system and all

/partitions are mounted.
[Android Software Development] eyaw:
Im not pretty sure on the method of mounting??.

Can you xplain this mounting method .

Sorry..not really good on this..

..all i care was to root..my phone..

???

Thank u..
[Android Software Development] AshhRED:
Boot into TWRP=>Mount=>

/System

/System_root

/Cache

/Data
[Android Software Development] eyaw:
Thank u very..

Ill try what u said..

Nothing 2 lose..anyway..

??
[Android Software Development] eyaw:
I did tried what u told me just now .and yet..same thing happens..

..any other methods u can give me .

??
[Android Software Development] AshhRED:
I always use these flashing sequence for clean ROOT installation..

1. Boot=>TWRP

2. Mount=>System

3. Flash=>ORANGE_STATE_DISABLER.zip

(if available)

4. Reboot=>RECOVERY

5. Mount=>System

6. Format=>Data=>type YES

(make a backup prior)

7. Reboot=>RECOVERY

8. Mount=>System

8. Flash=>MAGISK.zip (latest)

9. Flash=>DMverity+FE_disabler.zip (latest)

10. REBOOT=>SYSYTEM
[Android Software Development] eyaw:
It seems I did nothing wrong with how the way i flash it.

The only problem maybe is the android version.

Cause on pie i don't have any problem rooting it.

I try the way u show me but its not working on my S9+..

Thank u anyway..

???
[Android Software Development] AshhRED:
Try different TWRP, maybe the one which is compiled using STOCK A10 recovery.
[Android Software Development] eyaw:
I used the TWRP 3.2.3-0 as recomended in here..
[Android Software Development] Skew01:
Help

Please link for orange state disable. zip Thanks
[Android Software Development] alecxs:
--- 'Orange State' disabler v0.3 ---

##### Created by XopmoH97 : ) #####

source: orange_state_disabler_v0.3.zip
[Android Software Development] AshhRED:
ORANGE-STATE-DISABLER.zip

Remember this is for MTK {mediatek} devices only
[Android Software Development] eyaw:
Will this work on S9+(samsung)??
[Android Software Development] alecxs:
no. it's Exynos or Qualcomm, not Mediatek
[Android Software Development] eyaw:
Oh..so that's what it is..

..thank u..

Another..lesson learned..

??
[Android Software Development] Sehab084:
How to fix this. Failed to mount

On Redmi note 8. Please help
[Android Software Development] sfairmm:
Hi guys,

Can anyone tell me if this decryption works on MI9T Pro with eu.rom Miui 11 (Android 10)?

Thanks.
[Android Software Development] sfairmm:
When I format system, until not installing another ROM the partition appears this way system_root and becomes inaccessible. Reboot on recovery again and install the new ROM, should work.

Good luck.
[Android Software Development] MrHomebrew:
Does not boot with this version on the Galaxy Tab A 10.5 SM-T590 SM-T595 AND SM-T597

OLD VERSION I have from before works.

This one

https://mega.nz/#!eUpj3AAR!B-3_dgBX9nEj4PJufCnCl7FsiS5bJXy-XvNsBg2KQXg
[Android Software Development] Zackptg5:
Updated zip to latest AK3, also use an selinux enabled busybox so there's no need to system toybox anymore - it's all self-contained

Quick reminder, without logs, I can't help
[Android Software Development] Zackptg5:
It's in the OP. What the zip does is dependent on the zipname. Rename it as outlined in the OP so it doesn't disable encryption

Edit: it could still disable encryption if the right conditions aren't present. I'll add an option to prevent that from happening to keep encryption in all cases
[Android Software Development] Peter1212:
Running into a weird issue, I have installed everything. Followed the guide to disable encryption and then after everything was installed, finally went on to install this zip today. Everything went smoothly. Phone rebooted fine, there's no issue with that. But I hadn't set a phone password during all that process, was afraid of the device getting encrypted once again (saw somewhere that even if the encryption is disabled setting a screen lock pin/pattern could sometimes encrypt the device back)

Didn't want that to happen. Finally when everything (force encryption, dm-verity and disk quota was disabled) I went on to set a password and everytime I do that it tells me that the screen lock was already changed, try again with your new screen lock.) What can I do to resolve this?

I think it could have been due to this command, I tried setting the pin lock via adb locksettings set-pin xxxx hmm

Someone just told me it's due to the disabled encryption??? Huh

Edit: Never mind, just saw that it's not possible on redmi note 7. Welps, bad luck with a bad device.
[Android Software Development] Hopie:
does anyone else have the version 2.2.20

Maybe boot problem with my MI 9T Pro
[Android Software Development] Technical:
Yeah, we need to rename the file, but after all it's not the solution, as in some cases, we can't boot without formatting the data, and when we format the data, we can't encrypt anymore.
[Android Software Development] Zackptg5:
Put a poll up in the OP, debating which direction to take the zip in terms of install options so I'd appreciate all your input

I'm in favor of option 3 myself as it's already partially implemented (for sideloading) and would be the easiest for device compatibility and use :)
[Android Software Development] 4396316:
I have a strange thing...

My storage can only be written with root right now..

1.Format data and reboot twrp

2.Flash rom.

3.Flash twrp

4.reboot twrp

5.flash Disable_Dm-Verity_ForceEncrypt_02.24.2020.zip

6.flash magisk v20.3

7.reboot system

When I create a file in / sdcard as a normal user, it reports an error: permission denied.

When I execute the command mount, I get the mount details.

After it enters the system, I can only write data with root permission.

please....:crying::crying:

Oneplus 6 OOS android 10.0
[Android Software Development] Toni Moon:
you always must flash dm verity at last, read the op
[Android Software Development] 4396316:
Even if I finally flash thish zip, I can't read or write the storage:crying:
[Android Software Development] Montero7o:
Hello

You must use one of these 2 versions

Disable_Dm-Verity_ForceEncrypt_01.19.2020.zip

or

Disable_Dm-Verity_ForceEncrypt_02.02.2020.zip
[Android Software Development] 4396316:
Thank you. I tried Disable_Dm-Verity_ForceEncrypt_02.02.2020.zip, and I succeeded:D:D
[Android Software Development] taxi333:
Is it possible to flash this without TWRP? I have the t-mobile Oneplus 7T pro 5g mclaren and the only thing available is the stock recovery with ADB enabled...
[Android Software Development] amg314:
Try install it using adb sideload option in stock recovery (if any)
[Android Software Development] alecxs:
do not adb sideload because naming of zip is ignored (will be fixed in later releases). besides this, stock recovery does only allow oem signed files, it won't work anyway
[Android Software Development] Zackptg5:
Adb sideload was already fixed (uses vol keys) but the OEM signing would prevent it from working
[Android Software Development] Zackptg5:
Updated the zip!

Changelog:

- Update ak3

- Always disable verity - required for any other options

- Added keep encryption option to zip

- Added new verity flags
[Android Software Development] Spaceminer:
[MENTION=6037748]Zackptg5[/MENTION]

I have an issue disabling FBE and was wondering if you could provide some insight. For us it's being enforced in 2 places. The 1st is in init and the 2nd is in /vendor/etc/fstab.qcom.

The init issue: I found this command embedded inside init, which should be easy to hexpatch out.

system/core/fs_mgr/fs_mgr_format.cpp
fs_mgr_do_format : Format as 'File system type ' ' is not supported.
/system/bin/make_f2fs -d1 -O encrypt verity -w 4096

The thing I don't know, is what to replace "make_f2fs -d1 -O encrypt verity -w 4096" with. It's used to force file encryption according to archlinux wiki.

The other problem is a real head scratcher...

The vendor issue: Our fstab.qcom has the flag fileencryption=ice. Which is usually easy enough to change. The problem here is, nothing can mount our vendor partition read/write. The disabler can't, magisk can't, and neither can twrp. I have no clue why. So even if we patch init encryption will still get forced because of fstab flag. We have full read/write access to system, just not vendor or oem. Magisk can mirror a symlink there and change the fstab, but that creates a chicken/egg scenario. We'd have to wipe /data to remove the current encryption, which makes the symlink change useless because it sits in /data... Any help with this would be greatly appreciated.
[Android Software Development] Zackptg5:
This zip uses magiskboot to handle everything in ramdisk so that should be fine unless you mean SAR init?. As for the vendor issue, that's an odd one.

Can you check /dev/block and see what the partitions look like. For example, on my op7pro, there's sda, sdb, etc. So I then run:

su
for i in /dev/block/sd[a-z]; do sgdisk --print $i; done

To get partition information. If you could post your partition info, that'd be a good first step. What device do you have?
[Android Software Development] death_jax:
@Zackptg5

I've a Nokia 7 plus and I'm still on Android 9, NOT encrypted and WITHOUT dm-verity.

I tried to upgrade to Android 10, but without success :( , as described in this my new opened thread (never received an answer):

https://xdaforums.com/nokia-7-plus/help/problem-upgrading-android-9-to-10-dm-t4041301

I tried to upgrade to Android 10 following these steps (working successfully with Android 8/9) (I started from slot B):

flashed full OTA in stock recovery via ADB/external SD sideload

rebooted to bootloader, checked if it switched correctly to slot A and booted temporarily to latest twrp for Android 10 for my model

flashed TWRP installer zip and rebooted to TWRP

flashed Magisk 20.3 (and wiped Dalvik), rebooted to TWRP and flashed Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip (latest at writing time)

or, indifferently,

flashed Magisk 20.3 (and wiped Dalvik) and flashed Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip (latest at writing time)

or, indifferently,

flashed Magisk 20.3 (and wiped Dalvik), manually mounted /system and /vendor and flashed Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip

rebooted to system

but Android 10 cannot boot, bootloop afer android one logo!! :eek:

I attached stock Nokia 7 Plus fstab for Android 10.

Thanks for any help :)
[Android Software Development] Spaceminer:
I have a Moto G7 Play. It's a SAR device, I'm not sure if it's legacy or the other one. I've attached the output of sgdisk for all blocks, and cat /proc/mounts. Vendor is mmblk0p60, system which we have full control over is mmcblk0p62.
[Android Software Development] Zackptg5:
Where was that fstab located? Ramdisk? There's no vendor partition mount in it

Nothing odd in the dumps, so you can't even mount it in twrp? Did you try manual mount:

mount -t auto /dev/block/by_name/vendor_a /vendor

(or _b depending on active slot) (if it doesn't like auto, change to partition type - probably ext4)
[Android Software Development] Spaceminer:
I tried mounting it with the system booted and it works only if I use

mount -t ext4 /dev/block/dm-0 /vendor

. But when I change a file and reboot it reverts back to how it was. (I deleted an unused overlay.) I tried mounting the same way in twrp, and my device bricked when I rebooted. I can't even turn it on, or hard key combo into fastboot. I'm at a loss... PC can't see it. I hate Motorola.
[Android Software Development] death_jax:
In the /vendor partition, /vendor/etc path exactly.

As described here

https://xdaforums.com/nokia-7-plus/help/problem-upgrading-android-9-to-10-dm-t4041301

in Android 8/9 I can manually disable encryption and dm-verity, editing /vendor/etc/fstab.qcom, removing discard, errors=panic and changing fileencryption=ice in encryptable in the /dev/block/bootdevice/by-name/userdata voice inside fstab.com, then copying/creating .magisk file (with KEEPVERITY=false and

KEEPFORCEENCRYPT=false inside it) placing it in /cache path of TWRP and at last flashing Magisk 20.3 in order to remove dm-verity.

But, the above, didn't work for Android 10.

PS: I don't know why and I don't know if it's relevant but, in Nokia 7 Plus model, /cache is in a different path in Android system than the one present in TWRP because, in Android system, /cache become a link of /data/cache

(maybe an error of our TWRP developers or maybe a feature, I don't know :eek: )
[Android Software Development] alecxs:
[MENTION=7718083]Spaceminer[/MENTION] it seems vendor is protected by dm-verity. try to dump block partition, patch offline and raw write disk image
[Android Software Development] Spaceminer:
I might try that in a few days... or a week. I just spent like 3-4hrs battling qboot and blank flash files to get my phone working. I was stuck in EDL.
[Android Software Development] munchy_cool:
Hello [MENTION=6037748]Zackptg5[/MENTION],

on the Xiaomi Poco F1 running official MIUI 11 and Android 10. Device is decrypted using your DFE (latest 4th March version).

install lineage os 17+gapps + DFE. I did check that it was patching the fstab in vendor/etc

device boots into fastboot.

dirty flash, lineage os 17 + gapps (without DFE) and boots fine, and device is still decrypted.

Log and current fstab (from los) attached.

Edit:-I did try multiple roms including Omni and the result is same.

In fact, after booting into a rom if i flash DFE again, it again boots into fastboot.
[Android Software Development] Zackptg5:
Can you both post a link to your rom zip?
[Android Software Development] death_jax:
I'm on stock ROM (until are solved some custom ROM problems that in Nokia 7 Plus model occurs).

All my OTAs (full and incremental) are here:

Nokia 7 Plus OTA & Firmware Collection

Full Android 10 OTA (for my phone, Android 10 came in december):

00WW 4.10C December 2019 Full ROM (B2N-410C-0-00WW-B01-update.zip)

PS: my variant is TA-1046 (dual SIM) and Nokia 7 Plus is an A/B device

PS2: I attached payload_dumper that I used to extract images, if useful :)
[Android Software Development] munchy_cool:
rom link

https://drive.google.com/uc?id=13uJY1B9rBcJPQlibnBoxxnkxiT8rzNjE&export=download

rom source

https://xdaforums.com/poco-f1/development/rom-lineageos-17-1-xiaomi-poco-f1-t4048205

Edit

Just to add, Poco is a only.
[Android Software Development] Zackptg5:
I don't know what to think of that, there's no mount point for vendor in the fstab and I don't see any other fstabs anywhere in ramdisk. I'm wondering if I can just hexpatch init for everyone and stop messing with fstabs entirely. Can you send the recovery.log after flashing DFE?

So the fstab you sent me has no verity or encryption entries at all which is odd for a newer rom. Just don't use this zip, you don't need it :)
[Android Software Development] munchy_cool:
Thanks for taking the time to look into it.

2 more questions.

1. what is DFE doing, that is causing the device to boot into fastboot.

2. would it be possible for DFE to just let us know that we dont need the zip, or like nothing to patch, and not cause device to boot into fastboot?
[Android Software Development] Spaceminer:
How do I edit the raw dump and get it back in? Fastboot won't flash vendor or oem images without validation so edited ones will fail.

I can dd vendor, or get twrp to pull it, but I can't exactly dd the file back. I get a write fail. TWRP can restore a back up of vendor, so that's one way but I can't edit anything... I've tried both emmc and the standard .win, rename to tar, open it etc... But I can't actually edit either kind of backup. I tried on Windows 10 and linux. Linux will see the files inside correctly but windows just corrupts it. (It doubles all the data inside.)

I really wish I could figure out how the changes to oem and vendor are getting reversed. Any changes I make look like they stick, but if you remount the partition or reboot, it gets reversed instantly. I've tried making the same changes to vendor_a and vendor_b at once and it still gets reversed. I don't know how it's even possible. I ran a logcat while doing it, and it just points to Activity stop: failed binder transaction. I've looked that up, and there's nothing on how to fix it. Most people say you can't even debug the transaction buffer. Basically what I'm seeing is, some process fails to release memory from the transaction buffer, so there's no room to write and update the new data. (Not sure what process either. The logs don't say.)
[Android Software Development] Zackptg5:
Can you post a link to your rom so I can take a look at it?
[Android Software Development] Zackptg5:
1. No idea. A recovery.log after flashing it would be helpful but may not show any errors either

2. I could do that with the vendor fstab modifications but not with the ramdisk ones because magiskboot handles it all
[Android Software Development] Spaceminer:
Sure thing! Here's a direct link to the firmware that I'm running currently.

XT1952-4_CHANNEL_RETUS_9.0_PPY29.105-134_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

---------- Post added at 02:08 PM ---------- Previous post was at 01:58 PM ----------

The mounts might be inside the dtb if the boot.img has one. I've seen it on Motorolas (G6 Play has it, G7 Play doesn't.) and some Sammy devices. (No experience with Nokia though.) The easiest way I know to check is a simple, "./magisk unpack boot.img" then load the dtb into a hex editor and search for fstab or strings | grep for it. It could also be in the dtbo too. I've seen some very strange things.