Commit Graph

45100 Commits

Author SHA1 Message Date
Christopher Ferris 86f2d9d943 Fix missing offset for apk.
The elf_start_offset field in a map_info was not set in one path.

Added new offline test for this, and update a few unit tests.

Bug: 128442792

Test: New unit tests pass.
Change-Id: I2c6ac1b5271a99aa0e8c4b6342a5970199185112
2019-03-12 16:00:55 -07:00
Treehugger Robot 1922a501bf Merge "Revert "Mark libs as double_loadable"" 2019-03-12 22:11:27 +00:00
Martijn Coenen 4517e57ff5 Create /metadata/apex/[sessions].
For storing persistent apex session state.

Bug: 126740531
Test: builds
Change-Id: Ibf280764977768956b5512b2252d22ceaba31c1e
2019-03-12 22:05:20 +01:00
Vic Yang 19b3a51f64 Add support for no-vendor-variant VNDK
When no-vendor-variant VNDK is enabled, the vendor variant of VNDK
libraries are not installed.  In this case, the vendor binaries need to
be able to link in the core variant.

Update the linker config so that we export such VNDK libraries to the
proper linker namespaces.

Bug: 119423884
Test: Enable no-vendor-variant VNDK for a dummy VNDK library.  Boot and
      check the vendor variant does not exist and only the core variant
      is used.

Change-Id: I71274fdf61373663603a5fbc3497400420094fcf
2019-03-12 13:30:46 -07:00
Hans Boehm 28fdb8e282 Merge "Fix wp and sp comparison bugs" 2019-03-12 18:27:52 +00:00
Neil Fuller 9358e0972f Add an env variable for the tzdata module root
The ANDROID_TZDATA_ROOT maps to the /apex/com.android.tzdata
location on device like ANDROID_RUNTIME_ROOT maps to the
/apex/com.android.runtime location.

Bug: 128422035
Test: build only
Change-Id: Id90006004ca652564e530f3694600ac4afd798ed
2019-03-12 16:52:36 +00:00
David Anderson 7f6d6db24d Merge "libfiemap_writer: Fix bugs in vfat handling." 2019-03-12 16:20:56 +00:00
Mark Salyzyn 8d246b22ee Merge "bootstat: add recovery,quiescent and reboot,quiescent to known set" 2019-03-12 15:44:29 +00:00
Gavin Corkery 8df32193f3 Rename data/pkg_staging to data/app-staging.
Test: atest apex_e2e_tests
Bug: 126330086

Change-Id: Ic5729d60046e8825a2a94e3c3483ea8232a69ed2
Merged-In: Ic5729d60046e8825a2a94e3c3483ea8232a69ed2
2019-03-12 15:38:44 +00:00
Kiyoung Kim 23d774105e Merge "Add product apk support from libnativeloader" 2019-03-12 08:48:46 +00:00
Treehugger Robot 59d4c8a352 Merge "adb: make root/unroot wait for the device to come back." 2019-03-12 04:01:00 +00:00
David Anderson f9134aa1d5 libfiemap_writer: Fix bugs in vfat handling.
FIBMAP returns block numbers, whereas fiemap_writer was treating them as
byte offsets.

Bug: 126230649
Test: gsi_tool install to vfat works
Change-Id: Ice80128213425aa9601e381d0fbe53f9581bf596
2019-03-11 19:17:01 -07:00
Treehugger Robot 8a1fb91e14 Merge "Add missing override keyword" 2019-03-11 23:56:30 +00:00
Josh Gao 3c99b0f94f adb: make root/unroot wait for the device to come back.
Test: manually unplugged a device after adb root
Change-Id: I588283a666cc5e19d809d7ce81b5300398e8be2d
2019-03-11 15:59:09 -07:00
Treehugger Robot 2009e32008 Merge "Support zero-length mapped files" 2019-03-11 22:49:56 +00:00
Treehugger Robot 22ff8e1909 Merge "adbd: properly handle FUNCTIONFS_BIND without ENABLE." 2019-03-11 22:48:46 +00:00
Josh Gao 007a4dc7a6 adbd: properly handle FUNCTIONFS_BIND without ENABLE.
If a device is unplugged, a BIND will happen without an ENABLE until the
device is plugged in, which would previously result in adbd crashing
every 5 seconds due to an attempt to join a thread that hadn't been
started.

Bug: http://b/128255355
Test: manually observed adbd via serial cable while unplugged
Change-Id: I90d6384e7e829df1ffaf73a95f2418a2ff97fb03
2019-03-11 13:06:17 -07:00
Casey Dahlin 6e96f68cf3 Add missing override keyword
Fuchsia builds with Clang, and it's a bit pickier about always using
override when it's appropriate.

