Commit Graph

36390 Commits

Author SHA1 Message Date
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
Bowgo Tsai 2743cf88e8 Merge "Revert "adbd: lessen security constraints when the device is unlocked"" into oc-mr1-dev
am: 7e929121b1  -s ours

Change-Id: Ia325c7b24a09a6f117e5d26da8d75d341e4fd94a
2017-09-01 01:37:40 +00:00
TreeHugger Robot 7e929121b1 Merge "Revert "adbd: lessen security constraints when the device is unlocked"" into oc-mr1-dev 2017-09-01 01:30:51 +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 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 149f9b7696 Merge "Revert "adbd: lessen security constraints when the device is unlocked"" am: 9638729a9d am: 08a8c4209f
am: 0bf9c716bd

Change-Id: I6611368010a2cad55acbbb43fd4b6de12235f83c
2017-08-31 08:33:34 +00:00
Bowgo Tsai 0bf9c716bd Merge "Revert "adbd: lessen security constraints when the device is unlocked"" am: 9638729a9d
am: 08a8c4209f

Change-Id: I22a007674b17d7bb1d23ddd49d73ba3a918cfe33
2017-08-31 08:30:33 +00:00
Bowgo Tsai 08a8c4209f Merge "Revert "adbd: lessen security constraints when the device is unlocked""
am: 9638729a9d

Change-Id: I25eab992b0a4c2f144454cd5865fad1a762cfc61
2017-08-31 08:27:33 +00:00
Bowgo Tsai 9fa61b4df3 Revert "adbd: lessen security constraints when the device is unlocked"
This reverts commit f1d3dbc32f.

With the following changes to move /sbin/adbd to /system/bin/adbd,
we don't need this workaround anymore.

  https://android-review.googlesource.com/#/q/topic:move-adbd-to-system+(status:open+OR+status:merged)

Bug: 63313955
Bug: 63381692
Bug: 64822208
Test: 'adb root' works in VTS for a non-A/B device (userdebug GSI + user boot.img)

Change-Id: Ic1249d6abd7d6e6e7380a661df16d25447853a48
Merged-In: Ic1249d6abd7d6e6e7380a661df16d25447853a48
(cherry picked from commit 0603ec4294)
2017-08-31 16:26:49 +08:00
Treehugger Robot 9638729a9d Merge "Revert "adbd: lessen security constraints when the device is unlocked"" 2017-08-31 08:21:08 +00:00
Bowgo Tsai 0768f03157 Merge "Move adbd from root to system" am: 3d6f85167e am: f390f04381
am: 53aeb8af81  -s ours

Change-Id: I4d5de7f790db96009543599793ee429ec125cf79
2017-08-31 06:41:26 +00:00
Bowgo Tsai 53aeb8af81 Merge "Move adbd from root to system" am: 3d6f85167e
am: f390f04381

Change-Id: I5916c9dc47c2560c0acbdc1b405e752e041d4bbe
2017-08-31 06:35:57 +00:00
Bowgo Tsai 0603ec4294 Revert "adbd: lessen security constraints when the device is unlocked"
This reverts commit f1d3dbc32f.

With the following changes to move /sbin/adbd to /system/bin/adbd,
we don't need this workaround anymore.

  https://android-review.googlesource.com/#/q/topic:move-adbd-to-system+(status:open+OR+status:merged)

Bug: 63313955
Bug: 63381692
Bug: 64822208
Test: 'adb root' works in VTS for a non-A/B device (userdebug GSI + user boot.img)

Change-Id: Ic1249d6abd7d6e6e7380a661df16d25447853a48
2017-08-31 14:30:51 +08: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
Christopher Ferris 723f414ac2 Merge "Add proper support for embedded elf files." am: 537c68c8ed am: 863fcdb0ca
am: b41875be0b

Change-Id: I77cfa66ec34c5c30e44062cfabf0454253a3d92d
2017-08-31 02:41:48 +00:00
Christopher Ferris b41875be0b Merge "Add proper support for embedded elf files." am: 537c68c8ed
am: 863fcdb0ca

Change-Id: I038dcbbd11f35a494a5197b315278b35b9a72236
2017-08-31 02:32:15 +00:00
Christopher Ferris 863fcdb0ca Merge "Add proper support for embedded elf files."
am: 537c68c8ed

Change-Id: Ia28dbb1bbd02d54602a6256295cccf2def9caf04
2017-08-31 02:25:05 +00:00
Christopher Ferris 537c68c8ed Merge "Add proper support for embedded elf files." 2017-08-31 02:17:41 +00:00
Christopher Ferris 3f805ac3f8 Add proper support for embedded elf files.
- Add a method to get the max size of an elf file by reading the
  section header offset + size. This will properly map an elf
  file embedded into an apk, instead of just mapping in what is done
  by the dynamic linker. It does assume that the section headers are
  at the end of the elf file.
- Add new tests for the above functionality.
- Update the unwind_symbols tool to take an address for finding a
  function instead of dumping the entire symbol table.

Bug: 23762183

Test: Unit tests pass, unwind through the camera process and verify
Test: the GoogleCamera.apk shows some function names.
Change-Id: I00c021680fe1d43b60d652bf91bbf6667d9617be
2017-08-30 15:50:11 -07:00
Tom Cherry b5d7e00815 Merge "use a single file for storing persistent properties" am: e1f9a58c86 am: 39088d35ee
am: f8d36679bf

Change-Id: Id6b9812de8f7cc774fe7300d0b9e13a0d2b3b248
2017-08-30 19:55:39 +00:00
Tom Cherry f8d36679bf Merge "use a single file for storing persistent properties" am: e1f9a58c86
am: 39088d35ee

