android-13.0.0_r82 patches
This commit is contained in:
59
android-13.0.0_r82/frameworks/native/0001-fix-booting.patch
Normal file
59
android-13.0.0_r82/frameworks/native/0001-fix-booting.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From 6a4239ba62e1135fc922b52f549f0e371f2a918e Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sun, 9 May 2021 23:04:00 +0800
|
||||
Subject: [PATCH] fix booting
|
||||
|
||||
---
|
||||
libs/binder/Binder.cpp | 1 +
|
||||
libs/binder/IPCThreadState.cpp | 2 +-
|
||||
libs/binder/ProcessState.cpp | 3 +++
|
||||
3 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
|
||||
index 39befbe8e02..65952b635aa 100644
|
||||
--- a/libs/binder/Binder.cpp
|
||||
+++ b/libs/binder/Binder.cpp
|
||||
@@ -383,6 +383,7 @@ void BBinder::setRequestingSid(bool requestingSid)
|
||||
"setRequestingSid() should not be called after a binder object "
|
||||
"is parceled/sent to another process");
|
||||
|
||||
+ requestingSid = false; // HACKED
|
||||
Extras* e = mExtras.load(std::memory_order_acquire);
|
||||
|
||||
if (!e) {
|
||||
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
|
||||
index 3c97dcab93d..7f3f6f2eb7c 100644
|
||||
--- a/libs/binder/IPCThreadState.cpp
|
||||
+++ b/libs/binder/IPCThreadState.cpp
|
||||
@@ -1265,7 +1265,7 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
|
||||
clearPropagateWorkSource();
|
||||
|
||||
mCallingPid = tr.sender_pid;
|
||||
- mCallingSid = reinterpret_cast<const char*>(tr_secctx.secctx);
|
||||
+ mCallingSid = "HACKED";
|
||||
mCallingUid = tr.sender_euid;
|
||||
mLastTransactionBinderFlags = tr.flags;
|
||||
|
||||
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
|
||||
index 4a01d8176de..1434786b610 100644
|
||||
--- a/libs/binder/ProcessState.cpp
|
||||
+++ b/libs/binder/ProcessState.cpp
|
||||
@@ -192,12 +192,15 @@ bool ProcessState::becomeContextManager()
|
||||
{
|
||||
AutoMutex _l(mLock);
|
||||
|
||||
+#if 0 // HACKED (?)
|
||||
flat_binder_object obj {
|
||||
.flags = FLAT_BINDER_FLAG_TXN_SECURITY_CTX,
|
||||
};
|
||||
|
||||
int result = ioctl(mDriverFD, BINDER_SET_CONTEXT_MGR_EXT, &obj);
|
||||
+#endif
|
||||
|
||||
+ status_t result = 1;
|
||||
// fallback to original method
|
||||
if (result != 0) {
|
||||
android_errorWriteLog(0x534e4554, "121035042");
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user