-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
unmount_images.sh
41 lines (27 loc) · 793 Bytes
/
unmount_images.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
. ./VARIABLES.sh
echo "Unmounting product.img"
umount $MountPointProduct
echo "Unmounting system_ext.img"
umount $MountPointSystemExt
echo "Unmounting system.img"
umount $MountPointSystem
echo "Unmounting vendor.img"
umount $MountPointVendor
echo "chk product.img"
e2fsck -f $ImagesRoot/product.img
echo "Resizing product.img"
resize2fs -M $ImagesRoot/product.img
echo "chk system.img"
e2fsck -f $ImagesRoot/system.img
echo "Resizing system.img"
resize2fs -M $ImagesRoot/system.img
echo "chk system_ext.img"
e2fsck -f $ImagesRoot/system_ext.img
echo "Resizing system_ext.img"
resize2fs -M $ImagesRoot/system_ext.img
echo "chk vendor.img"
e2fsck -f $ImagesRoot/vendor.img
echo "Resizing vendor.img"
resize2fs -M $ImagesRoot/vendor.img
echo "!! Unmounting completed !!"