Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VERSION = $(shell git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/*\s//g')
- ROM=miui
- DEVICE=shooter
- BUILD_DATE=$(shell date +-%F_%H%M)
- ## FRAMEWORK is the array of framework files that are built each time.
- ## Each framework file path is also prefixed by build/. e.g
- # FRAMEWORK = build/system/framework/framework.jar
- FRAMEWORK = build/system/framework/framework-res.apk build/system/framework/framework.jar build/system/framework/android.policy.jar build/system/framework/services.jar
- ## APPLICATIONS is the array of applications that are built each time with apktool.
- ## Each application path is prefixed by build/. e.g
- # APPLICATIONS = build/system/app/Browser.apk
- APPLICATIONS = build/system/app/Launcher2.apk
- ## TEST_SIGNED is the array of applications that are test signed.
- ## Each application bath is prefixed by sign/.
- TEST_SIGNED = build/system/app/Launcher2.apk
- # Apps we dont build because of Signature issues
- # build/system/app/Maps.apk
- # Apps that cannot be build ATM
- # build/system/app/LiveWallpaperPicker.apk
- # build/system/app/EmailGoogle.apk
- .PHONY: java
- all: build
- clean:
- rm -rfv build
- rm -rfv decompiled/*/*/build
- rm -rfv decompiled/framework/*/resources/classes.dex
- rm -rfv decompiled/*/*.unsigned
- cd java && make clean
- ramdisk-build: clean
- mkdir -p build/resources/ && cd ramdisk && find . | cpio -H newc -o | gzip > ../build/resources/ramdisk.gz
- java:
- cd java && make
- build/system/app/%.apk: system-build java
- mkdir -p build/system/app
- apktool b decompiled/app/$* decompiled/app/$*.apk
- cd decompiled/app/$*/zip-resources && zip -r ../../$*.apk AndroidManifest.xml META-INF
- mv decompiled/app/$*.apk build/system/app/$*.apk
- build/system/framework/%.jar: system-build java
- mkdir -p build/system/framework
- smali decompiled/framework/$*/smali -o decompiled/framework/$*/resources/classes.dex
- cd decompiled/framework/$*/resources && zip ../$*.jar -r *
- mv decompiled/framework/$*/$*.jar build/system/framework/$*.jar
- build/system/framework/%.apk: system-build
- mkdir -p build/system/framework
- apktool b decompiled/framework/$* decompiled/framework/$*.apk
- cd decompiled/framework/$*/zip-resources && zip -r ../../$*.apk AndroidManifest.xml META-INF
- mv decompiled/framework/$*.apk build/system/framework/$*.apk
- system-build: clean
- mkdir -p build/system
- cp -Rv system/* build/system/
- update-zip-build: clean
- mkdir -p build/
- cp -Rv update-zip/* build/
- build: system-build update-zip-build ${FRAMEWORK} ${APPLICATIONS}
- mkdir -p out && cd build && zip ../out/Tiamat-$(DEVICE)-$(ROM)-$(VERSION)$(BUILD_DATE).zip -r *
- java -classpath `which testsign.jar` testsign out/Tiamat-$(DEVICE)-$(ROM)-$(VERSION)$(BUILD_DATE).zip out/Tiamat-$(DEVICE)-$(ROM)-$(VERSION)$(BUILD_DATE)_signed.zip
- rm out/Tiamat-$(DEVICE)-$(ROM)-$(VERSION)$(BUILD_DATE).zip
Advertisement
Add Comment
Please, Sign In to add comment