Skip to content

arv master : framework patch

Peter Yoon edited this page Nov 1, 2023 · 21 revisions

Avoid PermissionController waiting lockup

Apply following change under frameworks/base/

services/core/java/com/android/server/policy/PermissionPolicyService.java 
@@ line 573 @@ public final class PermissionPolicyService extends SystemService {
         final PermissionManagerServiceInternal permissionManagerInternal =
                 LocalServices.getService(PermissionManagerServiceInternal.class);
-        if (packageManagerInternal.isPermissionUpgradeNeeded(userId)) {
+        if (false) {
         if (DEBUG) Slog.i(LOG_TAG, "defaultPermsWereGrantedSinceBoot(" + userId + ")");

Disable Zbs & Vector

Since SiFive U74 in JH7110 is missing Zbs & Vector extension, Apply following change under build/soong/

cc/confing/riscv64_device.go
@@ line 31
	"-riscv-disable-sextw-removal=true",
-		"-march=rv64gcv_zba_zbb_zbs",
+		"-march=rv64gc_zba_zbb",
}

riscv64ArchVariantCflags = map[string][]string{}

riscv64Ldflags = []string{
	"-Wl,--hash-style=gnu",
-		"-march=rv64gcv_zba_zbb_zbs",
+		"-march=rv64gc_zba_zbb",
}

Revert Vector extension usage commits in ART

Revert following commits under bionic in order

https://android.googlesource.com/platform/bionic/+/7d13666b536f20ac0a591cbac2f17ec5a01c0478 https://android.googlesource.com/platform/bionic/+/a4d7102cf2f924265f21095be2c231faff980321

Revert following commits under art in order

https://android.googlesource.com/platform/art/+/e39c8bad3add22e01edefe4205d405a0bdc1c7ee https://android.googlesource.com/platform/art/+/955eacb7a56fcf97283459e67a1d90b241e8b3fd https://android.googlesource.com/platform/art/+/5cd9de6b3931a24a106b9ac1e9822653d92fe4a1 https://android.googlesource.com/platform/art/+/f248454761f054985689b40a431d06f0a958e348 https://android.googlesource.com/platform/art/+/20a7e17e229465b499c84552eb5a93c63fa0ce81 https://android.googlesource.com/platform/art/+/a38ce01c0445fa416c8bbe06d9891d9f3349aad4 https://android.googlesource.com/platform/art/+/b08bb5775771d669404791c6fd2b0b2deecbf714 https://android.googlesource.com/platform/art/+/178e647cfc23649acd4340fb60ce4d0f5207a526 https://android.googlesource.com/platform/art/+/f884ef53dfec01ece6c08f52e09ecddbdc8422b4

$ git revert <HASH>

Revive TARGET_FLATTEN_APEX

Without Flatten APEX, zygote is aborting during initialization.

Revert following commit under build/make

https://android.googlesource.com/platform/build/+/0d500c58aaee61bd8827ed74088d89ec966c0d16

$ git revert 0d500c58aaee61bd8827ed74088d89ec966c0d16

Avoid repeative logcat

Apply following changes under bionic/

libc/bionic/system_property_set.cpp
@@ line 230 @@ int __system_property_set(const char* key, const char* value) {
    if (result != PROP_SUCCESS) {
-        async_safe_format_log(ANDROID_LOG_WARN, "libc",
-                "Unable to set property \"%s\" to \"%s\": error code: 0x%x", key, value,
-                result);
         return -1;

Apply following changes under system/core/

init/init.cpp
@@ line 566 @@ static bool HandleControlMessage(std::string_view message, const std::string& na
    if (service == nullptr) {
-        LOG(ERROR) << "Control message: Could not find '" << name << "' for ctl." << message
-                   << " from pid: " << from_pid << " (" << process_cmdline << ")";
        return false;

Apply following changes under frameworks/native/

cmds/servicemanager/ServiceManager.cpp
@@ 654 @@ void ServiceManager::binderDied(const wp<IBinder>& who) {
-void ServiceManager::tryStartService(const Access::CallingContext& ctx, const std::string& name) {
+void ServiceManager::tryStartService(const Access::CallingContext& /*ctx*/, const std::string& name) {
-    ALOGI("Since '%s' could not be found (requested by debug pid %d), trying to start it as a lazy "
-          "AIDL service. (if it's not configured to be a lazy service, it may be stuck starting or "
-          "still starting).",
-          name.c_str(), ctx.debugPid);

     std::thread([=] {
         if (!base::SetProperty("ctl.interface_start", "aidl/" + name)) {
-            ALOGI("Tried to start aidl service %s as a lazy service, but was unable to. Usually "
-                  "this happens when a "
-                  "service is not installed, but if the service is intended to be used as a "
-                  "lazy service, then it may be configured incorrectly.",
-                  name.c_str());
         }
      }).detach();