Commit graph

42328 commits

Author SHA1 Message Date
David Anderson
c3ade7f48a fastboot: Use _WIN32 instead of WIN32.
Bug: N/A
Test: fastboot.exe builds
Change-Id: I316611f581c80ec813b953a7e6074293399ab7d7
2018-08-23 10:42:59 -07:00
Tri Vo
1738693f00 Merge "Remove libsuspend from VNDK." 2018-08-15 21:05:31 +00:00
Tao Bao
308129d274 Merge "adb: Drop the unneeded dependency on libfec_rs.so." 2018-08-15 18:14:16 +00:00
Tao Bao
d262346b57 Merge "fs_mgr: Drop some unneeded dependencies." 2018-08-15 18:14:16 +00:00
Treehugger Robot
1e6a318b7a Merge "fastbootd: Complete the implementation of getvar has-slot." 2018-08-15 15:09:15 +00:00
David Anderson
79ab0e3e98 fastbootd: Complete the implementation of getvar has-slot.
Bug: 78793464
Test: fastboot getvar has-slot:super returns "no"
Change-Id: I80f171df062c008718b810bbe12070834d4aa3fb
2018-08-14 16:24:07 -07:00
Treehugger Robot
c48943165d Merge "lmkd: Do not downgrade/ignore events when swap is full" 2018-08-14 21:31:56 +00:00
Tom Cherry
cecf5480fe Merge "Include some warnings about vendor_available for fsmgr." 2018-08-14 21:26:26 +00:00
Treehugger Robot
3231be66ce Merge "Add sideload, fastboot as reboot targets in init" 2018-08-14 21:25:50 +00:00
Tri Vo
f8398ee24c Remove libsuspend from VNDK.
Only platform should ever have access to libsuspend

Test: presubmit
Change-Id: I5d58aeb98d5e777d81d4d65f7a62fe2fb50a72d4
2018-08-14 13:39:55 -07:00
Roberto Pereira
a5d5c9debc Merge changes I31b6a66a,I682e5c98
* changes:
  Switch from old style KM2 HAL to new KM3 HAL
  Add Keymaster 3.0 binderized Trusty HAL
2018-08-14 20:27:40 +00:00
Tom Cherry
066fcdf820 Include some warnings about vendor_available for fsmgr.
The interface to fsmgr is subpar and while we haven't had time to
revisit it, we absolutely do not want to expose this to vendors in a
way that would force us to keep this interface in the future.

Test: n/a
Change-Id: I970048aa2e45d7f7eca357d052141e90d6e01123
2018-08-14 13:11:14 -07:00
Treehugger Robot
90668749e9 Merge "adb: make disconnect stop reconnection immediately." 2018-08-14 19:51:50 +00:00
Treehugger Robot
16c870270f Merge "fs_mgr: correct error handling" 2018-08-14 19:40:54 +00:00
Treehugger Robot
3f04e9e350 Merge "fs_mgr: use ro.persistent_properties.ready" 2018-08-14 19:36:51 +00:00
Roberto Pereira
b5dfc75a32 Switch from old style KM2 HAL to new KM3 HAL
Bug:110153632
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I31b6a66a44eb1a6bf89c6eb6a3c632ace83071a9
2018-08-14 10:49:38 -07:00
Roberto Pereira
2426197400 Add Keymaster 3.0 binderized Trusty HAL
Based on AndroidKeymaster3Device

Test: VtsHalKeymasterV3_0TargetTest
Bug:110153632
Change-Id: I682e5c9823ed3d8d8c0cfde0713ee64f96eab78a
2018-08-14 10:49:38 -07:00
Mark Salyzyn
7186787342 fs_mgr: correct error handling
Fix a few areas that mismanage error return values, and can result in
confusing messaging from the adb commands.

Test: manual
Bug: 109821005
Change-Id: Ib00069c9605df453ac8f600c7906649deebfd626
2018-08-14 07:56:03 -07:00
Mark Salyzyn
5f6b06973b fs_mgr: use ro.persistent_properties.ready
Replace more complicated logic that determines that persistent
properties are now valid with a simple check of
ro.persistent_properties.ready.

Test: manual
Bug: 109821005
Change-Id: I3e43df8283cb97abbf5c0333e64db4ad11703798
2018-08-14 07:55:55 -07:00
Treehugger Robot
890c5382d1 Merge "llkd: llkSplit should prevent empty entries" 2018-08-14 14:34:17 +00:00
Tao Bao
0caf3c1617 adb: Drop the unneeded dependency on libfec_rs.so.
It was only needed when we statically linked libfec into libadbd in
past.

Test: `mmma -j system/core/adb`
Test: `m -j installclean && m -j bootimage` with aosp_taimen-userdebug.
      Check the installed files in recovery image.
Change-Id: I8627d5f98568ab1d71e6a47cb1b2540a33bffdab
2018-08-14 06:05:04 +00:00
Tao Bao
7aa4608053 fs_mgr: Drop some unneeded dependencies.
libfs_mgr doesn't have direct dependencies on libfec_rs / libkeyutils /
libsquashfs_utils. They were only needed when libfec and libext4_utils
were statically linked into libfs_mgr.

Bug: 112494634
Test: `m -j installclean && m -j bootimage` with aosp_taimen-userdebug.
      Check the installed files in recovery image.
Test: `mmma -j system/core/fs_mgr`
Change-Id: I4b12c2df344fabba4942b6db943cf43a031b591d
2018-08-13 23:03:03 -07:00
Jae Shin
75cff06f5a Merge changes from topic "linker-config"
* changes:
  Parse the list of supported vndk snapshot versions
  Add '.bak' for sed -i that is required by BSD sed
  Build ld.config.txt for older VNDK versions
2018-08-14 01:48:09 +00:00
Josh Gao
902dace132 adb: make disconnect stop reconnection immediately.
Make `adb disconnect` remove transports immediately, instead of on
their next reconnection cycle.

Test: adb connect unreachable:12345; adb devices; adb disconnect; adb devices
Change-Id: I35c8b57344e847575596d09216fc636be47dde64
2018-08-13 16:33:54 -07:00
Treehugger Robot
ba028636ba Merge "Replace (unsigned) short with (u)int16_t." 2018-08-13 22:39:51 +00:00
Treehugger Robot
088d18e619 Merge "Allow C++17 in fastboot." 2018-08-13 21:35:25 +00:00
Chih-Hung Hsieh
08d470bf08 Replace (unsigned) short with (u)int16_t.
Bug: 112478838
Test: build with WITH_TIDY=1
Change-Id: I4b81e6287e72bce2d3cb67cacd6220d064818852
2018-08-13 14:24:33 -07:00
David Anderson
3195e6edc3 Allow C++17 in fastboot.
Bug: N/A
Test: fastboot builds
Change-Id: Ife120dbe4f45e8aa83225978ea9d5e88bbb58b9e
2018-08-13 13:18:02 -07:00
Chris Fries
3b984c7efe Merge "Increase fastboot timeout to 30 seconds" 2018-08-13 14:58:34 +00:00
Mark Salyzyn
acecaf7216 llkd: llkSplit should prevent empty entries
Add "false" as an option fed into llkSplit to be equivalent to empty,
as a truly empty list is replaced with the internal defaults.  Ensure
that no empty entries are added to the returned list.  Add some
additional provisos to README.md, as well as the explanation of what
"false" means for the associated properties.

Test: llkd_unit_test
Bug: 33808187
Bug: 111910505
Bug: 80502612
Change-Id: Iac0457ea1f6cd559b0875f9871dbae839001276d
2018-08-13 14:43:30 +00:00
Jae Shin
f6c6aaaf13 Parse the list of supported vndk snapshot versions
This allows the target, ld.config.$VER.txt, to be defined for all
$VERs for which a VNDK snapshot exists under /prebuilts/vndk/v$VER.
With this fix,
1) supported_vndk_snaphsot_versions do not need to
be manually updated everytime a new VNDK snapshot is added and,
2) ld.config.$VER.txt will not be ill-defined in a tree that does
not have the required dependency files under /prebuilts/vndk/v$VER.

Test: m -j ld.config.28.txt
Bug: 74658756
Merged-In: Idb056c21412d4cb7c7a7cb3c247b1d82a4a759ff
Change-Id: Idb056c21412d4cb7c7a7cb3c247b1d82a4a759ff
(cherry picked from commit baeaaf9429)
2018-08-13 02:19:42 +00:00
Justin Yun
61f474f457 Add '.bak' for sed -i that is required by BSD sed
BSD version of sed requires a parameter for '-i' option.
Add '.bak' for back up and remove the back up file at the end of the
sed command

Bug: 112478836
Test: checkbuild on a mac machine
Merged-In: Iedc93c2b5239004d2bbb8011488041c54b29996b
Change-Id: Iedc93c2b5239004d2bbb8011488041c54b29996b
(cherry picked from commit 6009d874aa)
2018-08-13 10:39:56 +09:00
Jae Shin
f6dff6dd33 Build ld.config.txt for older VNDK versions
Until now, the ld.config.$VER.txt for $VER older than
PLATFORM_VNDK_VERSION was installed from a prebuilt stored under
/prebuilts/vndk/v$VER. At runtime, the VNDK version needed by the
vendor partition (ro.vndk.version) determines which
ld.config.$VER.txt is loaded and this configuration is used for
both system and vendor processes. In a system-only-upgrade
scenario, where the system partition is a newer Android version
than the vendor partition, this is a problem because the prebuilt
linker config file will not reflect the most recent
system partition related changes made in the newer Android
version.

To fix this problem, this change builds ld.config.$VER.txt for
older VNDK versions from the source tree by getting the lists of
VNDK libraries from the /prebuilts/vndk/v{VER} directory.

Test: m -j ld.config.txt ld.config.28.txt ld.config.vndk_lite.txt
Bug: 74658756
Merged-In: I1fa2469fc0bce2f2aab507104cd9717b6112d738
Change-Id: I1fa2469fc0bce2f2aab507104cd9717b6112d738
(cherry picked from commit c30e0709bb)
2018-08-13 10:37:27 +09:00
Treehugger Robot
2a5881186d Merge "base: remove execute bit from utf8.h" 2018-08-12 04:15:38 +00:00
Spencer Low
991eedd102 base: remove execute bit from utf8.h
I originally accidentally created this file with the execute bit on.

