Rootcanal: Get a MAC from a property
Bug: 138260499
Test: boot a phone with Rootcanal
setprop bt.rootcanal_mac_address 3C:5A:B4:01:02:04
toggle airplane mode
Change-Id: I314ac4516997f0f45f84a21f851065216a205edb
diff --git a/test/rootcanal/bluetooth_hci.cc b/test/rootcanal/bluetooth_hci.cc
index 3a636f5..2bebd9a 100644
--- a/test/rootcanal/bluetooth_hci.cc
+++ b/test/rootcanal/bluetooth_hci.cc
@@ -104,7 +104,9 @@
controller_ = std::make_shared<DualModeController>();
- controller_->Initialize({"dmc", "3C:5A:B4:01:02:03"});
+ char mac_property[PROPERTY_VALUE_MAX] = "";
+ property_get("bt.rootcanal_mac_address", mac_property, "3C:5A:B4:01:02:03");
+ controller_->Initialize({"dmc", std::string(mac_property)});
controller_->RegisterEventChannel(
[this, cb](std::shared_ptr<std::vector<uint8_t>> packet) {