commit | 00c7fad2934a89d4b55979189fe79f8e83230322 | [log] [tgz] |
---|---|---|
author | Matadeen Mishra <matade@codeaurora.org> | Mon Feb 01 19:20:54 2016 +0530 |
committer | Andre Eisenbach <eisenbach@google.com> | Fri Mar 25 13:11:35 2016 -0700 |
tree | ded9ea7115a6eff6000efd8f79eb7c525bf60329 | |
parent | 278d75ecf965b505c93cd152b649f1abba7e9fcc [diff] |
Correcting sniff behaviour in multi-connection scenario Use case: When multiple profiles are connected on same link and if any one of the profiles deregisters with powermanager, powermanager will initiate a sniff when it removes the timer for one profile, even if a timeout did not trigger for other profiles. Steps: 1. Turn on BT 2. Pair with Mi band (Wearable device) 3. Pair with carkit 4. Turn off BT 5. Turn on BT HF and A2DP connection should successful after BT on to carkit. Failure: HF connection fails. Root Cause: powermanager initiates a sniff when it removes the timer for one profile Even if a timeout did not trigger for other profiles. Fix: When multiple profiles connect on the same link and if any one profile deregisters with powermanager, pm should stop the timer for that profile and restart the other profiles timers. Bug: 27852645 Change-Id: I8e215a9d868291976c70ff32b61145b4360a7f8f
Just build AOSP - Fluoride is there by default.
Instructions for Ubuntu, tested on 15.10 with GCC 5.2.1.
sudo apt-get install libevent-dev
sudo apt-get install ninja-build
or download binary from https://github.com/ninja-build/ninja/releases
Get sha1 of current version from here and then download corresponding executable:
wget -O gn http://storage.googleapis.com/chromium-gn/<gn.sha1>
i.e. if sha1 is “3491f6687bd9f19946035700eb84ce3eed18c5fa” (value from 24 Feb 2016) do
wget -O gn http://storage.googleapis.com/chromium-gn/3491f6687bd9f19946035700eb84ce3eed18c5fa
Then make binary executable and put it on your PATH, i.e.:
chmod a+x ./gn sudo mv ./gn /usr/bin
mkdir ~/fluoride cd ~/fluoride git clone https://android.googlesource.com/platform/packages/modules/Bluetooth/system
Then fetch third party dependencies:
cd ~/fluoride/bt mkdir third_party git clone https://github.com/google/googletest.git git clone https://android.googlesource.com/platform/external/libchrome git clone https://android.googlesource.com/platform/external/modp_b64
And third party dependencies of third party dependencies:
cd fluoride/bt/third_party/libchrome/base/third_party mkdir valgrind cd valgrind curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h
Fluoride currently has dependency on some internal Android projects, which also need to be downloaded. This will be removed in future:
cd ~/fluoride git clone https://android.googlesource.com/platform/system/core git clone https://android.googlesource.com/platform/hardware/libhardware git clone https://android.googlesource.com/platform/system/media
We need to configure some paths to make the build successful. Run:
cd ~/fluoride/bt gn args out/Default
This will prompt you to fill the contents of your “out/Default/args.gn” file. Make it look like below. Replace “/home/job” with path to your home directory, and don't use “~” in build arguments:
# Build arguments go here. Examples: # is_component_build = true # is_debug = false # See "gn args <out_dir> --list" for available build arguments. libhw_include_path = "/home/job/fluoride/libhardware/include" core_include_path = "/home/job/fluoride/core/include" audio_include_path = "/home/job/fluoride/media/audio/include"
Then generate your build files by calling
cd ~/fluoride/bt gn gen out/Default
cd ~/fluoride/bt ninja -C out/Default all
This will build all targets (the shared library, executables, tests, etc) and put them in out/Default. To build an individual target, replace “all” with the target of your choice, e.g. ninja -C out/Default net_test_osi
.
cd ~/fluoride/bt/out/Default LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride