Skip to content

Commit f4f88d3

Browse files
feat: codegen notification parcelable, gralloc/IGBP extraction, GUI capture native_impls
Notification parcelable: replaced hand-written native_impls with codegen output; extended java2spec to handle writeToParcelImpl, try blocks, static delegates, and field type annotations. Codegen: added skip cases for binder, long_array, typed_array, array_set, and char_sequence fields; handle self-referencing delegate pointer types; broadened null flag merging logic. Gralloc: moved from camera/ to top-level package; generalized format handling (RGBA/YCbCr); DMA-BUF sync support; goldfish address space driver; bridge mapper via purego/dlopen; GraphicBuffer reader. Camera: fixed bridge .so loading (-static-libstdc++), fixed YCbCr 3-plane copy, added pixel content assertions in E2E tests. IGBP: moved from camera/igbp to top-level igbp package; configurable consumer name. GUI capture: ScreenCaptureResults, CaptureArgs, LayerCaptureArgs native_impls with C++ flat wire format and version-aware parsing. Makefile: gralloc-bridge target, e2e with PIE+patchelf. Parcel: added SkipCharSequence; removed notification_skip.go.
1 parent b6a7967 commit f4f88d3

283 files changed

Lines changed: 6467 additions & 1804 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
.PHONY: specs generate cli readme test e2e e2e-bindercli vet build lint clean \
2-
bindercli list-commands check-generated release proofs difftest javaparser
2+
bindercli list-commands check-generated release proofs difftest javaparser \
3+
gralloc-bridge
34

45
# Generated top-level directories.
56
GENERATED_DIRS := android com fuzztest libgui_test_server parcelables src
67

78
# All non-3rdparty Go packages.
89
GO_PACKAGES = $(shell go list -e ./... | grep -v /3rdparty/)
910

11+
# --- Android NDK / GrapheneOS paths ---
12+
13+
NDK := $(HOME)/Android/Sdk/ndk/28.0.13004108
14+
NDK_CC := $(NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android35-clang++
15+
GRAPHENEOS := /home/streaming/grapheneos
16+
HIDL_GEN := $(GRAPHENEOS)/out/soong/.intermediates
17+
1018
# --- Spec-first pipeline ---
1119

1220
# Baseline 3rdparty directory for param version diffing (API 35).
@@ -62,14 +70,46 @@ test:
6270

6371
# Run E2E tests on a connected device via adb.
6472
e2e:
65-
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go test -tags e2e -c -o build/e2e_test ./tests/e2e/
73+
@mkdir -p build
74+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go test -tags e2e -c -buildmode=pie -o build/e2e_test ./tests/e2e/
75+
patchelf --set-interpreter /system/bin/linker64 \
76+
--replace-needed libdl.so.2 libdl.so \
77+
--replace-needed libpthread.so.0 libc.so \
78+
--replace-needed libc.so.6 libc.so \
79+
build/e2e_test
6680
adb push build/e2e_test /data/local/tmp/
6781
adb shell /data/local/tmp/e2e_test -test.v -test.timeout 300s
6882

6983
# Run bindercli E2E tests via emulator.
7084
e2e-bindercli:
7185
go test -tags e2e ./tests/e2e/... -run TestBindercli -v -timeout 300s
7286

87+
# Build gralloc bridge shared library for x86_64 Android using NDK.
88+
# Requires stub libs (libhidlbase.so, libmapper3.so, libutils.so, libcutils.so)
89+
# to be pulled from the emulator into /tmp first:
90+
# adb pull /system/lib64/libhidlbase.so /tmp/
91+
# adb pull /system/lib64/libutils.so /tmp/
92+
# adb pull /system/lib64/libcutils.so /tmp/
93+
# (libmapper3.so is a thin wrapper — pull or build separately)
94+
gralloc-bridge:
95+
@mkdir -p build
96+
$(NDK_CC) -shared -fPIC -o build/gralloc_bridge.so gralloc/bridge/native/gralloc_bridge.cpp \
97+
-I$(GRAPHENEOS)/system/libhidl/transport/include \
98+
-I$(GRAPHENEOS)/system/libhidl/base/include \
99+
-I$(GRAPHENEOS)/system/core/libcutils/include \
100+
-I$(GRAPHENEOS)/system/core/libutils/include \
101+
-I$(GRAPHENEOS)/system/core/libsystem/include \
102+
-I$(GRAPHENEOS)/system/libfmq/base \
103+
-I$(HIDL_GEN)/hardware/interfaces/graphics/mapper/3.0/[email protected]_genc++_headers/gen \
104+
-I$(HIDL_GEN)/hardware/interfaces/graphics/common/1.0/[email protected]_genc++_headers/gen \
105+
-I$(HIDL_GEN)/hardware/interfaces/graphics/common/1.1/[email protected]_genc++_headers/gen \
106+
-I$(HIDL_GEN)/hardware/interfaces/graphics/common/1.2/[email protected]_genc++_headers/gen \
107+
-I$(HIDL_GEN)/hardware/interfaces/graphics/mapper/2.0/[email protected]_genc++_headers/gen \
108+
-I$(HIDL_GEN)/hardware/interfaces/graphics/mapper/2.1/[email protected]_genc++_headers/gen \
109+
-I$(HIDL_GEN)/system/libhidl/transport/base/1.0/[email protected]_genc++_headers/gen \
110+
-I$(HIDL_GEN)/system/libhidl/transport/manager/1.0/[email protected]_genc++_headers/gen \
111+
-L/tmp -lhidlbase -lmapper3 -lutils -lcutils -std=c++17 -static-libstdc++
112+
73113
# --- Build ---
74114

75115
# Run go vet on all packages.

android/app/admin/packagepolicy.go

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/admin/wifissidpolicy.go

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/ambientcontext/ambientcontexteventrequest.go

Lines changed: 25 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/applicationexitinfo.go

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/assist/assiststructure.go

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/automaticzenrule.go

Lines changed: 15 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/contentproviderholder.go

Lines changed: 26 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/job/jobinfo.go

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/job/jobparameters.go

Lines changed: 10 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)