Test: None
2019-03-11 12:35:41 -07:00
The Android Open Source Project 4d916a1ece DO NOT MERGE - Merge PPRL.190305.001 into master
Bug: 127812889
Change-Id: I16a546dc24d3cf980ad7ab09895c0d97ee436224
2019-03-11 11:57:28 -07:00
Jayant Chowdhary a229d3e23e Special case init for android_is_in_vendor_process.
Init is executed without ld.config.<ver>.txt loaded (since sysprop
service isn't up in order for it to read ro.vndk.version and know <ver>). It uses the hard-coded
namespaces in the linker and therefore, does not know about the vndk namespace. That does not mean
it is not a system process.

Bug: 124128212

Test: Boot up device with selinux enforced, use camera to take pictures/ record videos (sanity)
Test: Watch movies on youtube (sanity)

Change-Id: If8701af2ee5dfa3bb36d0ce0a17a23808d184d9f
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-03-11 11:18:06 -07:00
Mark Salyzyn 6fc0829c5a bootstat: add recovery,quiescent and reboot,quiescent to known set
Reserve recovery,quiescent and reboot,quiescent to known reboot
reasons.

Test: none
Bug: 120624642
Change-Id: I78c52f6db447c9d3980a3f2007471bc7aa60e25f
2019-03-11 10:08:05 -07:00
Jooyung Han 55063b1444 Revert "Mark libs as double_loadable"
This reverts commit c624621554.

Reason for revert: These libs are no longer used by libmediandk(aosp/915075)

Change-Id: I5533a3c22263afb21f4053a569c4a646c9766404
2019-03-11 14:10:34 +00:00
Hans Boehm 029b12ebde Fix wp and sp comparison bugs
Make clear() actually clear wp m_refs, so that nulls compare equal.

Make equality consistent with < and >, ensuring that a weak pointer
cannot be both equal to and greater than another.

Don't rely on the built-in < and > operators to correctly order
different objects. The standard does not guarantee that, and there is
a risk of compiler relying on that lack of guarantee.

Remove unnecessary comparison overloads, especially those
comparing a wp<> to an sp<>.

Change the remaining wp<> to sp<> comparisons to check for equivalence
of the mRefs pointer instead of the object address, thus eliminating
the dubious equal comparison result for a dead wp<> and an sp<> that
happen to point to the same object address.

Add comparison tests.

Test: Treehugger, boot AOSP, atest RefBase
Bug: 126922090
Change-Id: I15911150e0fc85ace2c4b77d337826e12793c690
2019-03-09 21:41:37 -08:00
Christopher Ferris fdfb9a0113 Merge "Add unistd.h to includes in Regs.h" 2019-03-09 21:21:27 +00:00
Treehugger Robot 71c084d07e Merge "init: use PLOG rather than strerror." 2019-03-09 02:04:56 +00:00
Treehugger Robot f3762004a3 Merge "Set cg_file_data_ to null when initialization failed" 2019-03-09 00:15:05 +00:00
Treehugger Robot 34e1b402a6 Merge "Change mini-keyctl command format." 2019-03-08 23:17:01 +00:00
Casey Dahlin 0e113851a5 Add unistd.h to includes in Regs.h
This is required to use pid_t, but by luck nobody noticed its absence
until the Fuchsia build.

Test: Code now builds inside Fuchsia
2019-03-08 15:04:48 -08:00
Elliott Hughes 076305e4fb init: use PLOG rather than strerror.
Test: builds
Change-Id: Ifdba8e7fa4cd5c852946bb0f398382f2d64674cd
2019-03-08 12:34:53 -08:00
Josh Gao e6413fcd94 Merge "Restrict scanning port range, not emulator count" 2019-03-08 19:29:43 +00:00
android-build-team Robot 5d1d32dcbf Snap for 5240760 from 20ac1203a3 to pi-platform-release
Change-Id: I6bbede2f8c74a9f344df6f3c713de709eb79cd26
2019-03-08 18:40:29 +00:00
Wei Wang d71d30179c Set cg_file_data_ to null when initialization failed
Cannot really do calls if initialization failed.
Also fix LOG usage.

But: 124774415
Test: Build
Change-Id: Ifd7db90cfee51ba5830e1d4db8f8d19b5bc9feba
2019-03-08 10:18:06 -08:00
Xiaoyong Zhou b29b27ec7f Change mini-keyctl command format.
This CL change the mini-keyctl tool to make it compitable with libkeyctl
tool to make it more useful.

Bug: 112038861
Test: mini-keyctl padd asymmetric 'desc' .fs-verity < /path/to/cert.der
Test: mini-keyctl unlink <key_id> <keyring_id>
Test: mini-keyctl restrict_keyring <keyring_id>

Change-Id: I950f07c7718f173823ce5a5cd08e0d1a0e23a007
2019-03-08 09:59:42 -08:00
Mark Salyzyn 6c5c085e41 Merge "fs_mgr: overlay: preserve errno android::gsi::IsGsiRunning()" 2019-03-08 17:05:03 +00:00
Roland Levillain ecef987a35 Merge "Fix a typo in linker configuration comments." 2019-03-08 11:48:43 +00:00
Tao Bao b778c44c07 Merge "mkbootimg: print addresses and offsets in hex" 2019-03-08 06:31:05 +00:00
Treehugger Robot f97193d96f Merge "Revert "Revert "adbd: switch the default USB implementation.""" 2019-03-08 03:29:41 +00:00
Dongwon Kang fc6e441a1a Merge "allow_all_shared_libs for media namespace in ld.config.legacy.txt" 2019-03-08 02:46:06 +00:00
Pirama Arumuga Nainar 5d7f84144d Support zero-length mapped files
Bug: http://b/119818070 "app crashes when reading asset of zero length"

Add support for zero-length mappings for the Windows code path as well.

Test: ran libbase_test on Windows under wine.
Change-Id: Iccb65fa800c636444100c9369f41e36d24a53a99
2019-03-07 16:12:55 -08:00
Matthew Maurer 2ba61b775a Merge "Add support for RPMB over VirtIO Serial" 2019-03-07 21:30:56 +00:00
Mark Salyzyn 27c5047313 fs_mgr: overlay: preserve errno android::gsi::IsGsiRunning()
Resulted in remount reporting an mount_all failure.

Test: adb-remount-test.sh
Bug: 126256072
Change-Id: Ib9567748e5c12b047e38869c07755eb741308df4
2019-03-07 13:07:17 -08:00
David Anderson e9223204d3 Merge "Add write support to SplitFiemap." 2019-03-07 19:55:48 +00:00
Roland Levillain e51c87634a Fix a typo in linker configuration comments.
Test: n/a
Change-Id: I3fa36094cf3eb45b0e1400712f22b8477a096b59
2019-03-07 19:06:57 +00:00
Dongwon Kang 787e09a1de allow_all_shared_libs for media namespace in ld.config.legacy.txt
This is a temporal fix. With this change, the extractor plug-ins uses
unstable libs under /system/lib[64]. The right resolution is being
discussed.

Test: applied the same change to ld.config.txt and checked
      the memory map of media.extractor on cuttlefish.
Bug: 127791685

Change-Id: Ifd5b79831f27ef4017bb8aa774671aa9b2c5264e
2019-03-07 10:14:02 -08:00
David Anderson 1c1850fad2 Merge "Create /metadata/password_slots during boot." 2019-03-07 16:20:01 +00:00
Treehugger Robot e820afdadb Merge "Don't defer zygote" 2019-03-07 13:59:17 +00:00
Jiyong Park 1a789db2e3 Don't defer zygote
Removing 'updatable' from zygote as zygote is started after apexd. All
APEXes are guaranteed to be activated at the moment.

Sequence of actions:
1) /data mounted. post-fs-data is triggered.
2) apexd starts. APEXes are activated. Init does not execute more
commands until the activation finishes.
3) all post-fs-data sections from other *.rc are executed.
4) zygote-start is triggered.

Bug: 123404717
Bug: 126555629
Bug: 125549215
Test: device boots
Test: no following message on the logcat log
Could not restart 'zygote': Cannot start an updatable service 'zygote' before configs from APEXes are all loaded. Queued for execution.

Merged-In: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
Change-Id: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
(cherry picked from commit 3bddd540dd)
2019-03-07 22:21:32 +09:00
Tim Baverstock 25173c808a Restrict scanning port range, not emulator count
Our servers can comfortably run more than 16 emulators, and this is
much easier than messing with hypervisors or docker port allocation.

Assumes you know how to avoid clashes with Google Wear's default port.

Test: manual - still registers emulators.

Change-Id: I47cfd28725a550de0bd77fd11fcd94cdd11d2cc2
2019-03-07 12:28:31 +00:00
Kiyoung Kim 4639f6946a Add product apk support from libnativeloader
Currently libnativeloader appends vendor lib path if apk is from vendor
partition. Similar to this we should add product lib path if apk if from product partition.

Bug: 124705551
Test: m -j && tested from crosshatch with product apps (such as Wallpaper)
Change-Id: I8c3473f1f70b1c22dcaed7eb2d5f9c3deee9e1a5
Merged-In: I8690167ca8098015c8ae4bbb4f028404c5e94dc0
2019-03-07 15:01:52 +09:00
Yuvraj Saxena bc5a0ecd8a mkbootimg: print addresses and offsets in hex
Change-Id: Ia8a8d68acd8d68750f9ae49ccd341f0f4d3f4e9c
2019-03-07 05:06:09 +00:00