Test: mma

Change-Id: I8075ffdbb114475434ad48912a9dd24f19a9025b
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2018-08-11 12:28:39 -07:00
Treehugger Robot
389e950c37 Merge changes I784c1dcc,Ic6a06cdc,I874b10c2
* changes:
  adb: switch reconnect_queue to std::set.
  adb: add environment variables to disable usb, emulators, mdns.
  adb: minor cleanup.
2018-08-11 02:26:23 +00:00
Suren Baghdasaryan
7bb1ae2d88 Merge "lmkd: Add meminfo logging after each kill for easy troubleshooting" 2018-08-11 00:12:02 +00:00
Josh Gao
8a40c8a109 adb: switch reconnect_queue to std::set.
We can't remove from the middle of a priority_queue, which a followup
commit wants to do, so switch to std::set, with the side benefit of
making operator< point the right direction.

Test: mma
Test: ./test_adb.py
Change-Id: I784c1dcc91f0a9cf760e9fa1710202e37e85432b
2018-08-10 15:58:11 -07:00
Aaron Wisner
50acca7226 Increase fastboot timeout to 30 seconds
Some OEM commands can take quite a while.
The current 10 second timeout is too small.

Test: fastboot tool
Change-Id: Icf59615919c92dc85807abe3ec5793504cf7a162
2018-08-10 17:44:28 -05:00
Josh Gao
043fbec646 adb: add environment variables to disable usb, emulators, mdns.
Provide a way to selectively disable USB, automatic emulator
connection, and mDNS, to make reading through ADB_TRACE logging easier.

Test: manual
Change-Id: Ic6a06cdce14235415520cbf2d51c7f7031b7a7b3
2018-08-10 14:27:51 -07:00
Josh Gao
e032387480 adb: minor cleanup.
Test: mma
Change-Id: I874b10c2821ffe702fecd7e854bca2fbf4d701c3
2018-08-10 14:24:19 -07:00
Suren Baghdasaryan
282ad1a8f9 lmkd: Add meminfo logging after each kill for easy troubleshooting
While troubleshooting memory pressure related issues it's hard to get a
good view of the memory state when lmkd kill happens. Logging relevant
information from /proc/meminfo file that was used to make a kill decision
is very helpful for further analysis. To do this efficiently we are using
Android Logger event library functions and log the data used for kill
decision after the kill signal was issued.

Test: Run lmkd_unit_test and logcat -b events -v descriptive
Change-Id: Id5de41b9d91a04dd5d3eb9b85d4e1babe9755628
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-08-10 14:21:31 -07:00
Treehugger Robot
67bf7dff4a Merge changes I78f273db,I2fdaa9d3,Ib6e1df87
* changes:
  Move IPC functionality from trusty_keymaster_device to trusty_keymaster_ipc
  Update the Trusty Keymaster directory structure
  Run clang-format on all trusty/keymaster .cpp and .h files
2018-08-10 19:49:33 +00:00
Treehugger Robot
5f42ee186d Merge "fs_mgr: Small fix in overlayfs setup/teardown" 2018-08-10 15:53:36 +00:00
Treehugger Robot
0e7dc30874 Merge "llkd: switch to std::literals" 2018-08-10 15:09:59 +00:00
Greg Kaiser
b4bf8c66a3 fs_mgr: Small fix in overlayfs setup/teardown
In user builds, we fix fs_mgr_overlayfs_{setup,teardown} to
properly set the optional 'change' boolean, if it was provided.

Test: TreeHugger
Change-Id: I91fc99d801f8fd782b21f0ecaecddfc7744f0c3e
2018-08-10 05:24:25 -07:00
Treehugger Robot
6d5b931466 Merge "fastbootd: Add is-userspace variable." 2018-08-09 23:17:16 +00:00
Treehugger Robot
770395dee1 Merge "fastbootd: Add commands for logical partitions." 2018-08-09 23:16:27 +00:00
Josh Gao
18eae78c09 Merge changes If7c8d38f,I7117dd19,Iaa5006e3,I3a568361,I37df06e4, ...
* changes:
  adb: report connection status when we're unauthorized.
  adb: disable test_device.FileOperationsTest.test_pull_symlink_dir.
  adb: fix test_device.FileOperationsTest.test_push_empty
  adb: switch test_adb.py over to double quotes.
  adb: make test_adb.py work on windows.
  adb: switch test_adb.py to python3.
2018-08-09 22:12:46 +00:00
David Anderson
d9ba061e77 fastbootd: Add is-userspace variable.
Bug: 78793464
Test: fastboot getvar is-userspace
          returns true for fastbootd
      fastboot getvar is-userspace
          returns false or error for bootloader fastboot.

Change-Id: I80e1ef6dcf3922e4f555cb2e409e3e098c16fbbc
2018-08-09 15:06:53 -07:00