Neat android.googlesource.com/platform/packa is finally available.
Currently looking through the new repositories and major changes in Android 12 to determine which new projects we'll need to fork right away and which ones we'll likely want to change in the near future. Lots of nice changes.
Conversation
Android 12 heavily adopted Rust.
Uses the same unified declarative build system with C, C++, Java, etc.
Supported by AIDL (developer.android.com/guide/componen) with C++ and Rust for IPC/HALs.
cxx.rs is used for interoperability between modern C++ and Rust beyond bindgen.
1
2
19
security.googleblog.com/2021/06/rustc- is a nice post about it but it's more interesting to look at the code now that it's public.
New Bluetooth stack is one area it's adopted:
android.googlesource.com/platform/syste
Most of what's added in Android 12 is infrastructure for replacing C++ over the long term.
Replying to
The new Bluetooth stack is an example of where it's being used:
android.googlesource.com/platform/syste
173 external crates under external/rust ported to Android's declarative build system, although most of those probably aren't included in the OS in practice. A lot of it is for tooling, etc.
1
10
Continued substantial migration to Kotlin from Java too, since that's the official new high-level language not only for apps but for a lot of systems programming in the OS. After all, Android compiles Java & Kotlin to native code. A lot of C++ will likely become Kotlin, not Rust.
1
12
Modularization of the base system into APEX components has continued so we'll need to deal with a bunch of code we change moving to modules with internally backwards compatible APIs/ABIs.
GKIs (Generic Kernel Images) will be a lot of work for us for newer devices using them...
1
1
8
developer.android.com/about/versions is a good list of the features and other changes relevant to app developers.
It doesn't cover the extensive under the hood changes and those are most of what we're going to need to deal with for porting GrapheneOS to Android 12 over the next couple weeks.
10
