9

I am trying to MAKE / Compile a single AOSP project from the repository - specifically packages/apps/Email.

Does anyone know how to do it? (I have no problem compiling the entire repository, but I really would like to be able to compile a single project as well).

Yury
  • 20,618
  • 7
  • 58
  • 86
Erez A. Korn
  • 2,697
  • 3
  • 24
  • 32
  • 1
    If you are trying to convert an AOSP project to compile with the Android SDK, that will not work without tremendous effort in general. – CommonsWare Feb 20 '11 at 14:08
  • Thank you, but what I was looking for is compiling the application within the AOSP / CyanogenMod build environment. – Erez A. Korn Feb 22 '11 at 06:15

2 Answers2

17

If your environment has been configured by build/envsetup.sh in your android tree, you can run mmm [project_path] to build only a specific subproject. (This will require that you've built its dependencies from the tree before.)

As CommonsWare pointed out, if you're trying to build the Email app using the SDK there's more porting work to do.

adamp
  • 28,862
  • 9
  • 81
  • 69
  • "This will require that you've built its dependencies from the tree before." Do you mean to build the app, one has to build the full Android once? – Yulong Jun 12 '14 at 01:53
  • `mmm packages/apps/Settings/` or `mm Settings` works fine for me. Also, I find the following steps to install built app. `adb devices; adb root; adb remount; adb push out/target/product/generic/system/priv-app/Settings.apk /system/priv-app; adb shell chmod 644 /system/priv-app/Settings.apk; adb reboot;` And in my case, I actually don't need to reboot. – cwhsu Nov 09 '15 at 09:50
  • there's `mmp` command to push module to device, see https://wiki.cyanogenmod.org/w/Envsetup_help Also you can use `adb sync` https://wiki.cyanogenmod.org/w/Doc:_Building_Basics#ADB – Mixaz Sep 14 '16 at 00:04
10

make Email also works (and generally make [appname] for all apps)

Conley Owens
  • 8,691
  • 5
  • 30
  • 43