Some help with moving executables to proprietary location using Android.mk

1,113 views
Skip to first unread message

Shardul Bhakta

unread,
Feb 12, 2016, 1:54:06 PM2/12/16
to Android Building
Hi,

I am fairly new to Android build system.
I have created a test project on my Android M tree under "vendor/apps/ssbtest/" , which I want to convert to an executable and store it in a proprietary location like "out/product/prod1/system/vendor/bin."
I know that by default, the exectable is installed in location "out/product/prod1/system/bin", I just wanna know a way through which I can install it in another location.

ssb@ubuntu:~/clones/master/vendor/apps/ssbtestapp$ ls
Android.mk  test.c

ssb@ubuntu:~/clones/master/vendor/apps/ssbtestapp$ cat test.c
#include<stdio.h>

int main() {
    printf("Welcome to my test app. Hello World");
    return 0;
}

ssb@ubuntu:~/clones/master/vendor/apps/ssbtestapp$ cat Android.mk
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := ssbtest
LOCAL_MODULE_OWNER := intel

LOCAL_SRC_FILES := test.c

include $(BUILD_EXECUTABLE)

ssb@ubuntu:~/clones/master/vendor/apps/ssbtestapp$ mm -B
============================================
PLATFORM_VERSION=6.0.1
TARGET_BUILD_VARIANT=userdebug
OUT_DIR=out
============================================
make: Entering directory `/home/ssb/clones/master'
Import includes file: out/target/product/prod1/obj/EXECUTABLES/ssbtest_intermediates/import_includes
target  C: ssbtest <= vendor/apps/ssbtestapp/test.c
target Executable: ssbtest (out/target/product/prod1/obj/EXECUTABLES/ssbtest_intermediates/LINKED/ssbtest)
target Unpacked: ssbtest (out/target/product/prod1/obj/EXECUTABLES/ssbtest_intermediates/PACKED/ssbtest)
target Symbolic: ssbtest (out/target/product/prod1/symbols/system/bin/ssbtest)
Export includes file: vendor/apps/ssbtestapp/Android.mk -- out/target/product/prod1/obj/EXECUTABLES/ssbtest_intermediates/export_includes
target Strip: ssbtest (out/target/product/prod1/obj/EXECUTABLES/ssbtest_intermediates/ssbtest)
Install: out/target/product/prod1/system/bin/ssbtest
make: Leaving directory `/home/ssb/clones/master'

#### make completed successfully (2 seconds) ####

Can I please know if I can modify the Android.mk file to install it in /system/vendor/bin. It would be great if you guys help me out.

Thanks a lot.

Dan Willemsen

unread,
Feb 12, 2016, 3:47:10 PM2/12/16
to Android Building
You can use LOCAL_PROPRIETARY_MODULE to trigger the move to /vendor/:

LOCAL_PROPRIETARY_MODULE := true

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shardul Bhakta

unread,
Feb 12, 2016, 8:54:58 PM2/12/16
to Android Building
I tried it out, and it works wonders. 
Thanks so much. I never thought it would be so easy.
Reply all
Reply to author
Forward
0 new messages