Merge b2ginbound to central, a=merge
authorWes Kocher <wkocher@mozilla.com>
Fri, 02 Oct 2015 13:41:37 -0700
changeset 299143 0010c0cb259e28faf764949df54687e3a21a2d0a
parent 299113 2308353160d2c7b75d6471874af62c965159e2ee (current diff)
parent 299142 6e06d8348a714404cc3f2b1534b96138ef87f7bb (diff)
child 299144 824f8a387d24b939ff3853dc06dba5d98075312e
child 299222 03e8acfc181fea2620899600b0e58459151c7559
child 299272 afd5cf694ddab11326b287e3239c88c6962538d1
child 299307 e85cfb3fe538a926b5a886ed98a0a8ccc525f0b6
push id5392
push userraliiev@mozilla.com
push dateMon, 14 Dec 2015 20:08:23 +0000
treeherdermozilla-beta@16ce8562a975 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone44.0a1
first release with
nightly linux32
0010c0cb259e / 44.0a1 / 20151003030225 / files
nightly linux64
0010c0cb259e / 44.0a1 / 20151003030225 / files
nightly mac
0010c0cb259e / 44.0a1 / 20151003030225 / files
nightly win32
0010c0cb259e / 44.0a1 / 20151003030225 / files
nightly win64
0010c0cb259e / 44.0a1 / 20151003030225 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge b2ginbound to central, a=merge
--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1b0db93fb6b870b03467aff50d6419771ba0d88c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="27eb2f04e149fc2c9976d881b1b5984bbe7ee089"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="12ff7481566587aa4198cf1287598acb3a999973"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="660169a3d7e034a892359e39135e8c2785a6ad6f">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="f004530b30a63c08a16d82536858600446b2abf5"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="f004530b30a63c08a16d82536858600446b2abf5"/>
@@ -123,17 +123,17 @@
   <project name="platform/system/vold" path="system/vold" revision="d4455b8cf361f8353e8aebac15ffd64b4aedd2b9"/>
   <project name="platform/external/icu4c" path="external/icu4c" remote="aosp" revision="b4c6379528887dc25ca9991a535a8d92a61ad6b6"/>
   <project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="2da3a2d5100f8afa1229bb50aa2a29ea0aaf8417"/>
   <project name="platform_system_core" path="system/core" remote="b2g" revision="8586f55fe4b015911b48e731b69c592ad82a0807"/>
   <default remote="caf" revision="refs/tags/android-4.4.2_r1" sync-j="4"/>
   <!-- Emulator specific things -->
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="72ffdf71c68a96309212eb13d63560d66db14c9e"/>
   <project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="8d4018ebd33ac3f1a043b2d54bc578028656a659"/>
-  <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="e002268b30ce69725e60fdc827a19d729cce7396"/>
+  <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="b2773dbc3cb24e70cff2b05522e9c959250400ac"/>
   <project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="f37bd545063039e30a92f2550ae78c0e6e4e2d08"/>
   <project name="platform_external_wpa_supplicant_8" path="external/wpa_supplicant_8" remote="b2g" revision="0c6a6547cd1fd302fa2b0f6e375654df36bf0ec4"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="7132bc11fbc68acfebcd509095562ca04fad5584"/>
   <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="5f4b68c799927b6e078f987b12722c3a6ccd4a45"/>
   <project name="platform/development" path="development" revision="5968ff4e13e0d696ad8d972281fc27ae5a12829b"/>
   <project name="platform_prebuilts_qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="6a1bb59af65b6485b1090522f66fac95c3f9e22c"/>
   <project name="android-sdk" path="sdk" remote="b2g" revision="0951179277915335251c5e11d242e4e1a8c2236f"/>
   <project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="f004530b30a63c08a16d82536858600446b2abf5"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1b0db93fb6b870b03467aff50d6419771ba0d88c">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="27eb2f04e149fc2c9976d881b1b5984bbe7ee089"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="12ff7481566587aa4198cf1287598acb3a999973"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
-        "git_revision": "9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b", 
+        "git_revision": "f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e", 
         "remote": "https://git.mozilla.org/releases/gaia.git", 
         "branch": ""
     }, 
-    "revision": "73f844def0a5b0a7e077b68e5e16ffd6753129da", 
+    "revision": "ad7f7540499e0cf54ddd5cf41ff39886cf63acfb", 
     "repo_path": "integration/gaia-central"
 }
--- a/b2g/config/nexus-4-kk/sources.xml
+++ b/b2g/config/nexus-4-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -13,17 +13,17 @@
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="660169a3d7e034a892359e39135e8c2785a6ad6f">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="f004530b30a63c08a16d82536858600446b2abf5"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="9a682cb7bc8b7fde624a9b2b3c2d64415a08b04b"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="58909a53f638af022ab09f7a8f6976b0cae8f133"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
--- a/dom/bluetooth/bluedroid/BluetoothDaemonCoreInterface.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonCoreInterface.cpp
@@ -100,41 +100,40 @@ BluetoothDaemonCoreModule::GetAdapterPro
   if (NS_FAILED(rv)) {
     return rv;
   }
   unused << pdu.forget();
   return rv;
 }
 
 nsresult
-BluetoothDaemonCoreModule::GetAdapterPropertyCmd(const nsAString& aName,
+BluetoothDaemonCoreModule::GetAdapterPropertyCmd(BluetoothPropertyType aType,
                                                  BluetoothResultHandler* aRes)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsAutoPtr<DaemonSocketPDU> pdu(
     new DaemonSocketPDU(SERVICE_ID, OPCODE_GET_ADAPTER_PROPERTY,
                         0));
 
-  nsresult rv = PackPDU(
-    PackConversion<const nsAString, BluetoothPropertyType>(aName), *pdu);
+  nsresult rv = PackPDU(aType, *pdu);
   if (NS_FAILED(rv)) {
     return rv;
   }
   rv = Send(pdu, aRes);
   if (NS_FAILED(rv)) {
     return rv;
   }
   unused << pdu.forget();
   return rv;
 }
 
 nsresult
 BluetoothDaemonCoreModule::SetAdapterPropertyCmd(
-  const BluetoothNamedValue& aProperty, BluetoothResultHandler* aRes)
+  const BluetoothProperty& aProperty, BluetoothResultHandler* aRes)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsAutoPtr<DaemonSocketPDU> pdu(
     new DaemonSocketPDU(SERVICE_ID, OPCODE_SET_ADAPTER_PROPERTY,
                         0));
 
   nsresult rv = PackPDU(aProperty, *pdu);
@@ -169,43 +168,41 @@ BluetoothDaemonCoreModule::GetRemoteDevi
   }
   unused << pdu.forget();
   return rv;
 }
 
 nsresult
 BluetoothDaemonCoreModule::GetRemoteDevicePropertyCmd(
   const BluetoothAddress& aRemoteAddr,
-  const nsAString& aName,
+  BluetoothPropertyType aType,
   BluetoothResultHandler* aRes)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsAutoPtr<DaemonSocketPDU> pdu(
     new DaemonSocketPDU(SERVICE_ID, OPCODE_GET_REMOTE_DEVICE_PROPERTY,
                         0));
 
-  nsresult rv = PackPDU(
-    aRemoteAddr,
-    PackConversion<nsAString, BluetoothPropertyType>(aName), *pdu);
+  nsresult rv = PackPDU(aRemoteAddr, aType, *pdu);
   if (NS_FAILED(rv)) {
     return rv;
   }
   rv = Send(pdu, aRes);
   if (NS_FAILED(rv)) {
     return rv;
   }
   unused << pdu.forget();
   return rv;
 }
 
 nsresult
 BluetoothDaemonCoreModule::SetRemoteDevicePropertyCmd(
   const BluetoothAddress& aRemoteAddr,
-  const BluetoothNamedValue& aProperty,
+  const BluetoothProperty& aProperty,
   BluetoothResultHandler* aRes)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsAutoPtr<DaemonSocketPDU> pdu(
     new DaemonSocketPDU(SERVICE_ID, OPCODE_SET_REMOTE_DEVICE_PROPERTY,
                         0));
 
@@ -368,29 +365,26 @@ BluetoothDaemonCoreModule::CancelBondCmd
   }
   unused << pdu.forget();
   return rv;
 }
 
 nsresult
 BluetoothDaemonCoreModule::PinReplyCmd(const BluetoothAddress& aBdAddr,
                                        bool aAccept,
-                                       const nsAString& aPinCode,
+                                       const BluetoothPinCode& aPinCode,
                                        BluetoothResultHandler* aRes)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsAutoPtr<DaemonSocketPDU> pdu(
     new DaemonSocketPDU(SERVICE_ID, OPCODE_PIN_REPLY,
                         0));
 
