-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make decryption universal, fix usb, add tools for super partitions
All credit goes to brigudav!
- Loading branch information
rxuglr
committed
Nov 27, 2022
1 parent
23f3444
commit 7ea9c59
Showing
16 changed files
with
166 additions
and
44 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/system/bin/sh | ||
# This script is needed to support wrappedkey and fbe v2 | ||
# Author : brigudav | ||
# | ||
|
||
n=1 | ||
|
||
while [ $n -le 2 ]; do | ||
|
||
finish() { | ||
sleep 1 | ||
umount $tmpv || true | ||
rmdir $tmpv | ||
exit 1 | ||
} | ||
|
||
logf=/tmp/recovery.log | ||
tmpv=/tmp/vendor_fstab | ||
mkdir -p $tmpv | ||
fstabd=$tmpv/etc/fstab.default | ||
fstabq=$tmpv/etc/fstab.qcom | ||
fstabr=/system/etc/recovery.fstab | ||
mount -o ro -t auto /dev/block/mapper/vendor $tmpv || true | ||
if [ -f $fstabq ]; then | ||
fbev2=$(grep "/userdata" ${fstabq} | grep ":v2") | ||
echo "I:Find $fstabq" >> $logf | ||
if [ -z "$fbev2" ]; then | ||
echo "I:This ROM not support FBE v2. Changing flags in fstab" >> $logf | ||
cp $fstabr.bak $fstabr | ||
wrapv=$(grep "/userdata" ${fstabq} | grep "wrappedkey") | ||
if [ -n "$wrapv" ]; then | ||
echo "I:And enabled supports wrappedkey..." >> $logf | ||
sed -i -e "s/formattable/formattable,wrappedkey/g" $fstabr | ||
fi | ||
finish | ||
else | ||
echo "I:This ROM with FBE v2. Continuing with the default fstab." >> $logf | ||
finish | ||
fi | ||
elif [ -f $fstabd ]; then | ||
cp $fstabr.bak $fstabr | ||
wrap=$(grep "/userdata" ${fstabd} | grep "wrappedkey") | ||
echo "I:Find $fstabd" >> $logf | ||
if [ -n "$wrap" ]; then | ||
echo "I:This ROM supports wrappedkey. Changing flags in fstab" >> $logf | ||
sed -i -e "s/formattable/formattable,wrappedkey/g" $fstabr | ||
fi | ||
finish | ||
fi | ||
sleep 1 | ||
done | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> | ||
system /system ext4 ro,barrier=1,discard wait,logical | ||
system_ext /system_ext ext4 ro,barrier=1,discard wait,logical | ||
product /product ext4 ro,barrier=1,discard wait,logical | ||
vendor /vendor ext4 ro,barrier=1,discard wait,logical | ||
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,noatime,nodev,barrier=1 wait | ||
/dev/block/bootdevice/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable | ||
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt wait,check,formattable,fileencryption=ice,quota | ||
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
ro.product.vendor.marketname=Poco X3 NFC | ||
ro.product.board=surya | ||
ro.product.board=sm6150 | ||
ro.board.platform=sm6150 | ||
sys.usb.controller=a600000.dwc3 | ||
sys.usb.rndis.func.name=rndis_bam | ||
sys.usb.rmnet.func.name=rmnet_bam | ||
persist.sys.isUsbOtgEnabled=true | ||
vendor.gatekeeper.disable_spu=true | ||
ro.hardware.keystore_desede=true | ||
ro.boot.dynamic_partitions=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
ro.crypto.allow_encrypt_override=true | ||
ro.crypto.dm_default_key.options_format.version=2 | ||
ro.crypto.volume.metadata.method=dm-default-key | ||
ro.crypto.volume.filenames_mode=aes-256-cts | ||
ro.crypto.volume.options=::v2 | ||
ro.crypto.volume.filenames_mode=aes-256-cts | ||
ro.crypto.volume.metadata.method=dm-default-key |