Commit graph

52671 commits

Author SHA1 Message Date
Kiyoung Kim
59a9cef6a0 Merge "Disable to build ld.config.txt with previous vndk version" 2019-10-08 00:57:41 +00:00
Treehugger Robot
4ad0da974e Merge "init: drop unused direct dependency on libcrypto.so" 2019-10-07 23:12:56 +00:00
Suren Baghdasaryan
d72d846754 Merge "lmkd: Fix string null termination in proc_get_size and proc_get_name" 2019-10-07 22:53:49 +00:00
Elliott Hughes
69627e52b9 Merge "adb: log more detail on failure to read keys." 2019-10-07 22:29:32 +00:00
Treehugger Robot
07577e3778 Merge "Fix explicit constructor warning from cpplint" 2019-10-07 21:47:26 +00:00
Suren Baghdasaryan
ca0790d3f7 lmkd: Fix string null termination in proc_get_size and proc_get_name
Fix string null termination and cleanup proc_get_size and proc_get_name
functions.

Bug: 74119935
Test: lmkd_unit_test
Change-Id: Ied176b8d347b672b91866ac59a813d4ff349930a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-10-07 12:50:38 -07:00
Tobias Thierer
1be2a2ce8d init: drop unused direct dependency on libcrypto.so
When I previously tried this in https://r.android.com/1108553 , it broke on
some targets but I think that may have been fixed. I'm trying it again now
to see if this now passes treehugger and sticks.

Note: There is still an indirect dependency via libfs_mgr.

Bug: 137267623
Test: Treehugger
Change-Id: I2d8b909e451bb64a1eb0719a145dfd74da1dcbad
2019-10-07 19:34:16 +00:00
Eric Biggers
736557c510 Merge changes from topic "fscrypt-key-mgmt-improvements"
* changes:
  init/fscrypt_init_extensions: support setting v2 encryption policies
  fs_mgr_fstab: support specifying encryption policy version in fstab
2019-10-07 19:09:43 +00:00
Colin Cross
d0accefc05 Merge "Change logpersist.start to sh_binary" 2019-10-07 17:47:45 +00:00
Ashwini Oruganti
c5f8b3925b Merge "Show bug_map links on user builds" 2019-10-07 16:37:35 +00:00
Tom Cherry
dfc6ea334a Merge "liblog: run in isolated mode, disable flaky tests" 2019-10-07 16:36:09 +00:00
Elliott Hughes
7fb1407125 adb: log more detail on failure to read keys.
Before we just got "Failed to read key". After:

  adb E 10-07 08:20:14 258249 258249 auth.cpp:176] Failed to read key \
    from '/usr/local/google/home/enh/.android/adbkey'
  94390117965240:error:0900006e:PEM routines:OPENSSL_internal:NO_START_LINE:\
    external/boringssl/src/crypto/pem/pem_lib.c:622:Expecting: ANY PRIVATE KEY

Also fix the misleading "Failed to generate" message from adb_auth_init.

Bug: http://b/141715453
Test: manually corrupted key; see above
Change-Id: I6732ee6b683c8548d596d7c22eeddab8ce9a3cea
2019-10-07 08:25:42 -07:00
Orion Hodson
1384e7a706 Fix explicit constructor warning from cpplint
Bug: 137364733
Test: m
Change-Id: Ia3badccda5e6ca139d889c3c7b5aa8a9ab79ef38
2019-10-07 15:28:45 +01:00
Nikita Ioffe
baca43b3d8 Merge "Make init.updatable_crashing a read/write property" 2019-10-07 13:51:25 +00:00
Kiyoung Kim
7f5ec44dbc Disable to build ld.config.txt with previous vndk version
As generic ld.config.txt will be covered with linker config generator,
ld.config.txt with previous vndk build is no longer required. This
change removes this part so there will be no unnecessary build step for
multiple vndk version build. Also vndk snapshot will have vndkcore and
vndkprivate files with version number, update_and_install_ld_config.mk
has been updated temporary for vndk_lite build.

Bug: 142072719
Test: m -j passed with aosp_arm64 build
Change-Id: Ia7529c80b179dc262c6e7646a34c2a05a0d9be84
2019-10-07 17:30:42 +09:00
Kiyoung Kim
f2098870c1 Merge "Temporary add ld.config.txt build" 2019-10-07 05:48:03 +00:00
Treehugger Robot
71f124dc54 Merge "Add a link from runtime ns to the neuralnetworks ns" 2019-10-07 03:36:14 +00:00
Kiyoung Kim
2e7b3df686 Temporary add ld.config.txt build
Last generic ld.config.txt deprecation caused build error from
build_test build because of invalid ld.config.txt build target. To fix
this ld.config.txt build target should be enabled until
ld.config.vndklite.txt and ld.config.legacy.txt also become deprecated.

Bug: 138920271
Test: m ld.config.txt passed
Test: build_test passed
Change-Id: I7f45ee66d3ed70a1a698261e1e801a30729f592f
2019-10-07 11:10:37 +09:00
Kiyoung Kim
e5013de9ac Merge "Deprecate ld.config.txt for fully treblelized devices" 2019-10-07 01:07:58 +00:00
Jiyong Park
8ec6f59e62 Add a link from runtime ns to the neuralnetworks ns
libneuralnetworks.so could be preloaded. In that case, it should be
accessible from libnativeloader which runs in the runtime namespace.

Bug: 141847343
Bug: 142111172
Test: m, marlin/sailfish boots
Change-Id: I5b2f3073d0711d6049b4e1e1bd0bcc403949fe14
2019-10-07 09:34:41 +09:00
Rashed Abdel-Tawab
a726e460aa
Change logpersist.start to sh_binary
This is a script, should be sh_binary

Test: m -j logpersist.start, check symlinks
Change-Id: I724abab898285c308291091ea8c76f5b93e4aaa5
2019-10-04 20:42:39 -07:00
Bill Peckham
ac6672d49f Merge "Moving recovery resources from /system to /vendor" 2019-10-05 03:14:12 +00:00
Hridya Valsaraju
59942d7e52 Merge changes from topic "b/140916230"
* changes:
  Update ion_4.19.h with heap IDs
  Add a test to invoke ion_is_using_modular_heaps()
  Add libion API to check if modular heaps are being used
  create ion_4.19.h
2019-10-04 22:52:48 +00:00
Tom Cherry
7e99b22527 liblog: run in isolated mode, disable flaky tests
We disabled then re-enabled a set of tests believing that they were
stable; they were not, so we disable them again while we investigate
their stability.

A majority of tests filter the logs from logd based on pid, so running
in isolation helps them not see unexpected information from other test
runs.

Bug: 138876729
Bug: 142041379

Test: run via gtest with gtest_repeat=10 without failure
Test: run via atest 5x times without failure
Test: observe that isolated applies to both gtest and atest
Change-Id: I757d52dd3233323be9519625868b2fd2aaa41aeb
2019-10-04 13:05:50 -07:00
Hridya Valsaraju
dbc80cc7ef Update ion_4.19.h with heap IDs
system/core/libion/original-kernel-headers/linux/ion_4.19.h was
edited manually and the following command was run to generate
system/core/libion/ion_4.19.h

bionic/libc/kernel/tools/clean_header.py
-ksystem/core/libion/original-kernel-headers/linux ion_4.19.h
> system/core/libion/ion_4.19.h

Bug: 140916230
Test: make, ion-unit-tests
Change-Id: I6b66bed7e3b11c5b7e80bb0b937d620510f0e172
2019-10-04 10:37:43 -07:00
Ashwini Oruganti
ff2723e647 Show bug_map links on user builds
bug_map data is now included on user builds.

Bug: 141695494
Test: Generated a tracked denial on a user build and verified that the
bug number shows up in the logs.

Change-Id: If2afa861acece63573973fe42d504d1d41964a4f
2019-10-04 10:36:23 -07:00
Treehugger Robot
db11fdcca3 Merge "fs_mgr: overlayfs: fsck scratch filesystem" 2019-10-04 16:13:06 +00:00
Nikita Ioffe
72d249143d Make init.updatable_crashing a read/write property
This property will need to be reset during userspace reboot, so it can't
be a read-only property anymore.

Test: builds
Bug: 135984674
Change-Id: I4e079b537cb5c725ac0b652804fdc801a6facfcf
2019-10-04 16:45:56 +01:00
Yifan Hong
36749bd6d0 Merge "Convert SnapshotStatus to proto" 2019-10-04 01:59:23 +00:00
Bill Peckham
dea8c9c1ac Moving recovery resources from /system to /vendor
This change is part of a topic that moves the recovery resources from the
system partition to the vendor partition, if it exists, or the vendor directory
on the system partition otherwise. The recovery resources are moving from the
system image to the vendor partition so that a single system image may be used
with either an A/B or a non-A/B vendor image. The topic removes a delta in the
system image that prevented such reuse in the past.

The recovery resources that are moving are involved with updating the recovery
partition after an update. In a non-A/B configuration, the system boots from
the recovery partition, updates the other partitions (system, vendor, etc.)
Then, the next time the system boots normally, a script updates the recovery
partition (if necessary). This script, the executables it invokes, and the data
files that it uses were previously on the system partition. The resources that
are moving include the following.

* install-recovery.sh
* applypatch
* recovery-resource.dat (if present)
* recovery-from-boot.p (if present)

This change moves the recovery resources to vendor in libcutils/fs_config.cpp
and removes the flash_recovery service from rootdir/init.rc. This service moved
to a vendor init.rc file in bootable/recovery/applypatch.

Bug: 68319577
Test: Ensure that recovery partition is updated correctly.
Change-Id: I492f7989ea8042912e9d0e0eadeaa351affbee13
2019-10-04 00:04:08 +00:00
Hridya Valsaraju
25060535fa Add a test to invoke ion_is_using_modular_heaps()
Bug: 140916230
Test: ./ion-unit-tests

