Commit graph

48130 commits

Author SHA1 Message Date
Sandeep Patil
89ea28116a libion: Add missing error checks for input parameters to APIs.
The errors were caught by ion-unit-tests. Make sure we fix them before
we start running the tests in automation etc.

Bug: 133508579
Test: ion-unit-tests

Change-Id: I7ebecfa037767481ee7f2b30e2923c84ebc352bf
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-07-30 14:40:24 -07:00
Sandeep Patil
21620dc745 OWNERS: add owners to libion
Bug: none
Test: n/a

Change-Id: Ie6c462068acf6b6ad8cd6579feab05c2fa238a94
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-07-30 14:40:24 -07:00
Treehugger Robot
e1d4e39064 Merge "dmctl: suspend and resume devices" 2019-07-30 03:32:01 +00:00
Treehugger Robot
b6c32c9051 Merge "libdm: suspend and resume devices" 2019-07-30 00:09:31 +00:00
David Anderson
687f1c4e8e Merge "liblp: Fix typo in IsRetrofitDynamicPartitionsDevice." 2019-07-29 23:01:18 +00:00
Alessio Balsini
79338406e0 dmctl: suspend and resume devices
Export suspend and resume functionalities of libdm to command line
through dmctl.

Change-Id: I8e1dd7d67d8814631e4174d3ba169e705efc1df6
Bug: 137759376
Test: manual
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-07-29 20:48:55 +01:00
Alessio Balsini
bdc65bf083 libdm: suspend and resume devices
In some cases it would be required to suspend the device to succesfully
complete some operations. An example is the suspension of the origin
device that is necessary to avoid data corruption when merging a
snapshot.

Introduce suspend and resume ioctls in libdm.

Bug: 137759376
Test: libdm_test
Change-Id: Id2ff34e930a8b32e570cb9f49da9cc3f65cb499c
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-07-29 20:35:56 +01:00
Treehugger Robot
09bbdcb6b3 Merge "fs_mgt: Fix remount failure in case of non-overlayfs system" 2019-07-29 19:30:12 +00:00
David Anderson
f01faf2620 liblp: Fix typo in IsRetrofitDynamicPartitionsDevice.
Bug: 138590940
Test: manual test
Change-Id: I58c639e9308d1866d5423c79c00669d27f125d64
2019-07-29 12:20:13 -07:00
Treehugger Robot
244d9b8fb9 Merge "Use android::base::Result in libnativeloader" 2019-07-27 14:07:44 +00:00
Mark Salyzyn
588fe9e8af fs_mgt: Fix remount failure in case of non-overlayfs system
$ adb remount
W DM_DEV_STATUS failed for scratch: No such device or address
E Can not mount overlayfs for partitions: No such file or directory
/system/bin/remount exited with status 8
remount failed

Bug: 138407617
Test: $ adb remount

Change-Id: I0f359071234b57324ad2324905b5239dbfa44d01
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2019-07-26 13:46:41 -07:00
Treehugger Robot
d11603646a Merge "Don't fail catastrophically on non-existing namespace" 2019-07-26 14:50:33 +00:00
Treehugger Robot
485d024b05 Merge "Include ldd in /system/bin." 2019-07-25 23:34:45 +00:00
Jiyong Park
09db2edb45 Don't fail catastrophically on non-existing namespace
When a new namespace is added to ld.config.txt, it has to be reflected
to native_loader_test.cpp. However, failing to do so crashes the test
instead of showing an error message that the namespace hasn't been
added.

Fixing the issue by not returning nullptr when the namespace isn't
found.

Bug: 138304345
Test: libnativeloader_test
Change-Id: I9eee1293956caac69f95a946604a2e6f665bde89
2019-07-26 08:14:09 +09:00
Jiyong Park
8f4afc8298 Use android::base::Result in libnativeloader
Remove the out parameters for error messages using Result<T>.

Bug: 130388701
Test: libnativeloader_test
Change-Id: Idbaf391c183fb20d5e1d7c96f3a4ccbf9745b7e6
2019-07-26 08:06:46 +09:00
Yifan Hong
37602ed83e Merge changes Ifc4c4540,I4636de85
* changes:
  MetadataBuilder::IsABDevice: make static / use std::optional
  MetadataBuilder::NewForUpdate: check sysprop instead
2019-07-25 22:43:35 +00:00
Treehugger Robot
b4b9d21bf9 Merge "VtsKernelMemInfoTest: only enforce on Q+ launching devices" 2019-07-25 22:03:20 +00:00
Elliott Hughes
82033660c0 Include ldd in /system/bin.
Test: `which ldd`
Change-Id: I68a2e5402a82f22e7b715ab3d8ac2c09296b4376
2019-07-25 12:47:34 -07:00
Treehugger Robot
59772de0f0 Merge "Logcatd: remove some extra logic" 2019-07-25 18:29:43 +00:00
Yifan Hong
7cea50acd8 Merge changes from topic "charger_props"
* changes:
  healthd: Convert libhealthd_{draw,charger} to Soong.
  healthd: charger use runtime sysprops instead.
  healthd: remove unused variable.
