Skip to content

Pie : patch framework source

Peter Yoon edited this page Apr 17, 2023 · 6 revisions

Put delay in android.hardware.graphics.allocator

Until android.hardware.graphics.mapper retain the buffer,

Apply following patch under hardware/interfaces.

graphics/allocator/2.0/utils/hal/include/allocator-hal/2.0/Allocator.h
@@ line 66 @@ class AllocatorImpl : public Interface {
     hidl_vec<hidl_handle> hidlBuffers(buffers.cbegin(), buffers.cend());
     hidl_cb(Error::NONE, stride, hidlBuffers);
+    usleep(1000);
     // free the local handles
     mHal->freeBuffers(buffers);

Limit SurfaceSize in com.android.server.wm.DisplayContent

Since rpi3 max texture size is 2048x2048,

Apply following patch under frameworks/base.

services/core/java/com/android/server/wm/DisplayContent.java
@@ line 773 @@ class DisplayContent
     mSurfaceSize = Math.max(mBaseDisplayHeight, mBaseDisplayWidth) * 2;
+    if (mSurfaceSize > 2048) mSurfaceSize = 2048;
     final SurfaceControl.Builder b = mService.makeSurfaceBuilder(mSession)

Use GuidedActionEditText for TvSettings password input

To enable Keyboard enter-key for Wifi password entrance,

Apply following patch under packages/apps/TvSettings

Settings/res/layout/setup_password_item.xml
@@ line 35
-   <EditText
+   <android.support.v17.leanback.widget.GuidedActionEditText
        android:id="@+id/guidedactions_item_title"
        style="@style/Setup.Action.TextInput"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:focusable="true"
        android:gravity="center_vertical"
        android:imeOptions="actionNext|flagNoExtractUi"
+       android:inputType="text" />
-       android:inputType="text">
-   </EditText>

Guide to compile Android-Pie for Raspberry-Pi3 on Ubutu-22.04

(By denisrosas : https://github.com/android-rpi/device_brcm_rpi3/pull/139)

For Kernel Build :
If you're using gcc 11, you'll need to apply 2 patches:

  • change 1 to fix the error of multiple global declarations of yylloc.
  • change 2 to fix architecture compilation errors.

Update Flex version from Lineage-OS:
https://review.lineageos.org/c/LineageOS/android_prebuilts_misc/+/225953
=> download and replace .../prebuilts/misc/linux-x86/flex/flex-2.5.39

If you are running Kernel 5.18 or later on Host, apply this patch to avoid compilation error to create boot.art:
https://android-review.googlesource.com/c/platform/art/+/2226578/2