Commit graph

38919 commits

Author SHA1 Message Date
Treehugger Robot
28c44863f6 Merge "adb: don't spew to logcat when tracing is enabled." 2018-02-07 05:57:46 +00:00
Mark Salyzyn
9e11bb0cdb Merge "lmkd: use after free" am: 7c3c8c27e1
am: c95fb64f0f

Change-Id: I14be93f1bb37bab59b68c874017c4979cf9655db
2018-02-07 02:40:04 +00:00
Mark Salyzyn
c95fb64f0f Merge "lmkd: use after free"
am: 7c3c8c27e1

Change-Id: If54ce69ac7ca03a67e25a2e3a3f4392ba2a8aeca
2018-02-07 02:26:30 +00:00
Treehugger Robot
7c3c8c27e1 Merge "lmkd: use after free" 2018-02-07 01:53:15 +00:00
Josh Gao
95c4497bd4 adb: don't spew to logcat when tracing is enabled.
When persist.adb.trace_mask is used to enable verbose logging, avoid
exponential logging when a user runs `adb logcat`. As a side-effect,
set the minimum logging level to include everything when ADB_TRACE is
used on the client (which is something we want anyway).

Bug: http://b/72971016
Test: `adb shell 'setprop persist.adb.trace_mask; killall adbd'; adb logcat`
Change-Id: Id4bca1f3933a920345499dbeaeb103c8a2e220cd
2018-02-06 15:55:06 -08:00
Christopher Ferris
e762f1f193 Check that dex pc is in a valid map.
Add new unit tests for dex pc being non-zero.

Bug: 73004673

Test: Ran unit tests.
Test: Ran art 137-cfi test on host for interpreter.
Change-Id: I09bbf96d0ed65fc1e5896e4ab2bc67867e3b7fdb
2018-02-06 15:00:04 -08:00
Josh Gao
27cb7dca77 adb: switch asocket::enqueue to std::string.
Switch asocket over to taking a std::string instead of apacket* for
data. This allows us to remove asocket specific fields from apacket*.

Test: python test_device.py with x86_64 emulator, walleye
Test: adb_test on host
Change-Id: I9d157ff331a75ba49a54fdd4194e3f6cdff722f4
2018-02-06 12:59:06 -08:00
Josh Gao
5caaebdc3d adb: restore packet data length checks.
These checks were moved to after the read of the payload, which is too
late. Add a check before each read to avoid a heap buffer overflow.

Test: python test_device.py with x86_64 emulator, walleye
Change-Id: I86bcfaaa9004951cc52ad89af74680cf748e717d
2018-02-06 12:59:06 -08:00
Josh Gao
5e5076404a adb: switch asocket's intrusive linked list to vectors.
Test: python test_device.py
Change-Id: I24d7f5d0401de77d80c7a2dd5a7dcb551943342d
2018-02-06 12:59:06 -08:00
Greg Hartman
f46de84f8d Merge "Add support for non-partitioned devices for system" am: 9d6b55928c
am: 4e126cd4e9

Change-Id: I2fe47f67f180bf447ebff454a5af0a589b42c853
2018-02-06 19:06:01 +00:00
Greg Hartman
4e126cd4e9 Merge "Add support for non-partitioned devices for system"
am: 9d6b55928c

Change-Id: I414e81a89dbc9505c9eeff0d1d2e2ad4fb5ad01d
2018-02-06 18:55:09 +00:00
Treehugger Robot
9d6b55928c Merge "Add support for non-partitioned devices for system" 2018-02-06 18:39:14 +00:00
David Srbecky
5d1fb44cfb Merge "Fix in-memory loading of cdex files with shared data." am: d663ef9772
am: 29379fa494

Change-Id: I3d1731b7c0e28e4a743d128785a88242721b294e
2018-02-06 11:09:53 +00:00
David Srbecky
29379fa494 Merge "Fix in-memory loading of cdex files with shared data."
am: d663ef9772

Change-Id: I9ad148c8117897f49f34aed5e22935f5dbaf77d0
2018-02-06 11:05:44 +00:00
David Srbecky
d663ef9772 Merge "Fix in-memory loading of cdex files with shared data." 2018-02-06 11:00:31 +00:00
Greg Hartman
886474994a Add support for non-partitioned devices for system
BUG: 69071989
BUG: 71707530
Test: Local build and boot
Change-Id: I0cb7d61634be6a694ceb51cb06901c466eae1c35
2018-02-06 06:34:40 +00:00
Christopher Ferris
8dadf1fd77 Merge "Small test clean up." am: 8ca50401f5
am: b523a6a616

Change-Id: I7ab907d9b743874d7e6e76b56ee02a35ee7e65bb
2018-02-06 03:37:09 +00:00
Mark Salyzyn
48c3167899 Merge "base: adb.exe build error" am: 6760466063
am: fcb6c7425d

