configuring android environment on ubuntu 24.04

325 views
Skip to first unread message

giulio...@gmail.com

unread,
May 14, 2024, 11:04:03 AMMay 14
to Android Building
Hi, i am unable to configure the initial package configuration for the android download and building. 

unable to find the  libncurses5 package

enh

unread,
May 14, 2024, 11:30:49 AMMay 14
to android-...@googlegroups.com
if you install all the other packages and just don't install that one,
does it work? if so, i'll update the docs.

(i know we've done some work to remove curses dependencies, but i
don't know whether we got them _all_.)
> --
> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/f1ed8686-7e38-4fd5-ad98-5f15a33c213dn%40googlegroups.com.

Mathieu Fluhr

unread,
May 14, 2024, 11:50:05 AMMay 14
to android-...@googlegroups.com
This would be too easy :)
Without libncurses5 you will get build failures very early on, even with recent AOSP versions like 14 QPR1 (If needed, I can provide the failure logs...)
My solution here was to install the 22.04 package. From my side, this fixed my builds.

Another issue that you will face with 24.04 is some nsjail warning messages at the start of the build.
This is due to an AppArmor change that was introduced in 23.10 and restricted unprivileged user namespaces.
For this, my solution was to alter AppArmor configuration, setting kernel.apparmor_restrict_unprivileged_userns to 0.
(You can do that in a persistent way too, if wanted)

Kind Regards,
Mathieu

enh

unread,
May 14, 2024, 11:59:58 AMMay 14
to android-...@googlegroups.com
On Tue, May 14, 2024 at 11:50 AM Mathieu Fluhr <mathie...@gmail.com> wrote:
>
> This would be too easy :)
> Without libncurses5 you will get build failures very early on, even with recent AOSP versions like 14 QPR1 (If needed, I can provide the failure logs...)

yes please, so i can see if that's also a dependency we can just fix.

> My solution here was to install the 22.04 package. From my side, this fixed my builds.

you mean libncurses6?
> To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CAPyJwA8xq7TDbXWkckB7LCw6%3DaDjOFGCEGDEc2VK5DvFkWUsYg%40mail.gmail.com.

Fabio Porcedda

unread,
May 21, 2024, 11:31:47 AMMay 21
to Android Building
Il giorno martedì 14 maggio 2024 alle 17:50:05 UTC+2 Mathieu Fluhr ha scritto:
Another issue that you will face with 24.04 is some nsjail warning messages at the start of the build.
This is due to an AppArmor change that was introduced in 23.10 and restricted unprivileged user namespaces.
For this, my solution was to alter AppArmor configuration, setting kernel.apparmor_restrict_unprivileged_userns to 0.

How can be done?

Thanks
Fabio

Mathieu Fluhr

unread,
May 21, 2024, 11:33:20 AMMay 21
to Android Building
>>
>> This would be too easy :)
>> Without libncurses5 you will get build failures very early on, even with recent AOSP versions like 14 QPR1 (If needed, I can provide the failure logs...)
>
> yes please, so i can see if that's also a dependency we can just fix.

Ok, I did some more experiments on my side, and I can confirm that both the main and android14-qpr2-release branches can actually be built without libncurses5 (For the record, I used the sdk_phone64_x86_64 lunch target for my tests).
However, when going back to earlier 14 release tags, like android-14.0.0_r22, I still get some build errors (see attached): I try to dig inside the Android.bp and Android.mk related to the failing component, but I did not found anything relevant, and also no real mention of a hardware dependency or linker flag related to libncurses.so.5. I would suspect an issue with the prebuit clang, but that's nothing more than a rough guess....

Long story short, I would assume that the libncurses5 dependency is not anymore, but only if you plan to build the main or a very recent Android 14 release branch/tag.

>> My solution here was to install the 22.04 package. From my side, this fixed my builds.
>
> you mean libncurses6?

Nope, what I needed to install from 22.04 was this one: https://packages.ubuntu.com/jammy-updates/libncurses5
14.0.0_r22 build failures.txt

Mathieu Fluhr

unread,
May 22, 2024, 12:05:21 PMMay 22
to Android Building

> How can be done?

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

You can also make it persistent by following the instructions in /usr/lib/sysctl.d/10-apparmor.conf.
Reply all
Reply to author
Forward
0 new messages