android-12.0.0_r32 patches
This commit is contained in:
58
android-12.0.0_r32/frameworks/native/0001-fix-booting.patch
Normal file
58
android-12.0.0_r32/frameworks/native/0001-fix-booting.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
From 78a265c62f866a3d83701ad337158fd615e4e5f1 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 1/2] 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 d5bdd1c803..94b8da8e1c 100644
|
||||
--- a/libs/binder/Binder.cpp
|
||||
+++ b/libs/binder/Binder.cpp
|
||||
@@ -276,6 +276,7 @@ bool BBinder::isRequestingSid()
|
||||
|
||||
void BBinder::setRequestingSid(bool requestingSid)
|
||||
{
|
||||
+ 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 c415ea02e2..3e71a9c8e6 100644
|
||||
--- a/libs/binder/IPCThreadState.cpp
|
||||
+++ b/libs/binder/IPCThreadState.cpp
|
||||
@@ -1242,7 +1242,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 bade9187ac..8e8fec5040 100644
|
||||
--- a/libs/binder/ProcessState.cpp
|
||||
+++ b/libs/binder/ProcessState.cpp
|
||||
@@ -149,11 +149,14 @@ 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) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user