Commit Graph

1665 Commits

Author SHA1 Message Date
Jiyong Park 81088bf131 Remove *.dep files for ld.config.txt, [llndk|vndksp].libraries.txt
The dep files are not required because change in the command line
triggers the rule.

Test: m -j ld.config.txt llndk.libraries.txt vndksp.libraries.txt
Re-run the build after adding or removing libs to/from the vndk set.
The txt files are updated accordingly.

Change-Id: I9c9e22088cc2afeb66e8b159f611b25d698cf800
2017-10-13 16:36:49 +09:00
Dmitry Shmidt 31da436566 Merge "console: Add setenv HOSTNAME console" am: d2c66b31a0 am: 5884f608d9 am: 825915bfde
am: 455faa53ed

Change-Id: I4454a732810ef6f6d70b1f7d91455c8fb45b145f
2017-10-11 21:57:23 +00:00
Dmitry Shmidt 455faa53ed Merge "console: Add setenv HOSTNAME console" am: d2c66b31a0 am: 5884f608d9
am: 825915bfde

Change-Id: Ia845dfb8cba654766dfff15f2eab7dbee621a45d
2017-10-11 20:50:54 +00:00
Dmitry Shmidt 5884f608d9 Merge "console: Add setenv HOSTNAME console"
am: d2c66b31a0

Change-Id: I85addec989872b9e66f0e68c4fea20b969a1eb25
2017-10-11 20:28:49 +00:00
Dmitry Shmidt d0fb2510e2 console: Add setenv HOSTNAME console
Bug: 67678999
Test: Run serial console on Hikey

Change-Id: Ia5fa9c2af4771508d96545f6a8814a81d5ccee3c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-10-11 11:20:02 -07:00
Marco Nelissen 593b43910b Fix media on W/T
W/T enforce restrictions on linker paths, which M/S do not.
Because of this, media.extractor was unable to load its extractors on W/T.

Bug: 67405932
Test: play sounds successfully
Change-Id: I8914da74780c909da815beaffcd4d76fbe2cc6b5
2017-10-04 13:47:17 -07:00
TreeHugger Robot 773ebbdfe3 Merge "resolve merge conflicts of 73d9596bc to oc-mr1-dev-plus-aosp" into oc-mr1-dev-plus-aosp 2017-09-30 00:57:51 +00:00
Keun Soo Yim dfe8bb87df Merge "Tests are run with proper namespace configs by their locations" into oc-mr1-dev am: aedc1c9ab0
am: 202c5af4be

Change-Id: I5e794726de781c2faf72c89c442c115862009417
2017-09-29 23:27:08 +00:00
Keun Soo Yim 202c5af4be Merge "Tests are run with proper namespace configs by their locations" into oc-mr1-dev
am: aedc1c9ab0

Change-Id: I121703da98b8c66f24bbf0efced1c592c2fc113e
2017-09-29 23:23:08 +00:00
Keun Soo Yim aedc1c9ab0 Merge "Tests are run with proper namespace configs by their locations" into oc-mr1-dev 2017-09-29 22:59:28 +00:00
Bowgo Tsai 62398781f5 resolve merge conflicts of 73d9596bc to oc-mr1-dev-plus-aosp
Change-Id: I8272038fe905a88273ce9aa690af0ee0005a6b67
2017-09-30 06:44:32 +08:00
Jiyong Park cf3c298376 Merge "Fix: make vndk namespace visible for 2016 Pixes" into oc-mr1-dev am: 2f00c80c2b
am: f196067a8f

Change-Id: Ic9c2a52d2c07174716e2e33b2e52f8169809e94b
2017-09-29 21:08:56 +00:00
Jiyong Park f196067a8f Merge "Fix: make vndk namespace visible for 2016 Pixes" into oc-mr1-dev
am: 2f00c80c2b

Change-Id: I7659a648f88559ddf65c879e695c1766b3854686
2017-09-29 20:54:04 +00:00
TreeHugger Robot 2f00c80c2b Merge "Fix: make vndk namespace visible for 2016 Pixes" into oc-mr1-dev 2017-09-29 20:41:42 +00:00
Jiyong Park afc8dda111 Merge "Remove workaround for VNDK violations" into oc-mr1-dev am: 152687b26e
am: f631a98a31

Change-Id: Ic9c4597df4d26675524ce6ebb626d60e1eb9a014
2017-09-29 20:02:08 +00:00
Jiyong Park f631a98a31 Merge "Remove workaround for VNDK violations" into oc-mr1-dev
am: 152687b26e

Change-Id: I40798ad3c2a394d3210a3c218fd52ea38fc8cbff
2017-09-29 19:05:49 +00:00
Bowgo Tsai d29ac08509 Merge "Removing $(PRODUCT_OUT)/root/root"
am: 8cbbacdc15

