OSDN Git Service

android-x86/system-bt.git
3 years agoL2cap shim namespace clean up am: 530fdc6980 am: f4405bbf91
Hansong Zhang [Mon, 23 Nov 2020 22:20:45 +0000 (22:20 +0000)]
L2cap shim namespace clean up am: 530fdc6980 am: f4405bbf91

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506627

Change-Id: I7d050010a7aa023f34758776a3de87d86f79297b

3 years agoGD L2cap shim workaround am: d5f930abe8 am: d7ced6c94b
Hansong Zhang [Mon, 23 Nov 2020 22:20:26 +0000 (22:20 +0000)]
GD L2cap shim workaround am: d5f930abe8 am: d7ced6c94b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502166

Change-Id: I10d70cc484ba8f13f026c0f073bdde0d707e8300

3 years agorusty-gd: properly read ACL data from the HAL am: 55fc3947e9 am: f1d120267f
Zach Johnson [Mon, 23 Nov 2020 22:20:05 +0000 (22:20 +0000)]
rusty-gd: properly read ACL data from the HAL am: 55fc3947e9 am: f1d120267f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1499267

Change-Id: I5fa07247c5caf68e25e72db3d7f3157a56717b5d

3 years agoL2cap shim namespace clean up am: 530fdc6980
Hansong Zhang [Mon, 23 Nov 2020 22:01:09 +0000 (22:01 +0000)]
L2cap shim namespace clean up am: 530fdc6980

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506627

Change-Id: I7decc2dc32ebbc39db16467874a3d35570574de0

3 years agoGD L2cap shim workaround am: d5f930abe8
Hansong Zhang [Mon, 23 Nov 2020 21:58:29 +0000 (21:58 +0000)]
GD L2cap shim workaround am: d5f930abe8

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502166

Change-Id: I76862f27bb122de28df432285f8e29228906a304

3 years agoL2cap shim namespace clean up
Hansong Zhang [Thu, 19 Nov 2020 23:51:43 +0000 (15:51 -0800)]
L2cap shim namespace clean up

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Change-Id: Id1b152a6f679b5141c1ae80eab0696d6dafe6087

3 years agoGD L2cap shim workaround
Hansong Zhang [Wed, 18 Nov 2020 02:38:37 +0000 (18:38 -0800)]
GD L2cap shim workaround

* Fix a workflow in classic security enforcement
* Use the ACL workaround for address policy

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Test: Pair and connect with a headset
Change-Id: I31e439ae40f0db98aeed10ec6872a1f25c4f94d0

3 years agorusty-gd: properly read ACL data from the HAL am: 55fc3947e9
Zach Johnson [Mon, 23 Nov 2020 21:37:05 +0000 (21:37 +0000)]
rusty-gd: properly read ACL data from the HAL am: 55fc3947e9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1499267

Change-Id: I4e54b30401c0c2fea8cf27e7872cae6e5b5254b4

3 years agorusty-gd: properly read ACL data from the HAL
Zach Johnson [Sun, 15 Nov 2020 00:34:07 +0000 (16:34 -0800)]
rusty-gd: properly read ACL data from the HAL

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: Ic6ed193f89a689a255820704b606b8ffb03a9ee0

3 years agoMerge changes Ib8d0227e,I2bcd02ea am: 063b7654e9 am: ebda8ab626
Zach Johnson [Mon, 23 Nov 2020 21:06:26 +0000 (21:06 +0000)]
Merge changes Ib8d0227e,I2bcd02ea am: 063b7654e9 am: ebda8ab626

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1507896

Change-Id: I17d47b3a9829c33d9d15427e9399048e44b29875

3 years agoMerge changes Ib8d0227e,I2bcd02ea am: 063b7654e9
Zach Johnson [Mon, 23 Nov 2020 20:17:53 +0000 (20:17 +0000)]
Merge changes Ib8d0227e,I2bcd02ea am: 063b7654e9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1507896

Change-Id: I6729251b41e12e33ce7cb02fa73671d5fd2caa0a

3 years agoMerge changes Ib8d0227e,I2bcd02ea
Zach Johnson [Mon, 23 Nov 2020 19:28:11 +0000 (19:28 +0000)]
Merge changes Ib8d0227e,I2bcd02ea

* changes:
  rusty-packets: rename packets & add packet child enums
  rusty-packets: stub out struct & packet generation

3 years agoMerge "rusty-packets: generate sample enums and make this work end to end" am: fbdba4...
Zach Johnson [Mon, 23 Nov 2020 18:54:21 +0000 (18:54 +0000)]
Merge "rusty-packets: generate sample enums and make this work end to end" am: fbdba4beb2 am: 35356392b2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506848

