Commit Graph

36959 Commits

Author SHA1 Message Date
Elliott Hughes d59c04eb8b Merge "Set $HOSTNAME in adbd." am: 2364d7ccc5 am: 510552149c
am: 3ef8d2abca

Change-Id: Ib5fa7548a2ef15d3d78fdcabb2b66ce3e3a947f1
2017-10-03 22:46:17 +00:00
Elliott Hughes 3ef8d2abca Merge "Set $HOSTNAME in adbd." am: 2364d7ccc5
am: 510552149c

Change-Id: I9aaae73846ed0388b24769589a14d9d824372ca9
2017-10-03 22:38:59 +00:00
Elliott Hughes 510552149c Merge "Set $HOSTNAME in adbd."
am: 2364d7ccc5

Change-Id: I40ef480380f250540d6c2856721540400c599111
2017-10-03 22:32:13 +00:00
Elliott Hughes 2364d7ccc5 Merge "Set $HOSTNAME in adbd." 2017-10-03 21:57:49 +00:00
Jayant Chowdhary a7470fb32b Merge "Hide implementation details of log_time struct" am: 541428a13b am: 1511cbb439
am: 768125dee3

Change-Id: I34dab415f2e7d4ea7c5346ddee937904cb413b97
2017-10-03 20:10:32 +00:00
Jayant Chowdhary 768125dee3 Merge "Hide implementation details of log_time struct" am: 541428a13b
am: 1511cbb439

Change-Id: If24b9d5be5fdea0fdca7d8c0da25876aedd4fa11
2017-10-03 20:07:18 +00:00
Jayant Chowdhary 1511cbb439 Merge "Hide implementation details of log_time struct"
am: 541428a13b

Change-Id: I170a1f983e7752bb318973a30d761376ecff7f05
2017-10-03 20:05:15 +00:00
Jayant Chowdhary 541428a13b Merge "Hide implementation details of log_time struct" 2017-10-03 20:01:13 +00:00
Mark Salyzyn f174c1880d Merge "CtsLogdTestCases#sepolicy_rate_limiter failure" into oc-mr1-dev
am: 42e9fabace

Change-Id: I0ead6c02109b39959da25442bb445cbd6e368ed5
2017-10-03 19:52:25 +00:00
TreeHugger Robot 42e9fabace Merge "CtsLogdTestCases#sepolicy_rate_limiter failure" into oc-mr1-dev 2017-10-03 19:38:37 +00:00
Jiyong Park 0d047642eb Hide implementation details of log_time struct
In the future, the sizes of tv_sec and tv_nsec (or even the size of
log_time struct itself) can change due to the 32-bit overflow expected
to happen in the year 2138. In order to hide such implementation details
to the clients of liblog, the two macros LOG_TIME_SEC and LOG_TIME_NSEC
are introduced.

Furthermore, vendors are provided with a simplified version of log_time.h
without C++ APIs. In doing so, log_time.h no longer includes time.h.
This breaks several modules that implicitly relied on the hidden
dependency, which should be fixed.

Bug: 37629934
Test: build with BOARD_VNDK_VERSION=current

Merged-In: If213fc291395554fd8de5f5d1fb005ceaaa5ca57
Change-Id: I01b36078c1d8f3f44824be20ae769ba1465b6feb
(cherry picked from commit 98c0d030c9)
2017-10-03 17:45:17 +00:00
Elliott Hughes ba4d9fd933 Set $HOSTNAME in adbd.
bash sets this itself, but mksh doesn't.

