Commit graph

52659 commits

Author SHA1 Message Date
Elliott Hughes
636ebc9b3b init: actually report which signal is causing the reboot.
It wasn't clear to me why init was rebooting until I saw that it was
SIGABRT, which then made me read through earlier log spam to work out
what was actually unhappy (the SELinux compiler, in my case).

Test: worked out why init was rebooting my device
Change-Id: I605d8956213c4c23711073fd4b0ff99562b7f351
2019-10-07 18:16:23 -07: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
Nikita Ioffe
baca43b3d8 Merge "Make init.updatable_crashing a read/write property" 2019-10-07 13:51:25 +00: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
Tom Cherry
990852ff7d liblog: remove superfluous checks
More checks in static functions where all callers always satisfy them.

Test: build
Change-Id: I3c9bd1fd4e5c55a2f9f2c42d5259c5cdd8f8a853
2019-10-02 14:27:04 -07:00
Tom Cherry
97ec4eecd4 liblog: don't set transports to nullptr when they close
The old code did not free the transports, just unlink their nodes from
the linked list, so there was no race condition between close() and
other threads writing to the logs.  By settings these to nullptr, I
introduced a race condition, but setting them to nullptr isn't
necessary, so let's simply not do that.

Test: liblog-unit-tests
Change-Id: Iec0b680addd13b5d30bd91ccef5bdeab6bf797b0
2019-10-02 14:22:07 -07:00
Mark Salyzyn
63f97b6f49 fs_mgr: overlayfs: fsck scratch filesystem
Enable fsck phase for scratch filesystem.  Solved a resulting
problem where the end of the fsck executable would result in a
SIGHUP to the caller.

Add some debugging details from adb-remount-test.sh script

Test: adb-remount-test.sh
Bug: 138577868
Bug: 139283818
Bug: 139226412
Change-Id: I129d86b7cf4e938001ba6db8d03247bc9903988d
2019-10-02 13:30:07 -07:00
Alex Buynytskyy
665f3ff5a7 FastDeploy refactor: 2+GB APK support, optimizations, tests.
- removed 2GB apk size cap,
- removed zip archive parsing on device (1.1M->236K agent size reduction),
- optimized matching entries search,
- added more robust matching entries search based on hash of CDr entry,
- reduced patch size by reusing Local File Header of matched entries,
- removed extra manifest parsing and extra agent calls,
- added device-side tests for agent,
- fix for Windows patch creation.

Test: atest adb_test fastdeploy_test FastDeployTests

Total time for 0-size patch reduction for 1.7G apk: 1m1.778s->0m36.234s.

Change-Id: I66d2cef1adf5b2be3325e355a7e72e9c99992369
2019-10-02 13:25:03 -07:00
George Burgess IV
c73e065946 lmkd: fix an uninit value bug
Caught by clang's static analyzer:
system/core/lmkd/lmkd.c:930:9: warning: 1st function call argument is an
uninitialized value [clang-analyzer-core.CallAndMessage]

Bug: None
Test: TreeHugger
Change-Id: I9dc8e97d6aa22ea977fa06553d957a31a9df8819
2019-10-02 19:55:41 +00:00
Treehugger Robot
c63ef7fc36 Merge "Using WideChar->UTF8 versions of Windows API to obtain temp folder." 2019-10-02 19:46:36 +00:00
Elliott Hughes
6efbda7309 liblog: replace crufty min macro with existing MIN.
The "branchless" macro generates slightly worse code than std::min or
<sys/param.h>'s MIN.

Test: treehugger
Change-Id: I92c17325383bd6116c7b4736d42f01f7a9bb81a3
2019-10-02 12:27:03 -07:00
Elliott Hughes
b55731d883 libstats: remove copy of cruft removed from liblog.
Test: treehugger
Change-Id: Id336758cd435393f2013d8e643d3784ee1820b1e
2019-10-02 12:03:23 -07:00
Yifan Hong
9ae5a6ccaa Merge "libsnapshot: Return path if snapshot is already merged" 2019-10-02 18:11:33 +00:00
Treehugger Robot
3d8fbfada6 Merge "lmkd: Avoid potential out of buffer write" 2019-10-02 16:29:27 +00:00