Commit graph

38758 commits

Author SHA1 Message Date
Jerry Zhang
5a75507795 libsparse: Change source files to cpp
Bug: 78793464
Test: compiles
Change-Id: Ib8b933fe3ccb8dfa49a77f7955891678bf0df086
2018-06-13 11:17:22 -07:00
Jerry Zhang
50e6029a4e libsparse: Add method to create sparse file from buffer
Refactor elements of sparse file parsing that depend on
an fd into SparseFileSource class, then create implementations
using both fd and buffer. Add sparse_file_read_buf which
reads the given buffer into a sparse file cookie without
copying.

Test: flash system with sparse images
Bug: 78793464
Change-Id: Ice6c8e1ff075d6867e070f80fcf5aa4f530a1b95
2018-06-07 14:33:18 -07:00
Treehugger Robot
f875aaa339 Merge "libnativeloader: add jiyong to OWNERS." 2018-06-01 02:59:57 +00:00
Treehugger Robot
36b61f061d Merge "Support /product/bin" 2018-06-01 01:22:58 +00:00
Elliott Hughes
0ca7c79dfb libnativeloader: add jiyong to OWNERS.
Bug: N/A
Test: N/A
Change-Id: I892bfff4bcf28482588582a1045dcae720b121db
2018-05-31 18:09:20 -07:00
Elliott Hughes
cf252ab07d Merge "Improve SIGILL support." 2018-06-01 00:51:14 +00:00
Treehugger Robot
bfb4bf05d9 Merge "adb: add remount -R for deduplicated ext4" 2018-06-01 00:28:52 +00:00
Inseob Kim
25195daaca Support /product/bin
Bug: 80422611
Test: m -j succeeded and permissions of files under /product/bin are set
correctly

Change-Id: I83377d809c47c92da6b226d2853ea6a7462fb127
2018-06-01 08:33:04 +09:00
David Anderson
07445f4a71 adb: add remount -R for deduplicated ext4
When using "adb remount" on a deduplicated filesystem, the current
response is a warning that the remount will not work. This patch
allows the user to specify an -R option. This option will reboot to recovery,
run e2fsck to undo deduplication, and then reboot the device where "adb
remount" will then succeed.

In addition, if verity needs to be disabled to remount, it will be disabled in
the same reboot cycle to minimize reboots.

Bug: 64109868
Test: adb remount -R on a deduplicated filesystem
Change-Id: I812407499b2df6f4d2509e8d51878117108a6849
2018-05-31 15:38:25 -07:00
Yifan Hong
05625ab420 Merge "androidboot.lrap => logical_partitions" 2018-05-31 22:05:06 +00:00
Yifan Hong
59bd65bdf6 androidboot.lrap => logical_partitions
Test: boots with prototype
Bug: 79885414
Change-Id: Ia84d052800b71ff9cfa1630def0ce72c57f76b81
2018-05-31 13:08:01 -07:00
Tom Cherry
1c15b02b54 Merge "init: implement getpwnam for host init verifier" 2018-05-31 17:30:50 +00:00
Tom Cherry
279de56b3e Merge "init: handle properties and imports for host init verifier" 2018-05-31 15:48:31 +00:00
Tom Cherry
31525f5cb6 init: implement getpwnam for host init verifier
Bug: 36970783
Test: test bullhead successfully at TOT
Test: create errors and check that they're caught
Test: create uid in passwd and check that it's successful
Change-Id: I237fb8df16a294757fe898bdbbd42e850bcb8301
2018-05-30 15:43:40 -07:00
Tom Cherry
194b5d1da9 init: handle properties and imports for host init verifier
Allow specifying properties on the command line when running host init
verifier.  This is needed particularly for importing files that have a
property expansion in their path.

Handle the import statement on host, basing paths off of the out
directory of Android builds.

Bug: 36970783
Test: verify that bullhead imports the correct files and checks them
Change-Id: I4fe263016b3764a372708b559bc0c739b1b7e5e3
2018-05-30 15:43:32 -07:00
Treehugger Robot
fe86a1473f Merge "Correct comment in boot image header" 2018-05-30 20:55:37 +00:00
Elliott Hughes
2baf443a21 Improve SIGILL support.
Include the illegal instruction in the header if we get a
SIGILL. Otherwise (since these tend to be one-off bit flips), we don't
usually have any information to try to confirm our suspicion that any
given instance is actually a one-off bit flip.

