Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ameer Dawood
OnlineNandroid
Commits
6bf35aae
Commit
6bf35aae
authored
10 years ago
by
Ameer Dawood
Browse files
Options
Download
Email Patches
Plain Diff
v9.52
Bug Fix: TWRP backups taking too long for file list.
parent
28516579
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
137 deletions
+29
-137
changelog
changelog
+1
-0
onandroid
onandroid
+27
-136
version
version
+1
-1
No files found.
changelog
View file @
6bf35aae
...
...
@@ -244,3 +244,4 @@ v9.50 - Added: LED notification for Samsung Galaxy Relay 4G.
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.
v9.52 - Bug Fix: TWRP backups taking too long for file list.
This diff is collapsed.
Click to expand it.
onandroid
View file @
6bf35aae
...
...
@@ -29,7 +29,7 @@
###########################################################################################################
#### Define constants
version="9.5
1
"
version="9.5
2
"
blobsdir="/clockworkmod/blobs"
tz="utc"
req_power=10
...
...
@@ -507,150 +507,41 @@ nandroid_fs(){
else
full_size=-1
fi
maxfilesize=2047
splitfilesize=1024
if $bb [ $full_size -gt $maxfilesize ]; then
$bb touch $path/$name/.list_generating
while $bb [ -f $path/$name/.list_generating ]; do
progress none
if $bb [ "$compress_backup" == "yes" ]; then
$bb tar -cpzf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
$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
progress $part_fname.$part_fs.win
$bb sleep 2
done &
$bb touch $path/$name/$part_fname.$part_fs.win
i=0
$bb mkdir -p $path/$name/tmp
$bb rm $path/$name/tmp/list$i 2> /dev/nul
exclude_dirs=`$bb echo $part_excludes | sed s/'--exclude='/''/g | sed s/'\/\*'/''/g`
for dir in $exclude_dirs; do
if $bb [ -d $dir ]; then
$bb echo $dir >> $path/$name/tmp/list$i
fi
done
dirlist="`$bb find . -type d -xdev`"
for dir in $dirlist; do
if $bb [ -d $dir ]; then
if $bb [ "`$bb ls -A $dir`" == "" ]; then
$bb echo $dir >> $path/$name/tmp/list$i
fi
fi
done
filelist="`$bb find . -type b` `$bb find . -type c` `$bb find . -type p` `$bb find . -type f` `$bb find . -type l` `$bb find . -type s`"
listsize=0
for file in $filelist; do
if $bb [ -e $file ]; then
for dir in $exclude_dirs; do
dir_length=`$bb expr length $dir`
if $bb [ "`$bb expr substr $file 1 $dir_length`" == "$dir" ]; then
continue 2
fi
done
filesize=`$bb du -sm $file | $bb awk '{print $1}'`
if $bb [ `$bb expr $listsize + $filesize` -lt $splitfilesize ]; then
listsize=`$bb expr $listsize + $filesize`
$bb echo $file >> $path/$name/tmp/list$i
else
listsize=0
i=`$bb expr $i + 1`
$bb rm $path/$name/tmp/list$i 2> /dev/nul
listsize=`$bb expr $listsize + $filesize`
$bb echo $file >> $path/$name/tmp/list$i
if $bb [ $listsize -gt $maxfilesize ]; then
loglater="$LANG_ERROR: $LANG_FSOVER2GB"
fi
fi
fi
done
listlist=`ls $path/$name/tmp`
i=0
$bb rm $path/$name/.list_generating
for list in $listlist; do
suffix=$i
while $bb [ `$bb echo $suffix | $bb wc -m` -lt 4 ]; do
suffix="0$suffix"
done
if $bb [ "$compress_backup" == "yes" ]; then
$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
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
$bb sleep 2
done
if $bb [ ! -f $path/$name/$part_fname.$part_fs.win$suffix ]; then
$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
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
$bb sleep 2
done
fi
elif $bb [ "$compress_backup" == "gzip" ]; then
$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 -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
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
$bb sleep 2
done
else
$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
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
$bb sleep 2
done
fi
i=`$bb expr $i + 1`
done
$bb rm -rf $path/$name/tmp
progress_done
$bb echo ""
if $bb [ "$loglater" != "" ]; then
logmsg $loglater
fi
$bb rm $path/$name/$part_fname.$part_fs.win 2> /dev/nul
if $bb [ $? != 0 -a -f $path/$name/$part_fname.$part_fs.win ]; then
$bb sleep 2
$bb rm $path/$name/$part_fname.$part_fs.win 2> /dev/nul
if $bb [ $? != 0 -a -f $path/$name/$part_fname.$part_fs.win ]; then
logmsg "$LANG_ERROR: $LANG_MAYXRESTORE"
fi
fi
else
if $bb [ "$compress_backup" == "yes" ]; then
$bb tar -cpzf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
if $bb [ ! -f $path/$name/$part_fname.$part_fs.win ]; then
$bb tar -cpZf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
$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
progress $part_fname.$part_fs.win
$bb sleep 2
done
if $bb [ ! -f $path/$name/$part_fname.$part_fs.win ]; then
$bb tar -cpZf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
$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
progress $part_fname.$part_fs.win
$bb sleep 2
done
fi
progress_done
$bb echo ""
elif $bb [ "$compress_backup" == "gzip" ]; then
$bb tar -cp $part_excludes ./* | $bb gzip -c > $path/$name/$part_fname.$part_fs.win 2> /dev/null &
fi
progress_done
$bb echo ""
elif $bb [ "$compress_backup" == "gzip" ]; then
$bb tar -cp $part_excludes ./* | $bb gzip -c > $path/$name/$part_fname.$part_fs.win 2> /dev/null &
$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
progress $part_fname.$part_fs.win
$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
progress
$part_fname.$part_fs.win
$bb
sleep 2
don
e
progress_done
$bb
echo ""
else
$bb tar -cpf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
do
ne
progress
_done
$bb
echo ""
els
e
$bb tar -cpf $path/$name/$part_fname.$part_fs.win $part_excludes ./* > /dev/null 2>&1 &
$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
progress $part_fname.$part_fs.win
$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
progress $part_fname.$part_fs.win
$bb sleep 2
done
progress_done
$bb echo ""
fi
done
progress_done
$bb echo ""
fi
else
if $bb [ "$part_fs" == "yaffs2" -a "$yaffs_override" != "yes" ]; then
...
...
This diff is collapsed.
Click to expand it.
version
View file @
6bf35aae
9.51
\ No newline at end of file
9.52
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment