forked from TeamWin/android_device_xiaomi_ginkgo
-
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.
ginkgo: Unify dynamic and non-dynamic
Signed-off-by: erwinabs <[email protected]>
- Loading branch information
Showing
13 changed files
with
62 additions
and
62 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/system/bin/sh | ||
# Determine the filesystem of a block device | ||
|
||
FBE=$(getprop ro.crypto.dm_default_key.options_format.version) | ||
|
||
# Check if EROFS filesystem is present | ||
dd if=/dev/block/by-name/system bs=256k count=1 | strings | grep -q -E "ginkgo_erofs_dynapart" | ||
ISEROFS=$? | ||
|
||
# Dynamic partitions | ||
if dd if=/dev/block/by-name/system bs=256k count=1 | strings | grep -q -E "ginkgo_dynapart|qti_dynamic_partitions|ginkgo_erofs_dynapart"; then | ||
if [ "$ISEROFS" -eq 0 ]; then | ||
cat /system/etc/recovery.fstab.erofs >> /system/etc/recovery.fstab | ||
else | ||
cat /system/etc/recovery.fstab.ext4 >> /system/etc/recovery.fstab | ||
fi | ||
|
||
if [ "$FBE" = "2" ]; then | ||
cat /system/etc/recovery.fstab.fbev2 >> /system/etc/recovery.fstab | ||
fi | ||
|
||
for p in system vendor; do | ||
echo "/super_${p} emmc /dev/block/bootdevice/by-name/${p} flags=display=\"Super_${p}\";backup=1" >> /system/etc/twrp.flags | ||
done | ||
else | ||
# Non-dynamic partitions | ||
cat /system/etc/twrp.flags.nondynpart >> /system/etc/twrp.flags | ||
cat /system/etc/recovery.fstab.fbev1 >> /system/etc/recovery.fstab | ||
fi |
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,5 @@ | ||
system /system erofs ro wait,avb,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey | ||
system_ext /system_ext erofs ro wait,avb,logical,first_stage_mount | ||
product /product erofs ro wait,avb,logical,first_stage_mount | ||
vendor /vendor erofs ro wait,avb,logical,first_stage_mount | ||
odm /odm erofs ro wait,avb,logical,first_stage_mount |
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,5 @@ | ||
system /system ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey | ||
system_ext /system_ext ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount | ||
product /product ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount | ||
vendor /vendor ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount | ||
odm /odm ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount |
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,2 @@ | ||
/dev/block/bootdevice/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable,wrappedkey | ||
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,nodiscard,alloc_mode=reuse,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,fileencryption=ice,wrappedkey,keydirectory=/metadata/vold/metadata_encryption,quota |
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,2 @@ | ||
/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,check,formattable,first_stage_mount | ||
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,metadata_encryption=aes-256-xts:wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=128M,checkpoint=fs |
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,4 @@ | ||
/system_root ext4 /dev/block/bootdevice/by-name/system flags=display="System";backup=0;wipeingui | ||
/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=display="Vendor";backup=0;wipeingui | ||
/system_image emmc /dev/block/bootdevice/by-name/system | ||
/vendor_image emmc /dev/block/bootdevice/by-name/vendor |