-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile
104 lines (83 loc) · 3.45 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
98
99
100
101
102
103
104
#
# Makefile for onex
#
# 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 update.zip if not specified
# local-out-zip-file :=
# All apps from original ZIP, but has smali files chanded
local-modified-apps := Camera StockSettings
local-modified-jars := HTCExtension
local-miui-modified-apps := Phone Mms MiuiHome Settings MiuiSystemUI MiuiGallery
# All apks from MIUI
local-miui-removed-apps := LatinIME MediaProvider
# All apps need to be reserved from original ZIP file
local-phone-apps := AppSharing BackupRestoreConfirmation \
CertInstaller CustomizationSettingsProvider Camera DefaultContainerService DFPI DrmProvider \
FilePicker FaceLock FM_Radio FMRadioService GoogleTTS HTC_IME HtcBeatsNotify \
HTMLViewer IMEHWRPenPower IMEXT9English KeyChain LMW MarketUpdater \
Nfc OneTimeInitializer PhaseBeam PluginManager SDCardWizard SharedStorageBackup \
WifiRouter MediaProvider CIMEXT9 \
HtcSoundEnhancerSetting HtcDMC DLNAMiddleLayer \
CIMETPCHS
# 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-zip-misc
local-after-zip:= local-test
out/framework2.jar : out/framework.jar
# 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
local-zip-misc:
@echo Update build.prop
cp other/build.prop $(ZIP_DIR)/system/build.prop
@echo CID default xml
cp other/default.xml $(ZIP_DIR)/system/customize/CID/default.xml
@echo update bootanimation
rm $(ZIP_DIR)/system/bin/bootanimation
cp other/bootanimation $(ZIP_DIR)/system/bin/bootanimation
@echo add system app
cp other/system_app/* $(ZIP_DIR)/system/app/
@echo add system config
cp other/system_etc/* $(ZIP_DIR)/system/etc/
cp other/system_keylayout/* $(ZIP_DIR)/system/usr/keylayout/
cp other/system_lib/* $(ZIP_DIR)/system/lib/
cp other/system_xbin/* $(ZIP_DIR)/system/xbin/
@echo delete redundance files
rm -f $(ZIP_DIR)/system/customize/resource/*.png
rm -rf $(ZIP_DIR)/system/media/weather
rm -rf $(ZIP_DIR)/system/media/video
rm -f $(ZIP_DIR)/system/bin/su
@echo beats boot animation
rm -f $(ZIP_DIR)/system/media/bootanimation.zip
cp other/system_media/bootanimation.zip $(ZIP_DIR)/system/media/
%.phone : out/%.jar
@echo push -- to --- phone
adb remount
adb push $< /system/framework
adb shell chmod 644 /system/framework/$*.jar
#adb shell stop
#adb shell start
adb reboot
%.sign-plat : out/%
java -jar $(TOOL_DIR)/signapk.jar $(PORT_ROOT)/build/security/platform.x509.pem $(PORT_ROOT)/build/security/platform.pk8 $< $<.signed
@echo push -- to --- phone
adb remount
adb push $<.signed /system/app/$*
adb shell chmod 644 /system/app/$*
%.sign-test : out/%
java -jar $(TOOL_DIR)/signapk.jar $(PORT_ROOT)/build/security/testkey.x509.pem $(PORT_ROOT)/build/security/testkey.pk8 $< $<.signed
@echo push -- to --- phone
adb remount
adb push $<.signed /system/app/$*
adb shell chmod 644 /system/app/$*
local-test:
# rm -f $(local-out-zip-file)
# cp .build/$(local-out-zip-file) .
@echo push $(OUT_ZIP) to phone sdcard
adb shell mount sdcard
adb shell rm -f /sdcard/update.zip
adb push out/update.zip /sdcard/update.zip