remove inprocess tethering

It is just a constant source of bugs, with no real tests,
let's stop pretending this is a supported configuration.

The only tested configuration is out-of-process tethering
updatable apex.

Test: TreeHugger
Bug: 279942846
(cherry picked from https://android-review.googlesource.com/q/commit:7a03c187f596049db96acdae3f00dc6ff5e9e672)
Merged-In: I4b659a3cd32b89a65549b56006b926a5ac755f7b
Change-Id: I4b659a3cd32b89a65549b56006b926a5ac755f7b

Former-commit-id: 8bcaa2926d
This commit is contained in:
Maciej Żenczykowski 2023-04-27 19:22:11 +00:00 committed by Cherrypicker Worker
parent 2489cda965
commit 35873eca5e
8 changed files with 0 additions and 122 deletions

View File

@ -119,7 +119,6 @@ cc_library {
name: "libcom_android_networkstack_tethering_util_jni",
sdk_version: "30",
apex_available: [
"//apex_available:platform", // Used by InProcessTethering
"com.android.tethering",
],
min_sdk_version: "30",
@ -188,24 +187,6 @@ java_defaults {
lint: { strict_updatability_linting: true },
}
// Non-updatable tethering running in the system server process for devices not using the module
android_app {
name: "InProcessTethering",
defaults: [
"TetheringAppDefaults",
"TetheringApiLevel",
"ConnectivityNextEnableDefaults",
"TetheringReleaseTargetSdk"
],
static_libs: ["TetheringApiCurrentLib"],
certificate: "platform",
manifest: "AndroidManifest_InProcess.xml",
// InProcessTethering is a replacement for Tethering
overrides: ["Tethering"],
apex_available: ["com.android.tethering"],
lint: { strict_updatability_linting: true },
}
// Updatable tethering packaged for finalized API
android_app {
name: "Tethering",

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.networkstack.tethering.inprocess"
android:sharedUserId="android.uid.system"
android:process="system">
<uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29" />
<application>
<service android:name="com.android.networkstack.tethering.TetheringService"
android:process="system"
android:permission="android.permission.MAINLINE_NETWORK_STACK"
android:exported="true">
<intent-filter>
<action android:name="android.net.ITetheringConnector.InProcess"/>
</intent-filter>
</service>
</application>
</manifest>

View File

@ -18,13 +18,6 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
prebuilt_etc {
name: "TetheringInProcessFlag",
src: "in-process",
filename_from_src: true,
sub_dir: "flag",
}
prebuilt_etc {
name: "TetheringOutOfProcessFlag",
src: "out-of-process",
@ -254,27 +247,3 @@ systemserverclasspath_fragment {
standalone_contents: ["service-connectivity"],
apex_available: ["com.android.tethering"],
}
override_apex {
name: "com.android.tethering.inprocess",
base: "com.android.tethering",
package_name: "com.android.tethering.inprocess",
enabled: enable_tethering_next_apex,
bpfs: [
"block.o",
"clatd.o",
"dscpPolicy.o",
"netd.o",
"offload@inprocess.o",
"test@inprocess.o",
],
apps: [
"ServiceConnectivityResources",
"InProcessTethering",
],
prebuilts: [
"current_sdkinfo",
"privapp_allowlist_com.android.tethering",
"TetheringInProcessFlag",
],
}

View File

@ -102,18 +102,6 @@ bpf {
],
}
bpf {
name: "offload@inprocess.o",
srcs: ["offload@inprocess.c"],
btf: true,
cflags: [
"-Wall",
"-Werror",
"-DBTF",
"-DINPROCESS",
],
}
bpf {
name: "test.o",
srcs: ["test.c"],
@ -134,18 +122,6 @@ bpf {
],
}
bpf {
name: "test@inprocess.o",
srcs: ["test@inprocess.c"],
btf: true,
cflags: [
"-Wall",
"-Werror",
"-DBTF",
"-DINPROCESS",
],
}
bpf {
name: "clatd.o",
srcs: ["clatd.c"],

View File

@ -38,13 +38,7 @@
// Warning: values other than AID_ROOT don't work for map uid on BpfLoader < v0.21
#define TETHERING_UID AID_ROOT
#ifdef INPROCESS
#define DEFAULT_BPF_MAP_SELINUX_CONTEXT "fs_bpf_net_shared"
#define DEFAULT_BPF_PROG_SELINUX_CONTEXT "fs_bpf_net_shared"
#define TETHERING_GID AID_SYSTEM
#else
#define TETHERING_GID AID_NETWORK_STACK
#endif
#include "bpf_helpers.h"
#include "bpf_net_helpers.h"

View File

@ -1 +0,0 @@
offload.c

View File

@ -32,13 +32,7 @@
// Warning: values other than AID_ROOT don't work for map uid on BpfLoader < v0.21
#define TETHERING_UID AID_ROOT
#ifdef INPROCESS
#define DEFAULT_BPF_MAP_SELINUX_CONTEXT "fs_bpf_net_shared"
#define DEFAULT_BPF_PROG_SELINUX_CONTEXT "fs_bpf_net_shared"
#define TETHERING_GID AID_SYSTEM
#else
#define TETHERING_GID AID_NETWORK_STACK
#endif
// This is non production code, only used for testing
// Needed because the bitmap array definition is non-kosher for pre-T OS devices.

View File

@ -1 +0,0 @@
test.c