Skip to content

Commit

Permalink
Add support for india.img
Browse files Browse the repository at this point in the history
Signed-off-by: engstk <eng.stk@sapo.pt>
  • Loading branch information
mauronofrio authored and engstk committed Dec 20, 2019
1 parent 018942a commit 8d70c66
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
6 changes: 3 additions & 3 deletions recovery/root/init.recovery.qcom.rc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ service keymaster-3-0 /sbin/android.hardware.keymaster@3.0-service-qti
disabled
seclabel u:r:recovery:s0

service patchreserve-service /sbin/patchreserve-service.sh
service patchfakepartitions-service /sbin/patchfakepartitions-service.sh
user root
group root
disabled
Expand All @@ -107,8 +107,8 @@ on boot
setprop sys.usb.config adb
write /proc/touchpanel/gesture_enable 1
write /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/usb/otg_switch 1
chmod 0777 /sbin/patchreserve-service.sh
start patchreserve-service
chmod 0777 /sbin/patchfakepartitions-service.sh
start patchfakepartitions-service

on init
start hwservicemanager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/sbin/sh
# This script is needed to permananetly keep reserve_a and reserve_b fake partitions and /data/reserve/reserve.img.
# This script is needed to permananetly keep reserve_a and reserve_b fake partitions and /data/reserve/reserve.img and to keep india_a and india_b fake partitions and /data/india/india.img.

n=1

Expand Down Expand Up @@ -59,6 +59,60 @@ else
echo "/dev/block/by-name/reserve_b created"
fi

# Check if already exist the /data/india directory symlink and create it
if [ -d /data/india ];
then
echo "/data/india already exist"
else
mkdir /data/india
echo "/data/india created"
fi

# Check if already exist the /data/india/india.img symlink and create it
if [ -f /data/india/india.img ];
then
echo "/data/india/india.img already exist"
else
touch /data/india/india.img
echo "/data/india/india.img created"
fi

# Check if already exist the /dev/block/bootdevice/by-name/india_a symlink and create it
if [ -L /dev/block/bootdevice/by-name/india_a ];
then
echo "/dev/block/bootdevice/by-name/india_a already exist"
else
ln -s /data/india/india.img /dev/block/bootdevice/by-name/india_a
echo "/dev/block/bootdevice/by-name/india_a created"
fi

# Check if already exist the /dev/block/bootdevice/by-name/india_b symlink and create it
if [ -L /dev/block/bootdevice/by-name/india_b ];
then
echo "/dev/block/bootdevice/by-name/india_b already exist"
else
ln -s /data/india/india.img /dev/block/bootdevice/by-name/india_b
echo "/dev/block/bootdevice/by-name/india_b created"
fi

# Check if already exist the /dev/block/by-name/india_a symlink and create it
if [ -L /dev/block/by-name/india_a ];
then
echo "/dev/block/by-name/india_a already exist"
else
ln -s /data/india/india.img /dev/block/by-name/india_a
echo "/dev/block/by-name/india_a created"
fi

# Check if already exist the /dev/block/by-name/india_b symlink and create it
if [ -L /dev/block/by-name/india_b ];
then
echo "/dev/block/by-name/india_b already exist"
else
ln -s /data/india/india.img /dev/block/by-name/india_b
echo "/dev/block/by-name/india_b created"
fi

done

exit 0

0 comments on commit 8d70c66

Please sign in to comment.