-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
97 lines (81 loc) · 4.12 KB
/
makefile
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
# Makefile for Klte
#
# The original zip file, MUST be specified by each product
local-zip-file := stockrom.zip
# The output zip file of MIUI rom, the default is porting_miui.zip if not specified
local-out-zip-file := MIUI_Klte.zip
# All apps from original ZIP, but has smali files chanded
local-modified-apps :=
local-modified-priv-apps :=
PORT_PRODUCT := luo288_klte
local-modified-jars :=
# All apks from MIUI
local-miui-removed-apps :=
local-miui-removed-priv-apps :=
local-miui-modified-apps := DeskClock DownloadProvider MiuiHome miuisystem Settings TeleService SecurityCenter MiuiSystemUI ThemeManager
# Config density for co-developers to use the aaps with HDPI or XHDPI resource,
# Default configrations are HDPI for ics branch and XHDPI for jellybean branch
local-density := XXHDPI
# All apps need to be removed from original ZIP file
#local-remove-apps :=
include phoneapps.mk
# To include the local targets before and after zip the final ZIP file,
# and the local-targets should:
# (1) be defined after including porting.mk if using any global variable(see porting.mk)
# (2) the name should be leaded with local- to prevent any conflict with global targets
local-pre-zip := local-pre-zip-misc
local-after-zip:= local-put-to-phone
# The local targets after the zip file is generated, could include 'zip2sd' to
# deliver the zip file to phone, or to customize other actions
include $(PORT_BUILD)/porting.mk
# To define any local-target
#updater := $(ZIP_DIR)/META-INF/com/google/android/updater-script
#pre_install_data_packages := $(TMP_DIR)/pre_install_apk_pkgname.txt
BUILD_DATE := $(shell date +%Y%m%d)
local-pre-zip-misc:
cp -rf other/system $(ZIP_DIR)/
@echo ">>> Fix nfc"
cp -rf stockrom/system/app/Nfc.apk $(ZIP_DIR)/system/app/NfcNci.apk
rm -rf $(ZIP_DIR)/system/app/Nfc.apk
@echo ">>> Remove miui prebuilt binaries"
rm -rf $(ZIP_DIR)/system/bin/app_process_vendor
cp -rf stockrom/system/bin/app_process $(ZIP_DIR)/system/bin/app_process
rm -rf $(ZIP_DIR)/system/bin/debuggerd_vendor
cp -rf stockrom/system/bin/debuggerd $(ZIP_DIR)/system/bin/debuggerd
rm -rf $(ZIP_DIR)/system/bin/dexopt_vendor
cp -rf stockrom/system/bin/dexopt $(ZIP_DIR)/system/bin/dexopt
@echo ">>> Fix mdnsd"
cp -rf stockrom/system/bin/mdnsd $(ZIP_DIR)/system/bin/mdnsd_original
rm -rf $(ZIP_DIR)/system/bin/mdnsd
@echo ">>> Some changes"
echo "persist.sys.density=480" >> $(ZIP_DIR)/system/build.prop
echo "ro.sf.lcd_density=480" >> $(ZIP_DIR)/system/build.prop
sed -i 's/qemu.sf.lcd_density/persist.sys.density/g' $(ZIP_DIR)/system/lib/libsurfaceflinger.so
@echo ">>> Remove Qrng Service"
cp -rf stockrom/system/bin/qrngd $(ZIP_DIR)/system/bin/qrngd_original
rm -rf $(ZIP_DIR)/system/bin/qrngd
cp -rf stockrom/system/bin/qrngp $(ZIP_DIR)/system/bin/qrngp_original
rm -rf $(ZIP_DIR)/system/bin/qrngp
@echo ">>> Sounds Change"
echo "persist.power.sound=1" >> $(ZIP_DIR)/system/build.prop
echo "persist.screenshot.sound=1" >> $(ZIP_DIR)/system/build.prop
@echo ">>> PowerKeeper and Whetstone "
echo "persist.sys.mcd_config_file=/system/etc/mcd_default.conf" >> $(ZIP_DIR)/system/build.prop
echo "persist.sys.klo=on" >> $(ZIP_DIR)/system/build.prop
@echo ">>> Call Audio "
echo "persist.audio.fluence.voicerec=false" >> $(ZIP_DIR)/system/build.prop
echo "persist.audio.fluence.speaker=false" >> $(ZIP_DIR)/system/build.prop
sed -i 's/qemu.sf.lcd_density/persist.sys.density/g' $(ZIP_DIR)/system/lib/libsurfaceflinger.so
@echo ">>> Security Patch "
echo "ro.build.version.security_patch=2016-05-01" >> $(ZIP_DIR)/system/build.prop
echo "ro.build.version.base_os=" >> $(ZIP_DIR)/system/build.prop
@echo ">>> Use auto brightadj"
echo "persist.power.useautobrightadj=true" >> $(ZIP_DIR)/system/build.prop
@echo ">>> DeviceUpdater Changes"
echo "ro.ota.romname=MIUI7" >> $(ZIP_DIR)/system/build.prop
echo "ro.ota.device=klte" >> $(ZIP_DIR)/system/build.prop
echo "ro.ota.codename=experimental" >> $(ZIP_DIR)/system/build.prop
echo "ro.ota.version=$(BUILD_NUMBER)" >> $(ZIP_DIR)/system/build.prop
echo "ro.ota.version_number=$(BUILD_DATE)" >> $(ZIP_DIR)/system/build.prop
echo "ro.ota.manifest=http://luo2888.tk/miui7/ota.xml" >> $(ZIP_DIR)/system/build.prop