New System app on ethOS
The definitive guide.
First create an apk file out of your App.
- Create a Directory for your App under packages/apps. F.e.: for the Three Browser its packages/apps/ethOSBrowser.
Make sure to add these lines to the very top of your AndroidManifest.xml file:
android:sharedUserId="android.uid.system"
coreApp="true"
They should be defined right below the “package” definition.
- Add your APK to the dir, and create a File called Android.mk.
The file Android.mk should look like this:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := ethOSBrowser
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SRC_FILES := app-debug.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_PATH := $(TARGET_OUT_PRIVILEGED_MODULES)
include $(BUILD_PREBUILT)
Just replace the LOCAL_MODULE with your Directory name, and the LOCAL_SRC_FILE with the filename of your apk file.
Now edit the file build/make/target/product/handheld_system.mk. Add your Directory-Name/LOCAL_MODULE to the PRODUCT_PACKAGES section.
As always, ping us on discord if you have any questions or need some help!
Updated 8 months ago