Change-Id: I49e9856b2817b1e96c6e00d30d3948e1f8de20d0

3 years agoMerge "rusty-packets: generate sample enums and make this work end to end" am: fbdba4beb2
Zach Johnson [Mon, 23 Nov 2020 18:24:41 +0000 (18:24 +0000)]
Merge "rusty-packets: generate sample enums and make this work end to end" am: fbdba4beb2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506848

Change-Id: I9d9de14fa226271ba588bef53861e196d4bd680a

3 years agoMerge "rusty-packets: generate sample enums and make this work end to end"
Zach Johnson [Mon, 23 Nov 2020 17:47:44 +0000 (17:47 +0000)]
Merge "rusty-packets: generate sample enums and make this work end to end"

3 years agobtsnoop: Fix ISO handling am: f00fef4647 am: 3fe1158297
Łukasz Rymanowski [Mon, 23 Nov 2020 13:00:18 +0000 (13:00 +0000)]
btsnoop: Fix ISO handling am: f00fef4647 am: 3fe1158297

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1508116

Change-Id: Iffe12602453d3f039184d277da0cf9b4c90c0a5a

3 years agobtsnoop: Fix ISO handling am: f00fef4647
Łukasz Rymanowski [Mon, 23 Nov 2020 12:23:11 +0000 (12:23 +0000)]
btsnoop: Fix ISO handling am: f00fef4647

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1508116

Change-Id: I7874466ef5bc9f9f7f5f7da3f8b3aed59450013d

3 years agobtsnoop: Fix ISO handling
Łukasz Rymanowski [Wed, 9 Sep 2020 08:04:37 +0000 (08:04 +0000)]
btsnoop: Fix ISO handling

Sponsor: jpawlowski@
Tag: #feature
Bug: 150670922
Test: manually verified content of btsnoop log
Change-Id: Ie5cac9c189acf808761ac4213c8eadb497fdb531

3 years agorusty-packets: rename packets & add packet child enums
Zach Johnson [Sat, 21 Nov 2020 21:49:39 +0000 (13:49 -0800)]
rusty-packets: rename packets & add packet child enums

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ib8d0227e6d51d4bebbe28ddf61e957c943824185

3 years agoMerge changes Ia3d9e7e3,Ie2e264e9,I8767e4f9,I78716099 am: 082ac26478 am: 0ce1892fe1
Zach Johnson [Sat, 21 Nov 2020 01:51:16 +0000 (01:51 +0000)]
Merge changes Ia3d9e7e3,Ie2e264e9,I8767e4f9,I78716099 am: 082ac26478 am: 0ce1892fe1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1507681

Change-Id: I41a13ff986d5080ef58a98d916992a6f70c50fc1

3 years agoL2cap shim flag update am: 54137c7df3 am: 982b6ea632
Hansong Zhang [Sat, 21 Nov 2020 01:51:10 +0000 (01:51 +0000)]
L2cap shim flag update am: 54137c7df3 am: 982b6ea632

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1479129

Change-Id: I8a65639c6ed2eef370be5f976fa7a287c1cf7002

3 years agoMerge "Use std::optional instead of std::unique_ptr" am: fc27148179 am: 890ac2ee99
Jooyung Han [Sat, 21 Nov 2020 01:51:01 +0000 (01:51 +0000)]
Merge "Use std::optional instead of std::unique_ptr" am: fc27148179 am: 890ac2ee99

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1501916

Change-Id: Ie1a9ecdb6f29c82c1a31f2cb9c47058eafa7caaf

3 years agoMerge changes Ia3d9e7e3,Ie2e264e9,I8767e4f9,I78716099 am: 082ac26478
Zach Johnson [Sat, 21 Nov 2020 01:20:41 +0000 (01:20 +0000)]
Merge changes Ia3d9e7e3,Ie2e264e9,I8767e4f9,I78716099 am: 082ac26478

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1507681

Change-Id: I39259781baa784afa782af1a7687886742d36e12

3 years agoL2cap shim flag update am: 54137c7df3
Hansong Zhang [Sat, 21 Nov 2020 01:20:28 +0000 (01:20 +0000)]
L2cap shim flag update am: 54137c7df3

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1479129

Change-Id: Ie688d7e7cee93ea873dc66d909afd82af4a98f88

3 years agoMerge "Use std::optional instead of std::unique_ptr" am: fc27148179
Jooyung Han [Sat, 21 Nov 2020 01:19:47 +0000 (01:19 +0000)]
Merge "Use std::optional instead of std::unique_ptr" am: fc27148179

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1501916

Change-Id: Ide143da46192f97702107451af2181a09fa3ad39