Change-Id: Idb430e984e0ae1473c236e513d0e7de72a88a5d2
2018-02-06 03:36:33 +00:00
Mark Salyzyn
451ff596cf Merge "libcutils: Add "daemon" and "bin" users for testing only" am: 718899b415
am: 2500e38093

Change-Id: Ic4890f5f15b093985c5342983be300a4946ffbd6
2018-02-06 03:35:43 +00:00
Christopher Ferris
b523a6a616 Merge "Small test clean up."
am: 8ca50401f5

Change-Id: I177818b8d1598eb144f5ce76c3a508a71a68728c
2018-02-06 03:15:50 +00:00
Mark Salyzyn
fcb6c7425d Merge "base: adb.exe build error"
am: 6760466063

Change-Id: Ib75862d5ff87aea6ffa10adfcf9d07ceadb1f955
2018-02-06 03:15:19 +00:00
Christopher Ferris
8ca50401f5 Merge "Small test clean up." 2018-02-06 01:48:12 +00:00
Treehugger Robot
6760466063 Merge "base: adb.exe build error" 2018-02-06 00:09:28 +00:00
Mark Salyzyn
2500e38093 Merge "libcutils: Add "daemon" and "bin" users for testing only"
am: 718899b415

Change-Id: I7e0eb140ff8729b805c692983cc60623a1761346
2018-02-05 23:30:18 +00:00
Christopher Ferris
5f5cb238f0 Small test clean up.
Shrink a few files that are huge by removing all of the .debug_XXX
sections except .debug_frame since they aren't used.

Rename all of the arm32 to arm and x86_32 to x86.

Test: All unit tests pass.
Change-Id: Ia0f0baadf2a7fbc42a544aff2f14d5ed5f9287b7
2018-02-05 13:12:54 -08:00
Treehugger Robot
718899b415 Merge "libcutils: Add "daemon" and "bin" users for testing only" 2018-02-05 20:51:30 +00:00
David Srbecky
417f7c3720 Fix in-memory loading of cdex files with shared data.
Several cdex files may share the same data for de-duplication.

Bug: 72520014
Test: Disable DexFileFromFile and then run ART's 137 test.
Change-Id: Icfe04255cc20a302f844c2e3e3016578856e1f82
2018-02-05 20:40:31 +00:00
Todd Poynor
4d7ee2ebbb healthd: don't report fake data for battery-less devices
If the kernel does not implement a power_supply class device of type
battery, do not report fake data, instead report the following by
default:

* batteryPresent = false (instead of true),
* charging status = unknown (instead of charging),
* capacity = 0 (instead of 100%),
* health = unknown (instead of good),
* AC charger online not modified (instead of forcing true)

If no charger and no battery devices are supplied by the kernel, the
AC charger online property will no longer be forced to true.  Devices
that are always plugged into AC power should either implement a
power_supply class charger device or implement a Health HAL that sets
properties appropriately.

Bug: 34507420
Test: manual: gce_x6_phone (no battery or charger),
      boots and stays booted, inspect properties
Merged-In: I14cb3b685e8130428e417e7d08c4246f7415210a

Change-Id: I64bd4431af10f3d232f36fcf8d356b6d88b08013
2018-02-05 19:48:30 +00:00
Mark Salyzyn
8e8648463d libcutils: Add "daemon" and "bin" users for testing only
Multiple LTP tests require a "daemon" or "bin" user.  These user ids
have been defined since UNIX incept, and even up to the '80s remained
in many of the tools as hard coded values.  Add these two ids with
a cautionary note.

Test: compile
Bug: 31152327
Bug: 31226046
Bug: 32385889
Change-Id: Ida2fb6d817b8ada0624870439fcf848667b31fb3
2018-02-05 11:06:08 -08:00
Mark Salyzyn
919f538e6d lmkd: use after free
Remove a use-after free reference of procp->pid, using the already
captured pid variable.

Test: lmkd_unit_tests
Bug: 33808187
Change-Id: I3f5f8dd9acab2e28c81465d6195b73ae47e0a3c4
2018-02-05 11:00:59 -08:00
Tom Cherry
6b07191d13 Merge "init: add TODO for mount operations." am: 94e9305511
am: e053c09f8d

Change-Id: I42ba2a1e5c7795da72c101bb3259388a30f5aea1
2018-02-05 18:21:09 +00:00
Tom Cherry
e053c09f8d Merge "init: add TODO for mount operations."
am: 94e9305511

Change-Id: I11e757937b08e1a8e1457c068fa4c2f5ebc91f4e
2018-02-05 18:17:59 +00:00
Treehugger Robot
94e9305511 Merge "init: add TODO for mount operations." 2018-02-05 18:08:10 +00:00
Mark Salyzyn
0c071c9de7 base: adb.exe build error
Windows build of adb is broken because of the lack of
std::chrono_literals and for an implementation of
android::boot_clock::now().

