Commit Graph

47721 Commits

Author SHA1 Message Date
Jiyong Park 4b5a37c8bd Refactor public_libraries.cpp more
- *_public_libraries() are now thread-safe
- removed some of the duplicated code

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I34b5149f75e28bb892cffe8fd9070be886d2f9bd
2019-05-10 00:12:03 +09:00
Bowgo Tsai d9516f42dc Merge "fs_mgr_remount: fix a typo"
am: 43f49694a5

Change-Id: Ic4345f1c4653cb6e0315b14eaf0660801fb1df5a
2019-05-09 02:21:28 -07:00
Treehugger Robot 43f49694a5 Merge "fs_mgr_remount: fix a typo" 2019-05-09 09:14:35 +00:00
Vic Yang a1be8d39b1 Merge "Static link libjsoncpp in libprocessgroup"
am: 7608ed6047

Change-Id: I1a9d9f6d1d660470dd331fcb27adfea0354b3590
2019-05-09 02:10:12 -07:00
Treehugger Robot 7608ed6047 Merge "Static link libjsoncpp in libprocessgroup" 2019-05-09 08:59:05 +00:00
Bowgo Tsai 2badf73b99 fs_mgr_remount: fix a typo
Replacing "ro.boot.vbmeta.devices_state" with
"ro.boot.vbmeta.device_state" to check if the device is locked.

Bug: 132224452
Test: tree hugger
Change-Id: If4f312730cc82ad5a5d5104a7aca8b9691cf6600
2019-05-09 13:19:29 +08:00
Vic Yang d167cb2958 Static link libjsoncpp in libprocessgroup
The majority of libjsoncpp use is due to libprocessgroup.  Static
linking reduces relocations required at runtime as well as compacts the
pages dirtied by relocations.  On a 32-bit system, where this matters
the most, this reduces 8KB of dirty pages per libprocessgroup load.
Overall, the dirty page reduction on 32-bit cuttlefish is ~500KB.

Bug: 132275636
Test: Boot on cuttlefish.  Calculate total amount of dirty memory used
      for libprocessgroup and libjsoncpp.
Change-Id: I1135bb45a3764f96a4a3a47c98fbcdee3913c988
(cherry picked from commit b562e68503)
2019-05-08 20:29:44 -07:00
Mark Salyzyn 41e53e58bf Merge "init: move "started at" environment var names to headers"
am: 72fe284022

Change-Id: Iab0cdb53053b628821acb1f8f5a24ee04c8f3aaf
2019-05-08 19:01:35 -07:00
Treehugger Robot 72fe284022 Merge "init: move "started at" environment var names to headers" 2019-05-09 00:10:40 +00:00
Mark Salyzyn 44505ecdd9 init: move "started at" environment var names to headers
Move "FIRST_STAGE_STARTED_AT" to env_first_stage_started_at variable
in first_stage_init.h.  Move "SELINUX_STARTED_AT" to
env_selinux_started_at variable in selinux.h.

Test: build
Bug: 124491153
Bug: 129780532
Change-Id: I512d1835dcee5a3d034ac453b27b0709eed23cff
2019-05-08 13:50:21 -07:00
Mark Salyzyn d8cddff7b8 Merge "init: ro.boottime.init.first_stage"
am: a6e6c7d966

Change-Id: Ib622f2277a1f38df31e3a3cd1ae08d699abf3475
2019-05-08 11:53:10 -07:00
Treehugger Robot a6e6c7d966 Merge "init: ro.boottime.init.first_stage" 2019-05-08 18:33:29 +00:00
Elliott Hughes a22ac0f07e libziparchive: start moving to a non-ZipString StartIteration API.
Same issue as with FindEntry: using ZipString in the API forces all
callers to make sure they don't hit the ZipString length limits. Switch
to std::string_view and uniformly use the empty string as a way to
signal no prefix/suffix rather than nullptr.

Also use default arguments to make the common case of no prefix and no
suffix more convenient.

Also just use std::string to increase the lifetime of the provided
prefix/suffix rather than manual memory management.

Bug: http://b/129068177
Test: treehugger
Change-Id: I6675e39ce62fadd766386d77d27423013c17d6f7
2019-05-08 11:00:32 -07:00
Elliott Hughes 7ed43aafb1 Merge "libziparchive: remove now-unused FindEntry overload."
am: 1d5745fb40

Change-Id: Iddcecbcdb424990dbac84da6e7e33d9c804ec2c9
2019-05-08 10:24:25 -07:00
Elliott Hughes 1d5745fb40 Merge "libziparchive: remove now-unused FindEntry overload." 2019-05-08 17:05:46 +00:00
Mark Salyzyn 10377df9f8 init: ro.boottime.init.first_stage
Add a property ro.boottime.init.first_stage to provide us a
first stage init duration from start to exec completed in
nanoseconds.

