Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between LOCAL_CERTIFICATE values in Android.mk

What is the difference between the different values of the variable LOCAL_CERTIFICATE ?

I know of two values platform and shared. What are the other possible values in Android build system ? How does it effect our application's behavior.

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := abc
LOCAL_CERTIFICATE := shared

LOCAL_JNI_STATIC_LIBRARIES := abcjni

LOCAL_PROGUARD_ENABLED := disabled

include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))
like image 746
Rohit Rokde Avatar asked Jan 31 '15 10:01

Rohit Rokde


1 Answers

Besides the value platform and shared, there are other two values called media and releasekey. The following list illustrate their differences which was copy from Android build system from here.

  • platform: a key for packages that are part of the core platform.
  • shared: a key for things that are shared in the home/contacts process.
  • media: a key for packages that are part of the media/download system.
  • releasekey: the default key to sign with if not otherwise specified

Those are the signatures used by Android security system to ensure the core component and the framework of the system's security is under the control of manufacture.

The link about Android build system I gave above is not official, but it's a good material for references.

Update:
You can also set LOCAL_CERTIFICATE to be PRESIGNED, which tells the signing script that this APKs are already signed and should not be signed again.

like image 127
alijandro Avatar answered Oct 18 '22 20:10

alijandro