-  nsresult rv = PackPDU(
-    aBdAddr,
-    aAccept,
-    PackConversion<nsAString, BluetoothPinCode>(aPinCode), *pdu);
+  nsresult rv = PackPDU(aBdAddr, aAccept, aPinCode, *pdu);
   if (NS_FAILED(rv)) {
     return rv;
   }
   rv = Send(pdu, aRes);
   if (NS_FAILED(rv)) {
     return rv;
   }
   unused << pdu.forget();
@@ -956,29 +950,29 @@ class BluetoothDaemonCoreModule::PinRequ
   : private PDUInitOp
 {
 public:
   PinRequestInitOp(DaemonSocketPDU& aPDU)
     : PDUInitOp(aPDU)
   { }
 
   nsresult
-  operator () (BluetoothAddress& aArg1, nsString& aArg2, uint32_t& aArg3) const
+  operator () (BluetoothAddress& aArg1, BluetoothRemoteName& aArg2,
+               uint32_t& aArg3) const
   {
     DaemonSocketPDU& pdu = GetPDU();
 
     /* Read remote address */
     nsresult rv = UnpackPDU(pdu, aArg1);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     /* Read remote name */
-    rv = UnpackPDU(
-      pdu, UnpackConversion<BluetoothRemoteName, nsAString>(aArg2));
+    rv = UnpackPDU(pdu, aArg2);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     /* Read CoD */
     rv = UnpackPDU(pdu, aArg3);
     if (NS_FAILED(rv)) {
       return rv;
@@ -1002,30 +996,30 @@ class BluetoothDaemonCoreModule::SspRequ
   : private PDUInitOp
 {
 public:
   SspRequestInitOp(DaemonSocketPDU& aPDU)
     : PDUInitOp(aPDU)
   { }
 
   nsresult
-  operator () (BluetoothAddress& aArg1, nsString& aArg2, uint32_t& aArg3,
-               BluetoothSspVariant& aArg4, uint32_t& aArg5) const
+  operator () (BluetoothAddress& aArg1, BluetoothRemoteName& aArg2,
+               uint32_t& aArg3, BluetoothSspVariant& aArg4,
+               uint32_t& aArg5) const
   {
     DaemonSocketPDU& pdu = GetPDU();
 
     /* Read remote address */
     nsresult rv = UnpackPDU(pdu, aArg1);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     /* Read remote name */
-    rv = UnpackPDU(
-      pdu, UnpackConversion<BluetoothRemoteName, nsAString>(aArg2));
+    rv = UnpackPDU(pdu, aArg2);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     /* Read CoD */
     rv = UnpackPDU(pdu, aArg3);
     if (NS_FAILED(rv)) {
       return rv;
@@ -1108,35 +1102,34 @@ class BluetoothDaemonCoreModule::AclStat
 {
 public:
   AclStateChangedInitOp(DaemonSocketPDU& aPDU)
     : PDUInitOp(aPDU)
   { }
 
   nsresult
   operator () (BluetoothStatus& aArg1, BluetoothAddress& aArg2,
-               bool& aArg3) const
+               BluetoothAclState& aArg3) const
   {
     DaemonSocketPDU& pdu = GetPDU();
 
     /* Read status */
     nsresult rv = UnpackPDU(pdu, aArg1);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     /* Read remote address */
     rv = UnpackPDU(pdu, aArg2);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     /* Read ACL state */
-    rv = UnpackPDU(
-      pdu, UnpackConversion<BluetoothAclState, bool>(aArg3));
+    rv = UnpackPDU(pdu, aArg3);
     if (NS_FAILED(rv)) {
       return rv;
     }
     WarnAboutTrailingData();
     return NS_OK;
   }
 };
 
--- a/dom/bluetooth/bluedroid/BluetoothDaemonCoreInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonCoreInterface.h
@@ -74,31 +74,31 @@ public:
   //
 
   nsresult EnableCmd(BluetoothResultHandler* aRes);
 
   nsresult DisableCmd(BluetoothResultHandler* aRes);
 
   nsresult GetAdapterPropertiesCmd(BluetoothResultHandler* aRes);
 
-  nsresult GetAdapterPropertyCmd(const nsAString& aName,
+  nsresult GetAdapterPropertyCmd(BluetoothPropertyType aType,
                                  BluetoothResultHandler* aRes);
 
-  nsresult SetAdapterPropertyCmd(const BluetoothNamedValue& aProperty,
+  nsresult SetAdapterPropertyCmd(const BluetoothProperty& aProperty,
                                  BluetoothResultHandler* aRes);
 
   nsresult GetRemoteDevicePropertiesCmd(const BluetoothAddress& aRemoteAddr,
                                         BluetoothResultHandler* aRes);
 
   nsresult GetRemoteDevicePropertyCmd(const BluetoothAddress& aRemoteAddr,
-                                      const nsAString& aName,
+                                      BluetoothPropertyType aType,
                                       BluetoothResultHandler* aRes);
 
   nsresult SetRemoteDevicePropertyCmd(const BluetoothAddress& aRemoteAddr,
-                                      const BluetoothNamedValue& aProperty,
+                                      const BluetoothProperty& aProperty,
                                       BluetoothResultHandler* aRes);
 
   nsresult GetRemoteServiceRecordCmd(const BluetoothAddress& aRemoteAddr,
                                      const BluetoothUuid& aUuid,
                                      BluetoothResultHandler* aRes);
 
   nsresult GetRemoteServicesCmd(const BluetoothAddress& aRemoteAddr,
                                 BluetoothResultHandler* aRes);
@@ -113,17 +113,17 @@ public:
 
   nsresult RemoveBondCmd(const BluetoothAddress& aBdAddr,
                          BluetoothResultHandler* aRes);
 
   nsresult CancelBondCmd(const BluetoothAddress& aBdAddr,
                          BluetoothResultHandler* aRes);
 
   nsresult PinReplyCmd(const BluetoothAddress& aBdAddr, bool aAccept,
-                       const nsAString& aPinCode,
+                       const BluetoothPinCode& aPinCode,
                        BluetoothResultHandler* aRes);
 
   nsresult SspReplyCmd(const BluetoothAddress& aBdAddr,
                        BluetoothSspVariant aVariant,
                        bool aAccept, uint32_t aPasskey,
                        BluetoothResultHandler* aRes);
 
   nsresult DutModeConfigureCmd(bool aEnable, BluetoothResultHandler* aRes);
@@ -261,32 +261,36 @@ private:
     int, const BluetoothProperty*>
     DeviceFoundNotification;
 
   typedef mozilla::ipc::DaemonNotificationRunnable1<
     NotificationHandlerWrapper, void, bool>
     DiscoveryStateChangedNotification;
 
   typedef mozilla::ipc::DaemonNotificationRunnable3<
-    NotificationHandlerWrapper, void, BluetoothAddress, nsString, uint32_t,
-    const BluetoothAddress&, const nsAString&>
+    NotificationHandlerWrapper, void,
+    BluetoothAddress, BluetoothRemoteName, uint32_t,
+    const BluetoothAddress&, const BluetoothRemoteName&>
     PinRequestNotification;
 
   typedef mozilla::ipc::DaemonNotificationRunnable5<
-    NotificationHandlerWrapper, void, BluetoothAddress, nsString, uint32_t,
-    BluetoothSspVariant, uint32_t, const BluetoothAddress&, const nsAString&>
+    NotificationHandlerWrapper, void,
+    BluetoothAddress, BluetoothRemoteName, uint32_t, BluetoothSspVariant,
+    uint32_t,
+    const BluetoothAddress&, const BluetoothRemoteName&>
     SspRequestNotification;
 
   typedef mozilla::ipc::DaemonNotificationRunnable3<
     NotificationHandlerWrapper, void, BluetoothStatus, BluetoothAddress,
     BluetoothBondState, BluetoothStatus, const BluetoothAddress&>
     BondStateChangedNotification;
 
   typedef mozilla::ipc::DaemonNotificationRunnable3<
-    NotificationHandlerWrapper, void, BluetoothStatus, BluetoothAddress, bool,
+    NotificationHandlerWrapper, void,
+    BluetoothStatus, BluetoothAddress, BluetoothAclState,
     BluetoothStatus, const BluetoothAddress&>
     AclStateChangedNotification;
 
   typedef mozilla::ipc::DaemonNotificationRunnable3<
     NotificationHandlerWrapper, void, uint16_t, nsAutoArrayPtr<uint8_t>,
     uint8_t, uint16_t, const uint8_t*>
     DutModeRecvNotification;
 
--- a/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.cpp
@@ -509,109 +509,29 @@ Convert(int32_t aIn, BluetoothGattStatus
     aOut = GATT_STATUS_UNKNOWN_ERROR;
   } else {
     aOut = sGattStatus[aIn];
   }
   return NS_OK;
 }
 
 nsresult
-Convert(const nsAString& aIn, BluetoothPinCode& aOut)
-{
-  if (MOZ_HAL_IPC_CONVERT_WARN_IF(
-        aIn.Length() > MOZ_ARRAY_LENGTH(aOut.mPinCode), nsAString,
-        BluetoothPinCode)) {
-    return NS_ERROR_ILLEGAL_VALUE;
-  }
-
-  NS_ConvertUTF16toUTF8 pinCodeUTF8(aIn);
-  const char* str = pinCodeUTF8.get();
-
-  nsAString::size_type i;
-
-  // Fill pin into aOut
-  for (i = 0; i < aIn.Length(); ++i, ++str) {
-    aOut.mPinCode[i] = static_cast<uint8_t>(*str);
-  }
-
-  // Clear remaining bytes in aOut
-  size_t ntrailing = (MOZ_ARRAY_LENGTH(aOut.mPinCode) - aIn.Length()) *
-                     sizeof(aOut.mPinCode[0]);
-  memset(aOut.mPinCode + aIn.Length(), 0, ntrailing);
-
-  aOut.mLength = aIn.Length();
-
-  return NS_OK;
-}
-
-nsresult
-Convert(const nsAString& aIn, BluetoothPropertyType& aOut)
-{
-  if (aIn.EqualsLiteral("Name")) {
-    aOut = PROPERTY_BDNAME;
-  } else if (aIn.EqualsLiteral("Discoverable")) {
-    aOut = PROPERTY_ADAPTER_SCAN_MODE;
-  } else if (aIn.EqualsLiteral("DiscoverableTimeout")) {
-    aOut = PROPERTY_ADAPTER_DISCOVERY_TIMEOUT;
-  } else if (MOZ_HAL_IPC_CONVERT_WARN_IF(
-        false, nsAString, BluetoothPropertyType)) {
-    BT_LOGR("Invalid property name: %s", NS_ConvertUTF16toUTF8(aIn).get());
-    aOut = static_cast<BluetoothPropertyType>(0); // silences compiler warning
-    return NS_ERROR_ILLEGAL_VALUE;
-  }
-  return NS_OK;
-}
-
-nsresult
-Convert(const nsAString& aIn, BluetoothServiceName& aOut)
-{
-  NS_ConvertUTF16toUTF8 serviceNameUTF8(aIn);
-  const char* str = serviceNameUTF8.get();
-  size_t len = strlen(str);
-
-  if (MOZ_HAL_IPC_CONVERT_WARN_IF(
-        len > sizeof(aOut.mName), nsAString, BluetoothServiceName)) {
-    return NS_ERROR_ILLEGAL_VALUE;
-  }
-
-  memcpy(aOut.mName, str, len);
-  memset(aOut.mName + len, 0, sizeof(aOut.mName) - len);
-
-  return NS_OK;
-}
-
-nsresult
 Convert(nsresult aIn, BluetoothStatus& aOut)
 {
   if (NS_SUCCEEDED(aIn)) {
     aOut = STATUS_SUCCESS;
   } else if (aIn == NS_ERROR_OUT_OF_MEMORY) {
     aOut = STATUS_NOMEM;
   } else {
     aOut = STATUS_FAIL;
   }
   return NS_OK;
 }
 
 nsresult
-Convert(BluetoothAclState aIn, bool& aOut)
-{
-  static const bool sBool[] = {
-    [ACL_STATE_CONNECTED] = true,
-    [ACL_STATE_DISCONNECTED] = false
-  };
-  if (MOZ_HAL_IPC_CONVERT_WARN_IF(
-        aIn >= MOZ_ARRAY_LENGTH(sBool), BluetoothAclState, bool)) {
-    return NS_ERROR_ILLEGAL_VALUE;
-  }
-  aOut = sBool[aIn];
-  return NS_OK;
-}
-
-nsresult
 Convert(const BluetoothAttributeHandle& aIn, int32_t& aOut)
 {
   aOut = static_cast<int32_t>(aIn.mHandle);
   return NS_OK;
 }
 
 nsresult
 Convert(BluetoothAvrcpEvent aIn, uint8_t& aOut)
@@ -900,28 +820,16 @@ Convert(BluetoothPropertyType aIn, uint8
     aOut = 0x00; // silences compiler warning
     return NS_ERROR_ILLEGAL_VALUE;
   }
   aOut = sPropertyType[aIn];
   return NS_OK;
 }
 
 nsresult
-Convert(const BluetoothRemoteName& aIn, nsAString& aOut)
-{
-  const char* name = reinterpret_cast<const char*>(aIn.mName);
-
-  // We construct an nsCString here because the string
-  // returned from the PDU is not 0-terminated.
-  aOut = NS_ConvertUTF8toUTF16(
-    nsCString(name, strnlen(name, sizeof(aIn.mName))));
-  return NS_OK;
-}
-
-nsresult
 Convert(BluetoothScanMode aIn, int32_t& aOut)
 {
   static const int32_t sScanMode[] = {
     [SCAN_MODE_NONE] = 0x00,
     [SCAN_MODE_CONNECTABLE] = 0x01,
     [SCAN_MODE_CONNECTABLE_DISCOVERABLE] = 0x02
   };
   if (MOZ_HAL_IPC_CONVERT_WARN_IF(
@@ -1288,47 +1196,52 @@ PackPDU(const BluetoothHandsfreeVolumeTy
 nsresult
 PackPDU(const BluetoothHandsfreeWbsConfig& aIn, DaemonSocketPDU& aPDU)
 {
   return PackPDU(
     PackConversion<BluetoothHandsfreeWbsConfig, uint8_t>(aIn), aPDU);
 }
 
 nsresult
-PackPDU(const BluetoothNamedValue& aIn, DaemonSocketPDU& aPDU)
+PackPDU(const BluetoothProperty& aIn, DaemonSocketPDU& aPDU)
 {
-  nsresult rv = PackPDU(
-    PackConversion<nsString, BluetoothPropertyType>(aIn.name()), aPDU);
+  nsresult rv = PackPDU(aIn.mType, aPDU);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
-  if (aIn.value().type() == BluetoothValue::Tuint32_t) {
-    // Set discoverable timeout
-    rv = PackPDU(static_cast<uint16_t>(sizeof(uint32_t)),
-                 aIn.value().get_uint32_t(), aPDU);
-  } else if (aIn.value().type() == BluetoothValue::TnsString) {
-    // Set name
-    const nsCString value =
-      NS_ConvertUTF16toUTF8(aIn.value().get_nsString());
+  switch (aIn.mType) {
+    case PROPERTY_BDNAME:
+      /* fall through */
+    case PROPERTY_REMOTE_FRIENDLY_NAME: {
+        NS_ConvertUTF16toUTF8 stringUTF8(aIn.mString);
 
-    rv = PackPDU(PackConversion<size_t, uint16_t>(value.Length()),
-                 PackArray<uint8_t>(
-                   reinterpret_cast<const uint8_t*>(value.get()),
-                   value.Length()),
-                 aPDU);
-  } else if (aIn.value().type() == BluetoothValue::Tbool) {
-    // Set scan mode
-    bool value = aIn.value().get_bool();
-
-    rv = PackPDU(static_cast<uint16_t>(sizeof(int32_t)),
-                 PackConversion<bool, BluetoothScanMode>(value), aPDU);
-  } else if (MOZ_HAL_IPC_PACK_WARN_IF(true, BluetoothNamedValue)) {
-    BT_LOGR("Invalid property value type");
-    rv = NS_ERROR_ILLEGAL_VALUE;
+        rv = PackPDU(PackConversion<size_t, uint16_t>(stringUTF8.Length()),
+                     PackArray<uint8_t>(
+                       reinterpret_cast<const uint8_t*>(stringUTF8.get()),
+                       stringUTF8.Length()),
+                     aPDU);
+      }
+      break;
+    case PROPERTY_CLASS_OF_DEVICE:
+      /* fall through */
+    case PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
+      rv = PackPDU(PackConversion<size_t, uint16_t>(sizeof(aIn.mUint32)),
+                   aIn.mUint32,
+                   aPDU);
+      break;
+    case PROPERTY_ADAPTER_SCAN_MODE:
+      /* |mScanMode| is sent as signed int of 4 bytes */
+      rv = PackPDU(PackConversion<size_t, uint16_t>(sizeof(int32_t)),
+                   aIn.mScanMode,
+                   aPDU);
+      break;
+    default:
+      NS_NOTREACHED("Invalid property for packing");
+      return NS_ERROR_ILLEGAL_VALUE;
   }
   return rv;
 }
 
 nsresult
 PackPDU(const BluetoothPinCode& aIn, DaemonSocketPDU& aPDU)
 {
   return PackPDU(aIn.mLength,
@@ -1352,17 +1265,25 @@ nsresult
 PackPDU(BluetoothScanMode aIn, DaemonSocketPDU& aPDU)
 {
   return PackPDU(PackConversion<BluetoothScanMode, int32_t>(aIn), aPDU);
 }
 
 nsresult
 PackPDU(const BluetoothServiceName& aIn, DaemonSocketPDU& aPDU)
 {
-  return PackPDU(PackArray<uint8_t>(aIn.mName, sizeof(aIn.mName)), aPDU);
+  static const uint8_t sTerminator = '\0';
+
+  nsresult rv =
+    PackPDU(PackArray<uint8_t>(aIn.mName, sizeof(aIn.mName)), aPDU);
+  if (NS_FAILED(rv)) {
+    return rv;
+  }
+  /* The PDU requries one additional byte for \0 termination */
+  return aPDU.Write(sTerminator);
 }
 
 nsresult
 PackPDU(BluetoothSocketType aIn, DaemonSocketPDU& aPDU)
 {
   return PackPDU(PackConversion<BluetoothSocketType, uint8_t>(aIn), aPDU);
 }
 
--- a/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h
@@ -22,21 +22,16 @@ using mozilla::ipc::DaemonSocketPDUHelpe
 using mozilla::ipc::DaemonSocketPDUHelpers::UnpackPDU;
 
 using namespace mozilla::ipc::DaemonSocketPDUHelpers;
 
 //
 // Helper structures
 //
 
-enum BluetoothAclState {
-  ACL_STATE_CONNECTED,
-  ACL_STATE_DISCONNECTED
-};
-
 struct BluetoothAvrcpAttributeTextPairs {
   BluetoothAvrcpAttributeTextPairs(const uint8_t* aAttr,
                                    const char** aText,
                                    size_t aLength)
     : mAttr(aAttr)
     , mText(aText)
     , mLength(aLength)
   { }
@@ -103,29 +98,16 @@ struct BluetoothAvrcpEventParamPair {
 };
 
 struct BluetoothConfigurationParameter {
   uint8_t mType;
   uint16_t mLength;
   nsAutoArrayPtr<uint8_t> mValue;
 };
 
-struct BluetoothPinCode {
-  uint8_t mPinCode[16];
-  uint8_t mLength;
-};
-
-struct BluetoothRemoteName {
-  uint8_t mName[249];
-};
-
-struct BluetoothServiceName {
-  uint8_t mName[256];
-};
-
 //
 // Conversion
 //
 
 nsresult
 Convert(bool aIn, BluetoothScanMode& aOut);
 
 nsresult
@@ -196,28 +178,16 @@ Convert(uint8_t aIn, BluetoothStatus& aO
 
 nsresult
 Convert(int32_t aIn, BluetoothAttributeHandle& aOut);
 
 nsresult
 Convert(int32_t aIn, BluetoothGattStatus& aOut);
 
 nsresult
-Convert(const nsAString& aIn, BluetoothPinCode& aOut);
-
-nsresult
-Convert(const nsAString& aIn, BluetoothPropertyType& aOut);
-
-nsresult
-Convert(const nsAString& aIn, BluetoothServiceName& aOut);
-
-nsresult
-Convert(BluetoothAclState aIn, bool& aOut);
-
-nsresult
 Convert(const BluetoothAttributeHandle& aIn, int32_t& aOut);
 
 nsresult
 Convert(BluetoothAvrcpEvent aIn, uint8_t& aOut);
 
 nsresult
 Convert(BluetoothAvrcpNotification aIn, uint8_t& aOut);
 
@@ -259,19 +229,16 @@ Convert(BluetoothHandsfreeVolumeType aIn
 
 nsresult
 Convert(BluetoothHandsfreeWbsConfig aIn, uint8_t& aOut);
 
 nsresult
 Convert(BluetoothPropertyType aIn, uint8_t& aOut);
 
 nsresult
-Convert(const BluetoothRemoteName& aIn, nsAString& aOut);
-
-nsresult
 Convert(BluetoothScanMode aIn, uint8_t& aOut);
 
 nsresult
 Convert(BluetoothSocketType aIn, uint8_t& aOut);
 
 nsresult
 Convert(BluetoothSspVariant aIn, uint8_t& aOut);
 
@@ -352,17 +319,17 @@ PackPDU(const BluetoothHandsfreeServiceT
 
 nsresult
 PackPDU(const BluetoothHandsfreeVolumeType& aIn, DaemonSocketPDU& aPDU);
 
 nsresult
 PackPDU(const BluetoothHandsfreeWbsConfig& aIn, DaemonSocketPDU& aPDU);
 
 nsresult
-PackPDU(const BluetoothNamedValue& aIn, DaemonSocketPDU& aPDU);
+PackPDU(const BluetoothProperty& aIn, DaemonSocketPDU& aPDU);
 
 nsresult
 PackPDU(const BluetoothPinCode& aIn, DaemonSocketPDU& aPDU);
 
 nsresult
 PackPDU(BluetoothPropertyType aIn, DaemonSocketPDU& aPDU);
 
 nsresult
@@ -476,17 +443,27 @@ nsresult
 UnpackPDU(DaemonSocketPDU& aPDU, BluetoothHandsfreeVolumeType& aOut);
 
 nsresult
 UnpackPDU(DaemonSocketPDU& aPDU, BluetoothRemoteInfo& aOut);
 
 inline nsresult
 UnpackPDU(DaemonSocketPDU& aPDU, BluetoothRemoteName& aOut)
 {
-  return aPDU.Read(aOut.mName, sizeof(aOut.mName));
+  nsresult rv = aPDU.Read(aOut.mName, sizeof(aOut.mName));
+  if (NS_FAILED(rv)) {
+    return rv;
+  }
+  /* The PDU stores one extra byte for the trailing \0 character. We
+   * consume the byte, but don't store the character.
+   */
+  if (!aPDU.Consume(1)) {
+    return NS_ERROR_OUT_OF_MEMORY;
+  }
+  return NS_OK;
 }
 
 nsresult
 UnpackPDU(DaemonSocketPDU& aPDU, BluetoothProperty& aOut);
 
 nsresult
 UnpackPDU(DaemonSocketPDU& aPDU, BluetoothPropertyType& aOut);
 
--- a/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp
@@ -637,29 +637,29 @@ BluetoothDaemonInterface::GetAdapterProp
   nsresult rv = static_cast<BluetoothDaemonCoreModule*>
     (mProtocol)->GetAdapterPropertiesCmd(aRes);
   if (NS_FAILED(rv)) {
     DispatchError(aRes, rv);
   }
 }
 
 void
-BluetoothDaemonInterface::GetAdapterProperty(const nsAString& aName,
+BluetoothDaemonInterface::GetAdapterProperty(BluetoothPropertyType aType,
                                              BluetoothResultHandler* aRes)
 {
   nsresult rv = static_cast<BluetoothDaemonCoreModule*>
-    (mProtocol)->GetAdapterPropertyCmd(aName, aRes);
+    (mProtocol)->GetAdapterPropertyCmd(aType, aRes);
   if (NS_FAILED(rv)) {
     DispatchError(aRes, rv);
   }
 }
 
 void
 BluetoothDaemonInterface::SetAdapterProperty(
-  const BluetoothNamedValue& aProperty, BluetoothResultHandler* aRes)
+  const BluetoothProperty& aProperty, BluetoothResultHandler* aRes)
 {
   nsresult rv = static_cast<BluetoothDaemonCoreModule*>
     (mProtocol)->SetAdapterPropertyCmd(aProperty, aRes);
   if (NS_FAILED(rv)) {
     DispatchError(aRes, rv);
   }
 }
 
@@ -673,29 +673,29 @@ BluetoothDaemonInterface::GetRemoteDevic
     (mProtocol)->GetRemoteDevicePropertiesCmd(aRemoteAddr, aRes);
   if (NS_FAILED(rv)) {
     DispatchError(aRes, rv);
   }
 }
 
 void
 BluetoothDaemonInterface::GetRemoteDeviceProperty(
-  const BluetoothAddress& aRemoteAddr, const nsAString& aName,
+  const BluetoothAddress& aRemoteAddr, BluetoothPropertyType aType,
   BluetoothResultHandler* aRes)
 {
   nsresult rv = static_cast<BluetoothDaemonCoreModule*>
-    (mProtocol)->GetRemoteDevicePropertyCmd(aRemoteAddr, aName, aRes);
+    (mProtocol)->GetRemoteDevicePropertyCmd(aRemoteAddr, aType, aRes);
   if (NS_FAILED(rv)) {
     DispatchError(aRes, rv);
   }
 }
 
 void
 BluetoothDaemonInterface::SetRemoteDeviceProperty(
-  const BluetoothAddress& aRemoteAddr, const BluetoothNamedValue& aProperty,
+  const BluetoothAddress& aRemoteAddr, const BluetoothProperty& aProperty,
   BluetoothResultHandler* aRes)
 {
   nsresult rv = static_cast<BluetoothDaemonCoreModule*>
     (mProtocol)->SetRemoteDevicePropertyCmd(aRemoteAddr, aProperty, aRes);
   if (NS_FAILED(rv)) {
     DispatchError(aRes, rv);
   }
 }
@@ -792,17 +792,17 @@ BluetoothDaemonInterface::GetConnectionS
   // NO-OP: no corresponding interface of current BlueZ
 }
 
 /* Authentication */
 
 void
 BluetoothDaemonInterface::PinReply(const BluetoothAddress& aBdAddr,
                                    bool aAccept,
-                                   const nsAString& aPinCode,
+                                   const BluetoothPinCode& aPinCode,
                                    BluetoothResultHandler* aRes)
 {
   nsresult rv = static_cast<BluetoothDaemonCoreModule*>
     (mProtocol)->PinReplyCmd(aBdAddr, aAccept, aPinCode, aRes);
   if (NS_FAILED(rv)) {
     DispatchError(aRes, rv);
   }
 }
--- a/dom/bluetooth/bluedroid/BluetoothDaemonInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonInterface.h
@@ -50,30 +50,30 @@ public:
   void Cleanup(BluetoothResultHandler* aRes) override;
 
   void Enable(BluetoothResultHandler* aRes) override;
   void Disable(BluetoothResultHandler* aRes) override;
 
   /* Adapter Properties */
 
   void GetAdapterProperties(BluetoothResultHandler* aRes) override;
-  void GetAdapterProperty(const nsAString& aName,
+  void GetAdapterProperty(BluetoothPropertyType aType,
                           BluetoothResultHandler* aRes) override;
-  void SetAdapterProperty(const BluetoothNamedValue& aProperty,
+  void SetAdapterProperty(const BluetoothProperty& aProperty,
                           BluetoothResultHandler* aRes) override;
 
   /* Remote Device Properties */
 
   void GetRemoteDeviceProperties(const BluetoothAddress& aRemoteAddr,
                                  BluetoothResultHandler* aRes) override;
   void GetRemoteDeviceProperty(const BluetoothAddress& aRemoteAddr,
-                               const nsAString& aName,
+                               BluetoothPropertyType aType,
                                BluetoothResultHandler* aRes) override;
   void SetRemoteDeviceProperty(const BluetoothAddress& aRemoteAddr,
-                               const BluetoothNamedValue& aProperty,
+                               const BluetoothProperty& aProperty,
                                BluetoothResultHandler* aRes) override;
 
   /* Remote Services */
 
   void GetRemoteServiceRecord(const BluetoothAddress& aRemoteAddr,
                               const BluetoothUuid& aUuid,
                               BluetoothResultHandler* aRes) override;
   void GetRemoteServices(const BluetoothAddress& aRemoteAddr,
@@ -97,17 +97,17 @@ public:
   /* Connection */
 
   void GetConnectionState(const BluetoothAddress& aBdAddr,
                           BluetoothResultHandler* aRes) override;
 
   /* Authentication */
 
   void PinReply(const BluetoothAddress& aBdAddr, bool aAccept,
-                const nsAString& aPinCode,
+                const BluetoothPinCode& aPinCode,
                 BluetoothResultHandler* aRes) override;
 
   void SspReply(const BluetoothAddress& aBdAddr,
                 BluetoothSspVariant aVariant,
                 bool aAccept, uint32_t aPasskey,
                 BluetoothResultHandler* aRes) override;
 
   /* DUT Mode */
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.cpp
@@ -19,31 +19,31 @@ using namespace mozilla::ipc;
 
 const int BluetoothDaemonSocketModule::MAX_NUM_CLIENTS = 1;
 
 // Commands
 //
 
 nsresult
 BluetoothDaemonSocketModule::ListenCmd(BluetoothSocketType aType,
-                                       const nsAString& aServiceName,
+                                       const BluetoothServiceName& aServiceName,
                                        const BluetoothUuid& aServiceUuid,
                                        int aChannel, bool aEncrypt,
                                        bool aAuth,
                                        BluetoothSocketResultHandler* aRes)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsAutoPtr<DaemonSocketPDU> pdu(
     new DaemonSocketPDU(SERVICE_ID, OPCODE_LISTEN,
                         0));
 
   nsresult rv = PackPDU(
     aType,
-    PackConversion<nsAString, BluetoothServiceName>(aServiceName),
+    aServiceName,
     aServiceUuid,
     PackConversion<int, int32_t>(aChannel),
     SocketFlags(aEncrypt, aAuth), *pdu);
   if (NS_FAILED(rv)) {
     return rv;
   }
   rv = Send(pdu, aRes);
   if (NS_FAILED(rv)) {
@@ -301,17 +301,17 @@ BluetoothDaemonSocketInterface::Bluetoot
   MOZ_ASSERT(mModule);
 }
 
 BluetoothDaemonSocketInterface::~BluetoothDaemonSocketInterface()
 { }
 
 void
 BluetoothDaemonSocketInterface::Listen(BluetoothSocketType aType,
-                                       const nsAString& aServiceName,
+                                       const BluetoothServiceName& aServiceName,
                                        const BluetoothUuid& aServiceUuid,
                                        int aChannel, bool aEncrypt,
                                        bool aAuth,
                                        BluetoothSocketResultHandler* aRes)
 {
   MOZ_ASSERT(mModule);
 
   nsresult rv = mModule->ListenCmd(aType, aServiceName, aServiceUuid,
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.h
@@ -34,17 +34,17 @@ public:
 
   virtual nsresult Send(DaemonSocketPDU* aPDU,
                         DaemonSocketResultHandler* aRes) = 0;
 
   // Commands
   //
 
   nsresult ListenCmd(BluetoothSocketType aType,
-                     const nsAString& aServiceName,
+                     const BluetoothServiceName& aServiceName,
                      const BluetoothUuid& aServiceUuid,
                      int aChannel, bool aEncrypt, bool aAuth,
                      BluetoothSocketResultHandler* aRes);
 
   nsresult ConnectCmd(const BluetoothAddress& aBdAddr,
                       BluetoothSocketType aType,
                       const BluetoothUuid& aServiceUuid,
                       int aChannel, bool aEncrypt, bool aAuth,
@@ -107,17 +107,17 @@ private:
 class BluetoothDaemonSocketInterface final
   : public BluetoothSocketInterface
 {
 public:
   BluetoothDaemonSocketInterface(BluetoothDaemonSocketModule* aModule);
   ~BluetoothDaemonSocketInterface();
 
   void Listen(BluetoothSocketType aType,
-              const nsAString& aServiceName,
+              const BluetoothServiceName& aServiceName,
               const BluetoothUuid& aServiceUuid,
               int aChannel, bool aEncrypt, bool aAuth,
               BluetoothSocketResultHandler* aRes) override;
 
   void Connect(const BluetoothAddress& aBdAddr,
                BluetoothSocketType aType,
                const BluetoothUuid& aServiceUuid,
                int aChannel, bool aEncrypt, bool aAuth,
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
@@ -1041,18 +1041,26 @@ nsresult
 BluetoothServiceBluedroid::SetProperty(BluetoothObjectType aType,
                                        const BluetoothNamedValue& aValue,
                                        BluetoothReplyRunnable* aRunnable)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   ENSURE_BLUETOOTH_IS_READY(aRunnable, NS_OK);
 
+  BluetoothProperty property;
+  nsresult rv = NamedValueToProperty(aValue, property);
+  if (NS_FAILED(rv)) {
+    DispatchReplyError(aRunnable, STATUS_PARM_INVALID);
+    return rv;
+  }
+
   mSetAdapterPropertyRunnables.AppendElement(aRunnable);
-  sBtInterface->SetAdapterProperty(aValue,
+  sBtInterface->SetAdapterProperty(
+    property,
     new DispatchReplyErrorResultHandler(mSetAdapterPropertyRunnables,
                                         aRunnable));
 
   return NS_OK;
 }
 
 struct BluetoothServiceBluedroid::GetRemoteServiceRecordRequest final
 {
@@ -1342,17 +1350,24 @@ BluetoothServiceBluedroid::PinReplyInter
 
   BluetoothAddress address;
   nsresult rv = StringToAddress(aDeviceAddress, address);
   if (NS_FAILED(rv)) {
     DispatchReplyError(aRunnable, STATUS_PARM_INVALID);
     return;
   }
 
-  sBtInterface->PinReply(address, aAccept, aPinCode,
+  BluetoothPinCode pinCode;
+  rv = StringToPinCode(aPinCode, pinCode);
+  if (NS_FAILED(rv)) {
+    DispatchReplyError(aRunnable, STATUS_PARM_INVALID);
+    return;
+  }
+
+  sBtInterface->PinReply(address, aAccept, pinCode,
                          new PinReplyResultHandler(aRunnable));
 }
 
 void
 BluetoothServiceBluedroid::SetPinCodeInternal(
   const nsAString& aDeviceAddress, const nsAString& aPinCode,
   BluetoothReplyRunnable* aRunnable)
 {
@@ -1935,17 +1950,17 @@ BluetoothServiceBluedroid::AdapterStateC
     mCreateBondRunnables.Clear();
     mRemoveBondRunnables.Clear();
     mDeviceNameMap.Clear();
 
     // Bluetooth scan mode is SCAN_MODE_CONNECTABLE by default, i.e., it should
     // be connectable and non-discoverable.
     NS_ENSURE_TRUE_VOID(sBtInterface);
     sBtInterface->SetAdapterProperty(
-      BluetoothNamedValue(NS_ConvertUTF8toUTF16("Discoverable"), false),
+      BluetoothProperty(PROPERTY_ADAPTER_SCAN_MODE, SCAN_MODE_CONNECTABLE),
       new SetAdapterPropertyDiscoverableResultHandler());
 
     // Trigger OPP & PBAP managers to listen
     BluetoothOppManager* opp = BluetoothOppManager::Get();
     if (!opp || !opp->Listen()) {
       BT_LOGR("Fail to start BluetoothOppManager listening");
     }
 
@@ -2281,28 +2296,31 @@ BluetoothServiceBluedroid::DiscoveryStat
   if (!mChangeDiscoveryRunnables.IsEmpty()) {
     DispatchReplySuccess(mChangeDiscoveryRunnables[0]);
     mChangeDiscoveryRunnables.RemoveElementAt(0);
   }
 }
 
 void
 BluetoothServiceBluedroid::PinRequestNotification(
-  const BluetoothAddress& aRemoteBdAddr, const nsAString& aBdName, uint32_t aCod)
+  const BluetoothAddress& aRemoteBdAddr, const BluetoothRemoteName& aBdName,
+  uint32_t aCod)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   InfallibleTArray<BluetoothNamedValue> propertiesArray;
 
   // If |aBdName| is empty, get device name from |mDeviceNameMap|;
   // Otherwise update <address, name> mapping with |aBdName|
   nsAutoString bdAddr;
   AddressToString(aRemoteBdAddr, bdAddr);
 
-  nsString bdName(aBdName);
+  nsAutoString bdName;
+  RemoteNameToString(aBdName, bdName);
+
   if (bdName.IsEmpty()) {
     mDeviceNameMap.Get(aRemoteBdAddr, &bdName);
   } else {
     mDeviceNameMap.Remove(aRemoteBdAddr);
     mDeviceNameMap.Put(aRemoteBdAddr, bdName);
   }
 
   AppendNamedValue(propertiesArray, "address", bdAddr);
@@ -2313,29 +2331,31 @@ BluetoothServiceBluedroid::PinRequestNot
 
   DistributeSignal(NS_LITERAL_STRING("PairingRequest"),
                    NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
                    BluetoothValue(propertiesArray));
 }
 
 void
 BluetoothServiceBluedroid::SspRequestNotification(
-  const BluetoothAddress& aRemoteBdAddr, const nsAString& aBdName,
+  const BluetoothAddress& aRemoteBdAddr, const BluetoothRemoteName& aBdName,
   uint32_t aCod, BluetoothSspVariant aPairingVariant, uint32_t aPassKey)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   InfallibleTArray<BluetoothNamedValue> propertiesArray;
 
   // If |aBdName| is empty, get device name from |mDeviceNameMap|;
   // Otherwise update <address, name> mapping with |aBdName|
   nsAutoString bdAddr;
   AddressToString(aRemoteBdAddr, bdAddr);
 
-  nsString bdName(aBdName);
+  nsAutoString bdName;
+  RemoteNameToString(aBdName, bdName);
+
   if (bdName.IsEmpty()) {
     mDeviceNameMap.Get(aRemoteBdAddr, &bdName);
   } else {
     mDeviceNameMap.Remove(aRemoteBdAddr);
     mDeviceNameMap.Put(aRemoteBdAddr, bdName);
   }
 
   /**
@@ -2455,17 +2475,18 @@ BluetoothServiceBluedroid::BondStateChan
   } else if (!bonded && !mRemoveBondRunnables.IsEmpty()) {
     DispatchReplySuccess(mRemoveBondRunnables[0]);
     mRemoveBondRunnables.RemoveElementAt(0);
   }
 }
 
 void
 BluetoothServiceBluedroid::AclStateChangedNotification(
-  BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr, bool aState)
+  BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr,
+  BluetoothAclState aState)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   // FIXME: This will be implemented in the later patchset
 }
 
 void
 BluetoothServiceBluedroid::DutModeRecvNotification(uint16_t aOpcode,
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
@@ -393,30 +393,30 @@ public:
     int aNumProperties, const BluetoothProperty* aProperties) override;
 
   virtual void DeviceFoundNotification(
     int aNumProperties, const BluetoothProperty* aProperties) override;
 
   virtual void DiscoveryStateChangedNotification(bool aState) override;
 
   virtual void PinRequestNotification(const BluetoothAddress& aRemoteBdAddr,
-                                      const nsAString& aBdName,
+                                      const BluetoothRemoteName& aBdName,
                                       uint32_t aCod) override;
   virtual void SspRequestNotification(const BluetoothAddress& aRemoteBdAddr,
-                                      const nsAString& aBdName,
+                                      const BluetoothRemoteName& aBdName,
                                       uint32_t aCod,
                                       BluetoothSspVariant aPairingVariant,
                                       uint32_t aPasskey) override;
 
   virtual void BondStateChangedNotification(
     BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr,
     BluetoothBondState aState) override;
   virtual void AclStateChangedNotification(
     BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr,
-    bool aState) override;
+    BluetoothAclState aState) override;
 
   virtual void DutModeRecvNotification(uint16_t aOpcode,
                                        const uint8_t* aBuf,
                                        uint8_t aLen) override;
   virtual void LeTestModeNotification(BluetoothStatus aStatus,
                                       uint16_t aNumPackets) override;
 
   virtual void EnergyInfoNotification(
--- a/dom/bluetooth/bluedroid/BluetoothSocket.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothSocket.cpp
@@ -727,26 +727,32 @@ BluetoothSocket::Listen(const nsAString&
                         BluetoothSocketType aType,
                         int aChannel,
                         bool aAuth, bool aEncrypt,
                         MessageLoop* aConsumerLoop,
                         MessageLoop* aIOLoop)
 {
   MOZ_ASSERT(!mImpl);
 
+  BluetoothServiceName serviceName;
+  nsresult rv = StringToServiceName(aServiceName, serviceName);
+  if (NS_FAILED(rv)) {
+    return rv;
+  }
+
   SetConnectionStatus(SOCKET_LISTENING);
 
   mImpl = new DroidSocketImpl(aConsumerLoop, aIOLoop, this);
 
   BluetoothSocketResultHandler* res = new ListenResultHandler(mImpl);
   SetCurrentResultHandler(res);
 
   sBluetoothSocketInterface->Listen(
     aType,
-    aServiceName, aServiceUuid, aChannel,
+    serviceName, aServiceUuid, aChannel,
     aEncrypt, aAuth, res);
 
   return NS_OK;
 }
 
 nsresult
 BluetoothSocket::Listen(const nsAString& aServiceName,
                         const BluetoothUuid& aServiceUuid,
--- a/dom/bluetooth/common/BluetoothCommon.h
+++ b/dom/bluetooth/common/BluetoothCommon.h
@@ -307,16 +307,21 @@ enum BluetoothStatus {
   STATUS_UNSUPPORTED,
   STATUS_PARM_INVALID,
   STATUS_UNHANDLED,
   STATUS_AUTH_FAILURE,
   STATUS_RMT_DEV_DOWN,
   NUM_STATUS
 };
 
+enum BluetoothAclState {
+  ACL_STATE_CONNECTED,
+  ACL_STATE_DISCONNECTED
+};
+
 enum BluetoothBondState {
   BOND_STATE_NONE,
   BOND_STATE_BONDING,
   BOND_STATE_BONDED
 };
 
 /* Physical transport for GATT connections to remote dual-mode devices */
 enum BluetoothTransport {
@@ -487,28 +492,41 @@ struct BluetoothUuid {
   }
 
   bool operator!=(const BluetoothUuid& aOther) const
   {
     return !(*this == aOther);
   }
 };
 
+struct BluetoothPinCode {
+  uint8_t mPinCode[16]; /* not \0-terminated */
+  uint8_t mLength;
+};
+
+struct BluetoothServiceName {
+  uint8_t mName[255]; /* not \0-terminated */
+};
+
 struct BluetoothServiceRecord {
   BluetoothUuid mUuid;
   uint16_t mChannel;
   char mName[256];
 };
 
 struct BluetoothRemoteInfo {
   int mVerMajor;
   int mVerMinor;
   int mManufacturer;
 };
 
+struct BluetoothRemoteName {
+  uint8_t mName[248]; /* not \0-terminated */
+};
+
 struct BluetoothProperty {
   /* Type */
   BluetoothPropertyType mType;
 
   /* Value
    */
 
   /* PROPERTY_BDADDR */
@@ -537,16 +555,78 @@ struct BluetoothProperty {
   /* PROPERTY_SERVICE_RECORD */
   BluetoothServiceRecord mServiceRecord;
 
   /* PROPERTY_SCAN_MODE */
   BluetoothScanMode mScanMode;
 
   /* PROPERTY_REMOTE_VERSION_INFO */
   BluetoothRemoteInfo mRemoteInfo;
+
+  BluetoothProperty()
+    : mType(PROPERTY_UNKNOWN)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             const BluetoothAddress& aBdAddress)
+    : mType(aType)
+    , mBdAddress(aBdAddress)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             const nsAString& aString)
+    : mType(aType)
+    , mString(aString)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             const nsTArray<BluetoothUuid>& aUuidArray)
+    : mType(aType)
+    , mUuidArray(aUuidArray)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             const nsTArray<BluetoothAddress>& aBdAddressArray)
+    : mType(aType)
+    , mBdAddressArray(aBdAddressArray)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType, uint32_t aUint32)
+    : mType(aType)
+    , mUint32(aUint32)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType, int32_t aInt32)
+    : mType(aType)
+    , mInt32(aInt32)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             BluetoothTypeOfDevice aTypeOfDevice)
+    : mType(aType)
+    , mTypeOfDevice(aTypeOfDevice)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             const BluetoothServiceRecord& aServiceRecord)
+    : mType(aType)
+    , mServiceRecord(aServiceRecord)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             BluetoothScanMode aScanMode)
+    : mType(aType)
+    , mScanMode(aScanMode)
+  { }
+
+  explicit BluetoothProperty(BluetoothPropertyType aType,
+                             const BluetoothRemoteInfo& aRemoteInfo)
+    : mType(aType)
+    , mRemoteInfo(aRemoteInfo)
+  { }
 };
 
 enum BluetoothSocketType {
   RFCOMM = 1,
   SCO    = 2,
   L2CAP  = 3,
   EL2CAP = 4
 };
--- a/dom/bluetooth/common/BluetoothInterface.cpp
+++ b/dom/bluetooth/common/BluetoothInterface.cpp
@@ -871,35 +871,36 @@ BluetoothNotificationHandler::DeviceFoun
 { }
 
 void
 BluetoothNotificationHandler::DiscoveryStateChangedNotification(bool aState)
 { }
 
 void
 BluetoothNotificationHandler::PinRequestNotification(
-  const BluetoothAddress& aRemoteBdAddr, const nsAString& aBdName,
+  const BluetoothAddress& aRemoteBdAddr, const BluetoothRemoteName& aBdName,
   uint32_t aCod)
 { }
 
 void
 BluetoothNotificationHandler::SspRequestNotification(
-  const BluetoothAddress& aRemoteBdAddr, const nsAString& aBdName,
+  const BluetoothAddress& aRemoteBdAddr, const BluetoothRemoteName& aBdName,
   uint32_t aCod, BluetoothSspVariant aPairingVariant, uint32_t aPassKey)
 { }
 
 void
 BluetoothNotificationHandler::BondStateChangedNotification(
   BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr,
   BluetoothBondState aState)
 { }
 
 void
 BluetoothNotificationHandler::AclStateChangedNotification(
-  BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr, bool aState)
+  BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr,
+  BluetoothAclState aState)
 { }
 
 void
 BluetoothNotificationHandler::DutModeRecvNotification(uint16_t aOpcode,
                                                       const uint8_t* aBuf,
                                                       uint8_t aLen)
 { }
 
--- a/dom/bluetooth/common/BluetoothInterface.h
+++ b/dom/bluetooth/common/BluetoothInterface.h
@@ -51,17 +51,17 @@ protected:
 };
 
 class BluetoothSocketInterface
 {
 public:
   // Init and Cleanup is handled by BluetoothInterface
 
   virtual void Listen(BluetoothSocketType aType,
-                      const nsAString& aServiceName,
+                      const BluetoothServiceName& aServiceName,
                       const BluetoothUuid& aServiceUuid,
                       int aChannel, bool aEncrypt, bool aAuth,
                       BluetoothSocketResultHandler* aRes) = 0;
 
   virtual void Connect(const BluetoothAddress& aBdAddr,
                        BluetoothSocketType aType,
                        const BluetoothUuid& aServiceUuid,
                        int aChannel, bool aEncrypt, bool aAuth,
@@ -944,30 +944,30 @@ public:
     int aNumProperties, const BluetoothProperty* aProperties);
 
   virtual void DeviceFoundNotification(
     int aNumProperties, const BluetoothProperty* aProperties);
 
   virtual void DiscoveryStateChangedNotification(bool aState);
 
   virtual void PinRequestNotification(const BluetoothAddress& aRemoteBdAddr,
-                                      const nsAString& aBdName,
+                                      const BluetoothRemoteName& aBdName,
                                       uint32_t aCod);
   virtual void SspRequestNotification(const BluetoothAddress& aRemoteBdAddr,
-                                      const nsAString& aBdName,
+                                      const BluetoothRemoteName& aBdName,
                                       uint32_t aCod,
                                       BluetoothSspVariant aPairingVariant,
                                       uint32_t aPassKey);
 
   virtual void BondStateChangedNotification(
     BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr,
     BluetoothBondState aState);
   virtual void AclStateChangedNotification(
     BluetoothStatus aStatus, const BluetoothAddress& aRemoteBdAddr,
-    bool aState);
+    BluetoothAclState aState);
 
   virtual void DutModeRecvNotification(uint16_t aOpcode,
                                        const uint8_t* aBuf, uint8_t aLen);
   virtual void LeTestModeNotification(BluetoothStatus aStatus,
                                       uint16_t aNumPackets);
 
   virtual void EnergyInfoNotification(const BluetoothActivityEnergyInfo& aInfo);
 
@@ -1033,30 +1033,30 @@ public:
   virtual void Cleanup(BluetoothResultHandler* aRes) = 0;
 
   virtual void Enable(BluetoothResultHandler* aRes) = 0;
   virtual void Disable(BluetoothResultHandler* aRes) = 0;
 
   /* Adapter Properties */
 
   virtual void GetAdapterProperties(BluetoothResultHandler* aRes) = 0;
-  virtual void GetAdapterProperty(const nsAString& aName,
+  virtual void GetAdapterProperty(BluetoothPropertyType,
                                   BluetoothResultHandler* aRes) = 0;
-  virtual void SetAdapterProperty(const BluetoothNamedValue& aProperty,
+  virtual void SetAdapterProperty(const BluetoothProperty& aProperty,
                                   BluetoothResultHandler* aRes) = 0;
 
   /* Remote Device Properties */
 
   virtual void GetRemoteDeviceProperties(const BluetoothAddress& aRemoteAddr,
                                          BluetoothResultHandler* aRes) = 0;
   virtual void GetRemoteDeviceProperty(const BluetoothAddress& aRemoteAddr,
-                                       const nsAString& aName,
+                                       BluetoothPropertyType aType,
                                        BluetoothResultHandler* aRes) = 0;
   virtual void SetRemoteDeviceProperty(const BluetoothAddress& aRemoteAddr,
-                                       const BluetoothNamedValue& aProperty,
+                                       const BluetoothProperty& aProperty,
                                        BluetoothResultHandler* aRes) = 0;
 
   /* Remote Services */
 
   virtual void GetRemoteServiceRecord(const BluetoothAddress& aRemoteAddr,
                                       const BluetoothUuid& aUuid,
                                       BluetoothResultHandler* aRes) = 0;
   virtual void GetRemoteServices(const BluetoothAddress& aRemoteAddr,
@@ -1080,17 +1080,17 @@ public:
   /* Connection */
 
   virtual void GetConnectionState(const BluetoothAddress& aBdAddr,
                                   BluetoothResultHandler* aRes) = 0;
 
   /* Authentication */
 
   virtual void PinReply(const BluetoothAddress& aBdAddr, bool aAccept,
-                        const nsAString& aPinCode,
+                        const BluetoothPinCode& aPinCode,
                         BluetoothResultHandler* aRes) = 0;
 
   virtual void SspReply(const BluetoothAddress& aBdAddr,
                         BluetoothSspVariant aVariant,
                         bool aAccept, uint32_t aPasskey,
                         BluetoothResultHandler* aRes) = 0;
 
   /* DUT Mode */
--- a/dom/bluetooth/common/BluetoothUtils.cpp
+++ b/dom/bluetooth/common/BluetoothUtils.cpp
@@ -56,16 +56,136 @@ StringToAddress(const nsAString& aString
                    &aAddress.mAddr[4],
                    &aAddress.mAddr[5]);
   if (res < static_cast<ssize_t>(MOZ_ARRAY_LENGTH(aAddress.mAddr))) {
     return NS_ERROR_ILLEGAL_VALUE;
   }
   return NS_OK;
 }
 
+nsresult
+StringToPinCode(const nsAString& aString, BluetoothPinCode& aPinCode)
+{
+  NS_ConvertUTF16toUTF8 stringUTF8(aString);
+
+  auto len = stringUTF8.Length();
+
+  if (len > sizeof(aPinCode.mPinCode)) {
+    BT_LOGR("Service-name string too long");
+    return NS_ERROR_ILLEGAL_VALUE;
+  }
+
+  auto str = stringUTF8.get();
+
+  memcpy(aPinCode.mPinCode, str, len);
+  memset(aPinCode.mPinCode + len, 0, sizeof(aPinCode.mPinCode) - len);
+  aPinCode.mLength = len;
+
+  return NS_OK;
+}
+
+nsresult
+StringToPropertyType(const nsAString& aString, BluetoothPropertyType& aType)
+{
+  if (aString.EqualsLiteral("Name")) {
+    aType = PROPERTY_BDNAME;
+  } else if (aString.EqualsLiteral("Discoverable")) {
+    aType = PROPERTY_ADAPTER_SCAN_MODE;
+  } else if (aString.EqualsLiteral("DiscoverableTimeout")) {
+    aType = PROPERTY_ADAPTER_DISCOVERY_TIMEOUT;
+  } else {
+    BT_LOGR("Invalid property name: %s", NS_ConvertUTF16toUTF8(aString).get());
+    aType = PROPERTY_UNKNOWN; // silences compiler warning
+    return NS_ERROR_ILLEGAL_VALUE;
+  }
+  return NS_OK;
+}
+
+nsresult
+NamedValueToProperty(const BluetoothNamedValue& aValue,
+                     BluetoothProperty& aProperty)
+{
+  nsresult rv = StringToPropertyType(aValue.name(), aProperty.mType);
+  if (NS_FAILED(rv)) {
+    return rv;
+  }
+
+  switch (aProperty.mType) {
+    case PROPERTY_BDNAME:
+      if (aValue.value().type() != BluetoothValue::TnsString) {
+        BT_LOGR("Bluetooth property value is not a string");
+        return NS_ERROR_ILLEGAL_VALUE;
+      }
+      // Set name
+      aProperty.mString = aValue.value().get_nsString();
+      break;
+
+    case PROPERTY_ADAPTER_SCAN_MODE:
+      if (aValue.value().type() != BluetoothValue::Tbool) {
+        BT_LOGR("Bluetooth property value is not a boolean");
+        return NS_ERROR_ILLEGAL_VALUE;
+      }
+      // Set scan mode
+      if (aValue.value().get_bool()) {
+        aProperty.mScanMode = SCAN_MODE_CONNECTABLE_DISCOVERABLE;
+      } else {
+        aProperty.mScanMode = SCAN_MODE_CONNECTABLE;
+      }
+      break;
+
+    case PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
+      if (aValue.value().type() != BluetoothValue::Tuint32_t) {
+        BT_LOGR("Bluetooth property value is not an unsigned integer");
+        return NS_ERROR_ILLEGAL_VALUE;
+      }
+      // Set discoverable timeout
+      aProperty.mUint32 = aValue.value().get_uint32_t();
+      break;
+
+    default:
+      BT_LOGR("Invalid property value type");
+      return NS_ERROR_ILLEGAL_VALUE;
+  }
+
+  return NS_OK;
+}
+
+void
+RemoteNameToString(const BluetoothRemoteName& aRemoteName, nsAString& aString)
+{
+  auto name = reinterpret_cast<const char*>(aRemoteName.mName);
+
+  /* The content in |BluetoothRemoteName| is not a C string and not
+   * terminated by \0. We use |strnlen| to limit its length.
+   */
+  aString =
+    NS_ConvertUTF8toUTF16(name, strnlen(name, sizeof(aRemoteName.mName)));
+}
+
+nsresult
+StringToServiceName(const nsAString& aString,
+                    BluetoothServiceName& aServiceName)
+{
+  NS_ConvertUTF16toUTF8 serviceNameUTF8(aString);
+
+  auto len = serviceNameUTF8.Length();
+
+  if (len > sizeof(aServiceName.mName)) {
+    BT_LOGR("Service-name string too long");
+    return NS_ERROR_ILLEGAL_VALUE;
+  }
+
+  auto str = serviceNameUTF8.get();
+
+  memcpy(aServiceName.mName, str, len);
+  memset(aServiceName.mName + len, 0, sizeof(aServiceName.mName) - len);
+
+  return NS_OK;
+}
+
 void
 UuidToString(const BluetoothUuid& aUuid, nsAString& aString)
 {
   char uuidStr[37];
   uint32_t uuid0, uuid4;
   uint16_t uuid1, uuid2, uuid3, uuid5;
 
   memcpy(&uuid0, &aUuid.mUuid[0], sizeof(uint32_t));
--- a/dom/bluetooth/common/BluetoothUtils.h
+++ b/dom/bluetooth/common/BluetoothUtils.h
@@ -29,16 +29,53 @@ class BluetoothValue;
 
 void
 AddressToString(const BluetoothAddress& aAddress, nsAString& aString);
 
 nsresult
 StringToAddress(const nsAString& aString, BluetoothAddress& aAddress);
 
 //
+// Pin code/string conversion
+//
+
+nsresult
+StringToPinCode(const nsAString& aString, BluetoothPinCode& aPinCode);
+
+//
+// Property type/string conversion
+//
+
+nsresult
+StringToPropertyType(const nsAString& aString, BluetoothPropertyType& aType);
+
+//
+// Property conversion
+//
+
+nsresult
+NamedValueToProperty(const BluetoothNamedValue& aIn,
+                     BluetoothProperty& aProperty);
+
+//
+// Remote name/string conversion
+//
+
+void
+RemoteNameToString(const BluetoothRemoteName& aRemoteName, nsAString& aString);
+
+//
+// Service name/string conversion
+//
+
+nsresult
+StringToServiceName(const nsAString& aString,
+                    BluetoothServiceName& aServiceName);
+
+//
 // BluetoothUuid <-> uuid string conversion
 //
 
 /**
  * Convert BluetoothUuid object to xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx uuid string.
  *
  * Note: This utility function is used by gecko internal only to convert
  * BluetoothUuid created by bluetooth stack to uuid string representation.
--- a/testing/taskcluster/scripts/phone-builder/pre-build.sh
+++ b/testing/taskcluster/scripts/phone-builder/pre-build.sh
@@ -26,16 +26,21 @@ tc-vcs repo-checkout $WORKSPACE/B2G http
 rm -f $WORKSPACE/B2G/gecko
 ln -s $WORKSPACE/gecko $WORKSPACE/B2G/gecko
 
 debug_flag=""
 if [ 0$B2G_DEBUG -ne 0 ]; then
   debug_flag='--debug'
 fi
 
+if ! aws --output=text s3 ls s3://b2g-phone-backups/; then
+    echo "[aws:error] Failed to connect to AWS! Are the AWS credentials ok?"
+    exit 1
+fi
+
 backup_file=$(aws --output=text s3 ls s3://b2g-phone-backups/$TARGET/ | tail -1 | awk '{print $NF}')
 
 if echo $backup_file | grep '\.tar\.bz2'; then
     aws s3 cp s3://b2g-phone-backups/$TARGET/$backup_file .
     tar -xjf $backup_file -C $WORKSPACE/B2G
     rm -f $backup_file
 fi