For consistency, report nanoseconds duration for
ro.boottime.init.selinux as well instead of milliseconds.
Now also report consistently from start to exec completed
instead of just the selinux load time.

SideEffects: ro.boottime.init.selinux is reported to TRON and
             may alarm with the millionfold increase in precision.
             ro.boottime.init is now also consistent with ns
             precision.

Test: inspect
Bug: 124491153
Bug: 129780532
Change-Id: Iff4f1a3a1ab7ff0a309c278724c92da0832b9a69
2019-05-08 16:07:10 +00:00
Tom Cherry ede9bb5b37 Merge "Add default executable permission in odm/bin"
am: 766e878253

Change-Id: I67b77e770a029a7e45389b5c8078e529043a1123
2019-05-08 08:50:55 -07:00
Tom Cherry 766e878253 Merge "Add default executable permission in odm/bin" 2019-05-08 15:31:28 +00:00
Jiyong Park 196565d8de Merge changes I43be5550,Ic40da64f,If8241959
am: 3e182b6170

Change-Id: If89b1afdf612b5ea3605ec724dca86f123dc54b3
2019-05-08 05:38:27 -07:00
Jiyong Park 3e182b6170 Merge changes I43be5550,Ic40da64f,If8241959
* changes:
  Refactor public_libraries.*
  Introduce utils.h
  Move public libraries list to a separate source file
2019-05-08 12:24:59 +00:00
Tom Cherry c6c4fbe805 Merge "Remove sbin from fs_config.cpp"
am: 26ec31ce8d

Change-Id: Idab86185136877bd50f61eab1f478cbb4daf92b1
2019-05-07 23:48:23 -07:00
Treehugger Robot 26ec31ce8d Merge "Remove sbin from fs_config.cpp" 2019-05-08 06:23:30 +00:00
Jiyong Park 5b8b306b42 Refactor public_libraries.*
- shorten the long const variables
- merge {oem|product}_public_libraries into extended_public_libraries

Bug: 130388701
Test: build & pass presubmit tests

Change-Id: I43be555041466118f2b2d188f5da3ff0d8ed7d8d
2019-05-08 13:51:43 +09:00
Jiyong Park f8802e5f0a Introduce utils.h
Introduce utils.h to have common routines.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: Ic40da64fefc1f2216bdea9ea93a15e5abb8f23a4
2019-05-08 13:49:49 +09:00
Jiyong Park 40a6077244 Move public libraries list to a separate source file
Functions for reading the public libraries list are moved out of
library_namespace.cpp to public_libraries.cpp.

In addition, library-local symbols are moved from android namespace to
android::nativeloader namespace.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: If82419598304d56d29bfec4ef553443c788d0f53
2019-05-08 13:49:42 +09:00
Dimitry Ivanov afc369a469 Merge "Enable native_bridge_support"
am: 9a45f8ff4c

Change-Id: Ib04ee55d8fa37821b45aa1c28c204cf2594f8f40
2019-05-07 15:14:20 -07:00
android-build-team Robot 50e44460e7 Snap for 5450365 from e6ef013d2c to pi-platform-release
Change-Id: I51d6a1b331634e927247a13a96bfdd10d4e00f4f
2019-05-07 22:04:02 +00:00
Dimitry Ivanov 9a45f8ff4c Merge "Enable native_bridge_support" 2019-05-07 21:47:41 +00:00
Iris Chang d257f642df Merge "Support booting a chained boot-debug.img"
am: eabbfb9e81

Change-Id: I53946ed060f6060c7b5eb02602e33bd8764052f1
2019-05-07 10:47:03 -07:00
Treehugger Robot eabbfb9e81 Merge "Support booting a chained boot-debug.img" 2019-05-07 17:27:22 +00:00
Tom Cherry 2f74a26a2d Remove sbin from fs_config.cpp
There is no longer a /sbin on Android.

Bug: 73660730
Test: build
Change-Id: I3f5ce292790392a02aa4a1c661f44b4c7e1570dc
2019-05-07 10:21:05 -07:00
Elliott Hughes a5ff19e7e9 libziparchive: remove now-unused FindEntry overload.
Bug: http://b/129068177
Test: treehugger
Change-Id: I53da90bb61b0299aca545f9a1420f64e3f909657
2019-05-07 09:27:59 -07:00
Lorenzo Colitti c3d70146b4 Merge "Enable clang-tidy for libsysutils."
am: 799ddc9c19

