How to create stable AIDL interface in Android 11 release version

4,685 views
Skip to first unread message

Yue Xu

unread,
Mar 7, 2021, 10:08:44 PM3/7/21
to android-platform
Hi, 
I'm trying to create a stable AIDL interface for a new service from scratch following this documentation: https://source.android.com/devices/architecture/aidl/stable-aidl.

I'm working in an Android 11 release checkout.
I have something like this in Android.bp:
```
aidl_interface {
   name: "foo",
   stability: "vintf",
   srcs: [
      "IFoo.aidl",
   ],
}
```
And I want to freeze the API to create a first version. If I run 'foo-freeze-api', I have this error: `module "foo_interface": versions: must be set \(need to be frozen\) when "unstable" is false and PLATFORM_VERSION_CODENAME is REL`. (This is actually a test case from 'aidl_test.go'.) But the problem is I don't have any frozen versions yet and I'm trying to create one. And I have `PLATFORM_VERSION_CODENAME=REL`. Why the restriction? Does this mean I can't use stable AIDL in release? How can I make this work?

Thanks.

Stefan Wysocki

unread,
Apr 27, 2021, 11:14:11 AM4/27/21
to android-platform
Hello,

It is actually not documented that much in Android 11, but it has changed in master.

You need to add the "owner" field to make "m foo-freeze-api" and "m foo-update-api" work.

```
aidl_interface {
   name: "foo",
   stability: "vintf",
   owner: "EXAMPLE_OEM",
   srcs: [
      "IFoo.aidl",
   ],
}
```

Md Raj bd

unread,
Apr 28, 2021, 12:49:00 PM4/28/21
to android-...@googlegroups.com
Ok

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/ed76353e-1d22-428d-85a2-6342125061e5n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages