For devices which are not treble enabled, return the system shell.
For treble enabled devices, still return the appropriate shell depending
on whether the process is a vendor process or a system one.
Test: Manual testing: on a bullhead device, ran test programs from
/vendor/bin which used popen() and system(). The calls succeeded.
Bug: 65054230
Bug: 64516799
Change-Id: I15dfdbb107cfca7c0f92f337c9bb46b9876eb38e
diff --git a/libc/Android.bp b/libc/Android.bp
index b5229cb..a0d1f23 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1509,7 +1509,11 @@
srcs: ["bionic/mmap.cpp"],
},
},
-
+ product_variables: {
+ treble: {
+ cflags: ["-D__ANDROID_TREBLE__"],
+ },
+ },
cppflags: ["-Wold-style-cast"],
local_include_dirs: ["stdio"],
include_dirs: ["bionic/libstdc++/include"],