Also add `SIGILL` as a crasher option to easily generate such crashes.

Before:
  signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xab1456da

After:
  signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xab1456da (*pc=0xe7f0def0)

Bug: http://b/77274448
Test: ran crasher
Change-Id: I5f8dedca5eea2b117b1b1e48430214b38e1366ed
2018-05-30 12:58:43 -07:00
Treehugger Robot
ce75e71252 Merge "libmemunreachable: fix docs formatting." 2018-05-30 19:33:56 +00:00
Hridya Valsaraju
d0ab4e3701 Correct comment in boot image header
Test: make
Bug: 80207223
Change-Id: I88cf7683e036ff43bbe3ff5418519c7e35e08b79
2018-05-30 10:58:14 -07:00
Elliott Hughes
1c1b6a0cdb libmemunreachable: fix docs formatting.
Bug: N/A
Test: gittiles
Change-Id: I59e7d22562cffa4e4a3c2a186523ae0f15623950
2018-05-30 10:53:46 -07:00
Treehugger Robot
680bc0b6b5 Merge "init: add keychords_test" 2018-05-30 17:27:35 +00:00
Treehugger Robot
e6a878644c Merge "init: switch out keychord id with std::vector match of chords" 2018-05-30 16:12:36 +00:00
Mark Salyzyn
75b901d4a8 init: add keychords_test
Test: init_tests --gtest_filter=keychords.*
Bug: 64114943
Change-Id: I357d0c1bd56660ac28bc02b76d5632ef1b9328b7
2018-05-30 08:38:11 -07:00
Treehugger Robot
dfc4ad2a9c Merge "init; remove dead cruft." 2018-05-30 01:49:29 +00:00
Elliott Hughes
b0aba0fff9 init; remove dead cruft.
Bug: N/A
Test: builds
Change-Id: Ia38ef6959e8615b4f103b924ae51c19f916daa48
2018-05-29 17:05:56 -07:00
Elliott Hughes
d580c441ab Merge "libbase: add host properties support." 2018-05-29 23:59:50 +00:00
Treehugger Robot
420fe5fe90 Merge "init: turn keychords into a standalone class" 2018-05-29 23:10:25 +00:00
Treehugger Robot
16dd3582b7 Merge "init: refactor keychord for testing" 2018-05-29 23:03:43 +00:00
Mark Salyzyn
1385725e09 init: switch out keychord id with std::vector match of chords
Drop all references to keychord_id and id and instead use keycodes_
as the id.  The keycodes are a std::vector<int> with an unique
sorted-order emplacement method added in the parser.  Solves the
academic issue with duplicate keychords and trigger all services
that match rather than first match only.

Test: init_tests
Bug: 64114943
Change-Id: I5582779d81458fda393004c551c0d3c03d9471e0
2018-05-29 15:18:38 -07:00
Mark Salyzyn
06aeb41c16 init: turn keychords into a standalone class
Test: init_tests
Bug: 64114943
Change-Id: Ie760e4a3a661260ed2aabb8a92fe65fc93521cb5
2018-05-29 13:46:12 -07:00
Mark Salyzyn
eca2507634 init: refactor keychord for testing
Move things around so that keychords.cpp is independent of service
and init and can be individually tested with few dependencies.
Permits also rolling out the keychords as a class in a future commit.
Improve parser checking.

Test: init_tests
Bug: 64114943
Change-Id: I82570bc6269ed478db784ec38a8bc916da2be2be
2018-05-29 13:20:19 -07:00
Josh Gao
e82401e592 Merge "adb: really fix the mac build." 2018-05-25 05:59:58 +00:00
Josh Gao
6e1246c234 adb: really fix the mac build.
Test: changed `#if !defined(__APPLE__)` to `#if 0` and ran mma
Change-Id: I173cccbfb7bad348ac4796a2d6cebb8490f63479
2018-05-24 22:58:08 -07:00
Treehugger Robot
6c9bb058c5 Merge "Build adbd for recovery" 2018-05-25 05:58:01 +00:00
Elliott Hughes
f90137da60 Merge "Clarify 'fastboot flash' help." 2018-05-25 05:06:00 +00:00
Christopher Ferris
04b83d8ec2 Merge "Change tests to use a temporary dir for files." 2018-05-25 01:35:07 +00:00
Elliott Hughes
07fc6828a8 Clarify 'fastboot flash' help.
Bug: http://b/80206492
Test: `fastboot --help`
Change-Id: Idd4305628836eb0bcbcf3d217db0a9fc54a1d6d6
2018-05-24 18:30:58 -07:00
Elliott Hughes
dc80312628 libbase: add host properties support.
Move init and libprocessgroup away from their existing hacks.

