Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gralloc Generic

Gralloc V5 implements (supported Android 14+) for managing system buffers by using GBM backends (Currently using libgbm from Mesa3d) and Linux DMA-BUF.

Tested working fine with Android Hardware Composer 3 (HWC3) DRM instance on RK3588 Platform on Android 17.

This Gralloc implement manages graphics buffers by using GBM, manages blob (linear) buffers by using Linux DMA-BUF.

Compile and Use

  1. Download the source.
cd <path_to_aosp_root>
mkdir -p vendor/valentinliu0/
cd vendor/valentinliu0/
git clone https://github.com/ValentinLiu0/gralloc-generic.git
  1. Add product packages.
# Gralloc Generic
PRODUCT_PACKAGES += \
	android.hardware.graphics.allocator-service.generic \
	mapper.generic

Note: the file /vendor/bin/hw/android.hardware.graphics.allocator-service.generic should be labeled with correct SELinux label to execute. Like:

/vendor/bin/hw/android\.hardware\.graphics\.allocator-service\.generic  u:object_r:vendor_services_exec:s0
  1. Build AOSP and product image.

Development

Projects

Project Main build artifacts Path Usage
gralloc_gbm libgralloc_gbm.so common/ Library provided by gralloc_gbm
Allocator V2 android.hardware.graphics.allocator-service.generic allocator/ Allocator V2 AIDL service
Mapper Stable-C (Mapper V5) mapper.generic.so mapper_stablec/ IMapper Stable-C implement

Dependencies

  • libgbm (Provided by Mesa3d alias libgbm_mesa)
  • uthash (include/uthash/)

License

This project is licensed under the Apache License, Version 2.0.

Copyright (c) 2026 Valentin Liu (LIU, YUANCHEN)

You may obtain a copy of the Apache License, Version 2.0 at:

Apache License 2.0

Unless required by applicable law or agreed to in writing, software distributed under the Apache License, Version 2.0 is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Third-Party Libraries

Project License Path
UTHASH BSD-style License include/uthash/
Mesa3D Multiple Licenses Mesa3D Project

About

Android Gralloc 5 (IMapper Stable-C / Allocator V2) Impls based on GBM backends (Mesa currently).

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages