post install step for cc_binary

56 views
Skip to first unread message

Abhayadev S

unread,
Oct 4, 2021, 3:13:59 PM10/4/21
to Android Building

Hi,

I have a cc_binary module (name myBin) defined in in a/b/Android.bp which is building fine and installs the binary in to out/..../system/bin/myBin

Now, every time the binary is built, i need to copy this binary in to another git repo project cloned in a/b/bins/ to keep the prebuilts

so, is there post build/install options i can use inside the Android.bp ?

regards,
abhay

Dan Willemsen

unread,
Oct 4, 2021, 6:38:25 PM10/4/21
to android-...@googlegroups.com
No, the source tree should be considered read-only from within the build. I'd suggest doing this as a wrapper around the build, rather than inside the build. You can set up `dist` options so that `m ... dist` builds will copy artifacts (and logs -- it's meant to be used on build servers) to $DIST_DIR (defaults to out/dist/) after a build, but you'd still need something wrapping the build to put them where you wanted, so that may or may not simplify things.

- Dan

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/2edbc3a5-816e-4e12-8528-1cc0f0a7e841n%40googlegroups.com.

Abhayadev S

unread,
Oct 8, 2021, 5:37:59 PM10/8/21
to Android Building
Dan,
I was just trying out the "LOCAL_POST_INSTALL_CMD" (to execute some short shell scripts) and it works now in the Android.mk.
I could not find an equivalent for Android.bp though, do you know of any?

any way it works for now :)

cheers.
Reply all
Reply to author
Forward
0 new messages