add decryption support and cleanup
parent
7540cd0071
commit
d324fdaad5
@ -0,0 +1,14 @@
|
||||
# Android fstab file.
|
||||
# The filesystem that contains the filesystem checker binary (typically /system) cannot
|
||||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
|
||||
|
||||
#TODO: Add 'check' as fs_mgr_flags with data partition.
|
||||
# Currently we dont have e2fsck compiled. So fs check would failed.
|
||||
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1,discard wait,verify
|
||||
/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,resize,encryptable=footer
|
||||
/devices/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
|
||||
/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
|
||||
/devices/soc/7000000.ssusb/7000000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
|
||||
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
|
||||
@ -1,5 +0,0 @@
|
||||
on boot
|
||||
|
||||
# For starting recovery on 5.0 and newer
|
||||
service recovery /sbin/recovery
|
||||
seclabel u:r:recovery:s0
|
||||
@ -1,28 +0,0 @@
|
||||
on fs
|
||||
# needed to make qseecomd work in recovery
|
||||
chmod 0660 /dev/qseecom
|
||||
chown system drmrpc /dev/qseecom
|
||||
chmod 0664 /dev/ion
|
||||
chown system system /dev/ion
|
||||
|
||||
|
||||
# Oreo has qseecomd in /vendor/bin so add the additional
|
||||
# service. Only an existi both.
|
||||
|
||||
service sys_qseecomd /system/bin/qseecomd
|
||||
user root
|
||||
group root
|
||||
setenv PATH /system/bin:/system/vendor/bin:/vendor/bin
|
||||
setenv LD_LIBRARY_PATH /system/lib64:/system/lib:/system/vendor/lib64:/system/vendor/lib:/vendor/lib64:/vendor/lib
|
||||
disabled
|
||||
oneshot
|
||||
seclabel u:r:recovery:s0
|
||||
|
||||
service ven_qseecomd /vendor/bin/qseecomd
|
||||
user root
|
||||
group root
|
||||
setenv PATH /vendor/bin:/system/bin:/system/vendor/bin
|
||||
setenv LD_LIBRARY_PATH /vendor/lib64:/system/lib64:/vendor/lib:/system/lib:/system/vendor/lib64:/system/vendor/lib
|
||||
disabled
|
||||
oneshot
|
||||
seclabel u:r:recovery:s0
|
||||
@ -1,12 +0,0 @@
|
||||
import /init.recovery.vold_decrypt.qseecomd.rc
|
||||
|
||||
service sys_vold /system/bin/vold \
|
||||
--blkid_context=u:r:blkid:s0 --blkid_untrusted_context=u:r:blkid_untrusted:s0 \
|
||||
--fsck_context=u:r:fsck:s0 --fsck_untrusted_context=u:r:fsck_untrusted:s0
|
||||
socket vold stream 0660 root mount
|
||||
socket cryptd stream 0660 root mount
|
||||
setenv PATH /system/bin:/system/vendor/bin
|
||||
setenv LD_LIBRARY_PATH /system/lib64:/system/lib:/system/vendor/lib64:/system/vendor/lib
|
||||
disabled
|
||||
oneshot
|
||||
seclabel u:r:recovery:s0
|
||||
@ -0,0 +1,43 @@
|
||||
#!/sbin/sh
|
||||
while [ "$(getprop ro.crypto.fs_crypto_blkdev)" != "/dev/block/dm-0" ]; do
|
||||
if [ ! -d /system/etc ]; then #mount system if not already mounted
|
||||
mount /system -o ro
|
||||
fi
|
||||
if [ `blkid /dev/block/bootdevice/by-name/vendor | grep -c ext4` -lt 1 ]; then
|
||||
if [ ! -L /vendor ]; then
|
||||
ln -s /system/vendor /vendor #if no vendor partition symlink it
|
||||
fi
|
||||
else
|
||||
if [ ! -d /vendor ]; then # create a /vendor directory to mount onto if not there
|
||||
if [ -L /vendor ]; then #if it exists and isnt a directory get it out of the way
|
||||
rm /vendor
|
||||
fi
|
||||
mkdir /vendor
|
||||
fi
|
||||
mount /dev/block/bootdevice/by-name/vendor /vendor -t ext4 -o ro
|
||||
fi
|
||||
if [ -f /system/bin/qseecomd ]; then
|
||||
# start sys_qseecomd
|
||||
if [ -z "$(pidof qseecomd)" ]; then #make sure it isnt already running
|
||||
LD_LIBRARY_PATH='/system/lib64:/system/lib' PATH='/system/bin' /system/bin/qseecomd &
|
||||
fi
|
||||
else
|
||||
# start ven_qseecomd
|
||||
if [ -z "$(pidof qseecomd)" ]; then
|
||||
LD_LIBRARY_PATH='/vendor/lib64:/system/lib64:/vendor/lib:/system/lib' PATH='/vendor/bin:/system/bin' /vendor/bin/qseecomd &
|
||||
fi
|
||||
fi
|
||||
while [ ! -d /data/media ]; do
|
||||
sleep 0.02
|
||||
if [ ! -d /system/etc ]; then #sometimes /system gets unmounted
|
||||
mount /system -o ro
|
||||
fi
|
||||
done
|
||||
if [ ! -z "$(pidof qseecomd)" ]; then
|
||||
killall qseecomd
|
||||
fi
|
||||
if [ -d /system/etc ]; then
|
||||
umount /system
|
||||
fi
|
||||
exec /sbin/sh /qseecom.sh
|
||||
done
|
||||
@ -0,0 +1,51 @@
|
||||
#!/sbin/sh
|
||||
|
||||
while [ -z $cryptodone ]; do
|
||||
if [ -z "`mount | grep -w /system`" ]; then
|
||||
mount -o ro /system
|
||||
fi
|
||||
|
||||
if [ -n "`blkid /dev/block/bootdevice/by-name/vendor | grep ext4`" ] && [ -z "`mount | grep -w /vendor`" ]; then
|
||||
if [ -L /vendor ]; then
|
||||
rm /vendor
|
||||
fi
|
||||
if [ ! -d /vendor ]; then
|
||||
mkdir /vendor
|
||||
fi
|
||||
mount -t ext4 -o ro /dev/block/bootdevice/by-name/vendor /vendor
|
||||
fi
|
||||
|
||||
if [ -z "`ls -A /vendor`" ]; then
|
||||
if [ -n "`mount | grep -w /vendor`" ]; then
|
||||
umount /vendor
|
||||
fi
|
||||
if [ -d /vendor ]; then
|
||||
rmdir /vendor
|
||||
fi
|
||||
ln -sf /system/vendor /vendor
|
||||
fi
|
||||
|
||||
if [ -z "`pidof qseecomd`" ]; then
|
||||
if [ -f /system/bin/qseecomd ]; then
|
||||
LD_LIBRARY_PATH='/system/lib64:/system/lib' PATH='/system/bin' /system/bin/qseecomd &
|
||||
else
|
||||
LD_LIBRARY_PATH='/vendor/lib64:/system/lib64:/vendor/lib:/system/lib' PATH='/vendor/bin:/system/bin' /vendor/bin/qseecomd &
|
||||
fi
|
||||
fi
|
||||
|
||||
case `getprop ro.crypto.fs_crypto_blkdev` in
|
||||
/dev/block/dm-*) cryptodone=1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n $cryptodone ]; then
|
||||
killall qseecomd
|
||||
fi
|
||||
|
||||
if [ -n "`mount | grep -w /system`" ]; then
|
||||
umount /system
|
||||
fi
|
||||
|
||||
if [ -n "`mount | grep -w /vendor`" ]; then
|
||||
umount /vendor
|
||||
fi
|
||||
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
#!/sbin/sh
|
||||
|
||||
reboot edl
|
||||
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.
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.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue