Questions tagged [android-soong]

Soong is the replacement for the old Android make-based build system. It replaces Android.mk files with Android.bp files, which are JSON-like simple declarative descriptions of modules to build.

Soong is the replacement for the old Android make-based build system. It replaces Android.mk files with Android.bp files, which are JSON-like simple declarative descriptions of modules to build.

See https://android.googlesource.com/platform/build/soong/

82 questions
3
votes
2 answers

Android Oreo new build system (soong / ninja)

I am in the process of migrating an NDK application from AOSP 7 to 8 and right away I have two (related) issues. 1) I used to build my module with mm -B, but now it seems -B is no longer an accepted option. 2) How can I do a clean of just my module?…
Donato Azevedo
  • 1,378
  • 1
  • 13
  • 22
2
votes
0 answers

AOSP System Apps with Jetpack Compose

Does AOSP support Jetpack Compose for System Applications? If so what changes have to be done in Android.bp file?
froots
  • 53
  • 3
2
votes
0 answers

Android ASOP build error while adding third party plugin of Firebase in Android.bp

I'm trying to build an ASOP build which uses some external libs like Firebase. (In ASOP source code) While adding Firebase plugin in Android.bp getting error like "depends on undefined module "com.google.gms.google-services" Is there any alternative…
Binil Surendran
  • 2,524
  • 6
  • 35
  • 58
2
votes
1 answer

Android build failing during soong bootsrap -- uses all resources and hangs

I'm building AOSP11 and building on Ubuntu 18.04 and early in the build process I get the following error: soong bootstrap failed with: exit status 1 It fails during this step: out/soong/.bootstrap/bin/soong_build out/soong/build.ninja It runs for…
VictorV
  • 41
  • 2
  • 4
2
votes
0 answers

How to get the Dependencies(direct & transitive) for android modules built using soong (Android.bp)

In aosp module containing Android.bp file uses soong m to build them In gradle project we can get the dependecies using gradle dependencies https://stackoverflow.com/a/35235229/2018343 Is there similar command in soong? or is there anyother way to…
Dinesh Ravi
  • 1,209
  • 1
  • 17
  • 35
2
votes
0 answers

build.ninja generate took too long time on 8G ram machine

Building machine info(Non building status): total used free shared buff/cache available Mem: 7.7Gi 314Mi 7.2Gi 0.0Ki 181Mi 7.2Gi Swap: 17Gi 1.4Gi …
lenge
  • 81
  • 2
  • 8
2
votes
0 answers

Create go script to filter Srcs based on condition

This is from reference to What is art.go? And why is it considered a way to write conditionals in bp files?. My use case need to segregate some source files based on condition. Is it possible to achieve something similar to ifeq case we add in .mk…
2
votes
1 answer

How to use soong namespaces in order to conditionally compile modules

I'm in the process of converting an Android.mk file to an Android.bp. The Android.mk file dynamically linked libraries within the /my/example/dir, choosing whether or not to link them based on a conditional using an environmental variable that was…
2
votes
1 answer

AOSP build error: unrecognized module type "hidl_package_root"

I'm keep getting that error in soong, while trying to build aosp. When I type make, this is the…
m4rci
  • 21
  • 1
  • 2
2
votes
0 answers

Mapping Android platform(AOSP) test types to Soong module types?

I'm having some hard time to understand the different Android platform test types and how it maps to the Soong module types Basically from what I read: Local unit test (which runs on local JVM) Instrumented tests (exercise framework APIs via…
Chen Xie
  • 3,849
  • 8
  • 27
  • 46
2
votes
0 answers

How to make decisions based on property values written in Android.bp w.r.t. Soong?

I'm writing a wrapper over a Soong's module type, where I want to add some additional checks. First, I have registered my custom module type : func init() { android.RegisterModuleType("my_cc_library_static", MyStaticLibrary) } Second, I've…
2
votes
1 answer

Build an application into Android system with Android.bp instead of Android.mk

I need help with Android.bp script used by the new Soong application build system in AOSP. I can't build simple HelloWorld application for Android Oreo, with new build scripts Android.bp my script: android_app { name: "AmpTest", certificate:…
westman
  • 61
  • 2
  • 4
1
vote
0 answers

AOSP Add Jar to Boot Class Path

I've set up the AOSP project, it builds fine (Android 12). I've created a new module under frameworks/base/mylib which is just a Java library. It builds fine and gets added to /system/framework/mylib.jar. The jar contains a classes.dex which…
Banana999
  • 73
  • 5
1
vote
1 answer

Include an app only in certain builds in AOSP by changing .bp file

Is there a way to change a .bp file of an app in AOSP so that is only included in a certain build. For example I want to include test apps only in userdebug apps?
Invader Zim
  • 796
  • 2
  • 14
  • 39
1
vote
1 answer

How to list all possible packages / modules in AOSP via command line?

In AOSP, I often use the following to setup my environment and build target and build the entire image: $ cd ~/aosp $ source build/envsetup.sh $ lunch sdk_phone_x86_64 $ m I also like to use the following to build a specific package/module instead…
code
  • 5,294
  • 16
  • 62
  • 113