Commit Graph

37792 Commits

Author SHA1 Message Date
Andreas Gampe 27b8fcdfcf ASAN: Remove old list of services
Remove list of services and support for asan.options. This has not
been used in a while, and there is contention about listing names
of device-specific services.

Bug: 70387666
Test: m
Change-Id: I766c6b3a0c44b6b992a3259a3c4215a688452907
2017-12-11 11:36:17 -08:00
Treehugger Robot 6f29887c71 Merge "adb: get libusb compiling on Windows." 2017-12-11 19:24:41 +00:00
Elliott Hughes d42df42f30 Set $TMPDIR for `adb shell`.
Bug: http://b/19635681
Test: printenv
Change-Id: I21e89b9d7cccad23f32a3062a9e04e59b8278104
2017-12-11 10:40:57 -08:00
Douglas Leung 61b1a1ae77 Add libunwindstack support for Mips and Mips64
This patch requires v3.18 kernel or above, because v3.10 kernel
has a bug (as of 8/1/2017) in the ptrace(GETREGSET) function for mips
and mips64.

Change-Id: I004c1fa190193eebe1c84440b366289122a6bd8a
Signed-off-by: Douglas Leung <douglas.leung@mips.com>
Signed-off-by: Dejan Jovicevic <dejan.jovicevic@mips.com>
2017-12-11 15:44:40 +01:00
Treehugger Robot 84de4c0a89 Merge "Use versioned VNDK directories in ld.config.txt" 2017-12-11 02:16:43 +00:00
Yabin Cui 0ca49b09ad libBacktraceOffline: try both .debug_frame and .ARM.exidx on arm.
Currently, libBacktraceOffline doesn't try .ARM.exidx if a function
appears in .debug_frame. This make it can't unwind through functions
appear in both .debug_frame and .ARM.exidx, but having dwarf instructions
not accepted by libunwind.
This patch fixes this by trying first .debug_frame then .ARM.exidx on arm.

Bug: http://b/69383534
Test: run libbacktrace_test on arm.

Change-Id: Ib95dd56d5cc123a20948e880b51b28ddc04b4a6e
2017-12-10 18:00:35 -08:00
Justin Yun 44bb46f604 Use versioned VNDK directories in ld.config.txt
All vndk/vndk-sp directories will have version suffix if
"ro.vndk.version" is set.

Bug: 69984421
Bug: 66074376
Test: Build with BOARD_VNDK_VERSION=current and
      BOARD_VNDK_RUNTIME_DISABLE=true. Check boot.

Change-Id: I03849f9f96bc6c7880aa70c517e963aab4e033b8
2017-12-11 10:58:51 +09:00
Elliott Hughes d65c6ba955 Merge "Add lmkd/OWNERS." 2017-12-09 18:47:57 +00:00
Christopher Ferris 70a454e25b Merge "Do not check arch for format check." 2017-12-09 03:23:18 +00:00
Christopher Ferris 4dac55d5fd Merge "Make sure at least XX maps are created." 2017-12-09 03:22:41 +00:00
Treehugger Robot fd3225492b Merge "Fix media on W/T" 2017-12-09 00:48:52 +00:00
Elliott Hughes ad4e3e2f54 Add lmkd/OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ic4970a95d799c16ffe06bc94a85adabc18d6cc0b
2017-12-08 16:12:58 -08:00
Christopher Ferris 02fdb569f6 Do not check arch for format check.
Use a generic check if the address is 32 bits when using the default
formating of a backtrace line instead of an arch check.

Test: New unit tests pass.
Change-Id: Id609abc037d7b437a02d52763aa91fbefe5f4d5b
2017-12-08 15:44:14 -08:00
Josh Gao 9425996b45 adb: get libusb compiling on Windows.
This still doesn't work yet because libusb doesn't support hotplug on
Windows yet, but it's in the milestones for the next libusb release,
and this is enough to start poking around with the WinUSB device-side
stuff, so leave it broken for now.

Bug: http://b/68993980
Test: set ADB_LIBUSB=1; adb.exe server nodaemon aborts in the expected place
Change-Id: Icef7d46e31c847d6a8e724c6f58ae5db43673c16
2017-12-08 13:11:15 -08:00
Christopher Ferris 88b48f7b18 Make sure at least XX maps are created.
Rather than expect exactly one set of maps, make sure there are at
least XX number of maps.

Test: Ran the 32 bit and 64 bit variants of the benchmarks.
Change-Id: I34184eab3810e92e7f246aa810ddb18fab443c9a
2017-12-08 12:48:46 -08:00
Treehugger Robot a4a9a81d38 Merge "adb: disable USB packet overflow checking on OS X." 2017-12-08 20:31:51 +00:00
Christopher Ferris 70f7d47f3c Merge "Add method to detect remote read function to use." 2017-12-08 20:09:34 +00:00
Christopher Ferris e328673a30 Add method to detect remote read function to use.
The process_vm_read function is much faster than ptrace, but sometimes
that will not work on a remote process. Modify the libunwindstack
MemoryRemote object to figure out which one it can use.

Wrote new unit test to verify this checking behavior.

Modify libbacktrace so that the read from libunwind is used instead of
using the default ptrace calls.

Add some benchmarks to libbacktrace to compare the two different methods.

Test: Ran unit tests libbacktrace/libunwindstack/debuggerd.
Test: Ran debuggerd -b <SYSTEM_SERVER_PID>
Test: Ran debuggerd -b <MEDIACODEC PID>
Test: Ran debuggerd -b <RANDOM_PID>
Test: Used crasher to create tombstones and verified stack data is
Test: dumped properly.
Change-Id: If75ca238289532dd8e1de430d569cabb2523380a
2017-12-07 19:00:00 -08:00
Jaegeuk Kim cf27dbacaf Merge "fastboot: support make_f2fs and sload_f2fs for win32" 2017-12-08 00:58:05 +00:00
Jaegeuk Kim ec87074542 Merge changes from topic "sload_f2fs"
* changes:
  fastboot/fs_mgr/init: add sload_f2fs
  fs_mgr: format f2fs with length=xx fstab
2017-12-08 00:57:42 +00:00
Treehugger Robot b07cc5e0c0 Merge changes I3978cbe2,I7b8e1232
* changes:
  Reland "Prevent vendors from accessing private VNDK libs"
  Permitted and search path change
2017-12-08 00:50:34 +00:00
Elliott Hughes 3289b9c928 Merge "Add OWNERS." 2017-12-07 23:21:26 +00:00
Elliott Hughes 693d63f9cf Add OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
2017-12-07 13:30:03 -08:00
Andrew Chant 255c43cd05 Merge "usblib: fix race & delay waiting for perms on open" 2017-12-07 18:49:40 +00:00
Elliott Hughes dcc0f8f76b Merge "Add a /bin symlink for convenience." 2017-12-07 16:55:25 +00:00
Treehugger Robot c431c43f8d Merge "Remove *.dep files for ld.config.txt, [llndk|vndksp].libraries.txt" 2017-12-07 09:51:22 +00:00
Jiyong Park d083db9bc9 /vendor/priv-app is added to the permitted paths for the default ns
We will have apps under /vendor/priv-app. Add the path to the permitted
paths so that the apks and so libs under the directory can be loaded.

Bug: 35301609
Test: None since we don't have priv vendor app yet.
Change-Id: Ida998adb2e180852b1922e9933f25b988517399e
2017-12-07 18:31:18 +09:00
Marco Nelissen 4ad1a34289 Fix media on W/T
W/T enforce restrictions on linker paths, which M/S do not.
Because of this, media.extractor was unable to load its extractors on W/T.

Bug: 67405932
Test: play sounds successfully
Merged-In: I8914da74780c909da815beaffcd4d76fbe2cc6b5
Change-Id: I8914da74780c909da815beaffcd4d76fbe2cc6b5
(cherry picked from commit 593b43910b)
2017-12-07 18:30:47 +09:00
Jaegeuk Kim aa64620eaa fastboot: support make_f2fs and sload_f2fs for win32
This patch enalbes to use windows tools for f2fs.

Change-Id: Id9109d3d1d8db85f433a20c6a9b18a88daa540d0
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-12-06 22:40:08 -08:00
Jaegeuk Kim 899ad558cd fastboot/fs_mgr/init: add sload_f2fs
Change-Id: Iab1e4037cbb835aba97f941c8840b8971caf38e7
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-12-06 22:40:08 -08:00
Jaegeuk Kim 6a3967a64b fs_mgr: format f2fs with length=xx fstab
Merged-In: Icce29ad918f20b16c9908e7fa3ae19eb8c96760b
Change-Id: Icce29ad918f20b16c9908e7fa3ae19eb8c96760b
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit a367430734)
2017-12-06 22:37:57 -08:00
Jiyong Park ad7ddd5a02 Reland "Prevent vendors from accessing private VNDK libs"
This reverts commit 875fe42a81.

... and fixes a bug that private VNDK libs are not accessible even to
RenderScript framework libraries (such as libRS_internal.so). This is
fixed by exceptionally allowing the private libs only to 'rs'
namespace.

Bug: 70260989
Bug: 70279973
Bug: 63878960
Test: Build for walleye and tested Photos edit.
Test: other renderscript app (camerascript) works as well
Merged-In: I3978cbe2e869f6a1c214c755ded038349bde7b6b
Change-Id: I3978cbe2e869f6a1c214c755ded038349bde7b6b
(cherry picked from commit 781c47f4da)
2017-12-07 13:44:46 +09:00
Sundong Ahn e93d7f9941 Permitted and search path change
The permitted and search paths should be changed according to VNDK version.
However these paths are fixed with vndk and vndk-sp. So I define the
directory name as below
- /system/${LIB}/vndk${VNDK_VERSION}
- /system/${LIB}/vndk-sp${VNDK_VERSION}
${VNDK_VERSION} will be set by the property "ro.vndk.version".