Change-Id: I0204b72e49f34d99df96b46229dda2e958a59bee
2019-10-03 15:05:13 -07:00
Hridya Valsaraju
d43e798553 Add libion API to check if modular heaps are being used
Bug: 140916230
Test: ./ion-unit-tests

Change-Id: Iabb050a70d9a838f2720c509df4017d6031ce1fe
2019-10-03 15:05:13 -07:00
Hridya Valsaraju
45d4da355c create ion_4.19.h
system/core/libion/original-kernel-headers/linux/ion_4.19.h was
created manually and the following command was run to generate
system/core/libion/ion_4.19.h

bionic/libc/kernel/tools/clean_header.py
-ksystem/core/libion/original-kernel-headers/linux ion_4.19.h
> system/core/libion/ion_4.19.h

Test: make
Bug: 140916230

Change-Id: I2cd8cda903e77374cf85f38fe16a4e82156d5c67
2019-10-03 15:05:13 -07:00
Yifan Hong
5fcc2b5d71 Convert SnapshotStatus to proto
Also, add a "name" field to SnapshotStatus, and delete
the "name" arg from CreateSnapshot / WriteSnapshotStatus.
ReadSnapshotStatus will warn if the name mismatches from
the file name, and auto-correct it.

Test: libsnapshot_test

Change-Id: I725cf39c07684b100b140a8a21ea9d23ab9d2241
2019-10-03 14:26:01 -07:00
Yifan Hong
58ae8d4780 Merge changes I7bb0b559,If147df2d,I25d7d590
* changes:
  libsnapshot: Skip initializing snapshot if not created.
  libdm: Fix DmTable::num_sectors
  Fix fds libdm_test
2019-10-03 18:58:38 +00:00
Treehugger Robot
c37e3f01ee Merge "liblog: use EXPECTED_STREQ for strings" 2019-10-03 18:40:32 +00:00
Christopher Ferris
45b570530b Merge "Fix static GetLoadBias function." 2019-10-03 16:29:48 +00:00
Tom Cherry
0de52e92dc liblog: use EXPECTED_STREQ for strings
These tests are flaky, but we're not seeing what the failure strings
are.

Bug: 142041379
Test: force a failure and see the right error message
Change-Id: Icd7777e5c309cac3b98ce65925980965a3cc3753
2019-10-03 07:32:24 -07:00
Tom Cherry
685949daad Merge "liblog: remove superfluous checks" 2019-10-03 13:58:35 +00:00
Tom Cherry
47fdf666fb Merge "liblog: don't set transports to nullptr when they close" 2019-10-03 13:58:09 +00:00
Jiyong Park
571e68efec Merge "public libs from APEXes are pre-loadable" 2019-10-03 11:37:22 +00:00
George Burgess IV
50816f0c21 Merge "lmkd: fix an uninit value bug" 2019-10-03 05:59:02 +00:00
Alex Buynytskyy
dd7288d83b Merge "Addressing comments in 1130236." 2019-10-03 04:02:11 +00:00
Jiyong Park
62870e295d public libs from APEXes are pre-loadable
This change fixes a bug that public libs from APEXes are never
pre-loaded. This was happening because those libs are removed by
InitDefaultPublicLibraries which was originaly designed for listing up
the libs that needs to be provided to the app namespace from the default
namespace. Since the libs from APEXes are not available from the default
namespace, but from their own namespaces (e.g."runtime", etc.), the
removal was fine. But the problem happend when the same function is
parameterized (with bool for_preload) and used to get the libs for
preloading.

This change fixes the problem by not removing the libs from APEXes when
the function is called with for_preload == true.

Bug: 141847343
Test: m
Change-Id: I9edf2f94bac473ac7d0651514a2dabe976f81058
2019-10-03 11:58:29 +09:00
Christopher Ferris
6c8ac56296 Fix static GetLoadBias function.
The load bias value set in ReadProgramHeaders is out of sync with the
algorithm used in the static GetLoadBias function.

Sync the two and add tests to verify that they stay in sync.

Test: Unit tests pass.
Change-Id: I20ac0104970a22a92a5314a41dcadad0c9c22e64
2019-10-02 17:53:46 -07:00
Elliott Hughes
22e6759102 Merge "libstats: remove copy of cruft removed from liblog." 2019-10-03 00:46:54 +00:00
Alex Buynytskyy
a1d6f4a41c Merge "FastDeploy refactor: 2+GB APK support, optimizations, tests." 2019-10-02 23:53:48 +00:00
Alex Buynytskyy
0c2819fc9d Addressing comments in 1130236.
Use Unicode versions of mktemp function.
Correctly handle unset TMP variable in tests.

Test: atest libbase_test
Change-Id: I5009962d33b224c4d5f39102e03daeb0837f1525
2019-10-02 16:48:22 -07:00
Bowgo Tsai
b0f90aa702 Merge "Support loading system_ext_property_contexts" 2019-10-02 23:02:37 +00:00
Treehugger Robot
5cd5da9e54 Merge "liblog: replace crufty min macro with existing MIN." 2019-10-02 21:45:55 +00:00