in fact I already had my application added to 
“build/make/target/product/aosp_product.mk”. But I got an error when 
building the source tree.

The error message was:

FAILED:

Build/make/core/artifact_path_requirements.mk:26: warning: 
build/make/target/product/sdk_phone_x86_64.mk produces files inside 
build/make/target/product/generic_system.mks artifact path requirement.

Offending entries:

System/priv-app/<AppName>/<AppName>.apk

My first idea was that “aosp_product.mk” is the wrong file and I have to 
add the make file for my app somewhere else.

Because of your answers I digged deeper into log files and did some 
googling.

Finally I found the reason for the error. I had to add

*LOCAL_PRODUCT_MODULE := true*

to the make file of my app. Now the apk is installed in “system/priv-app” 
folder.
@pan

Yes, I also think that moving to bp files would be a better solution. I 
will give this a try. After I got my branding app working.

[email protected] schrieb am Mittwoch, 20. Oktober 2021 um 09:07:32 UTC+2:

> Hi Christian,
>
> I suggest rather use Android.bp file than Android.mk file and you have to 
> use something like this, which is more readable than using Android.mk
>
>
> android_app {
> name: "SampleApp", 
> srcs: [ 
> "src/**/*.java",
> ],
> optimize: { 
> enabled: false, 
> }, 
> }
>
> PS : .bp is blueprint extension ,which is used now by Soong Build system 
> to generate AOSP build
>
> Regards
> Pankaj
>
>
> On Tue, Oct 19, 2021 at 2:49 AM Christian Bauer <[email protected]> 
> wrote:
>
>> I want to write an application to select different wallpapers and boot 
>> animations for OEM branding. This application should become part of the 
>> android system image. Once the branding has been chosen the application 
>> should no longer be started when booting the image.
>>
>> On this way I wanted to proceed step by step.
>>
>> But already at the first step I fail.
>>
>> This first step is a simple HelloWorld java application.
>>
>> I was building the android sources by lunching the target aosp_x86_64-eng.
>>
>> I added the source files for the application in directory 
>> aosp/vendor/<CompanyName>/packages/app/HelloWorld" with both an 
>> "Android.mk" and a "AndroidManifest.xml" file.
>>
>> But I couldn't figure out where to add the HelloWorld application in the 
>> build tree so that it becomes part of the image.
>>
>> Is there a rule I can follow where to put the link to the application?
>>
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the "Android 
>> Building" mailing list.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> 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 [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/b0eafce6-ac2a-4871-a30f-33b5db819dd4n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/android-building/b0eafce6-ac2a-4871-a30f-33b5db819dd4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/296f75f2-0c63-4936-9625-f470d282acddn%40googlegroups.com.

Reply via email to