This also makes interactive and non-interactive adb shells more similar,
because when we set this in mkshrc that wouldn't affect non-interactive
shells. (I'm not sure whether this is an improvement or not.)

This is certainly _cheaper_ than doing this in mkshrc by calling out to
getprop though.

Bug: N/A
Test: `adb shell printenv` and `adb shell`, `printenv`
Change-Id: I3ff724f19a5098313df83836253f1f7e7872d6a4
2017-10-03 08:44:27 -07:00
Dan Willemsen 55f9ae5223 Merge changes from topic "linux_glibc" am: 7b3d4da91a am: 348a082469
am: 60a410d606

Change-Id: I58b1b45ae68d908522afb61b272dba01e82f1009
2017-10-03 03:35:49 +00:00
Dan Willemsen cbeae7f80d Move host flags from linux -> host am: cd58088ccf am: 0a3b1d31ab
am: 22409b1ac6

Change-Id: I8048b288f3fe590fe6fded9cbd3112246ec180ef
2017-10-03 03:35:27 +00:00
Dan Willemsen 60a410d606 Merge changes from topic "linux_glibc" am: 7b3d4da91a
am: 348a082469

Change-Id: Ia203b8b7bf807385b90232fedf91cef80f040279
2017-10-03 03:19:45 +00:00
Dan Willemsen 22409b1ac6 Move host flags from linux -> host am: cd58088ccf
am: 0a3b1d31ab

Change-Id: I57477ab4fc1e240b719f20fe4cf38223a84e7e07
2017-10-03 03:19:27 +00:00
Dan Willemsen 348a082469 Merge changes from topic "linux_glibc"
am: 7b3d4da91a

Change-Id: I1cb69992882db5a265234ac808d408f1f136f0e5
2017-10-03 03:03:52 +00:00
Dan Willemsen 0a3b1d31ab Move host flags from linux -> host
am: cd58088ccf

Change-Id: If60258b3bf78cd9ed1c9b9dcbfb2d7bfa650d10d
2017-10-03 02:58:52 +00:00
Josh Gao 064205a6a0 adb: remove SendConnectOnHost.
am: 85366c15d4

Change-Id: I7dcb1d2a1dea39a008b49985173712ff95bef4ef
2017-10-03 02:41:21 +00:00
Josh Gao 7af56f12e7 adb: partially revert b5e11415.
am: 59dc0ecaaa  -s ours

Change-Id: Iaaaad72b7b683c30139682a4e96e17d2f73dfe2b
2017-10-03 02:41:09 +00:00
Josh Gao 070aa4edd0 adb: reformat comments.
am: e3585684d9

Change-Id: Iddfc24a3311d046c5f14217584e25bcb3c0247a1
2017-10-03 02:41:00 +00:00
Huihong Luo 0a04405b6d Fix bug #37284906, adb shell crashes on windows with invalid options. For example, "adb.exe shell -list" crashes without this fix. Test: adb.exe shell -list-packages
am: f0a4fb6ea5

Change-Id: I34d4ee5b73e65cbdd79936747eb6ed144433b8f7
2017-10-03 02:40:49 +00:00
Felipe Leme 693bcbac6c Don't preserve file attributes when pulling bugreport file...
am: ec92e5f194

Change-Id: Ife3640f15745b212db663b43080f1fd4c12ee98c
2017-10-03 02:40:40 +00:00
Elliott Hughes e7e441157e Fix reference to out of scope local in adb_thread_setname.
am: 0617eb7d83

Change-Id: I67053afe3fe9203641ce856dae3449367e422841
2017-10-03 02:40:24 +00:00
Dan Willemsen 7b3d4da91a Merge changes from topic "linux_glibc"
* changes:
  Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]
  Move host flags from linux -> host
2017-10-03 02:30:06 +00:00
Tom Cherry 5d809223dc Merge "init: fix subcontext SELinux strings" am: 60bd9ca592 am: 71b2c17ba7
am: 24bb332ea8

Change-Id: I994d102e583667bb1669beaf40cfd81a34baecbc
2017-10-03 02:10:31 +00:00
Tom Cherry 24bb332ea8 Merge "init: fix subcontext SELinux strings" am: 60bd9ca592
am: 71b2c17ba7

Change-Id: Ie045bb09b723523fc7f66614268687edc4a85156
2017-10-03 02:08:17 +00:00
Tom Cherry 71b2c17ba7 Merge "init: fix subcontext SELinux strings"
am: 60bd9ca592

Change-Id: I084da99db1fdc90aa0db276dd5bc755179b83713
2017-10-03 02:05:50 +00:00
Treehugger Robot 60bd9ca592 Merge "init: fix subcontext SELinux strings" 2017-10-03 01:57:38 +00:00
Tom Cherry ac7428b2f5 init: fix subcontext SELinux strings
'object_r' is supposed to be simply 'r'.

Test: boot sailfish with SELinux fully enabled and subcontexts enabled
Change-Id: I7eb8b2dd18e66f23c09863e8961da339f72d25c5
2017-10-02 16:59:02 -07:00
Josh Gao 3f9db04479 Merge "adb: remove SendConnectOnHost." am: 5eaa5bc081 am: 86a919041f
am: c2bf22f58e

Change-Id: Iff7993e9fc1ee932497f190e04a71d05784397eb
2017-10-02 23:37:08 +00:00
Josh Gao c2bf22f58e Merge "adb: remove SendConnectOnHost." am: 5eaa5bc081
am: 86a919041f

Change-Id: Iabd1a7ab7ac3e70ad7735efc83c669a98f4cdbe9
2017-10-02 23:34:08 +00:00
Josh Gao 86a919041f Merge "adb: remove SendConnectOnHost."
am: 5eaa5bc081

Change-Id: I899558eb51cda69d9c53288db86cada87a4a0e85
2017-10-02 23:32:49 +00:00
Treehugger Robot 5eaa5bc081 Merge "adb: remove SendConnectOnHost." 2017-10-02 23:27:23 +00:00
Josh Gao 85366c15d4 adb: remove SendConnectOnHost.
This logic appears to be racy, and it shouldn't actually be needed, if
our devices follow the USB spec. Use libusb_set_interface_alt_setting
on device initialization as well, to add one more thing that should
reset the data toggles.

Bug: 67320882
Bug: http://b/32952319
Test: python test_device.py
Change-Id: I392198af3d72c524b893e5056afa2b4617cea49c
(cherry picked from commit 4b5d4da6f6)
2017-10-02 16:14:30 -07:00
Josh Gao 59dc0ecaaa adb: partially revert b5e11415.
Revert the write_msg_lock part of commit b5e11415. A write which hangs
will hold onto the mutex, preventing the device kick from ever
happening, which also causes lots of other stuff to hang, due to Kick
being called with the transport lock taken.