Change-Id: I98871252072953ba8f892cdb1feef09a1b59e769
2017-08-30 19:49:38 +00:00
Tom Cherry 39088d35ee Merge "use a single file for storing persistent properties"
am: e1f9a58c86

Change-Id: Iea9d022eee79e3a4ccf9f5ebc6739d565b6e51b1
2017-08-30 19:42:08 +00:00
Tom Cherry e1f9a58c86 Merge "use a single file for storing persistent properties" 2017-08-30 19:30:18 +00:00
Josh Gao 12f0dfc915 Merge "base: hopefully fix the mac build." am: 815f74a759 am: 8949a0255e
am: 35e06ef181

Change-Id: Ib9202c26a95e3d264bd0ad0bf215ad257e5b5764
2017-08-30 08:21:28 +00:00
Josh Gao 35e06ef181 Merge "base: hopefully fix the mac build." am: 815f74a759
am: 8949a0255e

Change-Id: I97a5cc9e916ea0905861a2bd87c6902cdc66187c
2017-08-30 08:14:27 +00:00
Josh Gao 8949a0255e Merge "base: hopefully fix the mac build."
am: 815f74a759

Change-Id: I335e774a3c6e1ed1fd662552ae158bd232ae6c78
2017-08-30 08:07:27 +00:00
Treehugger Robot 815f74a759 Merge "base: hopefully fix the mac build." 2017-08-30 08:03:32 +00:00
Josh Gao 4221e2cc03 base: hopefully fix the mac build.
Test: none
Change-Id: Idd4f353a158a0c096d16ecf87e239c50aba79cf7
2017-08-29 21:28:32 -07:00
Ting-Yuan Huang 9cd73e43ed Merge "sdcard: mute false compiler alarm" am: cb4e164562 am: 124294a348
am: e657bf552c

Change-Id: I1e75decd46537a7697840908146981a4650ca417
2017-08-30 02:53:36 +00:00
Ting-Yuan Huang e657bf552c Merge "sdcard: mute false compiler alarm" am: cb4e164562
am: 124294a348

Change-Id: I6e8964c4eb7426b838c5f780a5c87136bfbc24e5
2017-08-30 02:49:37 +00:00
Ting-Yuan Huang 124294a348 Merge "sdcard: mute false compiler alarm"
am: cb4e164562

Change-Id: Iefc21ac2b479095e50a764495843db28bebdffa5
2017-08-30 02:43:07 +00:00
Treehugger Robot cb4e164562 Merge "sdcard: mute false compiler alarm" 2017-08-30 02:31:54 +00:00
Tom Cherry 16fad42007 use a single file for storing persistent properties
We have seen that storing persistent properties in separate files
causes increased boot latency compared to if they were stored in a
single contiguous file.

This change creates a simple format for a contiguously stored property
file, and adds the support for arbitrary characters in the names of
persistent properties, which previously had been restricted.  It has a
mechanism for converting older devices to the new format as well.

Bug: 64392887
Test: boot bullhead with new properties
Test: boot bullhead and verify old properties are converted to the new
      property file
Test: corrupt property file and ensure that it gets recovered from memory
Test: new unit tests
Change-Id: I60d8201d655ce5c97b33faae81d5ca8dbbb21a14
2017-08-29 17:45:06 -07:00
Ting-Yuan Huang 1991ae9459 sdcard: mute false compiler alarm
Clang static analyzer worries that strcpy to a field may overwrites
other fields.  Use snprintf() instead.

Test: built without seeing the warning.

Change-Id: I75d8edf1353b5d052fd14a954362bd0632c258fa
2017-08-29 17:21:13 -07:00
Josh Gao 82c4799fe0 adbd: don't spin if file sync read fails.
am: a2f1335819

Change-Id: I71fa5b33e79b1449431b05d4889fcc04746023de
2017-08-29 22:32:03 +00:00
Josh Gao f8ecfa2495 Merge "base: add Pipe and Socketpair wrappers." am: 287e8348de am: b8ae24c73b
am: 4db97b46fa

Change-Id: Icc945f3f6a5920a9bb49a08f2b11faf04905e7f0
2017-08-29 22:01:28 +00:00
Josh Gao 4db97b46fa Merge "base: add Pipe and Socketpair wrappers." am: 287e8348de
am: b8ae24c73b

Change-Id: I9ae44e8ef9ddaf4cf9bf3a8f8a514074c5104bdc
2017-08-29 21:54:18 +00:00
Josh Gao b8ae24c73b Merge "base: add Pipe and Socketpair wrappers."
am: 287e8348de

Change-Id: I7f86122ee2239ad8daebc59d17f14f665e65983b
2017-08-29 21:47:56 +00: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
Treehugger Robot 287e8348de Merge "base: add Pipe and Socketpair wrappers." 2017-08-29 21:26:39 +00:00
Tom Cherry 32e268561a Merge "Globally allow up to 32K FDs open per process" am: 451ff37052
am: 42fb030221

Change-Id: I3c73e3e235d496d0ad65a7c5a4aee2fb23aeb173
2017-08-29 21:20:02 +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 451ff37052 Merge "Globally allow up to 32K FDs open per process" 2017-08-29 21:01:23 +00:00
Josh Gao a2f1335819 adbd: don't spin if file sync read fails.
Bug: http://b/64508974
Bug: 64709603 (presubmit balking at the line above)
Test: mma
Change-Id: Ifba6a9dea3138b6d2a62c91cc0532f63986c048a
(cherry picked from commit 1d6c01b53d)
2017-08-29 18:54:19 +00:00