However, if your project does not yet build with soong, you can use bear to generate it from make files on Android.
- Install Bear
- Create an
incremental_build.shscript with the following contents and put it somwhere, like in
- Run the following on the target you'd like the
compile_commands.jsonfor, for example - you can do the following for surfaceflinger
bear bash ~/bin/incremental_build.sh \ frameworks/native/services/surfaceflinger