Bug: 66074376
Test: build & run
Merged-In: I7b8e12327af89d131c4c49cb9b459a393c7dacb8
Change-Id: I7b8e12327af89d131c4c49cb9b459a393c7dacb8
(cherry picked from commit 85c773f0a2)
2017-12-07 13:44:29 +09:00
Jiyong Park 74857cccd2 Remove *.dep files for ld.config.txt, [llndk|vndksp].libraries.txt
The dep files are not required because change in the command line
triggers the rule.

Test: m -j ld.config.txt llndk.libraries.txt vndksp.libraries.txt
Re-run the build after adding or removing libs to/from the vndk set.
The txt files are updated accordingly.

Merged-In: I9c9e22088cc2afeb66e8b159f611b25d698cf800
Change-Id: I9c9e22088cc2afeb66e8b159f611b25d698cf800
(cherry picked from commit 81088bf131)
2017-12-07 03:06:52 +00:00
Christopher Ferris a7e2a12d38 Merge "Split arch data into separate files." 2017-12-07 02:35:35 +00:00
Elliott Hughes a78c686799 Merge "Remove dead code." 2017-12-07 00:44:56 +00:00
Yabin Cui d7edcc9bc4 Merge "libBacktraceOffline: fix using debug frame with load bias." 2017-12-07 00:25:20 +00:00
Yabin Cui 665f144566 Merge "base: allow creating tempfile in a custom temporary dir." 2017-12-07 00:07:25 +00:00
Christopher Ferris d06001d6e0 Split arch data into separate files.
Add an ArchEnum to express the arch of the Elf objects and Reg objects.

Split out the regs code into per arch pieces and generic parts.
Also, split out the header files for each arch.

Do not break out the test code yet, there isn't enough and it doesn't
help to maintain the tests.

Test: libunwindstack/libbacktrace/debuggerd unit tests pass.
Test: Running debuggerd -b <PIDS> yields valid data on bullhead.
Change-Id: If61f6c730c9ff2249f986b41de8c4d62f7158325
2017-12-06 16:01:40 -08:00
Josh Gao 801048c6ea adb: disable USB packet overflow checking on OS X.
OS X appears to be misreporting the maximum packet size on some
hardware. Disable this on OS X until we figure out what's going on.

Bug: http://b/65063965
Bug: https://issuetracker.google.com/70244520
Test: python test_device.py on linux with CHECK_PACKET_OVERFLOW disabled
Test: python test_device.py on darwin (but on hardware that wasn't reproducing this)
Change-Id: I57e1adfa162e40ed79f71f97af552b3f0519324e
2017-12-06 15:34:41 -08:00
Xin Li f223ff4c29 Merge "DO NOT MERGE: Merge Oreo MR1 into master" 2017-12-06 23:18:26 +00:00
Xin Li ff84934e0a DO NOT MERGE: Merge Oreo MR1 into master
Exempt-From-Owner-Approval: Changes already landed internally
Change-Id: I9f1ced06ca1f28e5c75ba07c54cdc7bc78d5f5f9
2017-12-06 14:24:58 -08:00
Yabin Cui 464ea61143 base: allow creating tempfile in a custom temporary dir.
Bug: http://b/70232908
Test: none.
Change-Id: I24b894793f6725186b3582a91db083427e51aa5a
2017-12-06 14:20:07 -08:00
Elliott Hughes 231f1e664d Remove dead code.
Bug: N/A
Test: boots
Change-Id: Id901d95aa05d26767aa5d956ac6e167db1cc3036
2017-12-06 12:38:41 -08:00
Yabin Cui 4a26eaf1f1 libBacktraceOffline: fix using debug frame with load bias.
Bug: http://b/69383534
Test: run backtrace_test.
Change-Id: I295d9dc8f3e5b628f179b2eaeac21fa93de130b0
2017-12-06 11:27:06 -08:00
Ivan Lozano a93741ec87 Merge "Disable integer overflow sanitizer in grep."
am: 3946d93023

Change-Id: Ie4ab0b0c542de435a507c1efdab79eef91beaf2f
2017-12-06 19:21:39 +00:00
Ivan Lozano 3946d93023 Merge "Disable integer overflow sanitizer in grep." 2017-12-06 19:14:11 +00:00
Elliott Hughes ff1ef9f2b1 Add a /bin symlink for convenience.
We already have /etc and /sbin. As the Android world moves towards / being
on the system partition, the circumstances under which a /bin symlink
won't work are reduced. This should already be usable most of the time.

Bug: http://b/63142920
Test: `adb shell /bin/date`
Change-Id: I81c2209ae808ced186d05fbe1d5417ce8dd93ea7
2017-12-06 08:59:02 -08:00
Jin Qian 2cbce3739b Merge "fastboot: fix build break"
am: cce381e307

Change-Id: I1492e940fff923a979d957d9ca1d51ecffdb6492
2017-12-06 07:33:52 +00:00
Treehugger Robot cce381e307 Merge "fastboot: fix build break" 2017-12-06 07:27:29 +00:00