3 years agorusty-packets: stub out struct & packet generation
Zach Johnson [Sat, 21 Nov 2020 01:14:43 +0000 (17:14 -0800)]
rusty-packets: stub out struct & packet generation

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I2bcd02ea82f0e128e3125d93cacc4c2950ac1330

3 years agoMerge changes Ia3d9e7e3,Ie2e264e9,I8767e4f9,I78716099
Zach Johnson [Sat, 21 Nov 2020 00:59:15 +0000 (00:59 +0000)]
Merge changes Ia3d9e7e3,Ie2e264e9,I8767e4f9,I78716099

* changes:
  rusty-packets: generate a file that's ready for content
  rusty-packets: move some cpp generation to raw strings, for clarity
  rusty-packets: stub out rust generation function
  rusty-packets: move C++ and pybind11 to their own file

3 years agorusty-packets: generate sample enums and make this work end to end
Zach Johnson [Sat, 21 Nov 2020 00:57:33 +0000 (16:57 -0800)]
rusty-packets: generate sample enums and make this work end to end

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I9467b6871b3072a64d06bcd8b79887bc6e85c010

3 years agoL2cap shim flag update
Hansong Zhang [Wed, 18 Nov 2020 02:38:21 +0000 (18:38 -0800)]
L2cap shim flag update

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Test: Pair and connect with a headset
Change-Id: Iccb704e6d87f6758c4af7cd9148b88d00751b1c2

3 years agoMerge "Use std::optional instead of std::unique_ptr"
Jooyung Han [Sat, 21 Nov 2020 00:45:44 +0000 (00:45 +0000)]
Merge "Use std::optional instead of std::unique_ptr"

3 years agoMerge changes from topic "gd_oob" am: 5873a1a92d am: 8ee87a63a5
Myles Watson [Fri, 20 Nov 2020 21:49:42 +0000 (21:49 +0000)]
Merge changes from topic "gd_oob" am: 5873a1a92d am: 8ee87a63a5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506819

Change-Id: I33173972dc1e3cfc17d0684afb122a9652adfb95

3 years agoMerge changes from topic "gd_oob" am: 5873a1a92d
Myles Watson [Fri, 20 Nov 2020 21:15:58 +0000 (21:15 +0000)]
Merge changes from topic "gd_oob" am: 5873a1a92d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506819

Change-Id: I76759eb25334a5958fd9fdbb911b5ec61ff21701

3 years agoMerge changes from topic "gd_oob"
Myles Watson [Fri, 20 Nov 2020 20:37:38 +0000 (20:37 +0000)]
Merge changes from topic "gd_oob"

* changes:
  Security: Add a keyboard bonding test
  RootCanal: Add Passkey and PasskeyFailed
  HciMatchers: enforce argument requirement
  Rename GetOutOfBandData -> GetLeOutOfBandData
  Facade OobDataMessage: Rename members to be generic.
  SecurityTest: Create bond Out of Band

3 years agorusty-packets: generate a file that's ready for content
Zach Johnson [Fri, 20 Nov 2020 18:26:01 +0000 (10:26 -0800)]
rusty-packets: generate a file that's ready for content

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ia3d9e7e3d0b8f388204fd22d6ce4df2760af60de

3 years agorusty-packets: move some cpp generation to raw strings, for clarity
Zach Johnson [Fri, 20 Nov 2020 00:24:39 +0000 (16:24 -0800)]
rusty-packets: move some cpp generation to raw strings, for clarity

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ie2e264e95630f37a5474f67978e23d2192f89025

3 years agoMerge "rusty-packets: add rust option to switch generated packet type" am: f6cc710a71...
Zach Johnson [Fri, 20 Nov 2020 18:49:20 +0000 (18:49 +0000)]
Merge "rusty-packets: add rust option to switch generated packet type" am: f6cc710a71 am: 6fc041ee93 am: a9bba5e757

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506816

Change-Id: I39c930da581eed6f2bd2ff408cd53c9579b364ae

3 years agoMerge "rusty-packets: add rust option to switch generated packet type" am: f6cc710a71...
Zach Johnson [Fri, 20 Nov 2020 18:20:23 +0000 (18:20 +0000)]
Merge "rusty-packets: add rust option to switch generated packet type" am: f6cc710a71 am: 6fc041ee93

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506816

Change-Id: Ifd069cdb3b8cc82cf51a8ec1b948dc1f95f20799

3 years agoMerge "rusty-packets: add rust option to switch generated packet type" am: f6cc710a71
Zach Johnson [Fri, 20 Nov 2020 18:06:51 +0000 (18:06 +0000)]
Merge "rusty-packets: add rust option to switch generated packet type" am: f6cc710a71

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1506816

