3 # This script just makes the modules needed for patches. Replace the variables
4 # with your info. Can be run for a DEVC, e.g. ./make_openpdroid maguro
11 # Edit to match your info...note: MODS=patch location.
12 KANG
=$BASE/android
/system
16 MODS
=$BASE/patches
/openpdroid
/
18 SAVE
=$HOME/auto-patcher
/diff_tools
/built
/openpdroid
/$ANDR/$ROMTYPE
19 [[ $# > 0 ]] && DEVC
=$2
21 # aokp needs testing...should add Slim, PA, and Ever.
24 PLTF
=cm_
${DEVC}-userdebug
27 PLTF
=full_
$DEVC-userdebug
30 PLTF
=aokp_
$DEVC-userdebug
35 cd $KANG/build
&& git checkout .
&& git clean
-df
36 cd $KANG/libcore
&& git checkout .
&& git clean
-df
37 cd $KANG/frameworks
/base
&& git checkout .
&& git clean
-df
38 cd $KANG/frameworks
/base
/telephony
&& git checkout .
&& git clean
-df
39 cd $KANG/packages
/apps
/Mms
&& git checkout .
&& git clean
-df
40 cd $KANG && $REPO abandon openpdroid
41 cd $KANG && $REPO sync
-j16
44 cd $KANG && make clobber
45 cd $KANG && . build
/envsetup.sh
&& lunch
$PLTF && make core services framework framework2 telephony-common Mms
>& OUT.
$DATE ||
exit
46 \rm
-rf $SAVE/stock.
$DATE.
$DEVC
47 \
cp -a $KANG/out
/target
/product
/$DEVC/system
/framework
$SAVE/stock.
$DATE.
$DEVC
50 cd $KANG/build
&& git checkout
-b openpdroid
&& patch --no-backup-if-mismatch -p2 < $MODS/openpdroid_4.2
.1_build.
diff ||
exit
51 cd $KANG/libcore
&& git checkout
-b openpdroid
&& patch --no-backup-if-mismatch -p2 < $MODS/openpdroid_4.2
.1_libcore.
patch ||
exit
52 cd $KANG/frameworks
/base
&& git checkout
-b openpdroid
&& patch --no-backup-if-mismatch -p3 < $MODS/openpdroid_4.2
.1_frameworks_base.
patch ||
exit
53 cd $KANG/frameworks
/opt
/telephony
&& git checkout
-b openpdroid
&& patch --no-backup-if-mismatch -p3 < $MODS/openpdroid_4.2
.1_frameworks_opt_telephony.
patch ||
exit
54 cd $KANG/packages
/apps
/Mms
&& git checkout
-b openpdroid
&& patch --no-backup-if-mismatch -p3 < $MODS/openpdroid_4.2
.1_packages_apps_Mms.
patch ||
exit
57 cd $KANG && make clobber
58 cd $KANG && . build
/envsetup.sh
&& lunch
$PLTF && make core services framework framework2 telephony-common Mms
>& LOG.
$DATE ||
exit
59 \rm
-rf $SAVE/openpdroid.
$DATE.
$DEVC
60 \
cp -a $KANG/out
/target
/product
/$DEVC/system
/framework
$SAVE/openpdroid.
$DATE.
$DEVC
63 # It is old and not pretty, but it works. I will make this a LOT better when I get time.