Commit c4cd5c9d authored by Ameer Dawood's avatar Ameer Dawood
Browse files

v9.51

Added: Preservation of SELinux contexts.
Bug Fix: Data partition size calculated incorrectly when excluding Google Music cache.
Bug Fix: TWRP backups taking too long for file list.
parent 8048d102
...@@ -241,3 +241,6 @@ v9.50 - Added: LED notification for Samsung Galaxy Relay 4G. ...@@ -241,3 +241,6 @@ v9.50 - Added: LED notification for Samsung Galaxy Relay 4G.
Bug Fix: Wrong sd-ext detection on some devices. Bug Fix: Wrong sd-ext detection on some devices.
Bug Fix: Partition size calculation on emmc devices. Bug Fix: Partition size calculation on emmc devices.
Bug Fix: Slow file listing in TWRP mode on some devices. Bug Fix: Slow file listing in TWRP mode on some devices.
v9.51 - Added: Preservation of SELinux contexts.
Bug Fix: Data partition size calculated incorrectly when excluding Google Music cache.
Bug Fix: TWRP backups taking too long for file list.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
########################################################################################################### ###########################################################################################################
#### Define constants #### Define constants
version="9.50" version="9.51"
blobsdir="/clockworkmod/blobs" blobsdir="/clockworkmod/blobs"
tz="utc" tz="utc"
req_power=10 req_power=10
...@@ -401,7 +401,7 @@ progress(){ ...@@ -401,7 +401,7 @@ progress(){
else else
if $bb [ -f $path/$name/$1 ] && $bb [ "`$bb echo $full_size | $bb egrep "^[0-9]+$"`" ]; then if $bb [ -f $path/$name/$1 ] && $bb [ "`$bb echo $full_size | $bb egrep "^[0-9]+$"`" ]; then
copied=`$bb stat -t $path/$name/$1* | $bb awk '{print $2}'` copied=`$bb stat -t $path/$name/$1* | $bb awk '{print $2}'`
copied=`echo $copied | $bb sed s/' '/' + '/g` copied=`$bb echo $copied | $bb sed s/' '/' + '/g`
copied=`$bb expr $copied` copied=`$bb expr $copied`
copied=`$bb expr $copied / 1048576` 2> /dev/null copied=`$bb expr $copied / 1048576` 2> /dev/null
pct=`$bb expr \( 100 \* $copied \) / $full_size` 2> /dev/null pct=`$bb expr \( 100 \* $copied \) / $full_size` 2> /dev/null
...@@ -519,7 +519,7 @@ nandroid_fs(){ ...@@ -519,7 +519,7 @@ nandroid_fs(){
i=0 i=0
$bb mkdir -p $path/$name/tmp $bb mkdir -p $path/$name/tmp
$bb rm $path/$name/tmp/list$i 2> /dev/nul $bb rm $path/$name/tmp/list$i 2> /dev/nul
exclude_dirs=`echo $part_excludes | sed s/'--exclude='/''/g | sed s/'\/\*'/''/g` exclude_dirs=`$bb echo $part_excludes | sed s/'--exclude='/''/g | sed s/'\/\*'/''/g`
for dir in $exclude_dirs; do for dir in $exclude_dirs; do
if $bb [ -d $dir ]; then if $bb [ -d $dir ]; then
$bb echo $dir >> $path/$name/tmp/list$i $bb echo $dir >> $path/$name/tmp/list$i
...@@ -568,14 +568,14 @@ nandroid_fs(){ ...@@ -568,14 +568,14 @@ nandroid_fs(){
suffix="0$suffix" suffix="0$suffix"
done done
if $bb [ "$compress_backup" == "yes" ]; then if $bb [ "$compress_backup" == "yes" ]; then
$bb tar -czf $path/$name/$part_fname.$part_fs.win$suffix -T $path/$name/tmp/$list $part_excludes > /dev/null 2>&1 & $bb tar -cpzf $path/$name/$part_fname.$part_fs.win$suffix -T $path/$name/tmp/$list $part_excludes > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
$bb sleep 2 $bb sleep 2
done done
if $bb [ ! -f $path/$name/$part_fname.$part_fs.win$suffix ]; then if $bb [ ! -f $path/$name/$part_fname.$part_fs.win$suffix ]; then
$bb tar -cZf $path/$name/$part_fname.$part_fs.win$suffix -T $path/$name/tmp/$list $part_excludes > /dev/null 2>&1 & $bb tar -cpZf $path/$name/$part_fname.$part_fs.win$suffix -T $path/$name/tmp/$list $part_excludes > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
...@@ -583,15 +583,15 @@ nandroid_fs(){ ...@@ -583,15 +583,15 @@ nandroid_fs(){
done done
fi fi
elif $bb [ "$compress_backup" == "gzip" ]; then elif $bb [ "$compress_backup" == "gzip" ]; then
echo "\n$bb tar -c $part_excludes -T $path/$name/tmp/$list | $bb gzip -c > $path/$name/$part_fname.$part_fs.win$suffix > /dev/null 2>&1 &" $bb echo "\n$bb tar -cp $part_excludes -T $path/$name/tmp/$list | $bb gzip -c > $path/$name/$part_fname.$part_fs.win$suffix > /dev/null 2>&1 &"
$bb tar -c $part_excludes -T $path/$name/tmp/$list | $bb gzip -c > $path/$name/$part_fname.$part_fs.win$suffix 2> /dev/null & $bb tar -cp $part_excludes -T $path/$name/tmp/$list | $bb gzip -c > $path/$name/$part_fname.$part_fs.win$suffix 2> /dev/null &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
$bb sleep 2 $bb sleep 2
done done
else else
$bb tar -cf $path/$name/$part_fname.$part_fs.win$suffix -T $path/$name/tmp/$list $part_excludes > /dev/null 2>&1 & $bb tar -cpf $path/$name/$part_fname.$part_fs.win$suffix -T $path/$name/tmp/$list $part_excludes > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
...@@ -616,14 +616,14 @@ nandroid_fs(){ ...@@ -616,14 +616,14 @@ nandroid_fs(){
fi fi
else else
if $bb [ "$compress_backup" == "yes" ]; then if $bb [ "$compress_backup" == "yes" ]; then
$bb tar -czf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 & $bb tar -cpzf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
$bb sleep 2 $bb sleep 2
done done
if $bb [ ! -f $path/$name/$part_fname.$part_fs.win ]; then if $bb [ ! -f $path/$name/$part_fname.$part_fs.win ]; then
$bb tar -cZf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 & $bb tar -cpZf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
...@@ -633,7 +633,7 @@ nandroid_fs(){ ...@@ -633,7 +633,7 @@ nandroid_fs(){
progress_done progress_done
$bb echo "" $bb echo ""
elif $bb [ "$compress_backup" == "gzip" ]; then elif $bb [ "$compress_backup" == "gzip" ]; then
$bb tar -c $part_excludes ./* | $bb gzip -c > $path/$name/$part_fname.$part_fs.win 2> /dev/null & $bb tar -cp $part_excludes ./* | $bb gzip -c > $path/$name/$part_fname.$part_fs.win 2> /dev/null &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
...@@ -642,7 +642,7 @@ nandroid_fs(){ ...@@ -642,7 +642,7 @@ nandroid_fs(){
progress_done progress_done
$bb echo "" $bb echo ""
else else
$bb tar -cf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 & $bb tar -cpf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.win progress $part_fname.$part_fs.win
...@@ -688,7 +688,7 @@ nandroid_fs(){ ...@@ -688,7 +688,7 @@ nandroid_fs(){
full_size=-1 full_size=-1
fi fi
$bb touch $path/$name/$part_fname.$part_fs.tar $bb touch $path/$name/$part_fname.$part_fs.tar
$bb tar -c $part_excludes $part_mountdir 2> /dev/null | $bb split -a 1 -b 1000000000 /proc/self/fd/0 $path/$name/$part_fname.$part_fs.tar. > /dev/null 2>&1 & $bb tar -cp $part_excludes $part_mountdir 2> /dev/null | $bb split -a 1 -b 1000000000 /proc/self/fd/0 $path/$name/$part_fname.$part_fs.tar. > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.tar progress $part_fname.$part_fs.tar
...@@ -702,7 +702,7 @@ nandroid_fs(){ ...@@ -702,7 +702,7 @@ nandroid_fs(){
else else
full_size=-1 full_size=-1
fi fi
$bb tar -cf $path/$name/$part_fname.$part_fs.tar $part_excludes $part_mountdir > /dev/null 2>&1 & $bb tar -cpf $path/$name/$part_fname.$part_fs.tar $part_excludes $part_mountdir > /dev/null 2>&1 &
$bb sleep 2 $bb sleep 2
while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do while $bb [ `$bb ps w | $bb grep "$bb tar" | $bb grep -v "$bb grep $bb tar" | $bb tail -n 1 | $bb awk '{print $1}'` ]; do
progress $part_fname.$part_fs.tar progress $part_fname.$part_fs.tar
...@@ -899,7 +899,7 @@ for arg in $arglist; do ...@@ -899,7 +899,7 @@ for arg in $arglist; do
elif $bb [ "$arg" == "-r" ] || $bb [ "$arg" == "--replace" ]; then elif $bb [ "$arg" == "-r" ] || $bb [ "$arg" == "--replace" ]; then
replace_backup="yes" replace_backup="yes"
elif $bb [ "$arg" == "-t" ] || $bb [ "$arg" == "--sbin-last" ]; then elif $bb [ "$arg" == "-t" ] || $bb [ "$arg" == "--sbin-last" ]; then
export PATH=`echo $PATH | $bb sed s/':\/sbin:'/''/g | $bb sed s/'$'/':\/sbin'/g` export PATH=`$bb echo $PATH | $bb sed s/':\/sbin:'/''/g | $bb sed s/'$'/':\/sbin'/g`
elif $bb [ "$arg" == "-pd" ] || $bb [ "$arg" == "--progress-dot" ]; then elif $bb [ "$arg" == "-pd" ] || $bb [ "$arg" == "--progress-dot" ]; then
progress_style="dot" progress_style="dot"
elif $bb [ "$arg" == "-pp" ] || $bb [ "$arg" == "--progress-percent" ]; then elif $bb [ "$arg" == "-pp" ] || $bb [ "$arg" == "--progress-percent" ]; then
...@@ -952,7 +952,7 @@ fi ...@@ -952,7 +952,7 @@ fi
#### Output device ID if it was requested #### Output device ID if it was requested
if $bb [ "$say_android_id" == "yes" ]; then if $bb [ "$say_android_id" == "yes" ]; then
echo "$android_id" $bb echo "$android_id"
exit 0 exit 0
fi fi
...@@ -1527,6 +1527,10 @@ else ...@@ -1527,6 +1527,10 @@ else
u_data=10 u_data=10
fi fi
fi fi
if $bb [ "$exclude_gmusic" == "yes" ]; then
u_datagmusic=`$bb du -sm $data_mount/data/com.google.android.music/files | $bb awk '{print $1}'`
u_data=`$bb expr $u_data - $u_datagmusic`
fi
fi fi
#### /cache partition size #### /cache partition size
...@@ -1849,7 +1853,7 @@ nandroid_fs "efs" "efs" "e" "/efs" "efs" "$efs_fs" "$u_efs" "$efs_excludes" "$ef ...@@ -1849,7 +1853,7 @@ nandroid_fs "efs" "efs" "e" "/efs" "efs" "$efs_fs" "$u_efs" "$efs_excludes" "$ef
nandroid_fs "preload" "preload" "o" "/preload" "preload" "$preload_fs" "$u_preload" "$preload_excludes" "$preload_excludes_dedupe" "no" nandroid_fs "preload" "preload" "o" "/preload" "preload" "$preload_fs" "$u_preload" "$preload_excludes" "$preload_excludes_dedupe" "no"
#### Backup /.cust_backup partition (for Huawei devices) #### Backup /.cust_backup partition (for Huawei devices)
if $bb [ "$custbkp_fs" != "" -a "`echo $adv | $bb grep 'u'`" != "" ]; then if $bb [ "$custbkp_fs" != "" -a "`$bb echo $adv | $bb grep 'u'`" != "" ]; then
$bb mount -o remount,rw / $bb mount -o remount,rw /
$bb mkdir -p $custbkp_temp_mount/boot $bb mkdir -p $custbkp_temp_mount/boot
$bb mount /.cust_backup $custbkp_temp_mount/boot $bb mount /.cust_backup $custbkp_temp_mount/boot
...@@ -1881,7 +1885,7 @@ if $bb [ "$as_parent" ]; then ...@@ -1881,7 +1885,7 @@ if $bb [ "$as_parent" ]; then
fi fi
#### Backup sd-ext #### Backup sd-ext
if $bb [ "$sdext_mount" != "" -a "`echo $adv | $bb grep 'x'`" != "" ]; then if $bb [ "$sdext_mount" != "" -a "`$bb echo $adv | $bb grep 'x'`" != "" ]; then
$bb mount -o remount,rw / $bb mount -o remount,rw /
$bb mkdir -p $sdext_temp_mount/sd-ext $bb mkdir -p $sdext_temp_mount/sd-ext
$bb mount $extm $sdext_temp_mount/sd-ext $bb mount $extm $sdext_temp_mount/sd-ext
......
9.50 9.51
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment