diff options
author | Arian <arian.kulmer@web.de> | 2019-08-17 18:15:24 +0200 |
---|---|---|
committer | Arian <arian.kulmer@web.de> | 2019-10-25 22:16:13 +0200 |
commit | f830aea419318e71934683a56652b18db782105f (patch) | |
tree | 073827de9637ae83a69e96716db62bf973245ef1 /rootdir/system/vendor | |
parent | 03e187ba0c3beba4ad529922d9328887d222aa90 (diff) |
shinano-common: Restructure rootdir folder
Diffstat (limited to 'rootdir/system/vendor')
-rwxr-xr-x | rootdir/system/vendor/bin/credmgrfirstboot.sh | 55 | ||||
-rw-r--r-- | rootdir/system/vendor/bin/init.qcom-sensor.sh | 23 |
2 files changed, 0 insertions, 78 deletions
diff --git a/rootdir/system/vendor/bin/credmgrfirstboot.sh b/rootdir/system/vendor/bin/credmgrfirstboot.sh deleted file mode 100755 index 3b3ade9..0000000 --- a/rootdir/system/vendor/bin/credmgrfirstboot.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/system/vendor/bin/sh -CREDFOLDER=/data/credmgr -LOG=/cache/credmgr.log - -# start new log file -echo -e "\n*********************************\n$(date) - $0 started" > $LOG - -# simple error function writing to kernel buffer and logfile -F_ERR(){ - ERR="$1" - MSG="$2" - if [ $ERR -ne 0 ];then - echo "CREDINIT: $MSG failed!" >> $LOG - exit $ERR - else - echo "CREDINIT: $MSG finished successfully" >> $LOG - fi -} - -# If credmgrd data doesn't match our -CREDMGRCNT=$(find $CREDFOLDER -group system -type f -name "credmgr.db" | wc -l ) - -echo -e "credmgr folder:\n$(ls -la $CREDFOLDER)\ncredmgr match (if any):" >> $LOG -find $CREDFOLDER -group system -type f -name "credmgr.db" >> $LOG - - -if [ "x$CREDMGRCNT" == "x0" ]; then - # If /data/credmgr exist remove it - echo "CREDINIT: Dont match" - if [ -d "$CREDFOLDER" ]; then - echo "CREDINIT: Drop old credmgrdata" - mv -vf $CREDFOLDER ${CREDFOLDER}.$(date +"%Y-%m-%d") >> $LOG 2>&1 - fi - # Put binary into /cache - mkdir $CREDFOLDER >> $LOG 2>&1 - F_ERR $? "mkdir $CREDFOLDER" - # Set perms on folder - chown system:system $CREDFOLDER >> $LOG 2>&1 - F_ERR $? "chown $CREDFOLDER" - chmod 770 $CREDFOLDER >> $LOG 2>&1 - F_ERR $? "chmod 770" - chcon u:object_r:credmgrd_data_file:s0 $CREDFOLDER >> $LOG 2>&1 - F_ERR $? "chcon $CREDFOLDER" - echo "CREDINIT: cp initial file" >> $LOG 2>&1 - cp -v /system/vendor/CredentialManagerData /cache/CredentialManagerData >> $LOG 2>&1 - F_ERR $? "copy CredentialManagerData" - chown system:system /cache/CredentialManagerData >> $LOG 2>&1 - F_ERR $? "chown CredentialManagerData" -else - F_ERR 0 "credmgr found already. no preparation required." -fi - -# Tell init we are ready -setprop sys.credmgrdready true -F_ERR $? "setting property" diff --git a/rootdir/system/vendor/bin/init.qcom-sensor.sh b/rootdir/system/vendor/bin/init.qcom-sensor.sh deleted file mode 100644 index f8ab53f..0000000 --- a/rootdir/system/vendor/bin/init.qcom-sensor.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/system/vendor/bin/sh -# Copyright (C) 2013 Sony Mobile Communications AB. - -# -# Function to start sensors for DSPS enabled platforms -# -start_sensors() -{ - if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then - chmod -h 775 /persist/sensors - chmod -h 664 /persist/sensors/sensors_settings - chown -h system.root /persist/sensors/sensors_settings - - mkdir -p /data/misc/sensors - chmod -h 775 /data/misc/sensors - - echo 1 > /persist/sensors/settings - start sensors - fi -} - -start_sensors - |