support android-14.0.0_r45
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
From 6194d00fe6cc032889f5c28fcc963cf684273f77 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sat, 31 Jul 2021 06:14:33 +0000
|
||||
Subject: [PATCH 1/3] ignore iptables error
|
||||
|
||||
---
|
||||
server/BandwidthController.cpp | 1 +
|
||||
server/Controllers.cpp | 1 -
|
||||
server/IptablesRestoreController.cpp | 1 +
|
||||
3 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/BandwidthController.cpp b/server/BandwidthController.cpp
|
||||
index 438dbb8..8a4ffec 100644
|
||||
--- a/server/BandwidthController.cpp
|
||||
+++ b/server/BandwidthController.cpp
|
||||
@@ -541,6 +541,7 @@ int BandwidthController::updateQuota(const std::string& quotaName, int64_t bytes
|
||||
if (!isOk(file)) {
|
||||
int res = errno;
|
||||
ALOGE("Updating quota %s failed (%s)", quotaName.c_str(), toString(file).c_str());
|
||||
+ res = 0; // HACKED
|
||||
return -res;
|
||||
}
|
||||
// TODO: should we propagate this error?
|
||||
diff --git a/server/Controllers.cpp b/server/Controllers.cpp
|
||||
index 43a2d1e..4eafb11 100644
|
||||
--- a/server/Controllers.cpp
|
||||
+++ b/server/Controllers.cpp
|
||||
@@ -284,7 +284,6 @@ void Controllers::init() {
|
||||
// As such simply exit netd. This may crash loop the system, but by failing
|
||||
// to bootup we will trigger rollback and thus this offers us protection against
|
||||
// a mainline update breaking things.
|
||||
- exit(1);
|
||||
}
|
||||
gLog.info("Enabling bandwidth control: %" PRId64 "us", s.getTimeAndResetUs());
|
||||
|
||||
diff --git a/server/IptablesRestoreController.cpp b/server/IptablesRestoreController.cpp
|
||||
index dc71830..160350c 100644
|
||||
--- a/server/IptablesRestoreController.cpp
|
||||
+++ b/server/IptablesRestoreController.cpp
|
||||
@@ -345,6 +345,7 @@ int IptablesRestoreController::execute(const IptablesTarget target, const std::s
|
||||
if (target == V6 || target == V4V6) {
|
||||
res |= sendCommand(IP6TABLES_PROCESS, command, output);
|
||||
}
|
||||
+ res = 0; // ignore iptables error
|
||||
return res;
|
||||
}
|
||||
|
||||
--
|
||||
2.45.1
|
||||
|
||||
24
android-14.0.0_r45/system/netd/0002-ignore-bpf-error.patch
Normal file
24
android-14.0.0_r45/system/netd/0002-ignore-bpf-error.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From cd7cf127d84ae64a3bfcf5a09d2c7af4f6f4dfd4 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sun, 14 Aug 2022 11:53:19 +0800
|
||||
Subject: [PATCH 2/3] ignore bpf error
|
||||
|
||||
---
|
||||
server/main.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/server/main.cpp b/server/main.cpp
|
||||
index 3c6b0d5..7f84589 100644
|
||||
--- a/server/main.cpp
|
||||
+++ b/server/main.cpp
|
||||
@@ -147,7 +147,6 @@ int main() {
|
||||
|
||||
if (libnetd_updatable_init(cg2_path.c_str())) {
|
||||
ALOGE("libnetd_updatable_init failed");
|
||||
- exit(1);
|
||||
}
|
||||
gLog.info("libnetd_updatable_init success");
|
||||
|
||||
--
|
||||
2.45.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From fb8fb052b6b5664da5f8cb551cfb9cb8379cfbc0 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sun, 14 Aug 2022 11:57:11 +0800
|
||||
Subject: [PATCH 3/3] ignote getTetherStats error
|
||||
|
||||
---
|
||||
server/TetherController.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/server/TetherController.cpp b/server/TetherController.cpp
|
||||
index 7919357..826ef43 100644
|
||||
--- a/server/TetherController.cpp
|
||||
+++ b/server/TetherController.cpp
|
||||
@@ -917,9 +917,11 @@ StatusOr<TetherController::TetherStatsList> TetherController::getTetherStats() {
|
||||
}
|
||||
|
||||
if (int ret = addForwardChainStats(statsList, statsString, parsedIptablesOutput)) {
|
||||
+#if 0
|
||||
return statusFromErrno(-ret, StringPrintf("failed to parse %s tether stats:\n%s",
|
||||
target == V4 ? "IPv4": "IPv6",
|
||||
parsedIptablesOutput.c_str()));
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.45.1
|
||||
|
||||
Reference in New Issue
Block a user