Change-Id: Ia671976f8d7d4b83478c58d566e309f36af125ab
2017-09-29 03:27:38 +00:00
Jiyong Park 326b783ad9 Tests are run with proper namespace configs by their locations
Tests in /data/[nativetest|benchmarktest] run with namespace config for
system and tests in /data/[nativetest|benchmarktest]/vendor run with
namespace config for vendor.

They no longer run in the 'test' namespace config which didn't impose
any restriction for libraries.

Bug: 67028906
Test: sailfish/marlin builds and boots
Test: no VTS regression on system.img from GSI + vendor.img from
marlin/sailfish
Test: VtsKernelLibcutilsTest successful in above config

Change-Id: I28cdef960d087565c8a22dca0e9a154fb1c3bb94
2017-09-29 05:04:27 +09:00
Bowgo Tsai 144893e5ec Removing $(PRODUCT_OUT)/root/root
Bug: 65570851
Test: boot sailfish
Change-Id: I80c3c3de23c57343187fde207980731b5341bc1f
Merged-In: I80c3c3de23c57343187fde207980731b5341bc1f
(cherry picked from commit ededee3e40)
2017-09-28 18:10:58 +08:00
Jiyong Park f8025aae82 Remove workaround for VNDK violations
lib-dplmedia.so and qseeproxydaemon no longer depend on non-VNDK
libraries. Remove the workaround.

Bug: 64427765
Bug: 64820887
Test: 2017 pixel devices boots
Change-Id: Ib8bcbbb16169dc5c997d6c0dad061c66dcd0ccfe
2017-09-26 01:54:57 +09:00
Jiyong Park 1cc09e749f Fix: make vndk namespace visible for 2016 Pixes
The nativeloader tries to find the 'vndk' namespace when there is a
vendor apk in the classloader paths. This can happen even for a
downloaded app if the app is using a vendor apk via <uses-library> tag.

In order to prevent the nativeloader from failing to find the vndk
namespace, the namespace is marked as visible.

Bug: 66482442
Test: download the app mentioned in the bug, it does not crash.
Change-Id: I82e2394eb6eedcb8645e1a5b3735bbfe2735b312
2017-09-26 01:38:22 +09:00
Bowgo Tsai ededee3e40 Removing $(PRODUCT_OUT)/root/root
Bug: 65570851
Test: boot sailfish
Change-Id: I80c3c3de23c57343187fde207980731b5341bc1f
2017-09-22 15:12:02 +08:00
Jiyong Park 25a03a23a8 Merge changes from topic "vndk_jni" into oc-mr1-dev
am: 6f7d928940

Change-Id: I69af1cdf06bf71f1125644c7064b40444613eaa7
2017-09-14 14:52:51 +00:00
Jiyong Park 6eaa30765e add llndk|vndksp.libraries.txt to vndk_package
am: 26335f89b1

Change-Id: Idc8d3ff696c782963337fa21ead8a7665c0a1e98
2017-09-14 14:52:40 +00:00
TreeHugger Robot 6f7d928940 Merge changes from topic "vndk_jni" into oc-mr1-dev
* changes:
  vendor apk is unbundled
  add llndk|vndksp.libraries.txt to vndk_package
2017-09-14 01:35:43 +00:00
Jiyong Park 299591e464 Merge "fix: boot fails on ASAN builds with VNDK restriction" into oc-mr1-dev
am: 80206d8f03

Change-Id: I051d1683e95171bc1e3e3d16007c5d25ea923bc2
2017-09-08 01:41:44 +00:00
TreeHugger Robot 80206d8f03 Merge "fix: boot fails on ASAN builds with VNDK restriction" into oc-mr1-dev 2017-09-08 01:20:30 +00:00
Jiyong Park a07f3057d0 vendor apk is unbundled
For devices where VNDK restrictions are all enforced, vendor apks are
recognized as unbundled; since system partition and vendor partition can
be updated independently from each other.

However, since vendor apks are still bundled in the vendor partition,
they are allowed to do more than ordinaly unbundled apks that are
downloaded and installed to the data partition.

1) /vendor/lib is allowed. So the path is added to the search_paths and
permitted paths of the classloader namespace.
2) LLNDK libs are allowed in addition to the NDK libs. So, LLNDK lib list
from llndk.libraries.txt is added to the list from public.libraries.txt.
3) VNDK-SP libs are allowed. To do so, the classloader namespace is
linked to the 'vndk' namespace where VNDK-SP libs are searched and
loaded from. The list of available VNDK-SP libs is read from
vndksp.libraries.txt file.
4) Name of the namespace is changed to 'vendor-classloader-namespace'
since the namespace is configured differently from the ordinary
'classloader-namespace'.

