Please share to me ls -ln from your board via terminal, not from adb.
May be need to add some more roots for vendor/lib folder?
Please share to me ls -ln from your board via terminal, not from adb.
May be need to add some more roots for vendor/lib folder?
You can use this Windows Tool to increase the size of the partitions but not the actual image files, most will resize to the full free space but not sure, it can depend on the filesystems used.
Load the parameter.txt file from the RockPi4 rockdev folder save it and use the new file in the Image folder before you create a new update.img
https://github.com/rockchip-linux/tools/blob/master/windows/ParameterTool_v1.0.zip
What do you think about zero size of library? Khadas has not this issueā¦
You can add to
/device/rockchip/rk3399/RockPi4B/BoardConfig
to give the actual sizes of partition image files and make them bigger
then just check the parameter.txt file if the new sizes can still fit in the partition sizes.
BOARD_SYSTEMIMAGE_PARTITION_SIZE :=3563168512
BOARD_VENDORIMAGE_PARTITION_SIZE :=303781632
Maybe the system or vendor partitions are too small and running out of free space and making the files 0 size, not sure.
I donāt understand how board is work.
init.rc, ueventd.rc, build.prop and many other system files have zero size in browser on board.
But adb shows correct size:
rk3399_Android10:/vendor/lib64/hw $ ls -ln
total 20320
-rw-r--r-- 1 0 0 302160 2020-09-13 16:20 android.hardware.audio.effect@5.0-impl.so
-rw-r--r-- 1 0 0 260496 2020-09-13 16:20 android.hardware.audio@5.0-impl.so
-rw-r--r-- 1 0 0 61616 2020-09-13 16:20 android.hardware.bluetooth@1.0-impl.so
-rw-r--r-- 1 0 0 25232 2020-09-13 16:20 android.hardware.camera.provider@2.4-impl.so
-rw-r--r-- 1 0 0 20600 2020-09-13 16:20 android.hardware.gatekeeper@1.0-impl.so
-rw-r--r-- 1 0 0 24904 2020-09-13 16:20 android.hardware.graphics.allocator@2.0-impl.so
-rw-r--r-- 1 0 0 104240 2020-09-13 16:20 android.hardware.graphics.composer@2.1-impl.so
-rw-r--r-- 1 0 0 38656 2020-09-13 16:20 android.hardware.graphics.mapper@2.0-impl-2.1.so
-rw-r--r-- 1 0 0 15256 2020-09-13 16:20 android.hardware.keymaster@3.0-impl.so
-rw-r--r-- 1 0 0 29376 2020-09-13 16:20 android.hardware.light@2.0-impl.so
-rw-r--r-- 1 0 0 20576 2020-09-13 16:20 android.hardware.memtrack@1.0-impl.so
-rw-r--r-- 1 0 0 24832 2020-09-13 16:20 android.hardware.power@1.0-impl.so
-rw-r--r-- 1 0 0 67912 2020-09-13 16:20 android.hardware.sensors@1.0-impl.so
-rw-r--r-- 1 0 0 29296 2020-09-13 16:20 android.hardware.weaver@1.0-impl.so
-rw-r--r-- 1 0 0 15576 2020-09-13 16:20 audio.primary.default.so
-rw-r--r-- 1 0 0 364352 2020-09-13 16:20 audio.primary.rk30board.so
-rw-r--r-- 1 0 0 46056 2020-09-13 16:20 audio.r_submix.default.so
-rw-r--r-- 1 0 0 28416 2020-09-13 16:20 audio.usb.default.so
-rw-r--r-- 1 0 0 1471320 2020-09-13 16:20 camera.rk30board.so
-rw-r--r-- 1 0 0 19600 2020-09-13 16:20 gatekeeper.rk30board.so
-rw-r--r-- 1 0 0 32352 2020-09-13 16:20 gps.default.so
-rw-r--r-- 1 0 0 23824 2020-09-13 16:20 gralloc.default.so
-rw-r--r-- 1 0 0 24136 2020-09-13 16:20 gralloc.rk30board.so
-rw-r--r-- 1 0 0 100584 2020-09-13 16:20 hw_output.default.so
-rw-r--r-- 1 0 0 506800 2020-09-13 16:20 hwcomposer.rk30board.so
-rw-r--r-- 1 0 0 158752 2020-09-13 16:20 keystore.rk30board.so
-rw-r--r-- 1 0 0 15728 2020-09-13 16:20 lights.rk3399.so
-rw-r--r-- 1 0 0 15136 2020-09-13 16:20 local_time.default.so
-rw-r--r-- 1 0 0 15424 2020-09-13 16:20 memtrack.rk3399.so
-rw-r--r-- 1 0 0 15120 2020-09-13 16:20 power.default.so
-rw-r--r-- 1 0 0 15304 2020-09-13 16:20 power.rk3399.so
-rw-r--r-- 1 0 0 33480 2020-09-13 16:20 rockchip.hardware.outputmanager@1.0-impl.so
-rw-r--r-- 1 0 0 49864 2020-09-13 16:20 sensors.rk30board.so
-rw-r--r-- 1 0 0 15208 2020-09-13 16:20 vibrator.default.so
-rw-r--r-- 1 0 0 16755032 2020-09-13 16:20 vulkan.rk30board.so
But terminal from board shows permission denied.
Maybe need to add some roots or something else?
@Lili Adb shows correct size.
I have big problem, I activate GPS HIDL service. It startup gps.default.so library, but it cannot start it, because size is zero and board has crash loop and never bootā¦
09-15 17:06:53.551 3853 3853 F DEBUG : uid: 1021
09-15 17:06:53.551 3853 3853 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
09-15 17:06:53.551 3853 3853 F DEBUG : Abort message: 'Binder driver could not be opened. Terminating.'
09-15 17:06:53.551 3853 3853 F DEBUG : x0 0000000000000000 x1 0000000000000f0a x2 0000000000000006 x3 0000007ffca963b0
09-15 17:06:53.551 3853 3853 F DEBUG : x4 6d6f630000000000 x5 6d6f630000000000 x6 6d6f630000000000 x7 0000000080ffffff
09-15 17:06:53.551 3853 3853 F DEBUG : x8 00000000000000f0 x9 0000007756c004e0 x10 0000000000000000 x11 0000000000000001
09-15 17:06:53.551 3853 3853 F DEBUG : x12 0000007ffca96540 x13 ffffffffffffffff x14 ffffff0000000000 x15 ffffffffffffffff
09-15 17:06:53.551 3853 3853 F DEBUG : x16 0000007756ccc8c0 x17 0000007756caa020 x18 0000007758422000 x19 00000000000000ac
09-15 17:06:53.551 3853 3853 F DEBUG : x20 0000000000000f0a x21 00000000000000b2 x22 0000000000000f0a x23 00000000ffffffff
09-15 17:06:53.551 3853 3853 F DEBUG : x24 00000077576c9020 x25 0000000000000000 x26 0000000000000000 x27 0000000000000000
09-15 17:06:53.551 3853 3853 F DEBUG : x28 0000000000000000 x29 0000007ffca96460
09-15 17:06:53.551 3853 3853 F DEBUG : sp 0000007ffca96390 lr 0000007756c5e170 pc 0000007756c5e1a0
09-15 17:06:53.554 3853 3853 F DEBUG :
09-15 17:06:53.554 3853 3853 F DEBUG : backtrace:
09-15 17:06:53.554 3853 3853 F DEBUG : #00 pc 00000000000821a0 /apex/com.android.runtime/lib64/bionic/libc.so (abort+176) (BuildId: 595e36c49352e5ab4eca138fe3e10a86)
09-15 17:06:53.554 3853 3853 F DEBUG : #01 pc 0000000000008a74 /system/lib64/liblog.so (__android_log_assert+324) (BuildId: 939b7168016ee7cae8219fcb808c63bd)
09-15 17:06:53.554 3853 3853 F DEBUG : #02 pc 00000000000641d0 /system/lib64/vndk-29/libbinder.so (android::ProcessState::ProcessState(char const*)+400) (BuildId: 979e7e6d32826dabe14a174bad85aa74)
09-15 17:06:53.554 3853 3853 F DEBUG : #03 pc 00000000000642c4 /system/lib64/vndk-29/libbinder.so (android::ProcessState::initWithDriver(char const*)+228) (BuildId: 979e7e6d32826dabe14a174bad85aa74)
09-15 17:06:53.554 3853 3853 F DEBUG : #04 pc 0000000000001078 /vendor/bin/hw/android.hardware.gnss@1.0-service (main+40) (BuildId: b99566b4ba0fe9b8342eba15c1e4cc50)
09-15 17:06:53.554 3853 3853 F DEBUG : #05 pc 000000000007d844 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: 595e36c49352e5ab4eca138fe3e10a86)
09-15 17:06:53.583 3440 3629 W NativeCrashListener: Couldn't find ProcessRecord for pid 3850
09-15 17:06:53.583 349 349 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_12
09-15 17:06:53.987 3440 3440 W ServiceManagement: Waited one second for android.hardware.gnss@1.0::IGnss/default
09-15 17:06:53.988 3440 3440 I ServiceManagement: getService: Trying again for android.hardware.gnss@1.0::IGnss/default...
How to fix zero size issue?
Give me all of file : /data/tombstones/tombstone_*
There is no zero File size issue, but you do not have permission in terminal. I hope you can distinguish between root
and shell
users
This patch is also needed otherwise firmware doesnāt compile
device/rockchip/common/prebuild.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/device/rockchip/common/prebuild.mk b/device/rockchip/common/prebuild.mk
index 28391f63859..af623641b10 100644
--- a/device/rockchip/common/prebuild.mk
+++ b/device/rockchip/common/prebuild.mk
@@ -2,5 +2,10 @@
$(warning Generating manifest snapshot at $(OUT_DIR)/commit_id.xml...)
$(warning You can disable this by removing this and setting BOARD_RECORD_COMMIT_ID := false in BoardConfig.mk)
$(shell test -d .repo && .repo/repo/repo manifest -r -o $(OUT_DIR)/commit_id.xml)
+
+ifeq (,$(wildcard commit_id.xml))
+BOARD_RECORD_COMMIT_ID := false
+endif
+
-include $(TARGET_DEVICE_DIR)/prebuild.mk
--
GitLab
I have set BOARD_RECORD_COMMIT_ID to false by default, and I have no problems compiling.
Hello,
@Lili I created Android10 update.img from radxa/manifests is 1.5Gbyte.
(I exectuted build-rockpi-4c.sh.)
Download pageās rockpi-4c image is bigger than it(2.7G). Also not found commit id md5(ff35b7a).
Is there any difference?
No GMS. We are not licensed to open source this part.
I told about file explorer, not terminal. My ROM has a root, and terminal show right size, but explorer shows zero size with root right.
09-15 17:56:36.124 14516 14516 W android.hardwar: type=1400 audit(0.0:1016): avc: denied { read } for name="vndbinder" dev="tmpfs" ino=20535 scontext=u:r:hal_gnss_default:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file permissive=0(
09-15 17:56:36.125 14516 14516 W android.hardwar: type=1400 audit(0.0:1017): avc: denied { read write } for name="binder" dev="tmpfs" ino=20536 scontext=u:r:hal_gnss_default:s0 tcontext=u:object_r:binder_device:s0 tclass=chr_file permissive=0(
Your firmware selinux is in the on state.
Yes, I add permissions for hal_gnss_default in system/sepolicy/vendor/hal_gnss_default.te.
vndbinder_use(hal_gnss_default)
binder_call(hal_gnss_default,system_server)
It works fine now. Thank you!
GPS library startup successfully. But it have not access to /data/settings.conf file.
09-16 17:21:15.069 279 279 W gnss@1.0-servic: type=1400 audit(0.0:94): avc: denied { read } for name="settings.conf" dev="mmcblk2p15" ino=527984 scontext=u:r:hal_gnss_default:s0 tcontext=u:object_
r:app_data_file:s0:c512,c768 tclass=file permissive=0
09-16 17:21:45.660 279 279 W gnss@1.0-servic: type=1400 audit(0.0:100): avc: denied { read } for name="settings.conf" dev="mmcblk2p15" ino=527984 scontext=u:r:hal_gnss_default:s0 tcontext=u:object
_r:app_data_file:s0:c512,c768 tclass=file permissive=0
Please, tell me how to add permissions to read this file?
I try to add
allow hal_gnss_default app_data_file:dir rw_dir_perms;
But after that I have āneverallowā error.
I never added permissions for other ROMs and boards.
Why is it need for your android source?
Also, users need to modify /data/settings.conf file via file explorer to set the settings for their gps receiver.
Maybe need to disable selinux or what? What do you think about this?
Maybe rockchipās latest SDK, SELinux, is turned on by default. I will submit the code that selinux closes.
@Lili
Do you know how to remove all the Google Go commits or where they are located?
And perhaps do you know how to disable Verity(system verified boot), I think it is something like
PRODUCT_SUPPORTS_VERITY := false
PRODUCT_SUPPORTS_VERITY_FEC := false
in the RockPi4B.mk makefile but I canāt remember the correct command. Or it was also verity flags you needed to remove form the different partitions in fstab or something.
Here are also patches for adb support for Magisk
system/core/adb/daemon/restart_service.cpp
@@ -33,6 +33,12 @@
WriteFdExactly(fd.get(), "adbd is already running as root\n");
return;
}
+ std::string magisk_prop = android::base::GetProperty("sys.magisk.adb.root", "0");
+ bool magisk_root = (magisk_prop == "1");
+ if (magisk_root) {
+ LOG(INFO) << "restart_root_service: magisk root";
+ WriteFdExactly(fd.get(), "magisk root adb ...\n");
+ } else
if (!__android_log_is_debuggable()) {
WriteFdExactly(fd.get(), "adbd cannot run as root in production builds\n");
system/core/adb/daemon/main.cpp
@@ -72,6 +72,12 @@
}
static bool should_drop_privileges() {
+ std::string magisk_prop = android::base::GetProperty("sys.magisk.adb.root", "0");
+ bool magisk_root = (magisk_prop == "1");
+ if (magisk_root){
+ D("should_drop_privileges: magisk root");
+ return false;
+ }
// "adb root" not allowed, always drop privileges.
if (!ALLOW_ADBD_ROOT && !is_device_unlocked()) return true;
As far as I know, building the GO version of the product requires BUILD_WITH_GO_OPT: =true in the Makefile, which does not conflict with the normal version.
I just want to get rid of this warning if you run ./mkimage.sh
device/rockchip/common/device.mk:868: warning: Please set client id with your own MADA ID!
device/rockchip/common/
diff --git a/device.mk b/device.mk
index 49ef6c8..7e3978b 100644
--- a/device.mk
+++ b/device.mk
@@ -865,7 +865,6 @@ ifeq ($(strip $(BUILD_WITH_GOOGLE_MARKET)), true)
PRODUCT_PROPERTY_OVERRIDES += \
ro.control_privapp_permissions=enforce
endif
- $(warning Please set client id with your own MADA ID!)
PRODUCT_PROPERTY_OVERRIDES += \
ro.com.google.clientidbase=android-rockchip
endif