aboutsummaryrefslogtreecommitdiff
path: root/scripts/mount_pds.sh
blob: 4ad51b5614059aec9f868fbf23400a0368788b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/system/bin/sh
export PATH=/system/xbin:$PATH

if [ ! -f /cache/pds-CM10.img ]
then
    #make a copy of pds in /cache
    /system/xbin/dd if=/dev/block/platform/msm_sdcc.1/by-name/pds of=/cache/pds-CM10.img
    echo "Backed up PDS"
fi

#mount the fake pds
/system/xbin/losetup /dev/block/loop0 /cache/pds-CM10.img
/system/xbin/busybox mount -o rw /dev/block/loop0 /pds
/system/bin/restorecon -R /pds
echo "Mounted PDS"