top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Building Android Source with minimal apps

+2 votes
944 views

Is it possible to build the Android Source with only the essential applications? I have downloaded the Android Source and after compiling the app folder seems to have a lot of apks that I feel the project can live without (e.g. Calender.apk, Contacts.apk, LiveWallpapers.apk and there are others).

If this is possible, which/where Make should I modify to remove the inclusion of these APKs?

posted Sep 19, 2013 by Meenal Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote

You can modify the /BUILD/TARGET/PRODUCT/GENERIC_NO_TELEPHONY.MK and remove any application's package entry, from tag- PRODUCT_PACKAGES := ... ,which ever applications you don't want in your build.

In Same context, for your knowledge:-
1. All apps are placed in /PACKAGES/APPS/
2. Each app directory contains a ANDROID.MK file which contain a tag LOCAL_PACKAGE_NAME := ...
3. These packages names are registered in /BUILD/TARGET/PRODUCT/GENERIC_NO_TELEPHONY.MK file and with tag PRODUCT_PACKAGES := ...
4. If you don't want any of these app to be included simply remove the entry of it from above GENERIC_NO_TELEPHONY.MK file.
5. If you want to add your app to be included for all builds also add entry of your LOCAL_PACKAGE_NAME in this file.
6. If you want to add your app to only some selected builds than only do not add entry of your app in GENERIC_NO_TELEPHONY.MK but in your particular build's vendor specific Android.mk file with extending tag PRODUCT_PACKAGES := ...

answer Sep 19, 2013 by Naveena Garg
Thanks for the detailed explanation. It was very helpful. I have modified the generic_no_telephony.mk file and removed all packages apart from Settings. The effect of this change was that the 'out/target/product/nitrogen6x/' is much much smaller in size. However I am yet to find out what the end result is once I move this compile to the actual device.
One thing that I tried before you replied to my question was the following:-> Without any modification, when Android was running, the power supply was showing current usage to be just under 1 amp on the desktop power supply.
-> I manually removed the redundant APKs from the /system/app/ (from the SD card) and tried rebooting the development board. What I found was that the current usage peaked to about 2A and the freescale chip was hot. It seems as if the Android framework was trying to run the APK's however, as they were manually removed, there was some kind of infinite loop taking place.
So my question is if one were to remove these APK's manually do we need to change any other settings to indicate to Android to stop running them?
We are using the Boundary Devices iMX6 development board
http://boundarydevices.com/products/sabre-lite-imx6-sbc/
http://boundarydevices.com/android-jellybean-on-i-mx6-with-no-disclaimers/
Sometimes i also remove the app from device at runtime from /SYSTEM/APPS/ after rooting the device but i did not notice any heating/crashing as i always try on high end devices like Nexus 7/Nexus 4 etc.So i don't have any idea about it, that what could be the problem, due to which after removing apps at run time your board is experiencing issue you mentioned. So you will need to see logs and also dig in to AOSP code.
+1 vote

Would you know about the following? I have read on google that if we want to run our application in kiosk manner, we have to essentially replace launcher2 application. Have you done this?
I managed to to compile Android source with minimal applications and then created a SD card (essentially copied the out/..../system directory however Android got stuck at the bootanimation screen! Will continue trying other things.

answer Sep 20, 2013 by Naveena Garg
yes, Android launcher is targeted for mobile/tablet devices, if you want to make it effective for any other purpose like kioske or anything else, you can modify/replace the launcher2 app.We also had created some Launchers.
Similar Questions
+1 vote

I'm building an application that can only be built from the Android source and can build it just fine from the command line. I'd like to be able to build from Eclipse for speed. I've tried these instructions:

http://source.android.com/source/using-eclipse.html

But the instructions don't work anymore as the newer versions of eclipse seem to act quite differently that what is described here (I've tried 3.7 and 4.2). Both of those versions of Eclipse do not have the option number 5 in:

*   If Eclipse asks you for a workspace location, choose the default. 
*   If you have a "Welcome" screen, close it to reveal the Java perspective. 
*   File > New > Java Project 
*   Pick a project name, "android" or anything you like. 
*   Select "Create project from existing source", enter the path to your Android root directory, and click Finish. 
*   Wait while it sets up the project. (You'll see a subtle progress meter in the lower right corner.) 

So instead I tried to "Import" the source code but as some of the projects to import have duplicate names (which don't seem to be changeable). Even removing some of the duplicate projects leaves the overall state with tonnes of build errors.

So...are there better instructions out there for building with the most recent versions of eclipse?

+1 vote

I am working on a android based device used for biometrics capture (iris, fingerprint, face) and some amount of local matching.

We have platform that has 2GB of memory and we want to let Android apps have large enough memory heap.

I know one can build my custom rom with build.prop with custom dalvik.vm.heapgrowthlimit, dalvik.vm.heapsize , in our experiments setting this limit to be more than 1GB causes board boot failures.

Has anybody else experimented with increasing heap size for Android application, on custom rom? I am also looking at increasing cursor window memory size as some of the biometric data is stored in sqlite
database.

Anybody else tried to wrangle Android platform to do more memory intensive applications any other places I should be looking to alter things?

+3 votes

I want to know if there is a way to some settings to be used by framework services such as ActivityManagerService of WindowManagerService like apps can do with preferences. They should be able to store some of their variables into some persistent storage and read them at bootup.

Currently, I found only the xml files in res/res folder but this is editable only at compile time.

+1 vote

My ultimate goal is to create a new lock screen for android so I thought that the best way to do that is to modify the source files that already implement the lock screens in android and particularly in android 4.2 or 4.3. I followed the instructions in http://source.android.com/source/building.html and i successfully downloaded and built android 4.3 in my computer. The next step is the modification of some java files. I want to do this with eclipse. I have eclipse 4.3.1 and I am trying to follow the instructions in http://source.android.com/source/using-eclipse.html . The problem is that the instructions are for older version of eclipse and with the new version i cant follow the 5th step as shown below :

  • If Eclipse asks you for a workspace location, choose the default.
  • If you have a "Welcome" screen, close it to reveal the Java perspective.
  • File > New > Java Project
  • Pick a project name, "android" or anything you like.
  • SELECT "CREATE PROJECT FROM EXISTING SOURCE", ENTER THE PATH TO YOUR ANDROID ROOT DIRECTORY, AND CLICK FINISH.
  • Wait while it sets up the project. (You'll see a subtle progress meter in the lower right corner.)

How can I do this correctly in eclipse 4.3.1 ; If i follow the wright steps will I be able to import all android 4.3 in eclipse without showing any errors? Please help me.

+2 votes

I am often confused with Dex Optimization details. Here are few details I know of.

Kindly correct me if i am wrong ? While exploring the source code, i found that package manager scans all the external libraries, base frameworks, system packages, and vendor packages for dex optimization.

So, if I understand correct 'dex optimization' can be done both in compilation time and execution time.

Also, surfing in the internet, DISABLE_DEXPREOPT has an impact over this dex optimization when to be done?

Which one do I have to opt?

DISABLE_DEXPREOPT=true [OR] DISABLE_DEXOPT=false  

while building with the below command

make TARGET= droid -j6  

According to the source code, I understood if .odex is available as part of .jar or apk file, then it ignores dex optimization, while booting.

Kindly correct me if i am wong?. and suggest.

...