2019-07-25 18:20:22 +00:00
Treehugger Robot
865f6df8d4 Merge "Fix libnativeloader_test" 2019-07-25 17:40:44 +00:00
Jiyong Park
e447335f81 Fix libnativeloader_test
Just before the test is enabled, the neuralnetwork namespace was added
by https://android-review.googlesource.com/c/platform/system/core/+/1014637.
This is breaking the libnativeloader_test.

Fix the test by adding the code for the new namespace.

Bug: 138304345
Test: libnativeloader_test on aosp_cf_x86_phone
Change-Id: Ifa762e395a3b9b5debdbcfcbcb395eeda3a1b2a4
2019-07-25 22:58:09 +09:00
Treehugger Robot
becbf6cb5f Merge "Add libraries txt file to build target" 2019-07-25 10:29:39 +00:00
Tian Baofeng
8415a5c45e Logcatd: remove some extra logic
There will be some unnecessary error logs caused
by extra logic was reported by init when some properties
were set default values. This patch remove these logic
codes to remove these avoidable error logs.

Bug: 137567691
Test: Can use logcat -r -n with configures

Change-Id: I9b8fa2025bcbef5d39438a8243f9ff5dc0a645df
Signed-off-by: Tian, Baofeng <baofeng.tian@intel.com>
Signed-off-by: Duan, YayongX <yayongx.duan@intel.com>
2019-07-25 06:27:36 +00:00
Treehugger Robot
08c6d1a5d1 Merge "fs_mgr: liblp test: give ownership of environment to gtest" 2019-07-25 03:36:46 +00:00
Yifan Hong
7bf1e9f459 fs_mgr: liblp test: give ownership of environment to gtest
From gtest doc:
Note that googletest takes ownership of the registered environment objects. Therefore do not delete them by yourself.

Test: run it
Change-Id: I275884ddd63a17097c3ea4d9d6bb2b5291dc8c90
2019-07-25 00:20:25 +00:00
Yifan Hong
f0dd120793 MetadataBuilder::IsABDevice: make static / use std::optional
Align with hat sRetrofitDap does.

Test: liblp_test_static
Change-Id: Ifc4c45404369a4eb18c02fc6a0ede938da5809b8
2019-07-24 17:19:06 -07:00
Yifan Hong
9d0e6cdfef MetadataBuilder::NewForUpdate: check sysprop instead
Check the value of ro.boot.dynamic_partitions_retrofit instead of
checking the name of the super partition being 'super' is a more
reliable way of determining retrofit DAP devices.

Some devices launch with DAP (e.g. cuttlefish) doesn't have "super"
as the super partition name. When Virtual A/B is implemented on
cuttlefish, update_engine calls NewForUpdate for the current super
partition metadata. Hence, this code needs to check the retrofit
sysprop instead.

Also, renamed IsRetrofitDevice to IsRetrofitMetadata to avoid the
confusion.

Test: OTA on retrofit DAP device
Test: OTA on launch DAP device
Test: liblp_test_static
Change-Id: I4636de854734df1bb61779d9a955217e89fdb2fd
2019-07-24 17:19:06 -07:00
Treehugger Robot
3a970945c9 Merge "Update overlayfs patch series reference" 2019-07-25 00:09:28 +00:00
Yifan Hong
dbaa477a70 healthd: Convert libhealthd_{draw,charger} to Soong.
Converting charger to Soong, one step at a time.

In the meantime, drop the use of BOARD_*/TARGET_* variables
in Android.mk because runtime sysprops will be used instead.
Libraries / binaries will always link to libminui / libpng /
libsuspend.

charger{.recovery,} can't be converted to Soong yet because
of the use of HAL_STATIC_LIBRARIES (Bug 127677771).

charger_test isn't converted because of the shared list
of CHARGER_{STATIC,SHARED}_LIBRARIES.

Bug: 124118169
Test: run charger on walleye