Bug: 63553457
Test: 2017 pixel devices build and boots to the UI
Test: a vendor apk (e.g. TimeService.apk) works. Turn the airplain mode on.
Set time. Reboot the device. The time is not reset.
Test: 1) set target as 2017 pixel
2) m -j CtsVendorJniTestCases
3) copy the built apk into /vendor/app/CtsVendorJniTestCases
4) reboot / factory reset
5) adb shell am instrument -w android.jni.vendor.cts

Change-Id: I447452eb025c0a0fd076b5c9ac081d453dc6074e
2017-09-07 20:26:10 +09:00
Jiyong Park 26335f89b1 add llndk|vndksp.libraries.txt to vndk_package
List of llndk and vndk-sp libraries are written in the txt file so that
they can be available at run-time. The information is used by
libnativeloader to configure the classloader-namespace specially for
vendor apks.

Bug: 64882323
Test: build 2017 pixel devices. check that the two files exist on
/system/etc.

Change-Id: Ifbe339a5862f6ef57a8213a14a022765ccf77283
2017-09-07 11:51:29 +09:00
Jiyong Park 533062b8d6 Merge "templatize ld.config.txt" into oc-mr1-dev
am: 2d3cf6799e

Change-Id: I570d4d52b630c3de0e82ec67638c6c37c48d1074
2017-09-01 03:28:45 +00:00
TreeHugger Robot 2d3cf6799e Merge "templatize ld.config.txt" into oc-mr1-dev 2017-09-01 03:23:17 +00:00
Jiyong Park 8e14484166 Merge "libz is back to LLNDK" into oc-mr1-dev
am: d9d20baf6f

Change-Id: Id2649fcd9c66003a5e84d75d91a34604b5f5d7e0
2017-09-01 00:54:49 +00:00
TreeHugger Robot d9d20baf6f Merge "libz is back to LLNDK" into oc-mr1-dev 2017-09-01 00:39:14 +00:00
Jiyong Park faefa6bd36 fix: boot fails on ASAN builds with VNDK restriction
Fix the bug that caused boot failure on ASAN builds with VNDK
restriciton. The major cause is because incorrect (old) ld.config.txt
was used when the build is sanitized, which prevented the dynamic linker
to find some VNDK libs that only exist in /system/lib/vndk; the old
ld.config.txt does not have the directory in its search paths. So, this
CL fixes the problem by having the same ld.config.txt for both sanitized
and non-sanitizied builds.

Furthermore, ld.config.txt is modified so that dependency to
libclang_rt* libs are redirected to those in /system/lib directory. This
ensures that the sanitizer runtime libs are not dual loaded but are
provided for both platform and vendors.

Bug: 65217017
Test: SANITIZE_TARGET=integer_overflow SANITIZE_TARGET_DIAG=integer_overflow m
on 2017 pixel devices. The build is successful and the device boots to
the UI.

Change-Id: I0e21e20d9aca340b984968e07d4ce542ae10fd31
2017-09-01 07:53:56 +09:00
Jiyong Park 367984602a templatize ld.config.txt
Lists of libraries in between the linker namespaces are no longer
hard-coded in ld.config.txt, but instead come from Soong.

Bug: 37139976
Test: build 2017 pixel device with BOARD_VNDK_VERSION=current m -j
Test: the device is bootable, basic functionalities (camera, camcorder,
wifi, bt, gps, etc.) work.
Change-Id: I8170e6c3f6ee04b16359791d64cc46bd2714a073
2017-09-01 07:53:56 +09:00
Jiyong Park ab8de9ebc3 Make default namespace for system processes isolated
am: 55f05d79f9

Change-Id: Idd31e85fbe01a506f11c88fd4dcecb23db936d0e
2017-08-31 16:17:20 +00:00
Jiyong Park 697eb2da0d libz is back to LLNDK
For 2016 pixel devices, where VNDK is not fully enforced, move libz back
to LLNDK so that we can pass the CTS without requiring the default
namespace to be isolated.

If we have libz in vndk-sp directory, test_linker_namespaces fails
because /system/lib/vndk-sp/libz.so becomes accessible. In order to make
the lib inaccessible, we have to make the default namespace isolated,
but this can't be done for 2016 pixel devices where VNDK is not fully
enforced. So, we choose to remove /system/lib/vndk-sp/libz.so and keep
the single copy at /system/lib.

Bug: 65018779
Test: android.jni.cts.JniStaticTest#test_linker_namespaces successful on
2016 pixel devices

Change-Id: Ib6b6560b02be69d2015c0afb86acf07c02b30c2f
2017-08-31 22:11:35 +09:00
Bowgo Tsai f390f04381 Merge "Move adbd from root to system"
am: 3d6f85167e

