|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| audio_a2dp_hw/ | | 03-May-2024 | - | 2,220 | 1,571 |
| bta/ | | 03-May-2024 | - | 74,675 | 42,917 |
| btcore/ | | 03-May-2024 | - | 2,176 | 1,308 |
| btif/ | | 03-May-2024 | - | 43,299 | 27,509 |
| build/ | | 03-May-2024 | - | 1,201 | 1,061 |
| conf/ | | 03-May-2024 | - | 179 | 41 |
| device/ | | 03-May-2024 | - | 1,652 | 1,083 |
| doc/ | | 03-May-2024 | - | 788 | 619 |
| embdrv/ | | 03-May-2024 | - | 10,638 | 6,286 |
| hci/ | | 03-May-2024 | - | 4,629 | 2,856 |
| include/ | | 03-May-2024 | - | 2,447 | 1,492 |
| main/ | | 03-May-2024 | - | 1,050 | 644 |
| osi/ | | 03-May-2024 | - | 11,380 | 7,039 |
| service/ | | 03-May-2024 | - | 21,301 | 13,276 |
| stack/ | | 03-May-2024 | - | 155,528 | 89,228 |
| test/ | | 03-May-2024 | - | 2,008 | 1,358 |
| tools/ | | 03-May-2024 | - | 3,694 | 2,736 |
| types/ | | 03-May-2024 | - | 375 | 255 |
| udrv/ | | 03-May-2024 | - | 948 | 545 |
| utils/ | | 03-May-2024 | - | 241 | 134 |
| vendor_libs/ | | 03-May-2024 | - | 8,326 | 5,748 |
| vnd/ | | 03-May-2024 | - | 77 | 16 |
| .clang-format | D | 03-May-2024 | 812 | 25 | 22 |
| .gitignore | D | 03-May-2024 | 27 | 4 | 3 |
| .gn | D | 03-May-2024 | 888 | 23 | 20 |
| Android.bp | D | 03-May-2024 | 257 | 21 | 20 |
| Android.mk | D | 03-May-2024 | 37 | 2 | 1 |
| BUILD.gn | D | 03-May-2024 | 1.4 KiB | 49 | 43 |
| CleanSpec.mk | D | 03-May-2024 | 2.4 KiB | 54 | 2 |
| EventLogTags.logtags | D | 03-May-2024 | 1.3 KiB | 39 | 37 |
| MODULE_LICENSE_APACHE2 | D | 03-May-2024 | 0 | | |
| NOTICE | D | 03-May-2024 | 11.1 KiB | 203 | 169 |
| OWNERS | D | 03-May-2024 | 239 | 14 | 11 |
| PREUPLOAD.cfg | D | 03-May-2024 | 77 | 7 | 4 |
| README.md | D | 03-May-2024 | 3 KiB | 114 | 85 |
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
38git clone https://android.googlesource.com/platform/hardware/libhardware
39```
40
41And third party dependencies of third party dependencies:
42
43```sh
44cd fluoride/bt/third_party/libchrome/base/third_party
45mkdir valgrind
46cd valgrind
47curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h
48curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h
49```
50
51NOTE: If system/bt is checked out under AOSP, then create symbolic links instead
52of downloading sources
53
54```
55cd system/bt
56mkdir third_party
57cd third_party
58ln -s ../../../external/aac aac
59ln -s ../../../external/libchrome libchrome
60ln -s ../../../external/libldac libldac
61ln -s ../../../external/modp_b64 modp_b64
62ln -s ../../../external/tinyxml2 tinyxml2
63ln -s ../../../hardware/libhardware libhardware
64ln -s ../../../external/googletest googletest
65```
66
67### Generate your build files
68
69```sh
70cd ~/fluoride/bt
71gn gen out/Default
72```
73
74### Build
75
76```sh
77cd ~/fluoride/bt
78ninja -C out/Default all
79```
80
81This will build all targets (the shared library, executables, tests, etc) and
82 put them in out/Default. To build an individual target, replace "all" with the
83 target of your choice, e.g. ```ninja -C out/Default net_test_osi```.
84
85### Run
86
87```sh
88cd ~/fluoride/bt/out/Default
89LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride
90```
91
92### Eclipse IDE Support
93
941. Follows the Chromium project
95 [Eclipse Setup Instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_eclipse_dev.md)
96 until "Optional: Building inside Eclipse" section (don't do that section, we
97 will set it up differently)
98
992. Generate Eclipse settings:
100
101 ```sh
102 cd system/bt
103 gn gen --ide=eclipse out/Default
104 ```
105
1063. In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML
107 location under system/bt/out/Default
108
1094. Right click on the project. Go to Preferences->C/C++ Build->Builder Settings.
110 Uncheck "Use default build command", but instead using "ninja -C out/Default"
111
1125. Goto Behaviour tab, change clean command to "-t clean"
113
114