Bug: 67320882
Test: python test_devices.py
Change-Id: Ie7c958799c93cad287c32d6bbef30c07f40c2d51
(cherry picked from commit 33d14b8748)
2017-10-02 16:14:28 -07:00
Josh Gao e3585684d9 adb: reformat comments.
Bug: 67320882
Test: none
Change-Id: Ib484f701f66cdb57f303dbd6d5eb2e5a15abdc0e
(cherry picked from commit 55c8b34f14)
2017-10-02 16:14:25 -07:00
Huihong Luo f0a4fb6ea5 Fix bug #37284906, adb shell crashes on windows with invalid options.
For example, "adb.exe shell -list" crashes without this fix.
Test: adb.exe shell -list-packages

Bug: 67320882
Change-Id: I96be44128ff3ecab7804b70074cbde630b3fc3d1
(cherry picked from commit af39885c9f)
2017-10-02 16:14:23 -07:00
Felipe Leme ec92e5f194 Don't preserve file attributes when pulling bugreport file...
...otherwise it could have weird dates when the device clock is wrong.

Bug: 67320882
Test: m -j32 adb && ./out/host/linux-x86/bin/adb bugreport test.zip && ls -l test.zip
Test: m -j32 adb_test && ./out/host/linux-x86/nativetest64/adb_test/adb_test

Fixes: 63927360

Change-Id: I3f87277f1acb97212a87b89639e42b6d7d300faa
(cherry picked from commit 4bfddbd20e)
2017-10-02 16:14:20 -07:00
Elliott Hughes 0617eb7d83 Fix reference to out of scope local in adb_thread_setname.
Bug: 67320882
Bug: https://android-review.googlesource.com/#/c/168725/5/adb/sysdeps.h@639
Test: boots, adbd thread names look sane
Signed-off-by: Ivan Maidanski <i.maidanski@samsung.com>
Change-Id: Ib3bdf53658f3903de8f0a5688f7d77745e677c77
(cherry picked from commit 7462f1858c)
2017-10-02 16:14:10 -07:00
George Burgess IV 402c9dc99f Merge "Silence a use-after-free warning from the analyzer" am: 8c853c43cc am: 584853bdb0
am: 84b998f437

Change-Id: I3136eda15e1fb1464d398a259b0482a1bdba42d0
2017-10-02 22:44:15 +00:00
George Burgess IV 84b998f437 Merge "Silence a use-after-free warning from the analyzer" am: 8c853c43cc
am: 584853bdb0

Change-Id: I355b80ad7e59daeba569e6f9bb8eea853121acf9
2017-10-02 22:42:19 +00:00
George Burgess IV 584853bdb0 Merge "Silence a use-after-free warning from the analyzer"
am: 8c853c43cc

Change-Id: I053089d33c2e46da12c6e8d72252fd73bea0debf
2017-10-02 22:40:42 +00:00
Treehugger Robot 8c853c43cc Merge "Silence a use-after-free warning from the analyzer" 2017-10-02 22:32:33 +00:00
Josh Gao 4b5d4da6f6 adb: remove SendConnectOnHost.
This logic appears to be racy, and it shouldn't actually be needed, if
our devices follow the USB spec. Use libusb_set_interface_alt_setting
on device initialization as well, to add one more thing that should
reset the data toggles.

Bug: http://b/32952319
Test: python test_device.py
Change-Id: I392198af3d72c524b893e5056afa2b4617cea49c
2017-10-02 14:38:03 -07:00
Andreas Gampe a0e683c6a7 Merge "Keymaster: Move test to std::unique_ptr" am: 81348ffa9e am: 346d7e1405
am: 0fdb8616b8

Change-Id: Ie48dcc9b3c874697b726d6ab0a333905c455adb8
2017-10-02 21:37:31 +00:00
Andreas Gampe 0fdb8616b8 Merge "Keymaster: Move test to std::unique_ptr" am: 81348ffa9e
am: 346d7e1405

Change-Id: I14b39fd0f52501035c1d703bc006273c85736cb0
2017-10-02 21:30:29 +00:00
Andreas Gampe 346d7e1405 Merge "Keymaster: Move test to std::unique_ptr"
am: 81348ffa9e

Change-Id: I74b22a692e23589002eca812b88dc458bc67fad4
2017-10-02 21:22:16 +00:00
Treehugger Robot 81348ffa9e Merge "Keymaster: Move test to std::unique_ptr" 2017-10-02 21:09:17 +00:00
Mark Salyzyn edb33628db Merge "CtsLogdTestCases#sepolicy_rate_limiter failure" am: 99691dfc74 am: 806f050f6d
am: 9e3f4b057f

Change-Id: I7f8138337e77202a216c419b0ad7838bfc72e0c6
2017-10-02 20:58:13 +00:00