Test: make -j vts
Bug: 72941624
Change-Id: Ie65fed098633eb45a94ea553de6903f8d55fc5b2
2018-02-05 09:33:10 -08:00
Tom Cherry
880d566400 init: add TODO for mount operations.
mount operations should be done in vendor init context, but their
complexity currently limits this.  Add a TODO to make this reason
clear to those viewing the code.

Bug: 72488820
Test: N/A
Change-Id: I8b6dd92aa79f31dc24603559ed6de0815facfcba
2018-02-05 08:01:54 -08:00
bohu
83255e337a Merge "emulator: not start adbd upon ro.kernel.qemu=1" am: 7c271bdc3b
am: 466b098b87

Change-Id: Ic97d252da93210530746f131c2d6fab073cc8fde
2018-02-05 06:36:23 +00:00
bohu
466b098b87 Merge "emulator: not start adbd upon ro.kernel.qemu=1"
am: 7c271bdc3b

Change-Id: I7277a43dfebc01d8e9ef7a9c39cd8dd7b9633c9b
2018-02-05 06:32:48 +00:00
Treehugger Robot
7c271bdc3b Merge "emulator: not start adbd upon ro.kernel.qemu=1" 2018-02-05 06:27:57 +00:00
bohu
b40193e50a emulator: not start adbd upon ro.kernel.qemu=1
clean up emulator specific rules.

BUG: 72900827

Change-Id: Ica60838562fd773bcde5752c11586183ce55b71a
2018-02-03 17:22:15 -08:00
David Srbecky
c3ceb9af84 Merge "Load dex files from ART-specific data structure." am: 7f5615e8d4
am: 82aecc3b52

Change-Id: I7c1de41ddb95fb6ff74f1780878a0497430ec172
2018-02-03 11:38:43 +00:00
David Srbecky
82aecc3b52 Merge "Load dex files from ART-specific data structure."
am: 7f5615e8d4

Change-Id: I26d5eb21c492087128fa0528c39b5531a33abfe4
2018-02-03 11:35:21 +00:00
David Srbecky
7f5615e8d4 Merge "Load dex files from ART-specific data structure." 2018-02-03 11:29:38 +00:00
yusukes
61bca6d099 Merge "Do not block SIGTERM in init's child processes" am: 176afbbedf
am: 495a672f4c

Change-Id: I0253b1222a1b34fb3c1dae456d53022277d82228
2018-02-03 04:32:34 +00:00
yusukes
495a672f4c Merge "Do not block SIGTERM in init's child processes"
am: 176afbbedf

Change-Id: I26bcb38bf2082da18e753afe5761b6c0460fc85c
2018-02-03 04:19:18 +00:00
Treehugger Robot
176afbbedf Merge "Do not block SIGTERM in init's child processes" 2018-02-03 01:31:45 +00:00
yusukes
4a4ec14e42 Do not block SIGTERM in init's child processes
Previously, unless the process unblocks the signal by itself,
the signal was never delivered to the process. This caused at
least one CTS test failure.

Bug: 72453675
Test: 'kill -TERM app_pid' terminates the app process

Change-Id: I3977cac75e2673b52c5cf91d34d7a9c258c1a0e4
2018-02-02 15:28:03 -08:00
Christopher Ferris
7747b60faa Load dex files from ART-specific data structure.
Fixes cdex which was recently changed to have shared data section,
which means the DEX PC cannot be used to find the right symbol,
as the bytecode is no longer within the dex file, and in-fact,
we might have to scan multiple dex files to find the method.

Bug: 72520014
Test: testrunner.py --host --cdex-none -t 137
Test: testrunner.py --host --cdex-fast -t 137
Test: All unit tests pass.
Change-Id: I80265d05ad69dd9cefbe3f8a75e4cd349002af5e
2018-02-02 15:03:00 -08:00
Paul Crowley
2c90b91203 Merge "Use vold's mount with metadata encryption service." am: 4819edf4fc
am: fcc1db2189

Change-Id: I86b264b7c44775e4f2fcdc249d433c363f93961b
2018-02-02 07:14:49 +00:00
Christopher Ferris
6da71aaaee Merge "Fix symbol resolution within a dex file." am: 0ce76f910b
am: 4132278874

Change-Id: Idc721093812576e23ba28862da800b8daa24fbc3
2018-02-02 07:14:09 +00:00
Paul Crowley
fcc1db2189 Merge "Use vold's mount with metadata encryption service."
am: 4819edf4fc

Change-Id: I2bbde4166977723d5fde93d844d41bc244ccbb3d
2018-02-02 04:01:10 +00:00