This script is responsible for generating <module>_using.txt, which is a
file containing all NDK symbols used by the shared libraries in an APEX.
This script doesn't work as-is in the bazel sandbox; namely it tries to
create tmp directories in read only input dirs, for example:
"mkdir: cannot create directory 'bazel-out/android_target-fastbuild-ST-7fe6d3cd3905/bin/packages/modules/adb/apex/com.android.adbd_staging_dir/tmpUnzipped': Permission denied"
The staging dir inputs are also symlinks, so the `find` call needs a new
-L flag to follow symlinks.
This CL fixes that by using a tmpdir, and also refactors the script to
be less fragile.
I'm not a fan of the camelCase, but I'll save that for another change.
Test: presubmits
Bug: 239081455
Bug: 257226023
Fixes: 257226023
Change-Id: I1d0fe93c47c92d046e72c0ab32014a5dc8bbd597
Update the gen_ndk_usedby_apex.sh script to generate NDK API list with
library name.
Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: I799e03ad7d81a4184229f658fd6c8824b9ba6e1f
Add gen_ndk_usedby_apex.sh script to generate NDK API list used by Mainlain modules when modules get build.
Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Forrest run: android-build.googleplex.com/builds/forrest/run/L97800000742565481
Change-Id: I39e5aa7c74eff46aba06808642b2bd67ae45ba1e