Change-Id: Id42d855e727402558dcef65401c686a464aee773

3 years agoMerge "rusty-packets: add rust option to switch generated packet type"
Zach Johnson [Fri, 20 Nov 2020 17:41:33 +0000 (17:41 +0000)]
Merge "rusty-packets: add rust option to switch generated packet type"

3 years agoSecurity: Add a keyboard bonding test
Myles Watson [Thu, 19 Nov 2020 19:00:49 +0000 (11:00 -0800)]
Security: Add a keyboard bonding test

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I98b7e16fb8790b001b79e9c802e45b9f180bb203

3 years agoRootCanal: Add Passkey and PasskeyFailed
Myles Watson [Sat, 14 Nov 2020 05:25:51 +0000 (21:25 -0800)]
RootCanal: Add Passkey and PasskeyFailed

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I54f2fb20bf1a071b60c9e621ca40d9e850268909

3 years agoHciMatchers: enforce argument requirement
Martin Brabham [Wed, 18 Nov 2020 00:17:03 +0000 (16:17 -0800)]
HciMatchers: enforce argument requirement

If the command complete opcode is not specified then it
will match ANY command complete event which can prove to
be troubles some when getting a series of CommandComplete()
matches.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: Ia42c74c6476fd9d0763afa87ad1f61a243942e27

3 years agoRename GetOutOfBandData -> GetLeOutOfBandData
Martin Brabham [Tue, 17 Nov 2020 22:26:57 +0000 (14:26 -0800)]
Rename GetOutOfBandData -> GetLeOutOfBandData

Currently, this function is only used by cert tests.
This rename is a stopgap until it is dropped from the
FacadeConfigurationApi interface in favor of the SecurityManager
interface.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest:test_successful_dut_initiated_ssp_oob
Test: cert/run --host LeSecurityTest
Change-Id: Ib1a79de46d3a59ec1c14338e8328718d114aed2a

3 years agoFacade OobDataMessage: Rename members to be generic.
Martin Brabham [Tue, 17 Nov 2020 22:00:47 +0000 (14:00 -0800)]
Facade OobDataMessage: Rename members to be generic.

Member names are LE specific when that isn't necessary.
Renaming as Classic now uses the same message too.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest:test_successful_dut_initiated_ssp_oob
Test: cert/run --host LeSecurityTest
Change-Id: Ifd2c311a73d3e11cc64e287f18a5cb3e386e2f3c

3 years agoSecurityTest: Create bond Out of Band
Martin Brabham [Tue, 17 Nov 2020 02:01:43 +0000 (18:01 -0800)]
SecurityTest: Create bond Out of Band

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest:test_successful_dut_initiated_ssp_oob
Change-Id: I18c58bc7d9a6f33363befd60d8089544fe060ee9

3 years agoPySecurity: Add create_bond_out_of_band am: 5626012ce8 am: f31c654f36 am: 6d5da0b3ae
Martin Brabham [Fri, 20 Nov 2020 06:10:54 +0000 (06:10 +0000)]
PySecurity: Add create_bond_out_of_band am: 5626012ce8 am: f31c654f36 am: 6d5da0b3ae

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502235

Change-Id: I8d4669a91c994e48083f1fc73fbfc74613601a19

3 years agoSecurity Facade: Implement CreateBondOutOfBand am: b48b9800b2 am: b2cfc7dc27 am:...
Martin Brabham [Fri, 20 Nov 2020 06:10:53 +0000 (06:10 +0000)]
Security Facade: Implement CreateBondOutOfBand am: b48b9800b2 am: b2cfc7dc27 am: 526401934a

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502234

Change-Id: Id6097f359ecda782c77a9284de1a334b8b9f7d5f

3 years agoClassicPairingHandler: Add Out of Band support. am: 083fe68fa7 am: e2d39b0719 am...
Martin Brabham [Fri, 20 Nov 2020 06:10:50 +0000 (06:10 +0000)]
ClassicPairingHandler: Add Out of Band support. am: 083fe68fa7 am: e2d39b0719 am: 7fdc0aa5a3

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502233

Change-Id: I68be60fee74bd1dbdcc5d6e9fc1c7353030dd867

3 years agoPySecurity: Add create_bond_out_of_band am: 5626012ce8 am: f31c654f36
Martin Brabham [Fri, 20 Nov 2020 05:42:27 +0000 (05:42 +0000)]
PySecurity: Add create_bond_out_of_band am: 5626012ce8 am: f31c654f36

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502235

Change-Id: Ic6210a76726a4d0c49cedb21e8e7e7d8f52947fb

3 years agoSecurity Facade: Implement CreateBondOutOfBand am: b48b9800b2 am: b2cfc7dc27
Martin Brabham [Fri, 20 Nov 2020 05:42:25 +0000 (05:42 +0000)]
Security Facade: Implement CreateBondOutOfBand am: b48b9800b2 am: b2cfc7dc27

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502234

Change-Id: I8a34d5235616210a55e795438688815b45717e64

3 years agoClassicPairingHandler: Add Out of Band support. am: 083fe68fa7 am: e2d39b0719
Martin Brabham [Fri, 20 Nov 2020 05:42:22 +0000 (05:42 +0000)]
ClassicPairingHandler: Add Out of Band support. am: 083fe68fa7 am: e2d39b0719

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502233

Change-Id: I542565ccb1ebd71d40740c72a1166adc330583e5

3 years agoPySecurity: Add create_bond_out_of_band am: 5626012ce8
Martin Brabham [Fri, 20 Nov 2020 04:59:27 +0000 (04:59 +0000)]
PySecurity: Add create_bond_out_of_band am: 5626012ce8

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502235

Change-Id: I9b3fa47fa4e1f5c498a800a6b1f18c2a095c98b0

3 years agoSecurity Facade: Implement CreateBondOutOfBand am: b48b9800b2
Martin Brabham [Fri, 20 Nov 2020 04:59:24 +0000 (04:59 +0000)]
Security Facade: Implement CreateBondOutOfBand am: b48b9800b2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502234

Change-Id: Idee360edd8aa1fdcbd293e2b27627b7e8a5d06ba

3 years agoClassicPairingHandler: Add Out of Band support. am: 083fe68fa7
Martin Brabham [Fri, 20 Nov 2020 04:59:09 +0000 (04:59 +0000)]
ClassicPairingHandler: Add Out of Band support. am: 083fe68fa7

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502233

Change-Id: Ic2714ce86acb8504f9932e18c318e225c3ec29dc

3 years agoPySecurity: Add create_bond_out_of_band
Martin Brabham [Tue, 17 Nov 2020 02:01:18 +0000 (18:01 -0800)]
PySecurity: Add create_bond_out_of_band

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I41ac53a3b29e2409a1eb2da60abe8f37db84a9f4

3 years agoSecurity Facade: Implement CreateBondOutOfBand
Martin Brabham [Tue, 17 Nov 2020 01:18:42 +0000 (17:18 -0800)]
Security Facade: Implement CreateBondOutOfBand

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I78766ba130578b434298e739135951c9713a6748

3 years agoClassicPairingHandler: Add Out of Band support.
Martin Brabham [Tue, 17 Nov 2020 01:14:01 +0000 (17:14 -0800)]
ClassicPairingHandler: Add Out of Band support.

Adds support for p192, p256, and both.  As well as
secure connections "extended data" versions of the
RemoteOobDataRequestReply.

Add several unit tests to verify the pairing handler
correctly behaves.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Test: atest --host bluetooth_test_gd -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:--gtest_filter=ClassicPairingHandlerTest*
Change-Id: I72016f380a29ad11ec9bdd9e0dcb3383c092c830

3 years agorusty-packets: stub out rust generation function
Zach Johnson [Thu, 19 Nov 2020 23:51:17 +0000 (15:51 -0800)]
rusty-packets: stub out rust generation function

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I8767e4f9ebcf8de6930ab905142afc1a002fdb43

3 years agorusty-packets: move C++ and pybind11 to their own file
Zach Johnson [Thu, 19 Nov 2020 23:34:01 +0000 (15:34 -0800)]
rusty-packets: move C++ and pybind11 to their own file

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I787160993d299b0102daa0a92add4b61f036be43

3 years agorusty-packets: add rust option to switch generated packet type
Zach Johnson [Thu, 19 Nov 2020 23:14:42 +0000 (15:14 -0800)]
rusty-packets: add rust option to switch generated packet type

also add some debug messages to make it easier to see what
the C++ version is doing.

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I0832bb74cffeeb0474aa0f81545a667d4ab6c1bb

3 years agoMerge changes Idfc28489,I56a62a3c,Ibfea3d22 am: 9b5717eb38 am: c8aa7cba48 am: e025d1e8e5
Treehugger Robot [Thu, 19 Nov 2020 22:17:38 +0000 (22:17 +0000)]
Merge changes Idfc28489,I56a62a3c,Ibfea3d22 am: 9b5717eb38 am: c8aa7cba48 am: e025d1e8e5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502161

Change-Id: I23272dae9edfa9cc937b9a42f430468828fbfc2b

3 years agoMerge "RootCanal: Allow both sides to have OOB data" am: 7c8a8ef8e3 am: b12991cac2...
Treehugger Robot [Thu, 19 Nov 2020 22:17:21 +0000 (22:17 +0000)]
Merge "RootCanal: Allow both sides to have OOB data" am: 7c8a8ef8e3 am: b12991cac2 am: 38555635b9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1504279

Change-Id: If4c8d245157dd6f9aefc56001c1294302c36f180

3 years agoIntroduce LE COC security enforcement shim am: 43383c4e49 am: ecdc225507 am: 9d6925e3a1
Hansong Zhang [Thu, 19 Nov 2020 22:16:41 +0000 (22:16 +0000)]
Introduce LE COC security enforcement shim am: 43383c4e49 am: ecdc225507 am: 9d6925e3a1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502244

Change-Id: Ia7365d606608ca2ff06630c49d4b49a558f166ee

3 years agoMerge changes Idfc28489,I56a62a3c,Ibfea3d22 am: 9b5717eb38 am: c8aa7cba48
Treehugger Robot [Thu, 19 Nov 2020 22:03:23 +0000 (22:03 +0000)]
Merge changes Idfc28489,I56a62a3c,Ibfea3d22 am: 9b5717eb38 am: c8aa7cba48

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502161

Change-Id: I68b409be6ec8d5912c5c615a15bd6de62bc46ff9

3 years agoMerge "RootCanal: Allow both sides to have OOB data" am: 7c8a8ef8e3 am: b12991cac2
Treehugger Robot [Thu, 19 Nov 2020 22:03:18 +0000 (22:03 +0000)]
Merge "RootCanal: Allow both sides to have OOB data" am: 7c8a8ef8e3 am: b12991cac2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1504279

Change-Id: Iea5c7dba585c0712e444bbda00bc7a404c519413

3 years agoIntroduce LE COC security enforcement shim am: 43383c4e49 am: ecdc225507
Hansong Zhang [Thu, 19 Nov 2020 22:03:06 +0000 (22:03 +0000)]
Introduce LE COC security enforcement shim am: 43383c4e49 am: ecdc225507

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502244

Change-Id: Ica5ed675820433c5a45e4ec96f46f1ac9ff5edf9

3 years agoMerge changes Idfc28489,I56a62a3c,Ibfea3d22 am: 9b5717eb38
Treehugger Robot [Thu, 19 Nov 2020 21:50:39 +0000 (21:50 +0000)]
Merge changes Idfc28489,I56a62a3c,Ibfea3d22 am: 9b5717eb38

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502161

Change-Id: If1196c22e5f3052b041a3fd55b2517fddedb27fa

3 years agoMerge "RootCanal: Allow both sides to have OOB data" am: 7c8a8ef8e3
Treehugger Robot [Thu, 19 Nov 2020 21:49:42 +0000 (21:49 +0000)]
Merge "RootCanal: Allow both sides to have OOB data" am: 7c8a8ef8e3

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1504279

Change-Id: I1494ba6173d1a220835ced65b8bcd2ec9450f187

3 years agoMerge changes Idfc28489,I56a62a3c,Ibfea3d22
Treehugger Robot [Thu, 19 Nov 2020 21:45:54 +0000 (21:45 +0000)]
Merge changes Idfc28489,I56a62a3c,Ibfea3d22

* changes:
  Improve shim Btm::GetAddressType
  Fix stack shutdown
  GD L2cap improvements

3 years agoMerge "RootCanal: Allow both sides to have OOB data"
Treehugger Robot [Thu, 19 Nov 2020 21:42:34 +0000 (21:42 +0000)]
Merge "RootCanal: Allow both sides to have OOB data"

3 years agoIntroduce LE COC security enforcement shim am: 43383c4e49
Hansong Zhang [Thu, 19 Nov 2020 21:27:28 +0000 (21:27 +0000)]
Introduce LE COC security enforcement shim am: 43383c4e49

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1502244

Change-Id: I86686a650e4a3b1b77ceed93dfa195eefac3fced

3 years agoMerge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ... am: ee5cdae366...
Zach Johnson [Thu, 19 Nov 2020 19:45:40 +0000 (19:45 +0000)]
Merge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ... am: ee5cdae366 am: d825173fb5 am: c22c6c1370

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1499266

Change-Id: If40a8ea6966095356270f922706503fece4dea36

3 years agoMerge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ... am: ee5cdae366...
Zach Johnson [Thu, 19 Nov 2020 19:30:13 +0000 (19:30 +0000)]
Merge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ... am: ee5cdae366 am: d825173fb5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1499266

Change-Id: Iebf9eeba132cc6f8d3fa109d9d44a92dcb6aaa23

3 years agoImprove shim Btm::GetAddressType
Hansong Zhang [Wed, 18 Nov 2020 00:42:10 +0000 (16:42 -0800)]
Improve shim Btm::GetAddressType

If legacy btm already knows its type, use it.

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Change-Id: Idfc28489f7d674dba7c724baccce0d4ee9170831

3 years agoIntroduce LE COC security enforcement shim
Hansong Zhang [Tue, 17 Nov 2020 23:13:51 +0000 (15:13 -0800)]
Introduce LE COC security enforcement shim

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Test: Pair and connect with a headset
Change-Id: Iad2d1e71582886c05a4c7df39cc85735cb3f8abf

3 years agoFix stack shutdown
Hansong Zhang [Wed, 18 Nov 2020 20:51:38 +0000 (12:51 -0800)]
Fix stack shutdown

Stop main thread first, before btm shutdown, so that we won't handle
ADV reports during shutdown.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I56a62a3c193997bc2e548dee38817ef758d82f2f

3 years agoGD L2cap improvements
Hansong Zhang [Wed, 18 Nov 2020 00:37:53 +0000 (16:37 -0800)]
GD L2cap improvements

* Store the role from updates.
* Update PSM check.  LE doesn't need it because it uses SPSM.

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Change-Id: Ibfea3d227a999c8e31e6897628c257084b43174e

3 years agoMerge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ... am: ee5cdae366
Zach Johnson [Thu, 19 Nov 2020 19:14:42 +0000 (19:14 +0000)]
Merge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ... am: ee5cdae366

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1499266

Change-Id: I85ef1eb82c1763a19189ef1b5de7bcebb69328dc

3 years agoMerge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ...
Zach Johnson [Thu, 19 Nov 2020 18:36:42 +0000 (18:36 +0000)]
Merge changes Ic66d8fcd,I9ffbe874,I59e6926b,I1fb172f7,I0eb60ace, ...

* changes:
  Add some wait commands inside PyHal
  Simplify scan parameters & start/stop
  Simplify le random address setting for tests
  Simplify le connection logic for SimpleHalTest
  Simplify Le connect logic for SimpleHalTest
  Simplify advertisement in SimpleHalTest
  Add HciMatchers.Exactly, for more compact tests
  Add HAL reset helper
  Add advertisement abstraction in PyHal
  Add an advertisment abstraction to PyHci

3 years agogd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT am: 787e582564 am: cdb54ca6ac...
Chris Manton [Thu, 19 Nov 2020 09:03:49 +0000 (09:03 +0000)]
gd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT am: 787e582564 am: cdb54ca6ac am: de4ea47813

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1503434

Change-Id: I26cf0853f169e350d0b0a2025bb80da35e58108e

3 years agogd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT am: 787e582564 am: cdb54ca6ac
Chris Manton [Thu, 19 Nov 2020 08:23:12 +0000 (08:23 +0000)]
gd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT am: 787e582564 am: cdb54ca6ac

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1503434

Change-Id: I428cd6b280f3c725aab346c88d1d8716cbfcf7f6

3 years agogd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT am: 787e582564
Chris Manton [Thu, 19 Nov 2020 08:02:29 +0000 (08:02 +0000)]
gd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT am: 787e582564

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1503434

Change-Id: I488516932223adf230a7f09f9313bbc6a2f96e2a

3 years agogd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT
Chris Manton [Wed, 18 Nov 2020 20:51:18 +0000 (12:51 -0800)]
gd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT

Occurs when a connection ACL is requested to a given
device but there is already an existing ACL connection.

Bug: 145832107
Test: gd/cert/run --host
Tag: #refactor
Change-Id: I609374ba9376f2a1056971fc514d97615931c62a

3 years agoMerge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ... am: 1ccacbef6e...
Zach Johnson [Thu, 19 Nov 2020 06:19:32 +0000 (06:19 +0000)]
Merge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ... am: 1ccacbef6e am: adfd9a11d9 am: 1c6982edb0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1498345

Change-Id: I3a063951e3aa636399209ce0c87c56ca42424708

3 years agoMerge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ... am: 1ccacbef6e...
Zach Johnson [Thu, 19 Nov 2020 05:44:30 +0000 (05:44 +0000)]
Merge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ... am: 1ccacbef6e am: adfd9a11d9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1498345

Change-Id: I86e010c59e25329728e0c1860810cb6393202824

3 years agoMerge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ... am: 1ccacbef6e
Zach Johnson [Thu, 19 Nov 2020 05:22:29 +0000 (05:22 +0000)]
Merge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ... am: 1ccacbef6e

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1498345

Change-Id: I39f1c3b321ff43daad5d6cd353e50dd608799b2c

3 years agoMerge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ...
Zach Johnson [Thu, 19 Nov 2020 04:49:39 +0000 (04:49 +0000)]
Merge changes I333524dc,Ia460804d,I90cfe69e,I848e344b,Ie9108602, ...

