[ROM][Android10][RockPI 4] Android Q Firmware Release

@Lili
Hope you can get gpt images to build too.
Also SDDiskTool v1.62 if you use SD Boot on RKFirmware images to burn firmware to a micro-sd card, it boots to recovery and doesn’t load Android.

I added with PRODUCT_COPY_FILES in RockPi4C.mk file, but it doesn’t matter, the standart library is empty too! Why? They have size in out folder, but size is ZERO in ROM.

PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/bootanimation.zip:product/media/bootanimation.zip \
    $(LOCAL_PATH)/lib_hw/gps.default.so:vendor/lib/hw/gps.default.so \
    $(LOCAL_PATH)/lib64_hw/gps.default.so:vendor/lib64/hw/gps.default.so \
    $(LOCAL_PATH)/lib64_hw/settings.conf:vendor/settings.conf

Is it normal log for ./mkimage.sh command?

davemf@i7-8700-64gb-ram:~/ROCK_Pi4c$ ./mkimage.sh
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
TARGET_PRODUCT=RockPi4C
TARGET_BASE_PARAMETER_IMAGE==
HIGH_RELIABLE_RECOVERY_OTA=false
BOARD_AVB_ENABLE=false
system filesysystem is ext4
create dtbo.img.... 
done.
create boot.img.... 
BOARD_AVB_ENABLE is false, make boot.img from kernel.
done.
create recovery.img.... 
BOARD_AVB_ENABLE is false, make recovery.img from kernel && out.
done.
create system.img.... BOARD_AVB_ENABLE is false, make system.img from out.
in=/home/davemf/ROCK_Pi4c/out/target/product/RockPi4C/system.img out=/home/davemf/ROCK_Pi4c/out/target/product/RockPi4C/system.img.out align=1024
Total of 297916 4096-byte output blocks in 14 input chunks.
Generating optimized sparse image done,total_chunk=12.
done.
create vbmeta.img.... BOARD_AVB_ENABLE is false,use default vbmeta.imgdone.create vendor.img...BOARD_AVB_ENABLE is false, make vendor.img from out.
in=/home/davemf/ROCK_Pi4c/out/target/product/RockPi4C/vendor.img out=/home/davemf/ROCK_Pi4c/out/target/product/RockPi4C/vendor.img.out align=1024
Total of 64623 4096-byte output blocks in 6 input chunks.
Generating optimized sparse image done,total_chunk=4.
done.create odm.img...BOARD_AVB_ENABLE is false, make odm.img from out.
in=/home/davemf/ROCK_Pi4c/out/target/product/RockPi4C/odm.img out=/home/davemf/ROCK_Pi4c/out/target/product/RockPi4C/odm.img.out align=1024
Total of 1175 4096-byte output blocks in 2 input chunks.
Generating optimized sparse image done,total_chunk=2.
done.
copy super.img...
create misc.img.... done.
create uboot.img...done.
create trust.img...done.
create loader...done.
create resource.img...done.
create kernel.img...done.
create config.cfg...done.
create parameter...done.

@mo123 Do you have zero library size in /vendor/lib64/hw folder?

@davemf
I think more changes are needed for gps.
Perhaps try grep -r gps in the /device/rockchip and /vendor/rockchip/common folders to check.

Did you remember to add

diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk
index e49f228..883fc6f 100755
--- a/device.mk
+++ b/device.mk
@@ -23,6 +23,11 @@ PRODUCT_PACKAGES += \
     displayd \
     libion
 
+# GPS HAL
+PRODUCT_PACKAGES += \
+    android.hardware.gnss@1.0-impl \
+    android.hardware.gnss@1.0-service
+
 #enable this for support f2fs with data partion
 BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs

--- a/device/rockchip/common/manifest.xml
+++ b/device/rockchip/common/manifest.xml
@@ -185,6 +185,14 @@
         </interface>
         <fqname>@1.0::IHdmiCec/default</fqname>
     </hal>
-
+    <hal format="hidl">
+       <name>android.hardware.gnss</name>
+       <transport>hwbinder</transport>
+       <version>1.0</version>
+       <interface>
+           <name>IGnss</name>
+           <instance>default</instance>
+       </interface>
+    </hal>
 </manifest>

Yes, it is need, but if you add this changes your board never boot, if shows bootanimation only. Because gps.default.so file is empty and hidl service cannot start it again and again.
My question is: Why ROM has empty library files?

Please check your intermediate file under out.

Yes, I have checked it. All files have a size.

Android10 uses variable partitions, so you need to make super part. bigger.

How big is each partition that you compile?

Mmmm. It is good idea!
How to do it?

my partitions are:

It looks all right, show me df -h in device.

I added gaps, after that ROM add size 300 MB.

I have deleted gapps and rebuilt ROM. But issue is same - library size 0.

I think it is not the compilation problem, but your makefile problem. You can refer to vendor/rockchip/common.

Which makefile has a problem? Out folder has correct files! And audio.usb.default.so, camera.kr30board.so, hw_output.default.so and many other are not my library, but they have zero size too in device!
I think it is your issue with pack script. You source has issue and does not work. Please fix it.

I have flashed your ROM and check /vendor/lib/hw and /vendor/lib64/hw folders. You ROM contains libraries with ZERO size too! It is not my changes, it is your ROM. Please fix this issue!

Root directory is full and have not free space! It is too small - 0.96GB.


Only 4 files have a size.

You may need a USB to serial port.

how to add room partition size? I have khadas EDGE board with same android 10. It has 1.2GB for root directory and works perfect with my library and other changes.

This partition size is growing dynamically, as I said you need a USB to TTL to see what the real problem is.