Commit Graph

30267 Commits

Author SHA1 Message Date
Josh Gao 9886b1aa4a Merge "adb: properly handle libusb_clear_halt failure." am: 761ae04777
am: b44385f6b3

Change-Id: Iab2804f11c8052eeb4bf4f6aaa04ea7d35dcc0e0
2017-05-08 22:52:26 +00:00
Josh Gao b44385f6b3 Merge "adb: properly handle libusb_clear_halt failure."
am: 761ae04777

Change-Id: Ie45ec4c1786d851aa8c50de44d80bda13a27c099
2017-05-08 22:50:55 +00:00
Treehugger Robot 761ae04777 Merge "adb: properly handle libusb_clear_halt failure." 2017-05-08 22:44:34 +00:00
Tom Cherry e4f35b111e Merge "Revert "Make /data/data a symlink to /data/user/0"" am: 823816ee9f
am: 20a74298a5

Change-Id: I0673663db7b20b44867801f146e49235d15baf8a
2017-05-08 20:56:05 +00:00
Tom Cherry 20a74298a5 Merge "Revert "Make /data/data a symlink to /data/user/0""
am: 823816ee9f

Change-Id: I116babbd8ff696bfd131f3ba4c81055d8339e0eb
2017-05-08 20:53:05 +00:00
Josh Gao 8bf37d7a4d adb: properly handle libusb_clear_halt failure.
The original code used continue to attempt to try to skip the current
device, but there was an loop between the outside one and the continue.
Move the device handling logic into a function and replace continue
with return.

Test: mma
Change-Id: Iaa7f4b5ddc26d2ce03f1172d37d6307190b44412
2017-05-08 13:50:58 -07:00
Treehugger Robot 823816ee9f Merge "Revert "Make /data/data a symlink to /data/user/0"" 2017-05-08 20:46:41 +00:00
Josh Gao 7182f06223 Merge "debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id." am: 2bc6196faa
am: fde3c3542a

Change-Id: Iae20409ca85ecb0fe18e67005505214cd7e342cc
2017-05-08 20:26:03 +00:00
Josh Gao fde3c3542a Merge "debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id."
am: 2bc6196faa

Change-Id: Ie8d68d563dcb1f1756e83bd8ce1770197ef02275
2017-05-08 20:23:01 +00:00
Josh Gao 2bc6196faa Merge "debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id." 2017-05-08 20:18:34 +00:00
Dan Willemsen 8652dd2a45 Merge changes Ie0b30417,I8b6e802e am: ee9e5d0981
am: ae587a8f19

Change-Id: Ide8c7b917179474a4060c2360f21bc5c52eee05f
2017-05-08 18:11:25 +00:00
Dan Willemsen ae587a8f19 Merge changes Ie0b30417,I8b6e802e
am: ee9e5d0981

Change-Id: Ic24a4699bb8dc0590897f4c22df90a2af5a3c693
2017-05-08 18:07:59 +00:00
Dan Willemsen ee9e5d0981 Merge changes Ie0b30417,I8b6e802e
* changes:
  Turn off debuggerd for host bionic
  Remove old simulator support from liblog
2017-05-08 18:01:27 +00:00
Tom Cherry 3f9ba91d8f Merge changes I46690d1c,I84c11aa5 am: 0dda322d4a
am: 18b23afa4b

Change-Id: I4f46e0285af613f12c533f1235d75887aca19e3b
2017-05-08 16:18:14 +00:00
Tom Cherry 18b23afa4b Merge changes I46690d1c,I84c11aa5
am: 0dda322d4a

Change-Id: I69cc4f5432da891ffa052ad6f56ef21a3bc0e46e
2017-05-08 16:16:23 +00:00
Tom Cherry 0dda322d4a Merge changes I46690d1c,I84c11aa5
* changes:
  init: do not log directly from read_file() and write_file()
  init: Check DecodeUid() result and use error string
2017-05-08 16:11:38 +00:00
Tom Cherry 982e0693ce Revert "Make /data/data a symlink to /data/user/0"
This reverts commit d147cb5887.

Original change breaks AVD
Original changes breaks SF/AF
Bug: 38026755
Bug: 38030346
Bug: 38114264

Change-Id: Iab56244f0dc0f6b0df2916c691277a882fc7d184
2017-05-08 16:06:38 +00:00
Bowgo Tsai d6576491fe Merge "fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work" am: 6019991c6e
am: 4dd17998ed

