-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
executable file
·44 lines (40 loc) · 1.38 KB
/
build.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
42
43
44
#!/bin/bash
FLYME_OUT_DIR=/home/bywwh/AndroidSource/FlymeOS/devices/aries/out
DEVICE_DIR=/home/bywwh/AndroidSource/FlymeOS/devices/aries
OTHER_DIR=/home/bywwh/AndroidSource/FlymeOS/devices/aries/other
cd ../..
. build/envsetup.sh
echo
echo ">>> in devices dir"
cd -
echo
flyme clean
flyme fullota
if [ -e $FLYME_OUT_DIR/flyme*.zip ];then
mv -vf $FLYME_OUT_DIR/flyme*.zip $FLYME_OUT_DIR/FlymeOS_aries-$USER-$(date +%Y%m%d)-5.1.1.zip
fi
echo
echo ">>> make merge partition patch"
echo
cp -v -rf $DEVICE_DIR/boot.img.out $DEVICE_DIR/boot.img.out.bak
cp -v -rf $DEVICE_DIR/framework-res $DEVICE_DIR/framework-res.bak
cp -v -rf $OTHER_DIR/storage_list.xml $DEVICE_DIR/framework-res/res/xml
cp -v -rf $OTHER_DIR/fstab.qcom $OTHER_DIR/init.target.rc $DEVICE_DIR/boot.img.out/RAMDISK
echo
echo ">>> make fullota again"
echo
mkdir -vp $DEVICE_DIR/tmp
mv -vf $FLYME_OUT_DIR/*.zip $DEVICE_DIR/tmp
cd $DEVICE_DIR
flyme clean
flyme fullota
rm -v -rf $DEVICE_DIR/boot.img.out $DEVICE_DIR/framework-res
mv -vf $DEVICE_DIR/boot.img.out.bak $DEVICE_DIR/boot.img.out
mv -vf $DEVICE_DIR/framework-res.bak $DEVICE_DIR/framework-res
if [ -e $FLYME_OUT_DIR/flyme*.zip ];then
mv -vf $FLYME_OUT_DIR/flyme*.zip $FLYME_OUT_DIR/FlymeOS_aries-$USER-$(date +%Y%m%d)-mixed-5.1.1.zip
fi
if [ -e $DEVICE_DIR/tmp/Flyme*.zip ] || [ -e $DEVICE_DIR/tmp/target*.zip ];then
mv -vf $DEVICE_DIR/tmp/*.zip $FLYME_OUT_DIR
rm -v -rf $DEVICE_DIR/tmp
fi