Bug: N/A
Test: ran tests
Change-Id: Ifabdd38e0cc4ab2582f1ea59d32159d386f48eb6
2018-05-24 18:04:31 -07:00
Elliott Hughes
54be246a1f Merge "Make per-application memcg hierarchy configurable via a property" 2018-05-25 00:01:03 +00:00
Christopher Ferris
3acf577759 Change tests to use a temporary dir for files.
Avoid using hard-coded paths for generated files. This can cause problems
if the tests are run in parallel.

Also fix a potential race condition in the unwind_through_unreadable_elf_remote
test.

Test: Ran tests in parallel and normally.
Change-Id: Ib42522de49499766a29bda5bfffe737b56715e3f
2018-05-24 16:48:16 -07:00
Suren Baghdasaryan
bc131c3244 Make per-application memcg hierarchy configurable via a property
Introduce ro.config.per_app_memcg Android property to enable/disable
per-application memcg hierarchy.
On low-ram devices (ro.config.low_ram=true) ro.config.per_app_memcg
defaults to true, otherwise it defaults to false.

Bug: 80201565
Test: set ro.config.per_app_memcg=true and verify /proc/<app_pid>/cgroup
membership (memory:/apps/uid_xxx/pid_xxx)
Test: set ro.config.per_app_memcg=false and verify /proc/<app_pid>/cgroup
membership (memory:/)
Change-Id: Iabd3ef6c9c16c774b9da959a7f43b5f66df120a3
Merged-In: Iabd3ef6c9c16c774b9da959a7f43b5f66df120a3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-05-24 15:13:00 -07:00
Treehugger Robot
6e92890135 Merge "Work around b/24465209, do not pack relocation table." 2018-05-24 19:07:26 +00:00
Christopher Ferris
a6a433a27d Merge "Add a specialized LocalUnwinder object." 2018-05-24 18:06:02 +00:00
Josh Gao
925b410c7f Merge "adb: fix mac build." 2018-05-24 17:34:41 +00:00
Chih-Hung Hsieh
462df10d91 Work around b/24465209, do not pack relocation table.
Global flag --pack-dyn-relocs=android is used with clang lld.
For b/24465209, we need to override that with pack_relocations:false.

Bug: 24465209
Bug: 80093890
Test: build with USE_CLANG_LLD=true and run dlext.compat_elf_hash_and_relocation_tables
Change-Id: I4edcdf49e184fa45ea2b6b6417654d81bcd09e1d
2018-05-24 09:34:54 -07:00
Tom Cherry
05063a8715 Merge "init: finer grained permissions for ctl. properties" 2018-05-24 16:28:24 +00:00
Josh Gao
99c27d3e99 adb: fix mac build.
Test: none
Change-Id: I93ff87338aa503588e36404f7566651e18f50292
2018-05-24 00:47:05 -07:00
Jiyong Park
a0e75045e6 Build adbd for recovery
adbd (and its dependencies) are marked as recovery_available:true so
that recovery version of the binary is built separately from the one for
system partition. This allows us to stop copying the system version to
the recovery partition and also opens up the way to enable shared
libraries in the recovery partition. Then we can also build adbd as a
dynamic executable.

Bug: 79146551
Test: m -j adbd.recovery
Change-Id: Ib95614c7435f9d0afc02a0c7d5ae1a94e439e32a
2018-05-24 14:11:11 +09:00
Treehugger Robot
39cab7cd25 Merge "Support product-specific libraries" 2018-05-24 03:04:48 +00:00
Christopher Ferris
ca9a54b2c0 Add a specialized LocalUnwinder object.
This object is for doing many local unwinds across different threads
at any point during a program's execution.

Also add LocalUpdatableMaps that will re-read the maps data under certain
circumstances.

This first version does not support jit or dex pc data.

Bug: 74361929

Test: Ran unit tests.
Change-Id: I790662366d3fed677f31b3288182950c494de9ad
2018-05-23 20:02:30 -07:00