-
Notifications
You must be signed in to change notification settings - Fork 3
/
dump.sh
39 lines (32 loc) · 892 Bytes
/
dump.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
#!/bin/bash
echo ""
echo "LineageOS 20.x dump blob for ANNE"
echo "please put *.img in raw format here before start"
echo "Executing in 5 seconds - CTRL-C to exit"
echo ""
sleep 5
mkdir dump/
mkdir dump/system/
mkdir dump/vendor/
mkdir dump/product/
mkdir dump/odm/
sudo mount -o loop system-raw.img dump/system/
sudo mount -o loop vendor-raw.img dump/vendor/
sudo mount -o loop product-raw.img dump/product/
sudo mount -o loop odm-raw.img dump/odm/
echo "Start extraction"
sleep 5
./extract-files.sh anne ./dump/ > dump.log
echo "Reset owner"
sudo chown -R $(id -u):$(id -g) ./../../../vendor/huawei/hi6250-9-common/*
sudo chown -R $(id -u):$(id -g) ./../../../vendor/huawei/anne/*
echo "Umount all"
sleep 5
sudo umount dump/system/
sudo umount dump/vendor/
sudo umount dump/product/
sudo umount dump/odm/
rm -rf dump/system/
rm -rf dump/vendor/
rm -rf dump/product/
rm -rf dump/odm/