Change-Id: I9e1cd04d0e324e58dfced430e10cb50a5ce24f21
2017-05-08 15:34:42 +00:00
Bowgo Tsai 4dd17998ed Merge "fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work"
am: 6019991c6e

Change-Id: Id35e60c6f00414d4e71cdc8e670d73c5daa74fbf
2017-05-08 15:31:42 +00:00
Treehugger Robot 6019991c6e Merge "fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work" 2017-05-08 15:28:13 +00:00
Bowgo Tsai 77cbfd6341 fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work
Should set verity mode to VERITY_MODE_DEFAULT when
androidboot.veritymode=enforcing.

Bug: 38103331
Test: `adb shell getprop partition.system.verified` returns 2 when veritymode=enforcing
Test: `adb shell getprop partition.vendor.verified` returns 2 when veritymode=enforcing
Change-Id: I2f34eb6509f91989ce726e540cf2c0d353347ede
2017-05-08 17:22:52 +08:00
Dan Willemsen c27f7911b1 Merge "Assume bionic has up-to-date linux/capability.h" am: 1445c4b932
am: c09d16234f

Change-Id: I5cb6df212014e3c9c07ca80c44c9d084649b66bd
2017-05-07 21:17:35 +00:00
Dan Willemsen c09d16234f Merge "Assume bionic has up-to-date linux/capability.h"
am: 1445c4b932

Change-Id: I01c990451aea493b92689478d6748465f8bd0ac8
2017-05-07 21:15:06 +00:00
Treehugger Robot 1445c4b932 Merge "Assume bionic has up-to-date linux/capability.h" 2017-05-07 21:08:56 +00:00
Dan Willemsen a4103a85b6 Turn off debuggerd for host bionic
Bug: 31559095
Test: Attempt to build host bionic
Change-Id: Ie0b30417bdc2c59fd4793a79fd23dc9ccd398937
2017-05-07 13:22:01 -07:00
Dan Willemsen f3452d8178 Remove old simulator support from liblog
As far as I know, this isn't used anymore, and is causing problems when
building with bionic on the host (with the cast of open).

Bug: 31559095
Test: host bionic compiles
Change-Id: I8b6e802e2d6dcc6e8476e387a5a365903aec3be1
2017-05-07 13:21:35 -07:00
Dan Willemsen 0de03b53fc Assume bionic has up-to-date linux/capability.h
The fallback android_filesystem_capability.h doesn't play nicely with
other kernel headers, since it #undef's __user. If we're building with
bionic (either for device or host), we use the same kernel headers, so
just use those.

Bug: 38056396
Test: build with Host_bionic:true
Change-Id: Idc61b6d96d86891164abe71604924638d67aefe2
2017-05-07 12:06:55 -07:00
Christopher Ferris 1bd88bab0d Merge "Small test fixes." am: 9a4f572a95
am: a61c3db243

Change-Id: I2aeac302d3736ab6c8c7b772b1bf6f07743cd85f
2017-05-06 06:36:50 +00:00
Christopher Ferris a61c3db243 Merge "Small test fixes."
am: 9a4f572a95

Change-Id: I53c3ab731be17e603e455890e6ae5fb15d033c79
2017-05-06 06:34:21 +00:00
Christopher Ferris 9a4f572a95 Merge "Small test fixes." 2017-05-06 06:30:41 +00:00
Elliott Hughes a2ce98d026 Merge "Give slightly less useless versions to adb and fastboot." am: ddfd5056a2
am: 77ca73f8a7

Change-Id: I0529c9d864ee74464d3a46d6184bbdc347a608ee
2017-05-06 05:32:16 +00:00
Elliott Hughes 77ca73f8a7 Merge "Give slightly less useless versions to adb and fastboot."
am: ddfd5056a2

Change-Id: Ia41e72ae4c21b060b9a104a10f4628d24195d915
2017-05-06 05:29:47 +00:00
Elliott Hughes ddfd5056a2 Merge "Give slightly less useless versions to adb and fastboot." 2017-05-06 05:24:49 +00:00
Yi Kong 475a448cf8 Merge "Remove unused lambda captures" am: 5b8a92af5d
am: 26f71e6a5a

Change-Id: I0efa39264550dd7b8b741e788729fefc3de427fb
2017-05-06 01:21:00 +00:00
Yi Kong 26f71e6a5a Merge "Remove unused lambda captures"
am: 5b8a92af5d

Change-Id: I3630eb3c17ac328c63a8675eb83893edcd196fb8
2017-05-06 01:18:31 +00:00
Elliott Hughes 666b616592 Merge "Fix macOS build." am: 71feb7b321
am: dcbd2a1501

Change-Id: I544e40b7c09f1c0bfc4bebf986bcd7ea34330163
2017-05-06 01:14:06 +00:00
Treehugger Robot 5b8a92af5d Merge "Remove unused lambda captures" 2017-05-06 01:12:57 +00:00
Elliott Hughes dcbd2a1501 Merge "Fix macOS build."
am: 71feb7b321

Change-Id: I2d5929947753795593088f3e18f20dc6c071e1a0
2017-05-06 01:11:58 +00:00
Treehugger Robot 71feb7b321 Merge "Fix macOS build." 2017-05-06 01:07:46 +00:00
Christopher Ferris 47e02f429d Small test fixes.
Bug: 31919199

Test: Ran the unit tests.
Change-Id: I62bdb007f9cfa57e3faaa05993fd6e23ce32b82f
2017-05-05 17:09:49 -07:00
Elliott Hughes 2708a953d2 Give slightly less useless versions to adb and fastboot.
This will let us see (a) whether the user has a legit build or something they
built themselves and (b) what Android release it corresponds to.

This isn't as useful as showing what Platform Tools release we correspond to,
but I'm planning on doing that as a separate line.

Bug: N/A
Test: adb --version ; fastboot --version
Change-Id: Idca489295e3c6f8571146f95822c08808e36b382
2017-05-05 16:29:19 -07:00
Elliott Hughes 4acb36020b Fix macOS build.
system/core/adb/client/usb_libusb.cpp:162:20: error: unused function 'get_device_serial_path' [-Werror,-Wunused-function]
  static std::string get_device_serial_path(libusb_device* device) {
                     ^

Bug: N/A
Test: no choice but to submit and see...
Change-Id: I0026d3273891588c27df5ccd71c41ad9907b038d
2017-05-05 16:26:30 -07:00
Josh Gao 2e7b8e2d1a debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id.
bionic's cached values for getpid/gettid can be invalid if the crashing
process manually invoked clone to create a thread or process, which
will lead the crash_dump refusing to do anything, because it sees the
actual values.

Use the getpid/gettid syscalls directly to ensure correct values on
this end.

Bug: http://b/37769298
Test: debuggerd_test
Change-Id: I0b1e652beb1a66e564a48b88ed7fa971d61c6ff9
2017-05-05 14:58:12 -07:00
Greg Hackmann 6aa8a19427 Merge changes If7b13672,I96135a8c am: 484acce026
am: 4f152a5f50

Change-Id: I19040cce88d99b55ce2b580caa0086d740aa6a9c
2017-05-05 21:49:45 +00:00
Greg Hackmann 4f152a5f50 Merge changes If7b13672,I96135a8c
am: 484acce026

Change-Id: Ibca5e28523666185c2760dd3918fea674ac44a13
2017-05-05 21:47:53 +00:00
Treehugger Robot 484acce026 Merge changes If7b13672,I96135a8c
* changes:
  AshmemTest: expand ProtTest cases
  AshmemTest: test lseek() and read() on ashmem fds
2017-05-05 21:43:38 +00:00
Elliott Hughes 1ad393daba Merge "Improve udev failure diagnostics." am: 5ad9ba12df
am: 94202c2b9d

Change-Id: I23e5d2622f485f5248cd4d1426b8327b637be7a0
2017-05-05 21:39:14 +00:00
Elliott Hughes 94202c2b9d Merge "Improve udev failure diagnostics."
am: 5ad9ba12df

Change-Id: I6ef9050b822c63ab79fd93bfb86ef96837727904
2017-05-05 21:37:14 +00:00
Tom Cherry 2cbbe9f7a3 init: do not log directly from read_file() and write_file()
Their callers may be able to add more context, so use an error string
to record the error.

Bug: 38038887
Test: boot bullhead
Test: Init unit tests
Change-Id: I46690d1c66e00a4b15cadc6fd0d6b50e990388c3
2017-05-05 14:37:12 -07:00
Tom Cherry 517e1f17cf init: Check DecodeUid() result and use error string
Check the result of DecodeUid() and return failure when uids/gids are
unable to be decoded.

Also, use an error string instead of logging directly such that more
context can be added when decoding fails.

Bug: 38038887
Test: Boot bullhead
Test: Init unit tests
Change-Id: I84c11aa5a8041bf5d2f754ee9af748344b789b37
2017-05-05 14:37:01 -07:00