* changes:
  Add read_own_addres to PyHal
  Simplify ACL connection components of DirectHciTest
  Add send_acl_first to PyHal, to simplify redundancy
  Fold ACL sending into PyHal
  Simplify ACL sending in SimpleHalTest
  Add shortcut for enabling inquiry in PyHal
  Simplify DirectHciTest send_hal_acl_data
  Add HciMatchers.LoopbackOf to avoid imprecise matching
  Improve signal to noise in DirectHciTest
  DirectHciTest, remove send_hal_hci_command
  Improve hci facade proto

3 years agoRootCanal: Allow both sides to have OOB data
Myles Watson [Thu, 19 Nov 2020 01:16:59 +0000 (17:16 -0800)]
RootCanal: Allow both sides to have OOB data

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I1c30296ec80aaac883fc3012982bf6fb76c34771

3 years agoMerge "remove invalid test, restucture simple_hal_test" am: 9a230a5e0c am: ea87ea1421...
Zach Johnson [Wed, 18 Nov 2020 23:41:59 +0000 (23:41 +0000)]
Merge "remove invalid test, restucture simple_hal_test" am: 9a230a5e0c am: ea87ea1421 am: 38600d6cbf

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1497896

Change-Id: I973787aa15ab81097d7deb914d2043e6480bd858

3 years agoMerge "remove invalid test, restucture simple_hal_test" am: 9a230a5e0c am: ea87ea1421
Zach Johnson [Wed, 18 Nov 2020 23:28:27 +0000 (23:28 +0000)]
Merge "remove invalid test, restucture simple_hal_test" am: 9a230a5e0c am: ea87ea1421

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1497896

Change-Id: Ie4d83d43531e9082b1336182a097f9261d3934f5

3 years agoMerge "remove invalid test, restucture simple_hal_test" am: 9a230a5e0c
Zach Johnson [Wed, 18 Nov 2020 23:12:03 +0000 (23:12 +0000)]
Merge "remove invalid test, restucture simple_hal_test" am: 9a230a5e0c

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1497896

Change-Id: Ic173b93e33f397c29f7cbe164289669b3fd0fec4

3 years agoAdd some wait commands inside PyHal
Zach Johnson [Sat, 14 Nov 2020 23:50:00 +0000 (15:50 -0800)]
Add some wait commands inside PyHal

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: Ic66d8fcd09f3c930de0a8b1063ec355e86df4d20

3 years agoSimplify scan parameters & start/stop
Zach Johnson [Sat, 14 Nov 2020 23:12:41 +0000 (15:12 -0800)]
Simplify scan parameters & start/stop

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I9ffbe874bf84e338bd1d38873fbecac6f83fa9b5

3 years agoSimplify le random address setting for tests
Zach Johnson [Sat, 14 Nov 2020 23:06:34 +0000 (15:06 -0800)]
Simplify le random address setting for tests

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I59e6926bb00b377b3580742800fbe2743c067181

3 years agoSimplify le connection logic for SimpleHalTest
Zach Johnson [Sat, 14 Nov 2020 23:00:43 +0000 (15:00 -0800)]
Simplify le connection logic for SimpleHalTest

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I1fb172f75ccd01fd449af2748ea9885991822594

3 years agoSimplify Le connect logic for SimpleHalTest
Zach Johnson [Sat, 14 Nov 2020 22:52:03 +0000 (14:52 -0800)]
Simplify Le connect logic for SimpleHalTest

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I0eb60ace4e5b354803fcbb331484cbb556f86e0f

3 years agoSimplify advertisement in SimpleHalTest
Zach Johnson [Sat, 14 Nov 2020 21:39:14 +0000 (13:39 -0800)]
Simplify advertisement in SimpleHalTest

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I297cfeac69b143d5783122f1ec103fd67af11446

3 years agoAdd read_own_addres to PyHal
Zach Johnson [Fri, 13 Nov 2020 05:34:43 +0000 (21:34 -0800)]
Add read_own_addres to PyHal

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I333524dcc50d7f9cc586ab66514cab04908686ab

3 years agoAdd HciMatchers.Exactly, for more compact tests
Zach Johnson [Sat, 14 Nov 2020 21:28:09 +0000 (13:28 -0800)]
Add HciMatchers.Exactly, for more compact tests

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: If87927d3e491f234000b7c9321832897e91bba04

3 years agoSimplify ACL connection components of DirectHciTest
Zach Johnson [Fri, 13 Nov 2020 05:22:22 +0000 (21:22 -0800)]
Simplify ACL connection components of DirectHciTest

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: Ia460804d5a8654b3ba305ca414ba1797498aecd3