How to bring up first app in AOSP 10

292 views
Skip to first unread message

Rohit Iti

unread,
Nov 3, 2020, 4:55:24 AM11/3/20
to Android Automotive OS Discussion Group
Hello ,
I am working on AOSP 10 for automotive platform . 
I am stuck basically in how to bring app in emulator . 

i have created an application in android studio like 5 buttons with some indication application. like status message on the button. 

1) I am not aware or not getting info basically how to connect it with VHAL
2) Where do i need to place this application in AOSP 10 and what configurations i need to make to see it in the emulator. 
3) if i click on the button then i need to send a message to car service layer. 
   what i need to do to achieve this . 

Basically am unclear on how the connections to be made and what i need to write in which layer
  
Thank you and appreciate your support. 

Amarnath Ch

unread,
Nov 3, 2020, 8:43:35 AM11/3/20
to Rohit Iti, Android Automotive OS Discussion Group

--
You received this message because you are subscribed to the Google Groups "Android Automotive OS Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automotive-devel...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/automotive-developers/5ca6c9cf-6d6e-4914-890a-ab4a1a9d4e3bn%40android.com.


--
Regards,
Amarnath.C.

Android Automotive OS Discussion Group

unread,
Nov 3, 2020, 11:56:01 AM11/3/20
to Android Automotive OS Discussion Group, amari...@gmail.com, Android Automotive OS Discussion Group, rohit...@gmail.com
Here is a sample code that might be helpful as well 

Rohit Iti

unread,
Nov 4, 2020, 12:39:07 AM11/4/20
to Android Automotive OS Discussion Group
  Hello ,
Thank you for sharing this info. 
This is certainly helpful.  I think I need to additionally add  an "android.car" jar file taking it from AOSP 10 into the correct project structure. 
 The only confusion I had with these steps is the location of the app. 
Where i need to place it AOSP10 and what configurations are required (which android.mk) to see it in linux AOSP emulator. 

Appreciate your support. 

Rohit Iti

unread,
Feb 18, 2021, 7:21:45 AM2/18/21
to Android Automotive OS Discussion Group, amari...@gmail.com, Android Automotive OS Discussion Group, Rohit Iti
Hello Amanrath,

I am writing this post based on the improvements what i have done till now to bring an app from end to end in android automotive.

That means,
I have written an application in android studio and was ableto access cars service using android.car.jar

The second part was to write new car service,

Lets say CarLevelControlService,

Here is have added types in types.hal with group as vendor,
I have added them also in VehiclePropertiyids.java,
created new class as CarLevelControlService.java and added listeners.
Added permission in androidmanifiest.xml
Registered it in Car.java
I am also able to build it .

There is small problem here , when i take android,car,jar in android studio am not able to list down vehicleproperties i have defined and also the
Permission which i have added .

I changed Current.txt and system_released.txt but am facing build issues as shown below


The changes may be compatible, but the signature file needs to be updated.

Diffs:
--- /home/daimler/Desktop/AOSP/packages/services/Car/car-lib/api/current.txt    2021-02-12 14:59:27.826383054 +0530
+++ /tmp/compat-diff-signatures-public6544694130843634726.txt    2021-02-12 15:44:33.035797463 +0530
@@ -37,7 +37,6 @@
     field public static final String PERMISSION_READ_INTERIOR_LIGHTS = "android.car.permission.READ_CAR_INTERIOR_LIGHTS";
     field public static final String PERMISSION_READ_STEERING_STATE = "android.car.permission.READ_CAR_STEERING";
     field public static final String PERMISSION_SPEED = "android.car.permission.CAR_SPEED";
-    field public static final java.lang.String PERMISSION_CONTROL_CAR_AP = "android.car.permission.CAR.LEVElCONTROL";
     field public static final String PROPERTY_SERVICE = "property";
     field @Deprecated public static final String SENSOR_SERVICE = "sensor";
   }
-e
******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
   1. You can add '@hide' javadoc comments to the methods, etc. listed in the
      errors above.

   2. You can update current.txt by executing the following command:
         make android.car-stubs-docs-update-current-api

      To submit the revised current.txt to the main Android repository,
      you will need approval.
******************************

15:44:33 ninja failed with: exit status 1

#### failed to build some targets (10 seconds) ####



Any support or hint you can provide here ?

Thanks and Regards,
Rohit Iti
Reply all
Reply to author
Forward
0 new messages