Comments (61)
Nope, no toybox needed. Toybox is included in all roms that it would be required in (oreo+) so we should be good to go. I'll drop the next test build on xda (same as the last one I posted here). Thanks a ton for all of the help and troubleshooting!
from disable_dm-verity_forceencrypt.
Gotcha. Osm0sis is looking into it :)
from disable_dm-verity_forceencrypt.
@Zackptg5 This one works perfect. 👍
from disable_dm-verity_forceencrypt.
Awesome, thanks for the testing!
from disable_dm-verity_forceencrypt.
Good discussion !
from disable_dm-verity_forceencrypt.
@fawazahmed0 Osm0sis pushed a complete rewrite of mounting and looks solid so I'm hoping this will do the trick regardless of how system_root is implemented in twrp. Can you give this one a go?
Disable_Dm-Verity_ForceEncrypt_08.18.2019.zip
from disable_dm-verity_forceencrypt.
Hmm, context shouldn't have been changed but I'll look into it, thanks. Did you use stable or latest test build? https://forum.xda-developers.com/showpost.php?p=79919222&postcount=500
from disable_dm-verity_forceencrypt.
@Zackptg5 I have used this Disable_Dm-Verity_ForceEncrypt_05.21.2019.zip, I assume this is stable version
from disable_dm-verity_forceencrypt.
I see sed command is being used in the script to replace the strings, I have tested in my linux vm, sed does not preserve selinux context
from disable_dm-verity_forceencrypt.
I would use something like this to fetch selinux of a file and store in some variable
somevar=ls -Z filename | awk '{print $1}'
Later after doing the sed editing,
I will use something like this to set the selinux context back:
chcon $somevar filename
from disable_dm-verity_forceencrypt.
Test build https://forum.xda-developers.com/showpost.php?p=79919222&postcount=500 , does not work, it does not patch the fstab
Disabledmveritytestbuild.log
from disable_dm-verity_forceencrypt.
That's a great idea! I'll use that for chcon of all of the fstabs
In your log, it looks like system didn't mount properly and that busted mounting of nvdata.
Can you try this test build? I don't expect the outcome to be any different but it should tell me what the actual error is with system mounting
Disable_Dm-Verity_ForceEncrypt_07.24.2019.zip
from disable_dm-verity_forceencrypt.
Here is the recovery log for stable build zip
disableveritystablebuild.log
Everything works perfectly in this except the selinux context gets changed, anyways I can manually edit it from twrp adb shell.
Just one more thing, after flash your stable build, it shows these lines in twrp adb shell:
WARNING: linker: Warning: couldn't read "/system/etc/ld.config.txt" for "/sbin/t
oybox" (using default configuration instead): error reading file "/system/etc/ld
.config.txt": Too many symbolic links encountered
Any time I enter any command in twrp adb shell, I get these lines, I am not sure what these lines means. Anyways thanks for your script
from disable_dm-verity_forceencrypt.
That's a great idea! I'll use that for chcon of all of the fstabs
In your log, it looks like system didn't mount properly and that busted mounting of nvdata.Can you try this test build? I don't expect the outcome to be any different but it should tell me what the actual error is with system mounting
Disable_Dm-Verity_ForceEncrypt_07.24.2019.zip
Testing now,wait
from disable_dm-verity_forceencrypt.
@Zackptg5
07.24.2019testbuild.log
Here is the log for 07.24.2019 test build
from disable_dm-verity_forceencrypt.
Hmm okay. I think I see the problem so hopefully this'll fix it. Try this zip and send me the log too (it has your file context fix in it btw)
Disable_Dm-Verity_ForceEncrypt_07.24.2019.zip
from disable_dm-verity_forceencrypt.
Hmm okay. I think I see the problem so hopefully this'll fix it. Try this zip and send me the log too (it has your file context fix in it btw)
Disable_Dm-Verity_ForceEncrypt_07.24.2019.zip
07.24.2019v2testbuild.log
This one works like stable build now, but the selinux context of fstab still got changed to u:object_r:unlabeled:s0, so network was not working
from disable_dm-verity_forceencrypt.
ok I see the problem in your script
it should be some thing like:
PERM="$(ls -Z $i | awk '{print $1}')"
and not
PERM="$(ls -z $i | awk '{print $1}')"
Z should be uppercase
wait I will test and see, if that works
from disable_dm-verity_forceencrypt.
ok, the problem is in busybox ls, which is stripped down version of ls, it does not support -Z (selinux) flag
from disable_dm-verity_forceencrypt.
@Zackptg5 This one works perfectly:
PERM="$(/sbin/ls -Z $i | awk '{print $1}')"
Kindly update the script :)
from disable_dm-verity_forceencrypt.
@Zackptg5 one more thing, awk '{print $1}' works only in my phone, other phones might have selinux context in other fields like awk '{print $3}' , you might have to use pattern matching or something else.
selinux context follows this pattern: :*:*:
from disable_dm-verity_forceencrypt.
Thanks for the tip, I have to be specific with it though because TWRP includes different binaries on different devices. It looks like toybox ls has it and is probably what you have in your TWRP. Lots of older ones have busybox instead so I'll need to include it in the zip then.
What else would be outputted other than the security context and filename for toybox ls? It should be all that's outputted for toybox
from disable_dm-verity_forceencrypt.
Okay, got toybox bundled in for it's ls applet so give this a try
Disable_Dm-Verity_ForceEncrypt_07.24.2019.zip
from disable_dm-verity_forceencrypt.
Okay, got toybox bundled in for it's ls applet so give this a try
@Zackptg5
Great idea to use toybox, now ls output will be consistent across all the devices.
Coming to your new zip, log message showing many errors in it, I guess maybe just a syntax error in your script.It got stopped in middle with error 1
Also the selinux thing does not work in your new zip. selinux got changed to ? for fstab
from disable_dm-verity_forceencrypt.
ok, the problem is in your compiled toybox, it prints ? instead of printing selinux context, don't know why that's happening, toybox in my twrp sbin print's selinux context properly
from disable_dm-verity_forceencrypt.
Looks like syntax error and some more mounting problems :/
I grabbed those binaries from the official site too - I'll test them out more and figure something out
from disable_dm-verity_forceencrypt.
@Zackptg5 ok I have used your previous zip (as it gives no syntax error) and added twrp compiled toybox in the zip (copied from /sbin) and now everything works perfectly fine , i.e selinux context is preserved etc.
from disable_dm-verity_forceencrypt.
Can you try this one (replace toybox with yours for now) and see if it all works as intended? Think I got the mounting stuff fixed here (and stupid syntax error)
Disable_Dm-Verity_ForceEncrypt_07.25.2019.zip
from disable_dm-verity_forceencrypt.
Can you try this one (replace toybox with yours for now) and see if it all works as intended? Think I got the mounting stuff fixed here (and stupid syntax error)
yeah works perfectly fine, provided I copy my twrp toybox in it, maybe it will be better to compile toybox from android source
from disable_dm-verity_forceencrypt.
ok, wait, I will get the toybox for you
from disable_dm-verity_forceencrypt.
I tried fetching the toybox from arm gsi, but it does not work, I guess it depends on dynamic libraries to work
from disable_dm-verity_forceencrypt.
Guess that makes sense. I looked into a different avenue and restorecon may do what we want. Give this a go and see if it works - no toybox required
Disable_Dm-Verity_ForceEncrypt_07.25.2019.zip
from disable_dm-verity_forceencrypt.
Scratch that last one, restorecon didn't work initially and I then found that it was a part of toybox.
Then had the 'duh' moment - toybox is in /system/bin on every marshmallow and newer rom so I can just use it so this one may finally fit the bill.
Disable_Dm-Verity_ForceEncrypt_07.25.2019.zip
from disable_dm-verity_forceencrypt.
Scratch that last one, restorecon didn't work initially and I then found that it was a part of toybox.
Then had the 'duh' moment - toybox is in /system/bin on every marshmallow and newer rom so I can just use it so this one may finally fit the bill.
Disable_Dm-Verity_ForceEncrypt_07.25.2019.zip
@Zackptg5 I think that might not work, because binaries in /system/bin depends on dynamic libraries.
Before flashing the script, I tried mount the system and then tried executing '/system/bin/toybox ls -Z' using twrp adb shell and it didn't worked. Someone has to compile the toybox, I have complete Omni source at my vm, I would have done it, but I have many bad sectors in my harddisk, starting vm causes blue screen problem.
from disable_dm-verity_forceencrypt.
If I solve my blue screen problem, then I will compile the arm version
from disable_dm-verity_forceencrypt.
It worked for me when I tested it, did you try it? Since system and vendor are mounted all of the dependencies should be there I would think.
I'd need arm and x86 builds if you're able to build
from disable_dm-verity_forceencrypt.
It worked for me when I tested it, did you try it? Since system and vendor are mounted all of the dependencies should be there I would think.
I'd need arm and x86 builds if you're able to build
Sorry, I thought it will not work , so didn't test it, because restoring things back to stock is a pain in this device as the twrp restore doesn't work and I have to use fastboot to restore.
Yeah, I just tested it now, it works perfectly. Do you still need toybox builds? I will do that when the pc gets working again. please confirm
from disable_dm-verity_forceencrypt.
@fawazahmed0 osm0sis (developer of ak3) reworked some of the system_root mounting stuff and wanted to know if it works now so could you test this out when you get the chance? Thanks
Disable_Dm-Verity_ForceEncrypt_08.11.2019.zip
from disable_dm-verity_forceencrypt.
@Zackptg5 You asked at the right time.
I flashed the zip, and It did not work. Here is log
I tried dmvertiy_08.02.2019.zip yesterday and that one worked for me.
from disable_dm-verity_forceencrypt.
@Zackptg5
It's trying to mount system from wrong location
It shouldn't be :
/dev/block/bootdevice/by-name/system
It should mount from:
/dev/block/by-name/system
or
/dev/block/platform/bootdevice/by-name/system
from disable_dm-verity_forceencrypt.
/dev/block/bootdevice should symlink to proper path. Can you post recovery log after flashing this so I could forward it to osm0sis? Thanks
from disable_dm-verity_forceencrypt.
@Zackptg5 You asked at the right time.
I flashed the zip, and It did not work. Here is logI tried dmvertiy_08.02.2019.zip yesterday and that one worked for me.
@Zackptg5 Here is the log
from disable_dm-verity_forceencrypt.
Thanks, I'll forward it on to him
from disable_dm-verity_forceencrypt.
@fawazahmed0
Talked to osm0sis and I think he got a better solution worked out. How's this one work (log as before)
Disable_Dm-Verity_ForceEncrypt_08.11.2019.zip
Thanks!
from disable_dm-verity_forceencrypt.
@Zackptg5
This one worked, Here is the log:
dm_verity_v2_08_11_2019.txt
from disable_dm-verity_forceencrypt.
@Zackptg5 @osm0sis Today I flashed a new twrp build , with these new changes:
fawazahmed0/android_device_Realme3_RMX1821@b4aceb0
I then tried the dmverity.zip and it did not work, I guess the problem is in how the twrp mounts the partitions.
Previouly, my twrp mounted system partition at /system (wrong way to mount for system as root devices, but still many SAR devices uses this in their twrp fstab)
The zip works perfectly well in the above setup. Here is the log
dmverity_08_11_19_v2_no_systemroot.txt
In my newly build twrp, the system partition is mounted at /system_root (right way to mount for SAR devices, I can now execute /system/bin binaries through twrp shell, as everything is mounted properly)
The zip didn't work in the above setup. Here is the log:
dm_verity_08_11_19_v2_with_systemrootmount.txt
from disable_dm-verity_forceencrypt.
Your device TWRP maintainer needs to fix it so you have the correct links in /dev/block
for a SAR device. Yours has /dev/block/platform/bootdevice
for some reason where the correct symlink is /dev/block/bootdevice
and always has been.
Your ongoing issues boil down to "broken TWRP is broken" so that's where the burden of resolving them should go.
Edit: Also I think you need to revert the fstab change in the commit you linked.
from disable_dm-verity_forceencrypt.
@osm0sis Thanks for pointing that, I have solved the bootdevice mount thing for now:
fawazahmed0/android_device_Realme3_RMX1821@1dd4bef
Coming to fstab change, I guess that is the right way to mount in SAR devices, for example see here:
TeamWin/android_device_realme_RMX1851@0d20a81
TeamWin/android_device_xiaomi_violet@581fb3d
TeamWin/android_device_xiaomi_perseus@8d2e63b
I will ask about this in slack, let's see what they reply
from disable_dm-verity_forceencrypt.
Looks like the path is figured out :)
This this will be next release if it works for you:
Disable_Dm-Verity_ForceEncrypt_08.13.2019.zip
from disable_dm-verity_forceencrypt.
@Zackptg5 Doesn't seem to work
Here is the log:
dm_verity_08_13_2019.txt
from disable_dm-verity_forceencrypt.
@osm0sis @Zackptg5 I am not sure, how AK script works, but I was trying to understand how opengapps works in /system and /system_root mount without throwing any error.
This is what I got:
if [ -n "$(cat /proc/cmdline | grep slot_suffix)" ];
then
device_abpartition=true
SYSTEM_MOUNT=/system
SYSTEM=$SYSTEM_MOUNT/system
VENDOR=/vendor/vendor
elif [ -n "$(cat /etc/fstab | grep /system_root)" ];
then
device_abpartition=false
SYSTEM_MOUNT=/system_root
SYSTEM=$SYSTEM_MOUNT/system
VENDOR=/vendor
else
device_abpartition=false
SYSTEM_MOUNT=/system
SYSTEM=$SYSTEM_MOUNT
VENDOR=/vendor
fi
from disable_dm-verity_forceencrypt.
Log is saying that system wasn't found in the fstab. Can you try this one and post log? I added some debug lines to it
Disable_Dm-Verity_ForceEncrypt_08.13.2019.zip
from disable_dm-verity_forceencrypt.
@Zackptg5 Here is the log: dmverity_08_13_19_v2.txt
from disable_dm-verity_forceencrypt.
Looks like it's an issue with your twrp. /system isn't present in the fstab so it isn't getting mounted. Magisk installer and other zips will likely fail too
from disable_dm-verity_forceencrypt.
@Zackptg5 nope, magisk is working, tested it today
from disable_dm-verity_forceencrypt.
Hmm, it uses a similar method. Here's the error:
/tmp/anykernel/tools/busybox mount -o rw -t auto /system mount: can't find /system in /etc/fstab
That command should work in twrp
from disable_dm-verity_forceencrypt.
Give me that magisk zip, with debugging enabled , I will post the log here
from disable_dm-verity_forceencrypt.
from disable_dm-verity_forceencrypt.
from disable_dm-verity_forceencrypt.
Looks like magisk does it differently. I'm not exactly sure what normal twrp setup is but it looks like you did remove system from the fstab here: https://github.com/fawazahmed0/android_device_realme_spartan/commit/99b158ac9edde8273ed69c58874210ab092b181e
@osm0sis Should both system and system_root be present in it?
from disable_dm-verity_forceencrypt.
@Zackptg5 see here: <Removed so noobs won't find it>
from disable_dm-verity_forceencrypt.
Related Issues (15)
- Use hex patch for dtb patching HOT 3
- Please give old version download link HOT 1
- Does not work with adb sideload HOT 9
- disable forceencrypt breaks encryption HOT 24
- Device stucks after installing it HOT 5
- Disable Force Encrypt Not Working On Xiaomi Redmi 6 (cereus) with MIUI 8.11.8
- Seems not working on Redmi K30 Pro MIUI 12.1 20.7.9 beta
- Unable to flash on Poco F3 due to inability to mount '/mnt/vendor/spunvm/'
- Redmi note 6 pro HOT 3
- can not boot HOT 6
- asus zenfone max m1 HOT 1
- Help me to understand please HOT 2
- Not working on pixel 3 with android 9. HOT 5
- grep not matching fstab HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disable_dm-verity_forceencrypt.