Change-Id: I3b89a7a8e98252319f850a225ef7ba2080e54879
2017-08-31 06:30:48 +00:00
Treehugger Robot 3d6f85167e Merge "Move adbd from root to system" 2017-08-31 06:22:16 +00:00
Jiyong Park 55f05d79f9 Make default namespace for system processes isolated
The default namespace for system process now becomes isolated, which
means it can load only the libs that are in search.paths and under
permitted.paths.

/system/framework, /system/app, /system/priv-app, /vendor/app, /data,
etc are added to the permitted paths since libart should be able to
dlopen odex files under the locations.

Following directories become unavailable:
/system/lib/vndk
/system/lib/vndk-sp

Bug: 37013858
Bug: 64888291
Bug: 64950640
Test: 2017 pixel devices builds and boots
Test: android.jni.cts.JniStaticTest#test_linker_namespaces passes
Change-Id: I2bbe9cc19940c3633c2fb901f9bf8ab813e38c13
2017-08-31 11:52:03 +09:00
Tom Cherry 698da68800 Merge "Globally allow up to 32K FDs open per process" am: 451ff37052 am: 42fb030221
am: 32e268561a

Change-Id: I07f13cb0ccfa5e5b1bbf9ef3c4dfb27d2e711a02
2017-08-29 21:32:05 +00:00
Tom Cherry 42fb030221 Merge "Globally allow up to 32K FDs open per process"
am: 451ff37052

Change-Id: Icb14faacb7d10fd99dd66e2172e04c0e73a8b170
2017-08-29 21:15:03 +00:00
Tom Cherry cb5fccc83c Globally allow up to 32K FDs open per process
We've seen crashes due to processes exceeding the current soft limit
for open FDs of 1024, mainly due to increases in using FDs for shared
memory and gralloc memory objects.

There is not a compelling reason to keep this limit artificially low,
so we raise it to 32K.  This matches my desktop linux limit, so it is
with precedent.

Bug: 64894637
Test: open 32K FDs in a process without failure then fail after 32K
Change-Id: Ibecfc486e9c61f273a432a108893137d2d13a530
2017-08-28 13:08:24 -07:00
Nick Kralevich 566ae3ebf6 Merge "init.rc: Lock down access to /proc/net/fib_trie" into oc-mr1-dev
am: c3090ba2f4

Change-Id: I9ffa9c76b807c8439f05388f4b8aae3d131bac5a
2017-08-28 14:42:49 +00:00
Nick Kralevich 15ffc53f6d init.rc: Lock down access to /proc/net/fib_trie
Make /proc/net/fib_trie only readable to root.

Bug: 31269937
Test: Device boots, file has appropriate permissions.
Change-Id: I0d01ce5c043d576344a6732b0b9ff93d62fcaa34
2017-08-25 12:55:52 -07:00
Mark Salyzyn 8b2136afe0 Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property" am: 13cb599536 am: 37c6015d9d
am: a0641b5c13

Change-Id: Ia78340ffa961a3375dfa5f6b012f4f98bd7b01e3
2017-08-25 14:47:51 +00:00
Mark Salyzyn 37c6015d9d Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property"
am: 13cb599536

Change-Id: Ib6c1b51668b892288db931b09b099bf5ed28fbae
2017-08-25 14:24:21 +00:00
Justin Yun e2c3cb1634 vndk: add vendor/lib(64)/vndk for vendor namespace
am: 3094de9684

Change-Id: I389ceda99569f3aaebac1a8b5f04e02e146fa8f0
2017-08-25 07:35:48 +00:00
Justin Yun 3094de9684 vndk: add vendor/lib(64)/vndk for vendor namespace
When the vndk is extended by vendor, the libs in vendor/lib(64)/vndk
will override system/lib(64)/vndk libs. Vendor binaries will search
vndk libs in vendor/lib(64)/vndk prior to system/lib(64)/vndk.

Also, remove a workaround for libsdm-color.so

Bug: 65032513
Test: build and boot check for libsdm-color.so will be loaded on boot
Test: currently no libs exist on vendor/lib(64)/vndk. No test for it
Change-Id: I99ed37eb1a9e92c83533e2d92c9c06db11f01e97
2017-08-25 12:30:44 +09:00
Mark Salyzyn 73e6b49c0c Switch /data/misc/reboot/last_reboot_reason to persistent property
Switch from /data/misc/reboot/last_reboot_reason to persistent
Android property persist.sys.boot.reason for indicating why the
device is rebooted or shutdown.

persist.sys.boot.reason has a standard as outlined in b/63736262 and
the associated investigation. Made adjustments to the values so that
we did not create a problem even before we started. Compliance is
part of the tests in boot_reason_test.sh.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 64687998
Change-Id: I812c55a12faf7cb7ff92101009be058ad9958d07
2017-08-24 15:13:48 -07:00