summaryrefslogtreecommitdiff
path: root/extract_utils.sh
diff options
context:
space:
mode:
authorChirayu Desai <chirayudesai1@gmail.com>2021-11-26 05:47:25 +0530
committerMichael Bestas <mkbestas@lineageos.org>2021-12-09 01:40:34 +0200
commitc1566eb2c3a5e252b64f3bec37f8d3b3204709f6 (patch)
treed9c4d38a5bf085f0021ea2b8c982810453b21daf /extract_utils.sh
parent48f78ad780218269ae3c9dc69119df7093b9a530 (diff)
extract_utils: Avoid requiring sudo
* We can use the available debugfs function, which works without root Change-Id: Ic24f8a7441fe53af3dd18bafd5f6afce7411999c
Diffstat (limited to 'extract_utils.sh')
-rw-r--r--extract_utils.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/extract_utils.sh b/extract_utils.sh
index 598e42e..c77a4d6 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -1538,11 +1538,8 @@ function extract() {
python "$ANDROID_ROOT"/tools/extract-utils/sdat2img.py "$DUMPDIR"/"$PARTITION".transfer.list "$DUMPDIR"/"$PARTITION".new.dat "$DUMPDIR"/"$PARTITION".img 2>&1
rm -rf "$DUMPDIR"/"$PARTITION".new.dat "$DUMPDIR"/"$PARTITION"
mkdir "$DUMPDIR"/"$PARTITION" "$DUMPDIR"/tmp
- echo "Requesting sudo access to mount the "$PARTITION".img"
- sudo mount -o loop "$DUMPDIR"/"$PARTITION".img "$DUMPDIR"/tmp
- cp -r "$DUMPDIR"/tmp/* "$DUMPDIR"/"$PARTITION"/
- sudo umount "$DUMPDIR"/tmp
- rm -rf "$DUMPDIR"/tmp "$DUMPDIR"/"$PARTITION".img
+ extract_img_data "$DUMPDIR"/"$PARTITION".img "$DUMPDIR"/"$PARTITION"/
+ rm "$DUMPDIR"/"$PARTITION".img
fi
done
fi