Change-Id: I355deda14e5b5c9938256ff0b778590ac0191095
2019-07-24 17:01:40 -07:00
Yifan Hong
97eecdc875 healthd: charger use runtime sysprops instead.
Bug: 124118169
Test: run off-mode charging
Change-Id: Ib71f84f1c93d1566f4e3101920d98b1d39184390
2019-07-24 17:01:40 -07:00
Yifan Hong
dcbaeef6e3 healthd: remove unused variable.
Test: builds
Change-Id: If12cfd31353cd26b41c1c07f44761cea3c46c34a
2019-07-24 17:01:40 -07:00
Tom Cherry
3af3fcce45 Merge "init: simplify keyword_map" 2019-07-24 21:50:22 +00:00
Mark Salyzyn
917616d47a Update overlayfs patch series reference
Test: none
Bug: 127298877
Change-Id: I0162248953ea4d2c97ccec52bf552a5e29a1b61e
2019-07-24 14:03:55 -07:00
Tomasz Wasilczyk
c9ec95272c Merge "Implement unique_fd.ok()" 2019-07-24 13:51:43 +00:00
Kiyoung Kim
178129d1c7 Add libraries txt file to build target
Linkerconfig requires more libraries txt files to get library list
related variable values. To make this available from runtime, those
should be added as build target and included in system image.

Bug: 137511540
Test: m -j && tested from cuttlefish
Change-Id: Id3304eea5a7d8f2ffc171cd3b110b7d65e881f8c
2019-07-24 19:19:01 +09:00
Przemyslaw Szczepaniak
2f40aa0f60 Merge "ld.config for com.android.neuralnetworks APEX." 2019-07-24 09:12:18 +00:00
Treehugger Robot
278754aeac Merge "adb: switch from system_clock to steady_clock." 2019-07-24 00:56:34 +00:00
Tri Vo
ad986341a4 VtsKernelMemInfoTest: only enforce on Q+ launching devices
Bug: 135553509
Test: VtsKernelMemInfoTest
Change-Id: I299d24623c363238e46229f8d09865e3afd6f9c0
2019-07-23 17:06:54 -07:00
Tomasz Wasilczyk
c3fc9607c2 Implement unique_fd.ok()
While I'm here, I'll fix how unique_fd disallows copy and assignment
constructors (detele instead of marking them private).

Bug: 135918744
Test: WiP change in master
Change-Id: Idefcc685943326c511f59d18790c1c4fa2e04989
2019-07-23 16:35:38 -07:00
Donald Chai
69055b5a37 Merge "Avoid using data descriptors in ZIP files when possible." 2019-07-23 23:02:34 +00:00
Tom Cherry
d52a5b3c10 init: simplify keyword_map
I've heard that keyword_map is too complex, in particular the tuple
and the pair in BuiltinFunctionMap, so this change removes a lot of
that complexity and, more importantly, better documents how all of
this works.

Test: boot, init unit tests

Change-Id: I74e5f9de7f2ec524cb6127bb9da2956b5f307f56
2019-07-23 14:39:38 -07:00
Treehugger Robot
b42e558b5a Merge changes I0940d13e,I38f2d013
* changes:
  Add TEST_MAPPING for libnativeloader
  Test the link to the sphal namespace when only needed
2019-07-23 15:57:37 +00:00
Donald Chai
e170d7fe85 Avoid using data descriptors in ZIP files when possible.
These add 16 bytes per ZIP entry, and are usually avoidable.  APKs contain thousands of
deflated entries, so this overhead adds up to tens of kilobytes.

Bug: 135470635
Change-Id: Ib928aa41dd55cacc41f7394c218c4340d3bbd570
2019-07-23 06:58:53 +00:00
Jiyong Park
28efde2b7a Add TEST_MAPPING for libnativeloader
Bug: 130388701
Test: watch TH to see if libnativeloader_test is running
Change-Id: I0940d13ec4e5c680ce1dbf2f5980b3b20080f7e4
2019-07-23 11:14:48 +09:00
Jiyong Park
713878d335 Test the link to the sphal namespace when only needed
The link to the spahal namespace is not done when there is no lib in
vendor/etc/public.libraries.txt

Bug: 130388701
Test: libnativeloader_test on cuttlefish
Change-Id: I38f2d01305bca5ea942573484a0e0b9b44b1c0be
2019-07-23 11:14:48 +09:00
Josh Gao
63e8d9815f adb: switch from system_clock to steady_clock.
Test: treehugger
Change-Id: I10b884dc159a5ba624bc0f7ad53a402bffb14293
2019-07-22 16:18:25 -07:00
Christopher Ferris
b3fc1b7441 Merge "Remove demangle, everyone use libc++ demangle." 2019-07-22 19:43:21 +00:00
Przemyslaw Szczepaniak
0bb871dc9f ld.config for com.android.neuralnetworks APEX.
Makes updated libneuralnetworks.so in /apex/com.android.neuralnetworks/{LIB}
loadable from all relevant namespaces.

Test: Verified that right library is being loaded using lsof and
Test: verbose debug logs from bionic/ld.
Bug: 137320025
Change-Id: I38140bb9915a3f85f10456e15ed0f492dbdba802
2019-07-22 11:28:42 +01:00
Treehugger Robot
44e343837f Merge "Add wchan data to ANR dump" 2019-07-20 16:40:54 +00:00