Commit graph

47575 commits

Author SHA1 Message Date
Tao Bao
15fe3b48a5 fs_mgr: Fix EnsurePathMounted with a given mount_point.
The expected behavior is to ensure the path mounted at the given mount
point, instead of the one in fstab.

Test: Boot into taimen recovery. Choose "Mount /system" from menu. Check
      that system image is mounted at /mnt/system.
Change-Id: I07128e34bc47561afee8164611709a2b5393f9b7
2019-05-10 15:10:26 -07:00
Al Sutton
09070afd38 Merge "Add deprecation warning to adb backup/restore" 2019-05-10 08:40:50 +00:00
Treehugger Robot
f0d59e24c3 Merge "NFC: Fix potentially uninitialized 'port' variable." 2019-05-10 01:34:56 +00:00
Josh Gao
fe1d1e815f Merge "Revert "Revert "Add a way to turn off unique_fd's operator int.""" 2019-05-09 23:09:38 +00:00
Treehugger Robot
fc9ad309ca Merge "crash_dump: populate uid field." 2019-05-09 22:54:25 +00:00
Xin Li
dbb6eb6195 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:44 +00:00
Elliott Hughes
05b9448ff7 Merge "libziparchive: start moving to a non-ZipString StartIteration API." 2019-05-09 21:32:52 +00:00
Stephen Hines
391c40b9ec NFC: Fix potentially uninitialized 'port' variable.
Bug: http://b/131390872
Test: Builds with -Wconditional-uninitialized.
Change-Id: Ie699ec39307fb3b66ade8248cdbe3d6de42533a7
2019-05-09 12:55:41 -07:00
Josh Gao
5df504c5f8 crash_dump: populate uid field.
Bug: http://b/132359035
Test: manual
Change-Id: I99d8446024fc2d9395132dea45f03317976a9b62
2019-05-09 12:49:57 -07:00
Treehugger Robot
d662792de5 Merge "Refactor public_libraries.cpp more" 2019-05-09 18:05:16 +00:00
Xin Li
3a95be9a7f DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: Icec65ff6f3ddb05b10ae62d7588422c0f8950190
2019-05-09 09:27:06 -07:00
Al Sutton
31d335f39f Add deprecation warning to adb backup/restore
Test: Manual execution and verification of the message
Fixes: 131891013
Change-Id: Idc38fcdace2d79668a4daac0b99fb87d04fb4cb8
2019-05-09 16:14:05 +00:00
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
Treehugger Robot
43f49694a5 Merge "fs_mgr_remount: fix a typo" 2019-05-09 09:14:35 +00: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
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
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