android_device_motorola_guamp/rootdir/bin/init.qti.chg_policy.sh
GarfieldFernando eddf6fbda6 guamp: Initial device tree
- Initial device tree for guamp device
- Based in Qualcomm SM6115

Signed-off-by: GarfieldFernando <ferchito.zoma@gmail.com>
2021-01-18 15:03:21 -06:00

29 lines
890 B
Bash

#! /vendor/bin/sh
#
# Copyright (c) 2019 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#
# Copyright (c) 2019 The Linux Foundation. All rights reserved.
#
export PATH=/vendor/bin
prefix="/sys/class/"
#List of folder for ownership update
arr=( "power_supply/battery/" "power_supply/usb/" "power_supply/main/" "power_supply/charge_pump_master/" "power_supply/pc_port/" "power_supply/dc/" "power_supply/bms/" "power_supply/parallel/" "usbpd/usbpd0/" "qc-vdm/" "charge_pump/" "qcom-battery/" )
for i in "${arr[@]}"
do
for j in `ls "$prefix""$i"`
do
#skip directories to prevent possible security issues.
if [[ -d "$prefix""$i""$j" ]]
then
continue
else
chown -h system.system "$prefix""$i""$j"
fi
done
done
setprop persist.vendor.hvdcp_opti.start 1