How to add App in Android as Basic App

Application Name: PermissionManager

How to add: Following are the steps to add PermissionManager application to Android as basic app.
i.    Copy PermissionManager to /mydroid/packages/apps/ folder.
ii.    Create file inside PermissionManager directory.

              looks like

.                    LOCAL_PATH := $(call my-dir)
.                    include $(CLEAR_VARS)
.                    LOCAL_STATIC_JAVA_LIBRARIES := libarity
.                    LOCAL_SRC_FILES := $(call all-java-files-under, src)
.                    LOCAL_PACKAGE_NAME := PermissionManager
.                    include $(BUILD_PACKAGE)

iii.     Edit /mydroid/build/target/product/ to add line for   \PermissionManager

           looks like

.                    PRODUCT_PACKAGES := \
.                    AccountAndSyncSettings \
.                    AlarmClock \
.                    PermissionManager \

.                    ……..

.                    ……..
.                    SyncProvider
.                    $(call inherit-product, $(SRC_TARGET_DIR)/product/
.                    # Overrides
.                    PRODUCT_BRAND := generic
.                    PRODUCT_DEVICE := generic
.                    PRODUCT_NAME := generic

iv.    Now Compiled source code

v.     After compilation is completed you will see PermissionManager installed.


4 thoughts on “How to add App in Android as Basic App

  1. Hi. This information was very helpful. If I want to add a java file in framework/base/core/java/android/provider ( something similar to, then how to do that ?

  2. Dear Pinal

    The Post is about adding a complete android application.
    But if you want to add a single java file in framework/base/core/java/android/provider

    Create your java Program

    package android.provider;
    public class JavaFile
        public JavaFile ()

    Go to framework/base/core/java/android/provider and paste there.

    Make your project, is successfully added.

    • OK. I did the same way. But let’s consider the file in framework/base/core/java/android/provider. If you have a look at out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/provider, you can see that a file is generated there. If I add my java file framework as per your instructions , I doesn’t generate my file in out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/provider. Although this doesn’t disturb my functionality or code, but I want to know the reason for this.

  3. hello..
    nice tutorial..
    One thing i want to ask is if my app uses location -GPS (that uses Google API and a different emulator) then how do i add/integrate to android source code??

    Thanks .

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s