Change-Id: I786432de83a3ab8713ec6b8e6c7466fdd8d237ac
2019-05-07 08:42:35 -07:00
Treehugger Robot 799ddc9c19 Merge "Enable clang-tidy for libsysutils." 2019-05-07 15:31:22 +00:00
Iris Chang 705fd7f52c Support booting a chained boot-debug.img
boot-debug.img is introduced to allow 'adb root' if the device is
unlocked, and it cannot be release signed. If /boot partition is chained
in AVB signing and boot-debug.img is used, avb_slot_verify() in
userspace will return AVB_SLOT_VERIFY_RESULT_ERROR_PUBLIC_KEY_REJECTED
and fs_mgr will refuse to boot. This CL treats the public key rejection
as non-fatal for chained vbmeta to continue booting, if the device is
unlocked.

Bug: 129508966
Test: can root with user load which /boot chained in AVB signing
Change-Id: Idfa8caffbb96f33702b1749afd2e2a59616ddba7
2019-05-07 09:26:49 +00:00
Rick Yiu c78c3be5cf Merge "Apply initial settings for blkio cgroup"
am: 9243da9008

Change-Id: I2aaa9a9f3267e6e57c44967144de2a4a8d76126c
2019-05-07 01:27:59 -07:00
Treehugger Robot 9243da9008 Merge "Apply initial settings for blkio cgroup" 2019-05-07 08:15:35 +00:00
Martijn Coenen 741fef7395 Merge "Support for stopping/starting post-data-mount class subsets."
am: fc78be2935

Change-Id: I3dad9a80217cc2d33576be4d681168566d991c77
2019-05-06 23:57:02 -07:00
Martijn Coenen fc78be2935 Merge "Support for stopping/starting post-data-mount class subsets." 2019-05-07 06:41:01 +00:00
Min Yun a8eb00720c Add default executable permission in odm/bin
In odm's binary files can't have executable permission.
Add default executable permission in odm/bin and vendor/odm/bin.
Previously partitions that except system, only appeared in
system partition if product haven't separated partition.
After support ODM, vendor/odm should considered.

Bug : 124465978
Test : Check each file's permission.
system/vendor/bin/* -> 0755
system/product/bin/* -> 0755
system/product_services/bin/* -> 0644
system/oem/bin/* -> 0644

vendor/odm/bin/* -> 0755
vendor/product/bin/* -> 0644
vendor/product_services/bin/* -> 0644

Change-Id: I5cee48474fceaf73853b2013d58017bd64953d86
2019-05-07 14:04:23 +09:00
David Anderson cefa083e36 Merge "Add a liblp test that we can parse the device's super partition."
am: eaf203d301

Change-Id: I1b1260a9d2821d257494f0c3a98c80ceeed61587
2019-05-06 21:13:40 -07:00
David Anderson eaf203d301 Merge "Add a liblp test that we can parse the device's super partition." 2019-05-07 04:00:57 +00:00
David Anderson 1227ad90d5 Merge "Add dm-snapshot targets to libdm and dmctl."
am: 41d6792dec

Change-Id: I52a36217479f6fe86349e264484a133dffb4741c
2019-05-06 18:28:27 -07:00
David Anderson 41d6792dec Merge "Add dm-snapshot targets to libdm and dmctl." 2019-05-07 00:43:19 +00:00
Elliott Hughes d43d5baed5 Merge "libziparchive: report errors on over-long names."
am: d62b9ca271

Change-Id: I7e492b3fa8b74ff9c41363d4b1ffc9b401eff660
2019-05-06 17:21:12 -07:00
Tom Cherry fe1c82fd61 Merge "Vboot1.0: remove code to read verity state in userspace"
am: 1cd30df584

Change-Id: I79a0b838b2aabcbf6083de7c75de5d219f14517f
2019-05-06 17:20:23 -07:00
David Anderson f5de989a55 Add a liblp test that we can parse the device's super partition.
Bug: 132112489
Test: liblp_test gtest
Change-Id: I1c0950dc30f42cd232e0616191d1365cdfc6512d
2019-05-06 17:06:33 -07:00
Elliott Hughes d62b9ca271 Merge "libziparchive: report errors on over-long names." 2019-05-06 23:45:16 +00:00
Tom Cherry 1cd30df584 Merge "Vboot1.0: remove code to read verity state in userspace" 2019-05-06 23:41:47 +00:00
Josh Gao 27241a7a96 Revert "Revert "Add a way to turn off unique_fd's operator int.""
The original commit broke aosp-master-with-phones, because of
vendor libraries the depended on the int versions of libbase functions.

This patch reverts the revert, and also adds ABI-compatibility shims for
the replaced functions.

This reverts commit 2c58e1924a.

Bug: http://b/131312539
Test: treehugger
Test: forrest run of aosp-master-with-phones
Change-Id: I75cc84ec8d963e20862f7662e8e2f409471f41cc
2019-05-06 16:18:02 -07:00