Android/Building/SystemAPPs: Difference between revisions

From OLPC
Jump to navigation Jump to search
(Created page with '=System APPs= Android system APPs are these APPs installed in system partition. Since system partition is read only, thus the system APPs are not remove-able for general user.')
 
No edit summary
 
(34 intermediate revisions by one other user not shown)
Line 1: Line 1:
=System APPs=
=System APPs=


Android system APPs are these APPs installed in system partition. Since system partition is read only, thus the system APPs are not remove-able for general user.
Android system APPs are these applications which are installed in system partition. Since system partition is read only at runtime, thus the system APPs are not remove-able for general user.

==Add/Remove==

In general, there is only one way to add/remove system applications.

===At build time===
System application configurations for android build system are located under source code folder '''vendor/olpc/xo4/apps/'''
To add an application in system partition simply do:
*Copy pre-built APK file to vendor/olpx/xo4/apps/
cp YourAPKName.apk vendor/olpc/xo4/apps/
*Add build description in [[http://dev.laptop.org/git/users/ben/android_vendor_olpc_xo4/tree/apps/Android.mk?h=android-4.3.1-xo4 Android.mk]] under vendor/olpx/xo4/apps
include $(CLEAR_VARS)
LOCAL_MODULE := YourAPKName
LOCAL_MODULE_OWNER := xxxx
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)

Note: If no need to resign application put PRESIGNED instead of platform
*Add module name in [[http://dev.laptop.org/git/users/ben/android_vendor_olpc_xo4/tree/apps/apps.mk?h=android-4.3.1-xo4 apps.mk]] under vendor/olpx/xo4/apps
PRODUCT_PACKAGES += \
....... \
....... \
YourAPKName
*[[Android/Building|Rebuild]] Android system
'''Important''': system partition size needs adjust <br />
Since system partition has limited size, developer should make sure [[Android/Building/SystemAPPs#System_Partition_Size|system partition size]] is big enough for the new applications.

==Upgrade==
*System APPs should be upgraded via update system in recovery mode.
*System APPs can be upgraded as normal application, the new version will be stored on data partition.

==System Partition Size==
System partition size configuration is located in [[http://dev.laptop.org/git/users/ben/android_vendor_olpc_xo4/tree/BoardConfigVendor.mk?h=android-4.3.1-xo4#n16 BoardConfigVender.mk]] under vendor/olpx/xo4 folder in source code.
SYSTEM_IMAGE_SIZE_IN_MEGABYTES := 420

Size are in megabytes.

Latest revision as of 12:11, 5 August 2015

System APPs

Android system APPs are these applications which are installed in system partition. Since system partition is read only at runtime, thus the system APPs are not remove-able for general user.

Add/Remove

In general, there is only one way to add/remove system applications.

At build time

System application configurations for android build system are located under source code folder vendor/olpc/xo4/apps/ To add an application in system partition simply do:

  • Copy pre-built APK file to vendor/olpx/xo4/apps/
cp YourAPKName.apk vendor/olpc/xo4/apps/
  • Add build description in [Android.mk] under vendor/olpx/xo4/apps
include $(CLEAR_VARS)
LOCAL_MODULE := YourAPKName
LOCAL_MODULE_OWNER := xxxx
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)

Note: If no need to resign application put PRESIGNED instead of platform

  • Add module name in [apps.mk] under vendor/olpx/xo4/apps
PRODUCT_PACKAGES += \
   ....... \
   ....... \
   YourAPKName

Important: system partition size needs adjust
Since system partition has limited size, developer should make sure system partition size is big enough for the new applications.

Upgrade

  • System APPs should be upgraded via update system in recovery mode.
  • System APPs can be upgraded as normal application, the new version will be stored on data partition.

System Partition Size

System partition size configuration is located in [BoardConfigVender.mk] under vendor/olpx/xo4 folder in source code.

SYSTEM_IMAGE_SIZE_IN_MEGABYTES := 420

Size are in megabytes.