7

Currently, i am trying to convert Android.mk to Android.bp. I am doing it manually. But when i read about this blog

I found using androidmk tool, we can convert easily Android.mk to Android.bp.

But, i am not able to find anywhere.

Please suggest me some solution.

2
  • Is this actually an NDK question? Android.bp is not for the NDK, it's for building AOSP itself.
    – Dan Albert
    Jul 9, 2018 at 21:13
  • Yes I am working on AOSP, Can you please tell me , how to do the Coversions?? Jul 11, 2018 at 7:44

2 Answers 2

10

Clone the full android source and prepare for a build like usual, using . build/envsetup.sh, then run make blueprint_tools. Now you can simply run androidmk and the command will be in your PATH.

2
  • After this I could use androidmk. However, I my regular Android build started failing as [100% 1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja FAILED: out/soong/.bootstrap/build.ninja out/soong/.minibootstrap/minibp -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/.bootstrap/build.ninja.d -globFile out/soong/.minibootstrap/build-globs.ninja -o out/soong/.bootstrap/build.ninja Android.bp error removing abandoned files: log entry has too few fields: "379188\t380202\t1607423502\tout/target/product/mysore". So I had to rm out/.ninja_log Dec 8, 2020 at 14:31
  • Thanks Hack5 and Lavakush. Keep helping. Feb 21, 2022 at 10:20
3

You need to only run below command:-

source build/envsetup.sh

cd "the directory where android.mk to be converted is present"

androidmk Android.mk

Then Copy the output to Android.bp file

2
  • how to convert android.bp to android.mk?
    – teo ten
    Aug 10, 2021 at 16:48
  • It would be simple enough to write one that handles your case. Please refer Android.mk file standards and plenty of examples available. Search for any Package in AOSP codebase.
    – Lavakush
    Aug 10, 2021 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.