• Home
Name Date Size #Lines LOC

..--

audio_a2dp_hw/03-May-2024-2,3531,673

audio_hearing_aid_hw/03-May-2024-2,2821,635

binder/03-May-2024-2,404932

bta/03-May-2024-72,42642,373

btcore/03-May-2024-1,7451,043

btif/03-May-2024-46,52530,434

build/03-May-2024-1,2051,065

conf/03-May-2024-18241

device/03-May-2024-1,6711,099

doc/03-May-2024-788619

embdrv/03-May-2024-11,7667,069

hci/03-May-2024-4,6962,909

include/03-May-2024-5,3332,869

internal_include/03-May-2024-2,4041,460

main/03-May-2024-1,086679

osi/03-May-2024-11,0896,865

packet/03-May-2024-7,2484,368

profile/avrcp/03-May-2024-4,3083,005

proto/03-May-2024-306235

service/03-May-2024-20,78312,981

stack/03-May-2024-157,89791,036

test/03-May-2024-2,2891,587

tools/03-May-2024-3,6812,723

types/03-May-2024-914591

udrv/03-May-2024-934546

utils/03-May-2024-241134

vendor_libs/03-May-2024-10,7257,169

vnd/03-May-2024-7716

.clang-formatD03-May-2024808 2522

.gitignoreD03-May-202427 43

.gnD03-May-2024884 2320

Android.bpD03-May-2024327 2524

Android.mkD03-May-202437 21

BUILD.gnD03-May-20241.4 KiB4943

CleanSpec.mkD03-May-20242.4 KiB542

EventLogTags.logtagsD03-May-20241.3 KiB3937

MODULE_LICENSE_APACHE2D03-May-20240

NOTICED03-May-202411.1 KiB203169

OWNERSD03-May-2024131 97

PREUPLOAD.cfgD03-May-202477 74

README.mdD03-May-20242.9 KiB11283

README.md

1# Fluoride Bluetooth stack
2
3## Building and running on AOSP
4Just build AOSP - Fluoride is there by default.
5
6## Building and running on Linux
7
8Instructions for Ubuntu, tested on 14.04 with Clang 3.5.0 and 16.10 with Clang
9 3.8.0
10
11### Download source
12
13```sh
14mkdir ~/fluoride
15cd ~/fluoride
16git clone https://android.googlesource.com/platform/system/bt
17```
18
19Install dependencies (require sudo access):
20
21```sh
22cd ~/fluoride/bt
23build/install_deps.sh
24```
25
26Then fetch third party dependencies:
27
28```sh
29cd ~/fluoride/bt
30mkdir third_party
31cd third_party
32git clone https://github.com/google/googletest.git
33git clone https://android.googlesource.com/platform/external/aac
34git clone https://android.googlesource.com/platform/external/libchrome
35git clone https://android.googlesource.com/platform/external/libldac
36git clone https://android.googlesource.com/platform/external/modp_b64
37git clone https://android.googlesource.com/platform/external/tinyxml2
38```
39
40And third party dependencies of third party dependencies:
41
42```sh
43cd fluoride/bt/third_party/libchrome/base/third_party
44mkdir valgrind
45cd valgrind
46curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h
47curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h
48```
49
50NOTE: If system/bt is checked out under AOSP, then create symbolic links instead
51of downloading sources
52
53```
54cd system/bt
55mkdir third_party
56cd third_party
57ln -s ../../../external/aac aac
58ln -s ../../../external/libchrome libchrome
59ln -s ../../../external/libldac libldac
60ln -s ../../../external/modp_b64 modp_b64
61ln -s ../../../external/tinyxml2 tinyxml2
62ln -s ../../../external/googletest googletest
63```
64
65### Generate your build files
66
67```sh
68cd ~/fluoride/bt
69gn gen out/Default
70```
71
72### Build
73
74```sh
75cd ~/fluoride/bt
76ninja -C out/Default all
77```
78
79This will build all targets (the shared library, executables, tests, etc) and
80 put them in out/Default. To build an individual target, replace "all" with the
81 target of your choice, e.g. ```ninja -C out/Default net_test_osi```.
82
83### Run
84
85```sh
86cd ~/fluoride/bt/out/Default
87LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride
88```
89
90### Eclipse IDE Support
91
921. Follows the Chromium project
93 [Eclipse Setup Instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_eclipse_dev.md)
94 until "Optional: Building inside Eclipse" section (don't do that section, we
95 will set it up differently)
96
972. Generate Eclipse settings:
98
99  ```sh
100  cd system/bt
101  gn gen --ide=eclipse out/Default
102  ```
103
1043. In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML
105 location under system/bt/out/Default
106
1074. Right click on the project. Go to Preferences->C/C++ Build->Builder Settings.
108 Uncheck "Use default build command", but instead using "ninja -C out/Default"
109
1105. Goto Behaviour tab, change clean command to "-t clean"
111
112