Merge "Add MdnsNsecRecord"
diff --git a/Tethering/src/com/android/networkstack/tethering/Tethering.java b/Tethering/src/com/android/networkstack/tethering/Tethering.java
index 1f3fc11..c2cf92c 100644
--- a/Tethering/src/com/android/networkstack/tethering/Tethering.java
+++ b/Tethering/src/com/android/networkstack/tethering/Tethering.java
@@ -477,17 +477,10 @@
             wifiManager.registerSoftApCallback(mExecutor, softApCallback);
         }
         if (SdkLevel.isAtLeastT() && wifiManager != null) {
-            try {
-                // Although WifiManager#registerLocalOnlyHotspotSoftApCallback document that it need
-                // NEARBY_WIFI_DEVICES permission, but actually a caller who have NETWORK_STACK
-                // or MAINLINE_NETWORK_STACK permission would also able to use this API.
-                wifiManager.registerLocalOnlyHotspotSoftApCallback(mExecutor, softApCallback);
-            } catch (UnsupportedOperationException e) {
-                // Since wifi module development in internal branch,
-                // #registerLocalOnlyHotspotSoftApCallback currently doesn't supported in AOSP
-                // before AOSP switch to Android T + 1.
-                Log.wtf(TAG, "registerLocalOnlyHotspotSoftApCallback API is not supported");
-            }
+            // Although WifiManager#registerLocalOnlyHotspotSoftApCallback document that it need
+            // NEARBY_WIFI_DEVICES permission, but actually a caller who have NETWORK_STACK
+            // or MAINLINE_NETWORK_STACK permission would also able to use this API.
+            wifiManager.registerLocalOnlyHotspotSoftApCallback(mExecutor, softApCallback);
         }
 
         startTrackDefaultNetwork();
diff --git a/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java b/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java
index 8ef5d71..903de9d 100644
--- a/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java
+++ b/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java
@@ -22,6 +22,7 @@
 import static android.net.ConnectivityManager.TYPE_MOBILE_DUN;
 import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI;
 import static android.provider.DeviceConfig.NAMESPACE_CONNECTIVITY;
+import static android.provider.DeviceConfig.NAMESPACE_TETHERING;
 
 import static com.android.net.module.util.DeviceConfigUtils.TETHERING_MODULE_NAME;
 import static com.android.networkstack.apishim.ConstantsShim.KEY_CARRIER_SUPPORTS_TETHERING_BOOL;
@@ -193,8 +194,13 @@
 
         isDunRequired = checkDunRequired(ctx);
 
-        final boolean forceAutomaticUpstream = !SdkLevel.isAtLeastS()
-                && isFeatureEnabled(ctx, TETHER_FORCE_UPSTREAM_AUTOMATIC_VERSION);
+        // Here is how automatic mode enable/disable support on different Android version:
+        // - R   : can be enabled/disabled by resource config_tether_upstream_automatic.
+        //         but can be force-enabled by flag TETHER_FORCE_UPSTREAM_AUTOMATIC_VERSION.
+        // - S, T: can be enabled/disabled by resource config_tether_upstream_automatic.
+        // - U+  : automatic mode only.
+        final boolean forceAutomaticUpstream = SdkLevel.isAtLeastU() || (!SdkLevel.isAtLeastS()
+                && isConnectivityFeatureEnabled(ctx, TETHER_FORCE_UPSTREAM_AUTOMATIC_VERSION));
         chooseUpstreamAutomatically = forceAutomaticUpstream || getResourceBoolean(
                 res, R.bool.config_tether_upstream_automatic, false /** defaultValue */);
         preferredUpstreamIfaceTypes = getUpstreamIfaceTypes(res, isDunRequired);
@@ -565,9 +571,23 @@
         return DeviceConfig.getProperty(NAMESPACE_CONNECTIVITY, name);
     }
 
+    /**
+     * This is deprecated because connectivity namespace already be used for NetworkStack mainline
+     * module. Tethering should use its own namespace to roll out the feature flag.
+     * @deprecated new caller should use isTetheringFeatureEnabled instead.
+     */
+    @Deprecated
+    private boolean isConnectivityFeatureEnabled(Context ctx, String featureVersionFlag) {
+        return isFeatureEnabled(ctx, NAMESPACE_CONNECTIVITY, featureVersionFlag);
+    }
+
+    private boolean isTetheringFeatureEnabled(Context ctx, String featureVersionFlag) {
+        return isFeatureEnabled(ctx, NAMESPACE_TETHERING, featureVersionFlag);
+    }
+
     @VisibleForTesting
-    protected boolean isFeatureEnabled(Context ctx, String featureVersionFlag) {
-        return DeviceConfigUtils.isFeatureEnabled(ctx, NAMESPACE_CONNECTIVITY, featureVersionFlag,
+    protected boolean isFeatureEnabled(Context ctx, String namespace, String featureVersionFlag) {
+        return DeviceConfigUtils.isFeatureEnabled(ctx, namespace, featureVersionFlag,
                 TETHERING_MODULE_NAME, false /* defaultEnabled */);
     }
 
diff --git a/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java b/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
index f0f9a31..c2c9fc4 100644
--- a/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
+++ b/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
@@ -556,23 +556,6 @@
         // client, which is not possible in this test.
     }
 
-    private boolean isEthernetTetheringSupported() throws Exception {
-        final CompletableFuture<Boolean> future = new CompletableFuture<>();
-        final TetheringEventCallback callback = new TetheringEventCallback() {
-            @Override
-            public void onSupportedTetheringTypes(Set<Integer> supportedTypes) {
-                future.complete(supportedTypes.contains(TETHERING_ETHERNET));
-            }
-        };
-
-        try {
-            mTm.registerTetheringEventCallback(mHandler::post, callback);
-            return future.get(TIMEOUT_MS, TimeUnit.MILLISECONDS);
-        } finally {
-            mTm.unregisterTetheringEventCallback(callback);
-        }
-    }
-
     private static final class MyTetheringEventCallback implements TetheringEventCallback {
         private final TetheringManager mTm;
         private final CountDownLatch mTetheringStartedLatch = new CountDownLatch(1);
diff --git a/Tethering/tests/unit/src/com/android/networkstack/tethering/FakeTetheringConfiguration.java b/Tethering/tests/unit/src/com/android/networkstack/tethering/FakeTetheringConfiguration.java
index 95ec38f..0d686ed 100644
--- a/Tethering/tests/unit/src/com/android/networkstack/tethering/FakeTetheringConfiguration.java
+++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/FakeTetheringConfiguration.java
@@ -33,7 +33,7 @@
     }
 
     @Override
-    protected boolean isFeatureEnabled(Context ctx, String featureVersionFlag) {
+    protected boolean isFeatureEnabled(Context ctx, String namespace, String featureVersionFlag) {
         return false;
     }
 
diff --git a/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java b/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java
index 1a12125..f662c02 100644
--- a/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java
+++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringConfigurationTest.java
@@ -545,7 +545,8 @@
         assertTrue(testCfg.shouldEnableWifiP2pDedicatedIp());
     }
 
-    @Test
+    // The config only works on T-
+    @Test @IgnoreAfter(Build.VERSION_CODES.TIRAMISU)
     public void testChooseUpstreamAutomatically() throws Exception {
         when(mResources.getBoolean(R.bool.config_tether_upstream_automatic))
                 .thenReturn(true);
@@ -556,6 +557,20 @@
         assertChooseUpstreamAutomaticallyIs(false);
     }
 
+    // The automatic mode is always enabled on U+
+    @Test @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+    public void testChooseUpstreamAutomaticallyAfterT() throws Exception {
+        // Expect that automatic mode is always enabled no matter what
+        // config_tether_upstream_automatic is.
+        when(mResources.getBoolean(R.bool.config_tether_upstream_automatic))
+                .thenReturn(true);
+        assertChooseUpstreamAutomaticallyIs(true);
+
+        when(mResources.getBoolean(R.bool.config_tether_upstream_automatic))
+                .thenReturn(false);
+        assertChooseUpstreamAutomaticallyIs(true);
+    }
+
     // The flag override only works on R-
     @Test @IgnoreAfter(Build.VERSION_CODES.R)
     public void testChooseUpstreamAutomatically_FlagOverride() throws Exception {
@@ -574,14 +589,34 @@
         assertChooseUpstreamAutomaticallyIs(false);
     }
 
-    @Test @IgnoreUpTo(Build.VERSION_CODES.R)
-    public void testChooseUpstreamAutomatically_FlagOverrideAfterR() throws Exception {
+    @Test @IgnoreUpTo(Build.VERSION_CODES.R) @IgnoreAfter(Build.VERSION_CODES.TIRAMISU)
+    public void testChooseUpstreamAutomatically_FlagOverrideOnSAndT() throws Exception {
         when(mResources.getBoolean(R.bool.config_tether_upstream_automatic))
                 .thenReturn(false);
         setTetherForceUpstreamAutomaticFlagVersion(TEST_PACKAGE_VERSION - 1);
         assertChooseUpstreamAutomaticallyIs(false);
     }
 
+    // The automatic mode is always enabled on U+
+    @Test @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+    public void testChooseUpstreamAutomatically_FlagOverrideAfterT() throws Exception {
+        // Expect that automatic mode is always enabled no matter what
+        // TETHER_FORCE_UPSTREAM_AUTOMATIC_VERSION is.
+        when(mResources.getBoolean(R.bool.config_tether_upstream_automatic))
+                .thenReturn(false);
+        setTetherForceUpstreamAutomaticFlagVersion(TEST_PACKAGE_VERSION - 1);
+        assertTrue(DeviceConfigUtils.isFeatureEnabled(mMockContext, NAMESPACE_CONNECTIVITY,
+                TetheringConfiguration.TETHER_FORCE_UPSTREAM_AUTOMATIC_VERSION, APEX_NAME, false));
+
+        assertChooseUpstreamAutomaticallyIs(true);
+
+        setTetherForceUpstreamAutomaticFlagVersion(0L);
+        assertChooseUpstreamAutomaticallyIs(true);
+
+        setTetherForceUpstreamAutomaticFlagVersion(Long.MAX_VALUE);
+        assertChooseUpstreamAutomaticallyIs(true);
+    }
+
     private void setTetherForceUpstreamAutomaticFlagVersion(Long version) {
         doReturn(version == null ? null : Long.toString(version)).when(
                 () -> DeviceConfig.getProperty(eq(NAMESPACE_CONNECTIVITY),
diff --git a/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java b/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java
index 9337b1a..a8d886b 100644
--- a/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java
+++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java
@@ -196,6 +196,7 @@
 import com.android.networkstack.tethering.TestConnectivityManager.TestNetworkAgent;
 import com.android.networkstack.tethering.metrics.TetheringMetrics;
 import com.android.testutils.DevSdkIgnoreRule;
+import com.android.testutils.DevSdkIgnoreRule.IgnoreAfter;
 import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo;
 import com.android.testutils.MiscAsserts;
 
@@ -1212,13 +1213,12 @@
         inOrder.verify(mUpstreamNetworkMonitor).setCurrentUpstream(wifi.networkId);
     }
 
-    @Test
-    public void testAutomaticUpstreamSelection() throws Exception {
+    private void verifyAutomaticUpstreamSelection(boolean configAutomatic) throws Exception {
         TestNetworkAgent mobile = new TestNetworkAgent(mCm, buildMobileDualStackUpstreamState());
         TestNetworkAgent wifi = new TestNetworkAgent(mCm, buildWifiUpstreamState());
         InOrder inOrder = inOrder(mCm, mUpstreamNetworkMonitor);
         // Enable automatic upstream selection.
-        upstreamSelectionTestCommon(true, inOrder, mobile, wifi);
+        upstreamSelectionTestCommon(configAutomatic, inOrder, mobile, wifi);
 
         // This code has historically been racy, so test different orderings of CONNECTIVITY_ACTION
         // broadcasts and callbacks, and add mLooper.dispatchAll() calls between the two.
@@ -1298,6 +1298,20 @@
     }
 
     @Test
+    public void testAutomaticUpstreamSelection() throws Exception {
+        verifyAutomaticUpstreamSelection(true /* configAutomatic */);
+    }
+
+    @Test
+    @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+    public void testAutomaticUpstreamSelectionWithConfigDisabled() throws Exception {
+        // Expect that automatic config can't disable the automatic mode because automatic mode
+        // is always enabled on U+ device.
+        verifyAutomaticUpstreamSelection(false /* configAutomatic */);
+    }
+
+    @Test
+    @IgnoreAfter(Build.VERSION_CODES.TIRAMISU)
     public void testLegacyUpstreamSelection() throws Exception {
         TestNetworkAgent mobile = new TestNetworkAgent(mCm, buildMobileDualStackUpstreamState());
         TestNetworkAgent wifi = new TestNetworkAgent(mCm, buildWifiUpstreamState());
@@ -1323,14 +1337,13 @@
         verifyDisableTryCellWhenTetheringStop(inOrder);
     }
 
-    @Test
-    public void testChooseDunUpstreamByAutomaticMode() throws Exception {
+    private void verifyChooseDunUpstreamByAutomaticMode(boolean configAutomatic) throws Exception {
         // Enable automatic upstream selection.
         TestNetworkAgent mobile = new TestNetworkAgent(mCm, buildMobileDualStackUpstreamState());
         TestNetworkAgent wifi = new TestNetworkAgent(mCm, buildWifiUpstreamState());
         TestNetworkAgent dun = new TestNetworkAgent(mCm, buildDunUpstreamState());
         InOrder inOrder = inOrder(mCm, mUpstreamNetworkMonitor);
-        chooseDunUpstreamTestCommon(true, inOrder, mobile, wifi, dun);
+        chooseDunUpstreamTestCommon(configAutomatic, inOrder, mobile, wifi, dun);
 
         // When default network switch to mobile and wifi is connected (may have low signal),
         // automatic mode would request dun again and choose it as upstream.
@@ -1359,6 +1372,18 @@
     }
 
     @Test
+    public void testChooseDunUpstreamByAutomaticMode() throws Exception {
+        verifyChooseDunUpstreamByAutomaticMode(true /* configAutomatic */);
+    }
+
+    @Test
+    @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+    public void testChooseDunUpstreamByAutomaticModeWithConfigDisabled() throws Exception {
+        verifyChooseDunUpstreamByAutomaticMode(false /* configAutomatic */);
+    }
+
+    @Test
+    @IgnoreAfter(Build.VERSION_CODES.TIRAMISU)
     public void testChooseDunUpstreamByLegacyMode() throws Exception {
         // Enable Legacy upstream selection.
         TestNetworkAgent mobile = new TestNetworkAgent(mCm, buildMobileDualStackUpstreamState());
diff --git a/framework/api/module-lib-current.txt b/framework/api/module-lib-current.txt
index 073cca2..752c347 100644
--- a/framework/api/module-lib-current.txt
+++ b/framework/api/module-lib-current.txt
@@ -228,13 +228,9 @@
   }
 
   public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo {
-    ctor public VpnTransportInfo(int, @Nullable String);
-    method public int describeContents();
+    ctor @Deprecated public VpnTransportInfo(int, @Nullable String);
     method @Nullable public String getSessionId();
-    method public int getType();
     method @NonNull public android.net.VpnTransportInfo makeCopy(long);
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR;
   }
 
 }
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt
index 8b35197..c7872a0 100644
--- a/framework/api/system-current.txt
+++ b/framework/api/system-current.txt
@@ -511,6 +511,15 @@
     field @NonNull public static final android.os.Parcelable.Creator<android.net.TcpKeepalivePacketData> CREATOR;
   }
 
+  public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo {
+    ctor public VpnTransportInfo(int, @Nullable String, boolean);
+    method public int describeContents();
+    method public boolean getBypassable();
+    method public int getType();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR;
+  }
+
 }
 
 package android.net.apf {
diff --git a/framework/src/android/net/VpnTransportInfo.java b/framework/src/android/net/VpnTransportInfo.java
index 4071c9a..ebad477 100644
--- a/framework/src/android/net/VpnTransportInfo.java
+++ b/framework/src/android/net/VpnTransportInfo.java
@@ -17,6 +17,7 @@
 package android.net;
 
 import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+import static android.annotation.SystemApi.Client.PRIVILEGED_APPS;
 import static android.net.NetworkCapabilities.REDACT_FOR_NETWORK_SETTINGS;
 
 import android.annotation.NonNull;
@@ -27,6 +28,10 @@
 import android.os.Parcelable;
 import android.text.TextUtils;
 
+import androidx.annotation.RequiresApi;
+
+import com.android.modules.utils.build.SdkLevel;
+
 import java.util.Objects;
 
 /**
@@ -37,7 +42,7 @@
  *
  * @hide
  */
-@SystemApi(client = MODULE_LIBRARIES)
+@SystemApi(client = PRIVILEGED_APPS)
 public final class VpnTransportInfo implements TransportInfo, Parcelable {
     /** Type of this VPN. */
     private final int mType;
@@ -45,6 +50,13 @@
     @Nullable
     private final String mSessionId;
 
+    private final boolean mBypassable;
+
+    // TODO: Refer to Build.VERSION_CODES when it's available in every branch.
+    private static final int UPSIDE_DOWN_CAKE = 34;
+
+    /** @hide */
+    @SystemApi(client = MODULE_LIBRARIES)
     @Override
     public @RedactionType long getApplicableRedactions() {
         return REDACT_FOR_NETWORK_SETTINGS;
@@ -52,21 +64,58 @@
 
     /**
      * Create a copy of a {@link VpnTransportInfo} with the sessionId redacted if necessary.
+     * @hide
      */
     @NonNull
+    @SystemApi(client = MODULE_LIBRARIES)
     public VpnTransportInfo makeCopy(@RedactionType long redactions) {
         return new VpnTransportInfo(mType,
-            ((redactions & REDACT_FOR_NETWORK_SETTINGS) != 0) ? null : mSessionId);
+            ((redactions & REDACT_FOR_NETWORK_SETTINGS) != 0) ? null : mSessionId, mBypassable);
     }
 
+    /**
+     * @deprecated please use {@link VpnTransportInfo(int,String,boolean)} instead.
+     * @hide
+     */
+    @Deprecated
+    @SystemApi(client = MODULE_LIBRARIES)
     public VpnTransportInfo(int type, @Nullable String sessionId) {
+        // When the module runs on older SDKs, |bypassable| will always be false since the old Vpn
+        // code will call this constructor. For Settings VPNs, this is always correct as they are
+        // never bypassable. For VpnManager and VpnService types, this may be wrong since both of
+        // them have a choice. However, on these SDKs VpnTransportInfo#getBypassable is not
+        // available anyway, so this should be harmless. False is a better choice than true here
+        // regardless because it is the default value for both VpnManager and VpnService if the app
+        // does not do anything about it.
+        this(type, sessionId, false /* bypassable */);
+    }
+
+    public VpnTransportInfo(int type, @Nullable String sessionId, boolean bypassable) {
         this.mType = type;
         this.mSessionId = sessionId;
+        this.mBypassable = bypassable;
+    }
+
+    /**
+     * Returns whether the VPN is allowing bypass.
+     *
+     * This method is not supported in SDK below U, and will throw
+     * {@code UnsupportedOperationException} if called.
+     */
+    @RequiresApi(UPSIDE_DOWN_CAKE)
+    public boolean getBypassable() {
+        if (!SdkLevel.isAtLeastU()) {
+            throw new UnsupportedOperationException("Not supported before U");
+        }
+
+        return mBypassable;
     }
 
     /**
      * Returns the session Id of this VpnTransportInfo.
+     * @hide
      */
+    @SystemApi(client = MODULE_LIBRARIES)
     @Nullable
     public String getSessionId() {
         return mSessionId;
@@ -84,17 +133,19 @@
         if (!(o instanceof VpnTransportInfo)) return false;
 
         VpnTransportInfo that = (VpnTransportInfo) o;
-        return (this.mType == that.mType) && TextUtils.equals(this.mSessionId, that.mSessionId);
+        return (this.mType == that.mType) && TextUtils.equals(this.mSessionId, that.mSessionId)
+                && (this.mBypassable == that.mBypassable);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(mType, mSessionId);
+        return Objects.hash(mType, mSessionId, mBypassable);
     }
 
     @Override
     public String toString() {
-        return String.format("VpnTransportInfo{type=%d, sessionId=%s}", mType, mSessionId);
+        return String.format("VpnTransportInfo{type=%d, sessionId=%s, bypassable=%b}",
+                mType, mSessionId, mBypassable);
     }
 
     @Override
@@ -106,12 +157,13 @@
     public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeInt(mType);
         dest.writeString(mSessionId);
+        dest.writeBoolean(mBypassable);
     }
 
     public static final @NonNull Creator<VpnTransportInfo> CREATOR =
             new Creator<VpnTransportInfo>() {
         public VpnTransportInfo createFromParcel(Parcel in) {
-            return new VpnTransportInfo(in.readInt(), in.readString());
+            return new VpnTransportInfo(in.readInt(), in.readString(), in.readBoolean());
         }
         public VpnTransportInfo[] newArray(int size) {
             return new VpnTransportInfo[size];
diff --git a/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java b/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java
index edf04b2..f6a55c8 100644
--- a/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java
+++ b/service-t/src/com/android/server/ethernet/EthernetServiceImpl.java
@@ -289,7 +289,7 @@
 
         enforceAdminPermission(iface, false, "enableInterface()");
 
-        mTracker.enableInterface(iface, new EthernetCallback(cb));
+        mTracker.setInterfaceEnabled(iface, true /* enabled */, new EthernetCallback(cb));
     }
 
     @Override
@@ -301,7 +301,7 @@
 
         enforceAdminPermission(iface, false, "disableInterface()");
 
-        mTracker.disableInterface(iface, new EthernetCallback(cb));
+        mTracker.setInterfaceEnabled(iface, false /* enabled */, new EthernetCallback(cb));
     }
 
     @Override
diff --git a/service-t/src/com/android/server/ethernet/EthernetTracker.java b/service-t/src/com/android/server/ethernet/EthernetTracker.java
index 95baf81..852cf42 100644
--- a/service-t/src/com/android/server/ethernet/EthernetTracker.java
+++ b/service-t/src/com/android/server/ethernet/EthernetTracker.java
@@ -371,15 +371,9 @@
     }
 
     @VisibleForTesting(visibility = PACKAGE)
-    protected void enableInterface(@NonNull final String iface,
+    protected void setInterfaceEnabled(@NonNull final String iface, boolean enabled,
             @Nullable final EthernetCallback cb) {
-        mHandler.post(() -> updateInterfaceState(iface, true, cb));
-    }
-
-    @VisibleForTesting(visibility = PACKAGE)
-    protected void disableInterface(@NonNull final String iface,
-            @Nullable final EthernetCallback cb) {
-        mHandler.post(() -> updateInterfaceState(iface, false, cb));
+        mHandler.post(() -> updateInterfaceState(iface, enabled, cb));
     }
 
     IpConfiguration getIpConfiguration(String iface) {
diff --git a/service/Android.bp b/service/Android.bp
index 326f91b..691c1ad 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -178,7 +178,10 @@
         "networkstack-client",
         "PlatformProperties",
         "service-connectivity-protos",
-        "service-connectivity-stats-protos",
+        // TODO: Adding the stats protos currently affects test coverage.
+        // So remove the protos in ConnectivityService until all
+        // tests for proto apis are added.
+        //"service-connectivity-stats-protos",
         "NetworkStackApiStableShims",
     ],
     apex_available: [
diff --git a/tests/cts/net/src/android/net/cts/CaptivePortalTest.kt b/tests/cts/net/src/android/net/cts/CaptivePortalTest.kt
index aad8804..7c24c95 100644
--- a/tests/cts/net/src/android/net/cts/CaptivePortalTest.kt
+++ b/tests/cts/net/src/android/net/cts/CaptivePortalTest.kt
@@ -47,6 +47,7 @@
 import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
 import androidx.test.runner.AndroidJUnit4
 import com.android.modules.utils.build.SdkLevel.isAtLeastR
+import com.android.testutils.DeviceConfigRule
 import com.android.testutils.RecorderCallback
 import com.android.testutils.TestHttpServer
 import com.android.testutils.TestHttpServer.Request
diff --git a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
index c7272f8..6c6070e 100644
--- a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
+++ b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
@@ -192,6 +192,7 @@
 import com.android.testutils.ConnectivityModuleTest;
 import com.android.testutils.DevSdkIgnoreRule;
 import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo;
+import com.android.testutils.DeviceConfigRule;
 import com.android.testutils.DeviceInfoUtils;
 import com.android.testutils.DumpTestUtils;
 import com.android.testutils.RecorderCallback.CallbackEntry;
@@ -1071,14 +1072,6 @@
             }, NETWORK_SETTINGS);
             registerBestMatchingNetworkCallback(makeDefaultRequest(), bestMatchingCallback, h);
         }
-        if (TestUtils.shouldTestTApis()) {
-            // Verify registerSystemDefaultNetworkCallback can be accessed via
-            // CONNECTIVITY_USE_RESTRICTED_NETWORKS permission.
-            final TestNetworkCallback systemDefaultCallback2 = new TestNetworkCallback();
-            runWithShellPermissionIdentity(() ->
-                    registerSystemDefaultNetworkCallback(systemDefaultCallback2, h),
-                    CONNECTIVITY_USE_RESTRICTED_NETWORKS);
-        }
 
         Network wifiNetwork = null;
         mCtsNetUtils.ensureWifiConnected();
@@ -1108,6 +1101,18 @@
         }
     }
 
+    @ConnectivityModuleTest
+    @IgnoreUpTo(Build.VERSION_CODES.R)
+    @Test
+    public void testRegisterSystemDefaultNetworkCallbackPermission() {
+        final Handler h = new Handler(Looper.getMainLooper());
+        // Verify registerSystemDefaultNetworkCallback can be accessed via
+        // CONNECTIVITY_USE_RESTRICTED_NETWORKS permission.
+        runWithShellPermissionIdentity(() ->
+                        registerSystemDefaultNetworkCallback(new TestNetworkCallback(), h),
+                CONNECTIVITY_USE_RESTRICTED_NETWORKS);
+    }
+
     /**
      * Tests both registerNetworkCallback and unregisterNetworkCallback similarly to
      * {@link #testRegisterNetworkCallback} except that a {@code PendingIntent} is used instead
@@ -2377,8 +2382,9 @@
             super.expectAvailableCallbacks(network, false /* suspended */, true /* validated */,
                     BLOCKED_REASON_NONE, NETWORK_CALLBACK_TIMEOUT_MS);
         }
-        public void expectBlockedStatusCallback(Network network, int blockedStatus) {
-            super.expectBlockedStatusCallback(blockedStatus, network, NETWORK_CALLBACK_TIMEOUT_MS);
+        public void eventuallyExpectBlockedStatusCallback(Network network, int blockedStatus) {
+            super.eventuallyExpect(CallbackEntry.BLOCKED_STATUS_INT, NETWORK_CALLBACK_TIMEOUT_MS,
+                    (it) -> it.getNetwork().equals(network) && it.getBlocked() == blockedStatus);
         }
         public void onBlockedStatusChanged(Network network, int blockedReasons) {
             getHistory().add(new CallbackEntry.BlockedStatusInt(network, blockedReasons));
@@ -2423,12 +2429,14 @@
         final Range<Integer> otherUidRange = new Range<>(otherUid, otherUid);
 
         setRequireVpnForUids(true, List.of(myUidRange));
-        myUidCallback.expectBlockedStatusCallback(defaultNetwork, BLOCKED_REASON_LOCKDOWN_VPN);
+        myUidCallback.eventuallyExpectBlockedStatusCallback(defaultNetwork,
+                BLOCKED_REASON_LOCKDOWN_VPN);
         otherUidCallback.assertNoBlockedStatusCallback();
 
         setRequireVpnForUids(true, List.of(myUidRange, otherUidRange));
         myUidCallback.assertNoBlockedStatusCallback();
-        otherUidCallback.expectBlockedStatusCallback(defaultNetwork, BLOCKED_REASON_LOCKDOWN_VPN);
+        otherUidCallback.eventuallyExpectBlockedStatusCallback(defaultNetwork,
+                BLOCKED_REASON_LOCKDOWN_VPN);
 
         // setRequireVpnForUids does no deduplication or refcounting. Removing myUidRange does not
         // unblock myUid because it was added to the blocked ranges twice.
@@ -2437,8 +2445,8 @@
         otherUidCallback.assertNoBlockedStatusCallback();
 
         setRequireVpnForUids(false, List.of(myUidRange, otherUidRange));
-        myUidCallback.expectBlockedStatusCallback(defaultNetwork, BLOCKED_REASON_NONE);
-        otherUidCallback.expectBlockedStatusCallback(defaultNetwork, BLOCKED_REASON_NONE);
+        myUidCallback.eventuallyExpectBlockedStatusCallback(defaultNetwork, BLOCKED_REASON_NONE);
+        otherUidCallback.eventuallyExpectBlockedStatusCallback(defaultNetwork, BLOCKED_REASON_NONE);
 
         myUidCallback.assertNoBlockedStatusCallback();
         otherUidCallback.assertNoBlockedStatusCallback();
diff --git a/tests/cts/net/src/android/net/cts/DeviceConfigRule.kt b/tests/cts/net/src/android/net/cts/DeviceConfigRule.kt
deleted file mode 100644
index 3a36cee..0000000
--- a/tests/cts/net/src/android/net/cts/DeviceConfigRule.kt
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (C) 2022 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.
- */
-
-package android.net.cts
-
-import android.Manifest.permission.READ_DEVICE_CONFIG
-import android.Manifest.permission.WRITE_DEVICE_CONFIG
-import android.provider.DeviceConfig
-import android.util.Log
-import com.android.modules.utils.build.SdkLevel
-import com.android.testutils.FunctionalUtils.ThrowingRunnable
-import com.android.testutils.runAsShell
-import com.android.testutils.tryTest
-import org.junit.rules.TestRule
-import org.junit.runner.Description
-import org.junit.runners.model.Statement
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import java.util.concurrent.TimeUnit
-
-private val TAG = DeviceConfigRule::class.simpleName
-
-/**
- * A [TestRule] that helps set [DeviceConfig] for tests and clean up the test configuration
- * automatically on teardown.
- *
- * The rule can also optionally retry tests when they fail following an external change of
- * DeviceConfig before S; this typically happens because device config flags are synced while the
- * test is running, and DisableConfigSyncTargetPreparer is only usable starting from S.
- *
- * @param retryCountBeforeSIfConfigChanged if > 0, when the test fails before S, check if
- *        the configs that were set through this rule were changed, and retry the test
- *        up to the specified number of times if yes.
- */
-class DeviceConfigRule @JvmOverloads constructor(
-    val retryCountBeforeSIfConfigChanged: Int = 0
-) : TestRule {
-    // Maps (namespace, key) -> value
-    private val originalConfig = mutableMapOf<Pair<String, String>, String?>()
-    private val usedConfig = mutableMapOf<Pair<String, String>, String?>()
-
-    /**
-     * Actions to be run after cleanup of the config, for the current test only.
-     */
-    private val currentTestCleanupActions = mutableListOf<ThrowingRunnable>()
-
-    override fun apply(base: Statement, description: Description): Statement {
-        return TestValidationUrlStatement(base, description)
-    }
-
-    private inner class TestValidationUrlStatement(
-        private val base: Statement,
-        private val description: Description
-    ) : Statement() {
-        override fun evaluate() {
-            var retryCount = if (SdkLevel.isAtLeastS()) 1 else retryCountBeforeSIfConfigChanged + 1
-            while (retryCount > 0) {
-                retryCount--
-                tryTest {
-                    base.evaluate()
-                    // Can't use break/return out of a loop here because this is a tryTest lambda,
-                    // so set retryCount to exit instead
-                    retryCount = 0
-                }.catch<Throwable> { e -> // junit AssertionFailedError does not extend Exception
-                    if (retryCount == 0) throw e
-                    usedConfig.forEach { (key, value) ->
-                        val currentValue = runAsShell(READ_DEVICE_CONFIG) {
-                            DeviceConfig.getProperty(key.first, key.second)
-                        }
-                        if (currentValue != value) {
-                            Log.w(TAG, "Test failed with unexpected device config change, retrying")
-                            return@catch
-                        }
-                    }
-                    throw e
-                } cleanupStep {
-                    runAsShell(WRITE_DEVICE_CONFIG) {
-                        originalConfig.forEach { (key, value) ->
-                            DeviceConfig.setProperty(
-                                    key.first, key.second, value, false /* makeDefault */)
-                        }
-                    }
-                } cleanupStep {
-                    originalConfig.clear()
-                    usedConfig.clear()
-                } cleanup {
-                    // Fold all cleanup actions into cleanup steps of an empty tryTest, so they are
-                    // all run even if exceptions are thrown, and exceptions are reported properly.
-                    currentTestCleanupActions.fold(tryTest { }) {
-                        tryBlock, action -> tryBlock.cleanupStep { action.run() }
-                    }.cleanup {
-                        currentTestCleanupActions.clear()
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Set a configuration key/value. After the test case ends, it will be restored to the value it
-     * had when this method was first called.
-     */
-    fun setConfig(namespace: String, key: String, value: String?): String? {
-        Log.i(TAG, "Setting config \"$key\" to \"$value\"")
-        val readWritePermissions = arrayOf(READ_DEVICE_CONFIG, WRITE_DEVICE_CONFIG)
-
-        val keyPair = Pair(namespace, key)
-        val existingValue = runAsShell(*readWritePermissions) {
-            DeviceConfig.getProperty(namespace, key)
-        }
-        if (!originalConfig.containsKey(keyPair)) {
-            originalConfig[keyPair] = existingValue
-        }
-        usedConfig[keyPair] = value
-        if (existingValue == value) {
-            // Already the correct value. There may be a race if a change is already in flight,
-            // but if multiple threads update the config there is no way to fix that anyway.
-            Log.i(TAG, "\"$key\" already had value \"$value\"")
-            return value
-        }
-
-        val future = CompletableFuture<String>()
-        val listener = DeviceConfig.OnPropertiesChangedListener {
-            // The listener receives updates for any change to any key, so don't react to
-            // changes that do not affect the relevant key
-            if (!it.keyset.contains(key)) return@OnPropertiesChangedListener
-            // "null" means absent in DeviceConfig : there is no such thing as a present but
-            // null value, so the following works even if |value| is null.
-            if (it.getString(key, null) == value) {
-                future.complete(value)
-            }
-        }
-
-        return tryTest {
-            runAsShell(*readWritePermissions) {
-                DeviceConfig.addOnPropertiesChangedListener(
-                        DeviceConfig.NAMESPACE_CONNECTIVITY,
-                        inlineExecutor,
-                        listener)
-                DeviceConfig.setProperty(
-                        DeviceConfig.NAMESPACE_CONNECTIVITY,
-                        key,
-                        value,
-                        false /* makeDefault */)
-                // Don't drop the permission until the config is applied, just in case
-                future.get(NetworkValidationTestUtil.TIMEOUT_MS, TimeUnit.MILLISECONDS)
-            }.also {
-                Log.i(TAG, "Config \"$key\" successfully set to \"$value\"")
-            }
-        } cleanup {
-            DeviceConfig.removeOnPropertiesChangedListener(listener)
-        }
-    }
-
-    private val inlineExecutor get() = Executor { r -> r.run() }
-
-    /**
-     * Add an action to be run after config cleanup when the current test case ends.
-     */
-    fun runAfterNextCleanup(action: ThrowingRunnable) {
-        currentTestCleanupActions.add(action)
-    }
-}
diff --git a/tests/cts/net/src/android/net/cts/NetworkValidationTestUtil.kt b/tests/cts/net/src/android/net/cts/NetworkValidationTestUtil.kt
index 375bfb8..a0b40aa 100644
--- a/tests/cts/net/src/android/net/cts/NetworkValidationTestUtil.kt
+++ b/tests/cts/net/src/android/net/cts/NetworkValidationTestUtil.kt
@@ -20,6 +20,7 @@
 import android.provider.DeviceConfig
 import android.provider.DeviceConfig.NAMESPACE_CONNECTIVITY
 import com.android.net.module.util.NetworkStackConstants
+import com.android.testutils.DeviceConfigRule
 import com.android.testutils.runAsShell
 
 /**
@@ -27,7 +28,6 @@
  */
 internal object NetworkValidationTestUtil {
     val TAG = NetworkValidationTestUtil::class.simpleName
-    const val TIMEOUT_MS = 20_000L
 
     /**
      * Clear the test network validation URLs.
diff --git a/tests/cts/net/src/android/net/cts/TestUtils.java b/tests/cts/net/src/android/net/cts/TestUtils.java
index 001aa01..6180845 100644
--- a/tests/cts/net/src/android/net/cts/TestUtils.java
+++ b/tests/cts/net/src/android/net/cts/TestUtils.java
@@ -16,8 +16,6 @@
 
 package android.net.cts;
 
-import static com.android.testutils.DevSdkIgnoreRuleKt.SC_V2;
-
 import android.os.Build;
 
 import com.android.modules.utils.build.SdkLevel;
@@ -37,11 +35,18 @@
     }
 
     /**
-     * Whether to test T+ APIs. This requires a) that the test be running on an S+ device, and
+     * Whether to test T+ APIs. This requires a) that the test be running on an T+ device, and
      * b) that the code be compiled against shims new enough to access these APIs.
      */
     public static boolean shouldTestTApis() {
-        // TODO: replace SC_V2 with Build.VERSION_CODES.S_V2 when it's available in mainline branch.
-        return SdkLevel.isAtLeastT() && ConstantsShim.VERSION > SC_V2;
+        return SdkLevel.isAtLeastT() && ConstantsShim.VERSION > Build.VERSION_CODES.S_V2;
+    }
+
+    /**
+     * Whether to test U+ APIs. This requires a) that the test be running on an U+ device, and
+     * b) that the code be compiled against shims new enough to access these APIs.
+     */
+    public static boolean shouldTestUApis() {
+        return SdkLevel.isAtLeastU() && ConstantsShim.VERSION > Build.VERSION_CODES.TIRAMISU;
     }
 }
diff --git a/tests/unit/java/android/net/NetworkTemplateTest.kt b/tests/unit/java/android/net/NetworkTemplateTest.kt
index 6c39169..666da53 100644
--- a/tests/unit/java/android/net/NetworkTemplateTest.kt
+++ b/tests/unit/java/android/net/NetworkTemplateTest.kt
@@ -231,10 +231,15 @@
         val mobileImsi1 = buildMobileNetworkState(TEST_IMSI1)
         val identMobile1 = buildNetworkIdentity(mockContext, mobileImsi1,
                 false /* defaultNetwork */, TelephonyManager.NETWORK_TYPE_UMTS)
+        val mobileImsi2 = buildMobileNetworkState(TEST_IMSI2)
+        val identMobile2 = buildNetworkIdentity(mockContext, mobileImsi2,
+                false /* defaultNetwork */, TelephonyManager.NETWORK_TYPE_LTE)
 
         // Verify that the template matches any subscriberId.
         templateMobileWildcard.assertMatches(identMobile1)
         templateMobileNullImsiWithRatType.assertMatches(identMobile1)
+        templateMobileWildcard.assertMatches(identMobile2)
+        templateMobileNullImsiWithRatType.assertDoesNotMatch(identMobile2)
 
         val identWifiImsi1Key1 = buildNetworkIdentity(
                 mockContext, buildWifiNetworkState(TEST_IMSI1, TEST_WIFI_KEY1), true, 0)
diff --git a/tests/unit/java/android/net/VpnTransportInfoTest.java b/tests/unit/java/android/net/VpnTransportInfoTest.java
index b4c7ac4..0510209 100644
--- a/tests/unit/java/android/net/VpnTransportInfoTest.java
+++ b/tests/unit/java/android/net/VpnTransportInfoTest.java
@@ -19,10 +19,13 @@
 import static android.net.NetworkCapabilities.REDACT_FOR_NETWORK_SETTINGS;
 import static android.net.NetworkCapabilities.REDACT_NONE;
 
+import static com.android.testutils.MiscAsserts.assertThrows;
 import static com.android.testutils.ParcelUtils.assertParcelSane;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
 
 import android.os.Build;
 
@@ -31,6 +34,7 @@
 import com.android.testutils.DevSdkIgnoreRule;
 import com.android.testutils.DevSdkIgnoreRunner;
 
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -38,36 +42,67 @@
 @SmallTest
 @DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.R)
 public class VpnTransportInfoTest {
+    @Rule
+    public final DevSdkIgnoreRule ignoreRule = new DevSdkIgnoreRule();
 
     @Test
     public void testParceling() {
-        VpnTransportInfo v = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, "12345");
-        assertParcelSane(v, 2 /* fieldCount */);
+        final VpnTransportInfo v = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, "12345");
+        assertParcelSane(v, 3 /* fieldCount */);
+
+        final VpnTransportInfo v2 =
+                new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, "12345", true);
+        assertParcelSane(v2, 3 /* fieldCount */);
     }
 
     @Test
     public void testEqualsAndHashCode() {
         String session1 = "12345";
         String session2 = "6789";
-        VpnTransportInfo v11 = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, session1);
-        VpnTransportInfo v12 = new VpnTransportInfo(VpnManager.TYPE_VPN_SERVICE, session1);
-        VpnTransportInfo v13 = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, session1);
-        VpnTransportInfo v14 = new VpnTransportInfo(VpnManager.TYPE_VPN_LEGACY, session1);
-        VpnTransportInfo v15 = new VpnTransportInfo(VpnManager.TYPE_VPN_OEM, session1);
-        VpnTransportInfo v21 = new VpnTransportInfo(VpnManager.TYPE_VPN_LEGACY, session2);
+        final VpnTransportInfo v11 = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, session1);
+        final VpnTransportInfo v12 = new VpnTransportInfo(VpnManager.TYPE_VPN_SERVICE, session1);
+        final VpnTransportInfo v13 = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, session1);
+        final VpnTransportInfo v14 = new VpnTransportInfo(VpnManager.TYPE_VPN_LEGACY, session1);
+        final VpnTransportInfo v15 = new VpnTransportInfo(VpnManager.TYPE_VPN_OEM, session1);
+        final VpnTransportInfo v16 = new VpnTransportInfo(VpnManager.TYPE_VPN_OEM, session1, true);
+        final VpnTransportInfo v17 = new VpnTransportInfo(VpnManager.TYPE_VPN_OEM, session1, true);
+        final VpnTransportInfo v21 = new VpnTransportInfo(VpnManager.TYPE_VPN_LEGACY, session2);
 
-        VpnTransportInfo v31 = v11.makeCopy(REDACT_FOR_NETWORK_SETTINGS);
-        VpnTransportInfo v32 = v13.makeCopy(REDACT_FOR_NETWORK_SETTINGS);
+        final VpnTransportInfo v31 = v11.makeCopy(REDACT_FOR_NETWORK_SETTINGS);
+        final VpnTransportInfo v32 = v13.makeCopy(REDACT_FOR_NETWORK_SETTINGS);
+        final VpnTransportInfo v33 = v16.makeCopy(REDACT_FOR_NETWORK_SETTINGS);
+        final VpnTransportInfo v34 = v17.makeCopy(REDACT_FOR_NETWORK_SETTINGS);
 
         assertNotEquals(v11, v12);
         assertNotEquals(v13, v14);
         assertNotEquals(v14, v15);
         assertNotEquals(v14, v21);
+        assertNotEquals(v15, v16);
 
         assertEquals(v11, v13);
         assertEquals(v31, v32);
+        assertEquals(v33, v34);
         assertEquals(v11.hashCode(), v13.hashCode());
+        assertEquals(v16.hashCode(), v17.hashCode());
         assertEquals(REDACT_FOR_NETWORK_SETTINGS, v32.getApplicableRedactions());
         assertEquals(session1, v15.makeCopy(REDACT_NONE).getSessionId());
     }
+
+    @DevSdkIgnoreRule.IgnoreAfter(Build.VERSION_CODES.TIRAMISU)
+    @Test
+    public void testGetBypassable_beforeU() {
+        final VpnTransportInfo v = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, "12345");
+        assertThrows(UnsupportedOperationException.class, () -> v.getBypassable());
+    }
+
+    @DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+    @Test
+    public void testGetBypassable_afterU() {
+        final VpnTransportInfo v = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, "12345");
+        assertFalse(v.getBypassable());
+
+        final VpnTransportInfo v2 =
+                new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM, "12345", true);
+        assertTrue(v2.getBypassable());
+    }
 }
diff --git a/tests/unit/java/com/android/server/ConnectivityServiceTest.java b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
index 8c9917e..f80b9bd 100755
--- a/tests/unit/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
@@ -5034,9 +5034,6 @@
 
     @Test
     public void testRegisterDefaultNetworkCallback() throws Exception {
-        // NETWORK_SETTINGS is necessary to call registerSystemDefaultNetworkCallback.
-        mServiceContext.setPermission(NETWORK_SETTINGS, PERMISSION_GRANTED);
-
         final TestNetworkCallback defaultNetworkCallback = new TestNetworkCallback();
         mCm.registerDefaultNetworkCallback(defaultNetworkCallback);
         defaultNetworkCallback.assertNoCallback();
@@ -8287,9 +8284,6 @@
 
     @Test
     public void testVpnNetworkActive() throws Exception {
-        // NETWORK_SETTINGS is necessary to call registerSystemDefaultNetworkCallback.
-        mServiceContext.setPermission(NETWORK_SETTINGS, PERMISSION_GRANTED);
-
         final int uid = Process.myUid();
 
         final TestNetworkCallback genericNetworkCallback = new TestNetworkCallback();
@@ -9634,8 +9628,6 @@
     public void testLegacyLockdownVpn() throws Exception {
         mServiceContext.setPermission(
                 Manifest.permission.CONTROL_VPN, PERMISSION_GRANTED);
-        // For LockdownVpnTracker to call registerSystemDefaultNetworkCallback.
-        mServiceContext.setPermission(NETWORK_SETTINGS, PERMISSION_GRANTED);
 
         final NetworkRequest request = new NetworkRequest.Builder().clearCapabilities().build();
         final TestNetworkCallback callback = new TestNetworkCallback();
@@ -13133,8 +13125,6 @@
             throw new IllegalStateException("Default network callbacks already registered");
         }
 
-        // Using Manifest.permission.NETWORK_SETTINGS for registerSystemDefaultNetworkCallback()
-        mServiceContext.setPermission(NETWORK_SETTINGS, PERMISSION_GRANTED);
         mSystemDefaultNetworkCallback = new TestNetworkCallback();
         mDefaultNetworkCallback = new TestNetworkCallback();
         mProfileDefaultNetworkCallback = new TestNetworkCallback();
diff --git a/tests/unit/java/com/android/server/connectivity/VpnTest.java b/tests/unit/java/com/android/server/connectivity/VpnTest.java
index 3c23d7b..e6745d1 100644
--- a/tests/unit/java/com/android/server/connectivity/VpnTest.java
+++ b/tests/unit/java/com/android/server/connectivity/VpnTest.java
@@ -1853,6 +1853,7 @@
 
         // Check if allowBypass is set or not.
         assertTrue(nacCaptor.getValue().isBypassableVpn());
+        assertTrue(((VpnTransportInfo) ncCaptor.getValue().getTransportInfo()).getBypassable());
 
         return new PlatformVpnSnapshot(vpn, nwCb, ikeCb, childCb);
     }
diff --git a/tests/unit/java/com/android/server/ethernet/EthernetServiceImplTest.java b/tests/unit/java/com/android/server/ethernet/EthernetServiceImplTest.java
index 9bf893a..de0af94 100644
--- a/tests/unit/java/com/android/server/ethernet/EthernetServiceImplTest.java
+++ b/tests/unit/java/com/android/server/ethernet/EthernetServiceImplTest.java
@@ -312,14 +312,15 @@
     @Test
     public void testEnableInterface() {
         mEthernetServiceImpl.enableInterface(TEST_IFACE, NULL_LISTENER);
-        verify(mEthernetTracker).enableInterface(eq(TEST_IFACE),
+        verify(mEthernetTracker).setInterfaceEnabled(eq(TEST_IFACE), eq(true),
                 any(EthernetCallback.class));
     }
 
     @Test
     public void testDisableInterface() {
         mEthernetServiceImpl.disableInterface(TEST_IFACE, NULL_LISTENER);
-        verify(mEthernetTracker).disableInterface(eq(TEST_IFACE), any(EthernetCallback.class));
+        verify(mEthernetTracker).setInterfaceEnabled(eq(TEST_IFACE), eq(false),
+                any(EthernetCallback.class));
     }
 
     @Test
@@ -384,7 +385,7 @@
         denyManageEthPermission();
 
         mEthernetServiceImpl.enableInterface(TEST_IFACE, NULL_LISTENER);
-        verify(mEthernetTracker).enableInterface(eq(TEST_IFACE),
+        verify(mEthernetTracker).setInterfaceEnabled(eq(TEST_IFACE), eq(true),
                 any(EthernetCallback.class));
     }
 
@@ -395,7 +396,7 @@
         denyManageEthPermission();
 
         mEthernetServiceImpl.disableInterface(TEST_IFACE, NULL_LISTENER);
-        verify(mEthernetTracker).disableInterface(eq(TEST_IFACE),
+        verify(mEthernetTracker).setInterfaceEnabled(eq(TEST_IFACE), eq(false),
                 any(EthernetCallback.class));
     }
 
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 529f53f..97b4371 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -117,63 +117,7 @@
 // GN: //base/allocator/partition_allocator:partition_alloc
 cc_library_static {
     name: "cronet_aml_base_allocator_partition_allocator_partition_alloc",
-    srcs: [
-        ":cronet_aml_third_party_android_ndk_cpu_features",
-        "base/allocator/partition_allocator/address_pool_manager.cc",
-        "base/allocator/partition_allocator/address_pool_manager_bitmap.cc",
-        "base/allocator/partition_allocator/address_space_randomization.cc",
-        "base/allocator/partition_allocator/allocation_guard.cc",
-        "base/allocator/partition_allocator/dangling_raw_ptr_checks.cc",
-        "base/allocator/partition_allocator/gwp_asan_support.cc",
-        "base/allocator/partition_allocator/memory_reclaimer.cc",
-        "base/allocator/partition_allocator/oom.cc",
-        "base/allocator/partition_allocator/oom_callback.cc",
-        "base/allocator/partition_allocator/page_allocator.cc",
-        "base/allocator/partition_allocator/page_allocator_internals_posix.cc",
-        "base/allocator/partition_allocator/partition_address_space.cc",
-        "base/allocator/partition_allocator/partition_alloc.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/check.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/cpu.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/debug/alias.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/files/file_util_posix.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/logging.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/memory/ref_counted.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/native_library.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/pkey.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/posix/safe_strerror.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/rand_util.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/strings/stringprintf.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/time/time.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/time/time_conversion_posix.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/time/time_now_posix.cc",
-        "base/allocator/partition_allocator/partition_alloc_base/time/time_override.cc",
-        "base/allocator/partition_allocator/partition_alloc_hooks.cc",
-        "base/allocator/partition_allocator/partition_bucket.cc",
-        "base/allocator/partition_allocator/partition_oom.cc",
-        "base/allocator/partition_allocator/partition_page.cc",
-        "base/allocator/partition_allocator/partition_root.cc",
-        "base/allocator/partition_allocator/partition_stats.cc",
-        "base/allocator/partition_allocator/random.cc",
-        "base/allocator/partition_allocator/reservation_offset_table.cc",
-        "base/allocator/partition_allocator/spinning_mutex.cc",
-        "base/allocator/partition_allocator/starscan/metadata_allocator.cc",
-        "base/allocator/partition_allocator/starscan/pcscan.cc",
-        "base/allocator/partition_allocator/starscan/pcscan_internal.cc",
-        "base/allocator/partition_allocator/starscan/pcscan_scheduling.cc",
-        "base/allocator/partition_allocator/starscan/snapshot.cc",
-        "base/allocator/partition_allocator/starscan/stack/asm/x64/push_registers_asm.cc",
-        "base/allocator/partition_allocator/starscan/stack/stack.cc",
-        "base/allocator/partition_allocator/starscan/stats_collector.cc",
-        "base/allocator/partition_allocator/starscan/write_protector.cc",
-        "base/allocator/partition_allocator/tagging.cc",
-        "base/allocator/partition_allocator/thread_cache.cc",
-    ],
+    host_supported: true,
     generated_headers: [
         "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
         "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags",
@@ -190,19 +134,27 @@
     ],
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_third_party_android_ndk_cpu_features",
     ],
     cflags: [
         "-DANDROID",
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_SYS_UIO_H",
         "-DIS_PARTITION_ALLOC_IMPL",
         "-DPA_PCSCAN_STACK_SUPPORTED",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -216,15 +168,139 @@
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
         "third_party/android_ndk/sources/android/cpufeatures/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
+    arch: {
+        x86: {
+            srcs: [
+                "base/allocator/partition_allocator/address_pool_manager.cc",
+                "base/allocator/partition_allocator/address_pool_manager_bitmap.cc",
+                "base/allocator/partition_allocator/address_space_randomization.cc",
+                "base/allocator/partition_allocator/allocation_guard.cc",
+                "base/allocator/partition_allocator/dangling_raw_ptr_checks.cc",
+                "base/allocator/partition_allocator/gwp_asan_support.cc",
+                "base/allocator/partition_allocator/memory_reclaimer.cc",
+                "base/allocator/partition_allocator/oom.cc",
+                "base/allocator/partition_allocator/oom_callback.cc",
+                "base/allocator/partition_allocator/page_allocator.cc",
+                "base/allocator/partition_allocator/page_allocator_internals_posix.cc",
+                "base/allocator/partition_allocator/partition_address_space.cc",
+                "base/allocator/partition_allocator/partition_alloc.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/check.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/cpu.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/debug/alias.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/files/file_util_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/logging.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/memory/ref_counted.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/pkey.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/posix/safe_strerror.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/rand_util.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/strings/stringprintf.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time_conversion_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time_now_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time_override.cc",
+                "base/allocator/partition_allocator/partition_alloc_hooks.cc",
+                "base/allocator/partition_allocator/partition_bucket.cc",
+                "base/allocator/partition_allocator/partition_oom.cc",
+                "base/allocator/partition_allocator/partition_page.cc",
+                "base/allocator/partition_allocator/partition_root.cc",
+                "base/allocator/partition_allocator/partition_stats.cc",
+                "base/allocator/partition_allocator/random.cc",
+                "base/allocator/partition_allocator/reservation_offset_table.cc",
+                "base/allocator/partition_allocator/spinning_mutex.cc",
+                "base/allocator/partition_allocator/starscan/metadata_allocator.cc",
+                "base/allocator/partition_allocator/starscan/pcscan.cc",
+                "base/allocator/partition_allocator/starscan/pcscan_internal.cc",
+                "base/allocator/partition_allocator/starscan/pcscan_scheduling.cc",
+                "base/allocator/partition_allocator/starscan/snapshot.cc",
+                "base/allocator/partition_allocator/starscan/stack/asm/x86/push_registers_asm.cc",
+                "base/allocator/partition_allocator/starscan/stack/stack.cc",
+                "base/allocator/partition_allocator/starscan/stats_collector.cc",
+                "base/allocator/partition_allocator/starscan/write_protector.cc",
+                "base/allocator/partition_allocator/tagging.cc",
+                "base/allocator/partition_allocator/thread_cache.cc",
+            ],
+        },
+        x86_64: {
+            srcs: [
+                "base/allocator/partition_allocator/address_pool_manager.cc",
+                "base/allocator/partition_allocator/address_pool_manager_bitmap.cc",
+                "base/allocator/partition_allocator/address_space_randomization.cc",
+                "base/allocator/partition_allocator/allocation_guard.cc",
+                "base/allocator/partition_allocator/dangling_raw_ptr_checks.cc",
+                "base/allocator/partition_allocator/gwp_asan_support.cc",
+                "base/allocator/partition_allocator/memory_reclaimer.cc",
+                "base/allocator/partition_allocator/oom.cc",
+                "base/allocator/partition_allocator/oom_callback.cc",
+                "base/allocator/partition_allocator/page_allocator.cc",
+                "base/allocator/partition_allocator/page_allocator_internals_posix.cc",
+                "base/allocator/partition_allocator/partition_address_space.cc",
+                "base/allocator/partition_allocator/partition_alloc.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/check.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/cpu.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/debug/alias.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/files/file_util_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/logging.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/memory/ref_counted.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/pkey.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/posix/safe_strerror.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/rand_util.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/strings/stringprintf.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time_conversion_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time_now_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time_override.cc",
+                "base/allocator/partition_allocator/partition_alloc_hooks.cc",
+                "base/allocator/partition_allocator/partition_bucket.cc",
+                "base/allocator/partition_allocator/partition_oom.cc",
+                "base/allocator/partition_allocator/partition_page.cc",
+                "base/allocator/partition_allocator/partition_root.cc",
+                "base/allocator/partition_allocator/partition_stats.cc",
+                "base/allocator/partition_allocator/random.cc",
+                "base/allocator/partition_allocator/reservation_offset_table.cc",
+                "base/allocator/partition_allocator/spinning_mutex.cc",
+                "base/allocator/partition_allocator/starscan/metadata_allocator.cc",
+                "base/allocator/partition_allocator/starscan/pcscan.cc",
+                "base/allocator/partition_allocator/starscan/pcscan_internal.cc",
+                "base/allocator/partition_allocator/starscan/pcscan_scheduling.cc",
+                "base/allocator/partition_allocator/starscan/snapshot.cc",
+                "base/allocator/partition_allocator/starscan/stack/asm/x64/push_registers_asm.cc",
+                "base/allocator/partition_allocator/starscan/stack/stack.cc",
+                "base/allocator/partition_allocator/starscan/stats_collector.cc",
+                "base/allocator/partition_allocator/starscan/write_protector.cc",
+                "base/allocator/partition_allocator/tagging.cc",
+                "base/allocator/partition_allocator/thread_cache.cc",
+            ],
+        },
+    },
+    target: {
+        android_x86_64: {
+            srcs: [
+                "base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/files/file_path.h",
+                "base/allocator/partition_allocator/partition_alloc_base/native_library.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/native_library.h",
+                "base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc",
+                "base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc",
+            ],
+        },
+    },
 }
 
 // GN: //base/allocator/partition_allocator:partition_alloc_buildflags
 genrule {
     name: "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags",
-    cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"false\"' | " +
+    cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
          "$(out) " +
          "--rulename " +
@@ -244,7 +320,7 @@
 // GN: //base:anchor_functions_buildflags
 genrule {
     name: "cronet_aml_base_anchor_functions_buildflags",
-    cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"true\"' | " +
+    cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
          "$(out) " +
          "--rulename " +
@@ -302,189 +378,17 @@
 cc_library_static {
     name: "cronet_aml_base_base",
     srcs: [
-        ":cronet_aml_base_numerics_base_numerics",
-        ":cronet_aml_third_party_abseil_cpp_absl",
-        ":cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
-        ":cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_base",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_config",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_endian",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_strerror",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
-        ":cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
-        ":cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_btree",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_common",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_layout",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
-        ":cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
-        ":cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
-        ":cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
-        ":cronet_aml_third_party_abseil_cpp_absl_hash_city",
-        ":cronet_aml_third_party_abseil_cpp_absl_hash_hash",
-        ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
-        ":cronet_aml_third_party_abseil_cpp_absl_memory_memory",
-        ":cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
-        ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
-        ":cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
-        ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
-        ":cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_distributions",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_random",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
-        ":cronet_aml_third_party_abseil_cpp_absl_status_status",
-        ":cronet_aml_third_party_abseil_cpp_absl_status_statusor",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cord",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_strings",
-        ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
-        ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
-        ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
-        ":cronet_aml_third_party_abseil_cpp_absl_time_time",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_compare",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_optional",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_span",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_variant",
-        ":cronet_aml_third_party_abseil_cpp_absl_utility_utility",
-        ":cronet_aml_third_party_android_ndk_cpu_features",
-        ":cronet_aml_third_party_ashmem_ashmem",
         "base/allocator/allocator_check.cc",
         "base/allocator/allocator_extension.cc",
         "base/allocator/dispatcher/dispatcher.cc",
         "base/allocator/dispatcher/internal/dispatch_data.cc",
         "base/allocator/dispatcher/reentry_guard.cc",
         "base/allocator/partition_allocator/shim/allocator_shim.cc",
-        "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
-        "base/android/android_hardware_buffer_compat.cc",
-        "base/android/android_image_reader_compat.cc",
-        "base/android/apk_assets.cc",
-        "base/android/application_status_listener.cc",
-        "base/android/base_feature_list.cc",
-        "base/android/base_features.cc",
-        "base/android/base_jni_onload.cc",
-        "base/android/build_info.cc",
-        "base/android/bundle_utils.cc",
-        "base/android/callback_android.cc",
-        "base/android/child_process_service.cc",
-        "base/android/command_line_android.cc",
-        "base/android/content_uri_utils.cc",
-        "base/android/cpu_features.cc",
-        "base/android/early_trace_event_binding.cc",
-        "base/android/event_log.cc",
-        "base/android/feature_list_jni.cc",
-        "base/android/features_jni.cc",
-        "base/android/field_trial_list.cc",
-        "base/android/important_file_writer_android.cc",
-        "base/android/int_string_callback.cc",
-        "base/android/jank_metric_uma_recorder.cc",
-        "base/android/java_exception_reporter.cc",
-        "base/android/java_handler_thread.cc",
-        "base/android/java_heap_dump_generator.cc",
-        "base/android/java_runtime.cc",
-        "base/android/jni_android.cc",
-        "base/android/jni_array.cc",
-        "base/android/jni_registrar.cc",
-        "base/android/jni_string.cc",
-        "base/android/jni_utils.cc",
-        "base/android/jni_weak_ref.cc",
-        "base/android/library_loader/anchor_functions.cc",
-        "base/android/library_loader/library_loader_hooks.cc",
-        "base/android/library_loader/library_prefetcher.cc",
-        "base/android/library_loader/library_prefetcher_hooks.cc",
-        "base/android/locale_utils.cc",
-        "base/android/memory_pressure_listener_android.cc",
-        "base/android/native_uma_recorder.cc",
-        "base/android/path_service_android.cc",
-        "base/android/path_utils.cc",
-        "base/android/radio_utils.cc",
-        "base/android/reached_addresses_bitset.cc",
-        "base/android/reached_code_profiler_stub.cc",
-        "base/android/remove_stale_data.cc",
-        "base/android/scoped_hardware_buffer_fence_sync.cc",
-        "base/android/scoped_hardware_buffer_handle.cc",
-        "base/android/scoped_java_ref.cc",
-        "base/android/statistics_recorder_android.cc",
-        "base/android/sys_utils.cc",
-        "base/android/task_scheduler/post_task_android.cc",
-        "base/android/task_scheduler/task_runner_android.cc",
-        "base/android/thread_instruction_count.cc",
-        "base/android/timezone_utils.cc",
-        "base/android/trace_event_binding.cc",
-        "base/android/unguessable_token_android.cc",
         "base/at_exit.cc",
         "base/barrier_closure.cc",
         "base/base64.cc",
         "base/base64url.cc",
         "base/base_paths.cc",
-        "base/base_paths_android.cc",
         "base/big_endian.cc",
         "base/build_time.cc",
         "base/callback_list.cc",
@@ -511,7 +415,6 @@
         "base/debug/proc_maps_linux.cc",
         "base/debug/profiler.cc",
         "base/debug/stack_trace.cc",
-        "base/debug/stack_trace_android.cc",
         "base/debug/task_trace.cc",
         "base/environment.cc",
         "base/feature_list.cc",
@@ -529,7 +432,6 @@
         "base/files/file_proxy.cc",
         "base/files/file_tracing.cc",
         "base/files/file_util.cc",
-        "base/files/file_util_android.cc",
         "base/files/file_util_posix.cc",
         "base/files/important_file_writer.cc",
         "base/files/important_file_writer_cleaner.cc",
@@ -537,7 +439,6 @@
         "base/files/memory_mapped_file_posix.cc",
         "base/files/safe_base_name.cc",
         "base/files/scoped_file.cc",
-        "base/files/scoped_file_android.cc",
         "base/files/scoped_temp_dir.cc",
         "base/functional/callback_helpers.cc",
         "base/functional/callback_internal.cc",
@@ -569,9 +470,7 @@
         "base/memory/nonscannable_memory.cc",
         "base/memory/page_size_posix.cc",
         "base/memory/platform_shared_memory_handle.cc",
-        "base/memory/platform_shared_memory_mapper_android.cc",
         "base/memory/platform_shared_memory_region.cc",
-        "base/memory/platform_shared_memory_region_android.cc",
         "base/memory/raw_ptr.cc",
         "base/memory/raw_ptr_asan_bound_arg_tracker.cc",
         "base/memory/raw_ptr_asan_service.cc",
@@ -587,7 +486,6 @@
         "base/memory/weak_ptr.cc",
         "base/memory/writable_shared_memory_region.cc",
         "base/message_loop/message_pump.cc",
-        "base/message_loop/message_pump_android.cc",
         "base/message_loop/message_pump_default.cc",
         "base/message_loop/message_pump_epoll.cc",
         "base/message_loop/message_pump_libevent.cc",
@@ -623,7 +521,6 @@
         "base/observer_list_threadsafe.cc",
         "base/observer_list_types.cc",
         "base/one_shot_event.cc",
-        "base/os_compat_android.cc",
         "base/path_service.cc",
         "base/pending_task.cc",
         "base/pickle.cc",
@@ -637,7 +534,6 @@
         "base/power_monitor/moving_average.cc",
         "base/power_monitor/power_monitor.cc",
         "base/power_monitor/power_monitor_device_source.cc",
-        "base/power_monitor/power_monitor_device_source_android.cc",
         "base/power_monitor/power_monitor_features.cc",
         "base/power_monitor/power_monitor_source.cc",
         "base/power_monitor/sampling_event_source.cc",
@@ -650,7 +546,6 @@
         "base/process/launch_posix.cc",
         "base/process/memory.cc",
         "base/process/memory_linux.cc",
-        "base/process/process_android.cc",
         "base/process/process_handle.cc",
         "base/process/process_handle_linux.cc",
         "base/process/process_handle_posix.cc",
@@ -673,7 +568,6 @@
         "base/profiler/stack_copier_signal.cc",
         "base/profiler/stack_copier_suspend.cc",
         "base/profiler/stack_sampler.cc",
-        "base/profiler/stack_sampler_android.cc",
         "base/profiler/stack_sampler_impl.cc",
         "base/profiler/stack_sampling_profiler.cc",
         "base/profiler/thread_delegate_posix.cc",
@@ -720,7 +614,6 @@
         "base/synchronization/waitable_event_watcher_posix.cc",
         "base/syslog_logging.cc",
         "base/system/sys_info.cc",
-        "base/system/sys_info_android.cc",
         "base/system/sys_info_linux.cc",
         "base/system/sys_info_posix.cc",
         "base/system/system_monitor.cc",
@@ -799,7 +692,6 @@
         "base/third_party/superfasthash/superfasthash.c",
         "base/threading/hang_watcher.cc",
         "base/threading/platform_thread.cc",
-        "base/threading/platform_thread_android.cc",
         "base/threading/platform_thread_internal_posix.cc",
         "base/threading/platform_thread_posix.cc",
         "base/threading/platform_thread_ref.cc",
@@ -826,7 +718,6 @@
         "base/time/default_tick_clock.cc",
         "base/time/tick_clock.cc",
         "base/time/time.cc",
-        "base/time/time_android.cc",
         "base/time/time_conversion_posix.cc",
         "base/time/time_delta_from_string.cc",
         "base/time/time_exploded_icu.cc",
@@ -851,21 +742,21 @@
         "base/version.cc",
         "base/vlog.cc",
     ],
-    shared_libs: [
-        "libandroid",
-        "liblog",
-    ],
     static_libs: [
         "cronet_aml_base_allocator_partition_allocator_partition_alloc",
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_base_third_party_symbolize_symbolize",
+        "cronet_aml_base_third_party_xdg_mime_xdg_mime",
+        "cronet_aml_base_third_party_xdg_user_dirs_xdg_user_dirs",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
-        "libssl",
     ],
+    host_supported: true,
     generated_headers: [
         "cronet_aml_base_allocator_buildflags",
         "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
@@ -927,7 +818,121 @@
         "cronet_aml_build_config_compiler_compiler_buildflags",
     ],
     defaults: [
+        "cronet_aml_base_numerics_base_numerics",
         "cronet_aml_defaults",
+        "cronet_aml_third_party_abseil_cpp_absl",
+        "cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
+        "cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
+        "cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
+        "cronet_aml_third_party_abseil_cpp_absl_base_base",
+        "cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_config",
+        "cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
+        "cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
+        "cronet_aml_third_party_abseil_cpp_absl_base_endian",
+        "cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
+        "cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
+        "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+        "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
+        "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+        "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+        "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+        "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
+        "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_container_btree",
+        "cronet_aml_third_party_abseil_cpp_absl_container_common",
+        "cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
+        "cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
+        "cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
+        "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
+        "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+        "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
+        "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_container_layout",
+        "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
+        "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
+        "cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
+        "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
+        "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+        "cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
+        "cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
+        "cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
+        "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+        "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+        "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+        "cronet_aml_third_party_abseil_cpp_absl_memory_memory",
+        "cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
+        "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+        "cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
+        "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+        "cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
+        "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
+        "cronet_aml_third_party_abseil_cpp_absl_random_random",
+        "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+        "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+        "cronet_aml_third_party_abseil_cpp_absl_status_status",
+        "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+        "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+        "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+        "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+        "cronet_aml_third_party_abseil_cpp_absl_time_time",
+        "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+        "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+        "cronet_aml_third_party_abseil_cpp_absl_types_compare",
+        "cronet_aml_third_party_abseil_cpp_absl_types_optional",
+        "cronet_aml_third_party_abseil_cpp_absl_types_span",
+        "cronet_aml_third_party_abseil_cpp_absl_types_variant",
+        "cronet_aml_third_party_abseil_cpp_absl_utility_utility",
+        "cronet_aml_third_party_android_ndk_cpu_features",
+        "cronet_aml_third_party_ashmem_ashmem",
     ],
     cflags: [
         "-DABSL_ALLOCATOR_NOTHROW=1",
@@ -936,18 +941,27 @@
         "-DBASE_IMPLEMENTATION",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+        "-DGLOG_EXPORT=",
         "-DHAVE_SYS_UIO_H",
         "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
+        "-DUSE_AURA=1",
         "-DUSE_CHROMIUM_ICU=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_SYMBOLIZE",
+        "-DUSE_UDEV",
         "-DU_ENABLE_DYLOAD=0",
         "-DU_ENABLE_RESOURCE_TRACING=0",
         "-DU_ENABLE_TRACING=1",
         "-DU_STATIC_IMPLEMENTATION",
         "-DU_USING_ICU_NAMESPACE=0",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -965,12 +979,173 @@
         "third_party/boringssl/src/include/",
         "third_party/icu/source/common/",
         "third_party/icu/source/i18n/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     header_libs: [
         "jni_headers",
     ],
     cpp_std: "c++20",
+    target: {
+        android: {
+            shared_libs: [
+                "libandroid",
+                "liblog",
+            ],
+        },
+        android_x86_64: {
+            srcs: [
+                "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
+                "base/allocator/partition_allocator/shim/allocator_shim_override_linker_wrapped_symbols.h",
+                "base/android/android_hardware_buffer_compat.cc",
+                "base/android/android_hardware_buffer_compat.h",
+                "base/android/android_image_reader_abi.h",
+                "base/android/android_image_reader_compat.cc",
+                "base/android/android_image_reader_compat.h",
+                "base/android/apk_assets.cc",
+                "base/android/apk_assets.h",
+                "base/android/application_status_listener.cc",
+                "base/android/application_status_listener.h",
+                "base/android/base_feature_list.cc",
+                "base/android/base_features.cc",
+                "base/android/base_features.h",
+                "base/android/base_jni_onload.cc",
+                "base/android/base_jni_onload.h",
+                "base/android/build_info.cc",
+                "base/android/build_info.h",
+                "base/android/bundle_utils.cc",
+                "base/android/bundle_utils.h",
+                "base/android/callback_android.cc",
+                "base/android/callback_android.h",
+                "base/android/child_process_binding_types.h",
+                "base/android/child_process_service.cc",
+                "base/android/command_line_android.cc",
+                "base/android/content_uri_utils.cc",
+                "base/android/content_uri_utils.h",
+                "base/android/cpu_features.cc",
+                "base/android/early_trace_event_binding.cc",
+                "base/android/early_trace_event_binding.h",
+                "base/android/event_log.cc",
+                "base/android/event_log.h",
+                "base/android/feature_list_jni.cc",
+                "base/android/features_jni.cc",
+                "base/android/field_trial_list.cc",
+                "base/android/important_file_writer_android.cc",
+                "base/android/int_string_callback.cc",
+                "base/android/int_string_callback.h",
+                "base/android/jank_metric_uma_recorder.cc",
+                "base/android/jank_metric_uma_recorder.h",
+                "base/android/java_exception_reporter.cc",
+                "base/android/java_exception_reporter.h",
+                "base/android/java_handler_thread.cc",
+                "base/android/java_handler_thread.h",
+                "base/android/java_heap_dump_generator.cc",
+                "base/android/java_heap_dump_generator.h",
+                "base/android/java_runtime.cc",
+                "base/android/java_runtime.h",
+                "base/android/jni_android.cc",
+                "base/android/jni_android.h",
+                "base/android/jni_array.cc",
+                "base/android/jni_array.h",
+                "base/android/jni_generator/jni_generator_helper.h",
+                "base/android/jni_int_wrapper.h",
+                "base/android/jni_registrar.cc",
+                "base/android/jni_registrar.h",
+                "base/android/jni_string.cc",
+                "base/android/jni_string.h",
+                "base/android/jni_utils.cc",
+                "base/android/jni_utils.h",
+                "base/android/jni_weak_ref.cc",
+                "base/android/jni_weak_ref.h",
+                "base/android/library_loader/anchor_functions.cc",
+                "base/android/library_loader/anchor_functions.h",
+                "base/android/library_loader/library_loader_hooks.cc",
+                "base/android/library_loader/library_loader_hooks.h",
+                "base/android/library_loader/library_prefetcher.cc",
+                "base/android/library_loader/library_prefetcher.h",
+                "base/android/library_loader/library_prefetcher_hooks.cc",
+                "base/android/locale_utils.cc",
+                "base/android/locale_utils.h",
+                "base/android/memory_pressure_listener_android.cc",
+                "base/android/memory_pressure_listener_android.h",
+                "base/android/native_uma_recorder.cc",
+                "base/android/path_service_android.cc",
+                "base/android/path_utils.cc",
+                "base/android/path_utils.h",
+                "base/android/radio_utils.cc",
+                "base/android/radio_utils.h",
+                "base/android/reached_addresses_bitset.cc",
+                "base/android/reached_addresses_bitset.h",
+                "base/android/reached_code_profiler.h",
+                "base/android/reached_code_profiler_stub.cc",
+                "base/android/remove_stale_data.cc",
+                "base/android/remove_stale_data.h",
+                "base/android/scoped_hardware_buffer_fence_sync.cc",
+                "base/android/scoped_hardware_buffer_fence_sync.h",
+                "base/android/scoped_hardware_buffer_handle.cc",
+                "base/android/scoped_hardware_buffer_handle.h",
+                "base/android/scoped_java_ref.cc",
+                "base/android/scoped_java_ref.h",
+                "base/android/statistics_recorder_android.cc",
+                "base/android/sys_utils.cc",
+                "base/android/sys_utils.h",
+                "base/android/task_scheduler/post_task_android.cc",
+                "base/android/task_scheduler/post_task_android.h",
+                "base/android/task_scheduler/task_runner_android.cc",
+                "base/android/task_scheduler/task_runner_android.h",
+                "base/android/thread_instruction_count.cc",
+                "base/android/thread_instruction_count.h",
+                "base/android/timezone_utils.cc",
+                "base/android/timezone_utils.h",
+                "base/android/trace_event_binding.cc",
+                "base/android/trace_event_binding.h",
+                "base/android/unguessable_token_android.cc",
+                "base/android/unguessable_token_android.h",
+                "base/base_paths_android.cc",
+                "base/base_paths_android.h",
+                "base/debug/stack_trace_android.cc",
+                "base/files/file_util_android.cc",
+                "base/files/scoped_file_android.cc",
+                "base/memory/platform_shared_memory_mapper_android.cc",
+                "base/memory/platform_shared_memory_region_android.cc",
+                "base/message_loop/message_pump_android.cc",
+                "base/message_loop/message_pump_android.h",
+                "base/os_compat_android.cc",
+                "base/os_compat_android.h",
+                "base/power_monitor/power_monitor_device_source_android.cc",
+                "base/process/process_android.cc",
+                "base/profiler/stack_sampler_android.cc",
+                "base/system/sys_info_android.cc",
+                "base/threading/platform_thread_android.cc",
+                "base/time/time_android.cc",
+            ],
+        },
+        host: {
+            srcs: [
+                "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_glibc.cc",
+                "base/allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h",
+                "base/allocator/partition_allocator/shim/allocator_shim_override_libc_symbols.h",
+                "base/base_paths_posix.cc",
+                "base/debug/stack_trace_posix.cc",
+                "base/files/dir_reader_linux.h",
+                "base/files/file_util_linux.cc",
+                "base/files/scoped_file_linux.cc",
+                "base/memory/platform_shared_memory_mapper_posix.cc",
+                "base/memory/platform_shared_memory_region_posix.cc",
+                "base/nix/mime_util_xdg.cc",
+                "base/nix/mime_util_xdg.h",
+                "base/nix/xdg_util.cc",
+                "base/nix/xdg_util.h",
+                "base/power_monitor/power_monitor_device_source_stub.cc",
+                "base/process/process_linux.cc",
+                "base/profiler/stack_sampler_posix.cc",
+                "base/stack_canary_linux.cc",
+                "base/stack_canary_linux.h",
+                "base/threading/platform_thread_linux.cc",
+            ],
+        },
+    },
 }
 
 // GN: //base:base_jni_headers
@@ -1244,6 +1419,7 @@
     srcs: [
         "base/base_switches.cc",
     ],
+    host_supported: true,
     generated_headers: [
         "cronet_aml_build_chromeos_buildflags",
     ],
@@ -1258,11 +1434,18 @@
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_SYS_UIO_H",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -1275,6 +1458,8 @@
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -1336,7 +1521,7 @@
 // GN: //base:debugging_buildflags
 genrule {
     name: "cronet_aml_base_debugging_buildflags",
-    cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"false\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"false\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
+    cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"true\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"false\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
          "$(out) " +
          "--rulename " +
@@ -1434,7 +1619,7 @@
 }
 
 // GN: //base/numerics:base_numerics
-filegroup {
+cc_defaults {
     name: "cronet_aml_base_numerics_base_numerics",
 }
 
@@ -1571,6 +1756,7 @@
         "base/third_party/double_conversion/double-conversion/string-to-double.cc",
         "base/third_party/double_conversion/double-conversion/strtod.cc",
     ],
+    host_supported: true,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -1579,11 +1765,18 @@
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_SYS_UIO_H",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -1596,6 +1789,8 @@
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -1607,6 +1802,7 @@
     srcs: [
         "base/third_party/dynamic_annotations/dynamic_annotations.c",
     ],
+    host_supported: true,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -1615,11 +1811,18 @@
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_SYS_UIO_H",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -1630,6 +1833,8 @@
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -1642,6 +1847,8 @@
         "base/third_party/symbolize/demangle.cc",
         "base/third_party/symbolize/symbolize.cc",
     ],
+    host_supported: true,
+    device_supported: false,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -1664,12 +1871,14 @@
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
         "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-UANDROID",
     ],
     local_include_dirs: [
         "./",
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
         "build/linux/debian_bullseye_amd64-sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -1688,6 +1897,8 @@
         "base/third_party/xdg_mime/xdgmimemagic.c",
         "base/third_party/xdg_mime/xdgmimeparent.c",
     ],
+    host_supported: true,
+    device_supported: false,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -1709,12 +1920,14 @@
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
         "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-UANDROID",
     ],
     local_include_dirs: [
         "./",
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
         "build/linux/debian_bullseye_amd64-sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -1726,6 +1939,8 @@
     srcs: [
         "base/third_party/xdg_user_dirs/xdg_user_dir_lookup.cc",
     ],
+    host_supported: true,
+    device_supported: false,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -1749,12 +1964,14 @@
         "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D__STDC_CONSTANT_MACROS",
         "-D__STDC_FORMAT_MACROS",
+        "-UANDROID",
     ],
     local_include_dirs: [
         "./",
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
         "build/linux/debian_bullseye_amd64-sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -1763,7 +1980,7 @@
 // GN: //base:tracing_buildflags
 genrule {
     name: "cronet_aml_base_tracing_buildflags",
-    cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"false\"' | " +
+    cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
          "$(out) " +
          "--rulename " +
@@ -1801,7 +2018,7 @@
 }
 
 // GN: //build:buildflag_header_h
-filegroup {
+cc_defaults {
     name: "cronet_aml_build_buildflag_header_h",
 }
 
@@ -1848,7 +2065,7 @@
 // GN: //build/config/compiler:compiler_buildflags
 genrule {
     name: "cronet_aml_build_config_compiler_compiler_buildflags",
-    cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"1\"' | " +
+    cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"2\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
          "$(out) " +
          "--rulename " +
@@ -1866,7 +2083,7 @@
 }
 
 // GN: //buildtools/third_party/libc++:libc++
-filegroup {
+cc_defaults {
     name: "cronet_aml_buildtools_third_party_libc___libc__",
     srcs: [
         "buildtools/third_party/libc++/trunk/src/algorithm.cpp",
@@ -1915,10 +2132,9 @@
 }
 
 // GN: //buildtools/third_party/libc++abi:libc++abi
-filegroup {
+cc_defaults {
     name: "cronet_aml_buildtools_third_party_libc__abi_libc__abi",
     srcs: [
-        "buildtools/third_party/libc++abi/cxa_demangle_stub.cc",
         "buildtools/third_party/libc++abi/trunk/src/abort_message.cpp",
         "buildtools/third_party/libc++abi/trunk/src/cxa_aux_runtime.cpp",
         "buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp",
@@ -1936,10 +2152,22 @@
         "buildtools/third_party/libc++abi/trunk/src/stdlib_stdexcept.cpp",
         "buildtools/third_party/libc++abi/trunk/src/stdlib_typeinfo.cpp",
     ],
+    target: {
+        android_x86_64: {
+            srcs: [
+                "buildtools/third_party/libc++abi/cxa_demangle_stub.cc",
+            ],
+        },
+        host: {
+            srcs: [
+                "buildtools/third_party/libc++abi/trunk/src/cxa_demangle.cpp",
+            ],
+        },
+    },
 }
 
 // GN: //buildtools/third_party/libunwind:libunwind
-filegroup {
+cc_defaults {
     name: "cronet_aml_buildtools_third_party_libunwind_libunwind",
     srcs: [
         "buildtools/third_party/libunwind/trunk/src/Unwind-EHABI.cpp",
@@ -1976,18 +2204,6 @@
 cc_library_shared {
     name: "cronet_aml_components_cronet_android_cronet",
     srcs: [
-        ":cronet_aml_buildtools_third_party_libc___libc__",
-        ":cronet_aml_buildtools_third_party_libc__abi_libc__abi",
-        ":cronet_aml_buildtools_third_party_libunwind_libunwind",
-        ":cronet_aml_components_cronet_android_cronet_static",
-        ":cronet_aml_components_cronet_cronet_common",
-        ":cronet_aml_components_cronet_cronet_version_header",
-        ":cronet_aml_components_cronet_metrics_util",
-        ":cronet_aml_components_cronet_native_cronet_native_headers",
-        ":cronet_aml_components_cronet_native_cronet_native_impl",
-        ":cronet_aml_components_grpc_support_grpc_support",
-        ":cronet_aml_components_grpc_support_headers",
-        ":cronet_aml_components_metrics_library_support",
         ":cronet_aml_third_party_metrics_proto_metrics_proto_gen",
         "components/cronet/android/cronet_jni.cc",
     ],
@@ -2002,17 +2218,27 @@
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_base_third_party_symbolize_symbolize",
+        "cronet_aml_base_third_party_xdg_mime_xdg_mime",
+        "cronet_aml_base_third_party_xdg_user_dirs_xdg_user_dirs",
         "cronet_aml_components_prefs_prefs",
+        "cronet_aml_crypto_crypto",
         "cronet_aml_net_net",
+        "cronet_aml_net_preload_decoder",
         "cronet_aml_net_third_party_quiche_quiche",
         "cronet_aml_net_uri_template",
+        "cronet_aml_third_party_boringssl_boringssl",
+        "cronet_aml_third_party_brotli_common",
+        "cronet_aml_third_party_brotli_dec",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
+        "cronet_aml_third_party_protobuf_protobuf_full",
+        "cronet_aml_third_party_protobuf_protobuf_lite",
+        "cronet_aml_third_party_protobuf_protoc_lib",
         "cronet_aml_third_party_zlib_zlib",
         "cronet_aml_url_url",
-        "libssl",
     ],
     generated_headers: [
         "cronet_aml_base_debugging_buildflags",
@@ -2027,6 +2253,18 @@
         "cronet_aml_url_buildflags",
     ],
     defaults: [
+        "cronet_aml_buildtools_third_party_libc___libc__",
+        "cronet_aml_buildtools_third_party_libc__abi_libc__abi",
+        "cronet_aml_buildtools_third_party_libunwind_libunwind",
+        "cronet_aml_components_cronet_android_cronet_static",
+        "cronet_aml_components_cronet_cronet_common",
+        "cronet_aml_components_cronet_cronet_version_header",
+        "cronet_aml_components_cronet_metrics_util",
+        "cronet_aml_components_cronet_native_cronet_native_headers",
+        "cronet_aml_components_cronet_native_cronet_native_impl",
+        "cronet_aml_components_grpc_support_grpc_support",
+        "cronet_aml_components_grpc_support_headers",
+        "cronet_aml_components_metrics_library_support",
         "cronet_aml_defaults",
     ],
     cflags: [
@@ -2072,6 +2310,7 @@
         "net/third_party/quiche/src/quiche/common/platform/default/",
         "third_party/abseil-cpp/",
         "third_party/boringssl/src/include/",
+        "third_party/protobuf/src/",
         "third_party/zlib/",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
@@ -2204,7 +2443,7 @@
 }
 
 // GN: //components/cronet/android:cronet_static
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_cronet_android_cronet_static",
     srcs: [
         "components/cronet/android/cronet_bidirectional_stream_adapter.cc",
@@ -2238,7 +2477,7 @@
 }
 
 // GN: //components/cronet:cronet_common
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_cronet_cronet_common",
     srcs: [
         "components/cronet/cronet_context.cc",
@@ -2252,7 +2491,7 @@
 }
 
 // GN: //components/cronet:cronet_version_header
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_cronet_cronet_version_header",
 }
 
@@ -2280,7 +2519,7 @@
 }
 
 // GN: //components/cronet:metrics_util
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_cronet_metrics_util",
     srcs: [
         "components/cronet/metrics_util.cc",
@@ -2288,12 +2527,12 @@
 }
 
 // GN: //components/cronet/native:cronet_native_headers
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_cronet_native_cronet_native_headers",
 }
 
 // GN: //components/cronet/native:cronet_native_impl
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_cronet_native_cronet_native_impl",
     srcs: [
         "components/cronet/native/buffer.cc",
@@ -2309,7 +2548,7 @@
 }
 
 // GN: //components/grpc_support:grpc_support
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_grpc_support_grpc_support",
     srcs: [
         "components/grpc_support/bidirectional_stream.cc",
@@ -2318,12 +2557,12 @@
 }
 
 // GN: //components/grpc_support:headers
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_grpc_support_headers",
 }
 
 // GN: //components/metrics:library_support
-filegroup {
+cc_defaults {
     name: "cronet_aml_components_metrics_library_support",
     srcs: [
         "components/metrics/histogram_encoder.cc",
@@ -2331,6 +2570,26 @@
     ],
 }
 
+// GN: //components/nacl/common:buildflags
+genrule {
+    name: "cronet_aml_components_nacl_common_buildflags",
+    cmd: "echo '--flags ENABLE_NACL=\"true\" IS_MINIMAL_TOOLCHAIN=\"false\"' | " +
+         "$(location build/write_buildflag_header.py) --output " +
+         "$(out) " +
+         "--rulename " +
+         "//components/nacl/common:buildflags " +
+         "--gen-dir " +
+         ". " +
+         "--definitions " +
+         "/dev/stdin",
+    out: [
+        "components/nacl/common/buildflags.h",
+    ],
+    tool_files: [
+        "build/write_buildflag_header.py",
+    ],
+}
+
 // GN: //components/prefs/android:jni_headers
 genrule {
     name: "cronet_aml_components_prefs_android_jni_headers",
@@ -2398,11 +2657,11 @@
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
-        "libssl",
     ],
     generated_headers: [
         "cronet_aml_base_debugging_buildflags",
@@ -2455,7 +2714,7 @@
 // GN: //crypto:buildflags
 genrule {
     name: "cronet_aml_crypto_buildflags",
-    cmd: "echo '--flags USE_NSS_CERTS=\"false\"' | " +
+    cmd: "echo '--flags USE_NSS_CERTS=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
          "$(out) " +
          "--rulename " +
@@ -2496,26 +2755,30 @@
         "crypto/unexportable_key.cc",
         "crypto/unexportable_key_metrics.cc",
     ],
-    shared_libs: [
-        "libandroid",
-        "liblog",
-    ],
     static_libs: [
         "cronet_aml_base_allocator_partition_allocator_partition_alloc",
         "cronet_aml_base_base",
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_base_third_party_symbolize_symbolize",
+        "cronet_aml_base_third_party_xdg_mime_xdg_mime",
+        "cronet_aml_base_third_party_xdg_user_dirs_xdg_user_dirs",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
-        "libssl",
     ],
+    host_supported: true,
     generated_headers: [
+        "cronet_aml_build_chromeos_buildflags",
+        "cronet_aml_components_nacl_common_buildflags",
         "cronet_aml_crypto_buildflags",
     ],
     export_generated_headers: [
+        "cronet_aml_build_chromeos_buildflags",
+        "cronet_aml_components_nacl_common_buildflags",
         "cronet_aml_crypto_buildflags",
     ],
     defaults: [
@@ -2527,11 +2790,18 @@
         "-DCRYPTO_IMPLEMENTATION",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_SYS_UIO_H",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -2541,14 +2811,36 @@
     ],
     local_include_dirs: [
         "./",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/nspr",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/nss",
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
         "third_party/abseil-cpp/",
         "third_party/boringssl/src/include/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
+    target: {
+        android: {
+            shared_libs: [
+                "libandroid",
+                "liblog",
+            ],
+        },
+        host: {
+            srcs: [
+                "crypto/nss_crypto_module_delegate.h",
+                "crypto/nss_key_util.cc",
+                "crypto/nss_key_util.h",
+                "crypto/nss_util.cc",
+                "crypto/nss_util.h",
+                "crypto/nss_util_internal.h",
+            ],
+        },
+    },
 }
 
 // GN: //gn:default_deps
@@ -2557,6 +2849,7 @@
     cflags: [
         "-DGOOGLE_PROTOBUF_NO_RTTI",
         "-O2",
+        "-Wno-ambiguous-reversed-operator",
         "-Wno-deprecated-non-prototype",
         "-Wno-error=return-type",
         "-Wno-macro-redefined",
@@ -2564,6 +2857,7 @@
         "-Wno-non-virtual-dtor",
         "-Wno-sign-compare",
         "-Wno-sign-promo",
+        "-Wno-unreachable-code-loop-increment",
         "-Wno-unused-parameter",
         "-fvisibility=hidden",
     ],
@@ -2571,7 +2865,7 @@
 }
 
 // GN: //ipc:param_traits
-filegroup {
+cc_defaults {
     name: "cronet_aml_ipc_param_traits",
 }
 
@@ -2674,43 +2968,8 @@
     ],
 }
 
-// GN: //net/cert:root_store_proto_full
-genrule {
-    name: "cronet_aml_net_cert_root_store_proto_full_gen",
-    srcs: [
-        "net/cert/root_store.proto",
-    ],
-    tools: [
-        "aprotoc",
-    ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/cert --cpp_out=lite=true:$(genDir)/external/chromium_org/net/cert/ $(in)",
-    out: [
-        "external/chromium_org/net/cert/root_store.pb.cc",
-    ],
-}
-
-// GN: //net/cert:root_store_proto_full
-genrule {
-    name: "cronet_aml_net_cert_root_store_proto_full_gen_headers",
-    srcs: [
-        "net/cert/root_store.proto",
-    ],
-    tools: [
-        "aprotoc",
-    ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/cert --cpp_out=lite=true:$(genDir)/external/chromium_org/net/cert/ $(in)",
-    out: [
-        "external/chromium_org/net/cert/root_store.pb.h",
-    ],
-    export_include_dirs: [
-        ".",
-        "net/cert",
-        "protos",
-    ],
-}
-
 // GN: //net:constants
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_constants",
 }
 
@@ -2738,7 +2997,7 @@
 }
 
 // GN: //net/dns:dns
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_dns_dns",
     srcs: [
         "net/dns/address_info.cc",
@@ -2782,27 +3041,27 @@
 }
 
 // GN: //net/dns:dns_client
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_dns_dns_client",
 }
 
 // GN: //net/dns:host_resolver
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_dns_host_resolver",
 }
 
 // GN: //net/dns:host_resolver_manager
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_dns_host_resolver_manager",
 }
 
 // GN: //net/dns:mdns_client
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_dns_mdns_client",
 }
 
 // GN: //net/dns/public:public
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_dns_public_public",
     srcs: [
         "net/dns/public/dns_config_overrides.cc",
@@ -2817,7 +3076,7 @@
 }
 
 // GN: //net/http:transport_security_state_generated_files
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_http_transport_security_state_generated_files",
     srcs: [
         "net/http/transport_security_state.cc",
@@ -2851,9 +3110,9 @@
         "net/base/isolation_info.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/base --cpp_out=lite=true:$(genDir)/external/chromium_org/net/base/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/base --cpp_out=lite=true:$(genDir)/external/chromium_org/net/base/ $(in)",
     out: [
         "external/chromium_org/net/base/isolation_info.pb.cc",
     ],
@@ -2866,9 +3125,9 @@
         "net/base/isolation_info.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/base --cpp_out=lite=true:$(genDir)/external/chromium_org/net/base/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/base --cpp_out=lite=true:$(genDir)/external/chromium_org/net/base/ $(in)",
     out: [
         "external/chromium_org/net/base/isolation_info.pb.h",
     ],
@@ -2883,21 +3142,9 @@
 cc_library_static {
     name: "cronet_aml_net_net",
     srcs: [
-        ":cronet_aml_net_constants",
-        ":cronet_aml_net_dns_dns",
-        ":cronet_aml_net_dns_dns_client",
-        ":cronet_aml_net_dns_host_resolver",
-        ":cronet_aml_net_dns_host_resolver_manager",
-        ":cronet_aml_net_dns_mdns_client",
-        ":cronet_aml_net_dns_public_public",
-        ":cronet_aml_net_http_transport_security_state_generated_files",
         ":cronet_aml_net_isolation_info_proto_gen",
-        ":cronet_aml_net_net_deps",
-        ":cronet_aml_net_net_export_header",
         ":cronet_aml_net_net_nqe_proto_gen",
-        ":cronet_aml_net_net_public_deps",
         ":cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen",
-        ":cronet_aml_net_traffic_annotation_traffic_annotation",
         "net/android/android_http_util.cc",
         "net/android/cert_verify_result_android.cc",
         "net/android/gurl_utils.cc",
@@ -3393,19 +3640,25 @@
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_base_third_party_symbolize_symbolize",
+        "cronet_aml_base_third_party_xdg_mime_xdg_mime",
+        "cronet_aml_base_third_party_xdg_user_dirs_xdg_user_dirs",
         "cronet_aml_crypto_crypto",
         "cronet_aml_net_preload_decoder",
         "cronet_aml_net_third_party_quiche_quiche",
         "cronet_aml_net_uri_template",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_brotli_common",
         "cronet_aml_third_party_brotli_dec",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
+        "cronet_aml_third_party_protobuf_protobuf_full",
+        "cronet_aml_third_party_protobuf_protobuf_lite",
+        "cronet_aml_third_party_protobuf_protoc_lib",
         "cronet_aml_third_party_zlib_zlib",
         "cronet_aml_url_url",
-        "libssl",
     ],
     generated_headers: [
         "cronet_aml_base_debugging_buildflags",
@@ -3441,6 +3694,18 @@
     ],
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_net_constants",
+        "cronet_aml_net_dns_dns",
+        "cronet_aml_net_dns_dns_client",
+        "cronet_aml_net_dns_host_resolver",
+        "cronet_aml_net_dns_host_resolver_manager",
+        "cronet_aml_net_dns_mdns_client",
+        "cronet_aml_net_dns_public_public",
+        "cronet_aml_net_http_transport_security_state_generated_files",
+        "cronet_aml_net_net_deps",
+        "cronet_aml_net_net_export_header",
+        "cronet_aml_net_net_public_deps",
+        "cronet_aml_net_traffic_annotation_traffic_annotation",
     ],
     cflags: [
         "-DANDROID",
@@ -3476,6 +3741,7 @@
         "third_party/abseil-cpp/",
         "third_party/boringssl/src/include/",
         "third_party/brotli/include/",
+        "third_party/protobuf/src/",
         "third_party/zlib/",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
@@ -3487,12 +3753,12 @@
 }
 
 // GN: //net:net_deps
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_net_deps",
 }
 
 // GN: //net:net_export_header
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_net_export_header",
 }
 
@@ -3606,9 +3872,9 @@
         "net/nqe/proto/network_id_proto.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/nqe/proto --cpp_out=lite=true:$(genDir)/external/chromium_org/net/nqe/proto/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/nqe/proto --cpp_out=lite=true:$(genDir)/external/chromium_org/net/nqe/proto/ $(in)",
     out: [
         "external/chromium_org/net/nqe/proto/network_id_proto.pb.cc",
     ],
@@ -3621,9 +3887,9 @@
         "net/nqe/proto/network_id_proto.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/nqe/proto --cpp_out=lite=true:$(genDir)/external/chromium_org/net/nqe/proto/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/nqe/proto --cpp_out=lite=true:$(genDir)/external/chromium_org/net/nqe/proto/ $(in)",
     out: [
         "external/chromium_org/net/nqe/proto/network_id_proto.pb.h",
     ],
@@ -3635,7 +3901,7 @@
 }
 
 // GN: //net:net_public_deps
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_net_public_deps",
 }
 
@@ -3655,11 +3921,11 @@
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
-        "libssl",
     ],
     defaults: [
         "cronet_aml_defaults",
@@ -3702,9 +3968,9 @@
         "net/third_party/quiche/src/quiche/quic/core/proto/source_address_token.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/third_party/quiche/src --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/third_party/quiche/src --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/ $(in)",
     out: [
         "external/chromium_org/net/third_party/quiche/src/quiche/quic/core/proto/cached_network_parameters.pb.cc",
         "external/chromium_org/net/third_party/quiche/src/quiche/quic/core/proto/crypto_server_config.pb.cc",
@@ -3721,9 +3987,9 @@
         "net/third_party/quiche/src/quiche/quic/core/proto/source_address_token.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/third_party/quiche/src --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/third_party/quiche/src --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/ $(in)",
     out: [
         "external/chromium_org/net/third_party/quiche/src/quiche/quic/core/proto/cached_network_parameters.pb.h",
         "external/chromium_org/net/third_party/quiche/src/quiche/quic/core/proto/crypto_server_config.pb.h",
@@ -3743,9 +4009,9 @@
         "net/third_party/quiche/src/quiche/quic/test_tools/send_algorithm_test_result.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools/ $(in)",
     out: [
         "external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools/send_algorithm_test_result.pb.cc",
     ],
@@ -3758,9 +4024,9 @@
         "net/third_party/quiche/src/quiche/quic/test_tools/send_algorithm_test_result.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools --cpp_out=lite=true:$(genDir)/external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools/ $(in)",
     out: [
         "external/chromium_org/net/third_party/quiche/src/quiche/quic/test_tools/send_algorithm_test_result.pb.h",
     ],
@@ -3776,117 +4042,6 @@
     name: "cronet_aml_net_third_party_quiche_quiche",
     srcs: [
         ":cronet_aml_net_third_party_quiche_net_quic_proto_gen",
-        ":cronet_aml_third_party_abseil_cpp_absl",
-        ":cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
-        ":cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_base",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_config",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_endian",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_strerror",
-        ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
-        ":cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
-        ":cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_btree",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_common",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_layout",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
-        ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
-        ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
-        ":cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
-        ":cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
-        ":cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
-        ":cronet_aml_third_party_abseil_cpp_absl_hash_city",
-        ":cronet_aml_third_party_abseil_cpp_absl_hash_hash",
-        ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
-        ":cronet_aml_third_party_abseil_cpp_absl_memory_memory",
-        ":cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
-        ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
-        ":cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
-        ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
-        ":cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_distributions",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_random",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
-        ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
-        ":cronet_aml_third_party_abseil_cpp_absl_status_status",
-        ":cronet_aml_third_party_abseil_cpp_absl_status_statusor",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cord",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_strings_strings",
-        ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
-        ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
-        ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
-        ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
-        ":cronet_aml_third_party_abseil_cpp_absl_time_time",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_compare",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_optional",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_span",
-        ":cronet_aml_third_party_abseil_cpp_absl_types_variant",
-        ":cronet_aml_third_party_abseil_cpp_absl_utility_utility",
         "net/third_party/quiche/overrides/quiche_platform_impl/quiche_mutex_impl.cc",
         "net/third_party/quiche/overrides/quiche_platform_impl/quiche_time_utils_impl.cc",
         "net/third_party/quiche/overrides/quiche_platform_impl/quiche_url_utils_impl.cc",
@@ -4179,13 +4334,16 @@
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
         "cronet_aml_net_uri_template",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
+        "cronet_aml_third_party_protobuf_protobuf_full",
+        "cronet_aml_third_party_protobuf_protobuf_lite",
+        "cronet_aml_third_party_protobuf_protoc_lib",
         "cronet_aml_third_party_zlib_zlib",
         "cronet_aml_url_url",
-        "libssl",
     ],
     generated_headers: [
         "cronet_aml_build_chromeos_buildflags",
@@ -4197,6 +4355,117 @@
     ],
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_third_party_abseil_cpp_absl",
+        "cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
+        "cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
+        "cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
+        "cronet_aml_third_party_abseil_cpp_absl_base_base",
+        "cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_config",
+        "cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
+        "cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
+        "cronet_aml_third_party_abseil_cpp_absl_base_endian",
+        "cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
+        "cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
+        "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+        "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
+        "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+        "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+        "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+        "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
+        "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_container_btree",
+        "cronet_aml_third_party_abseil_cpp_absl_container_common",
+        "cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
+        "cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
+        "cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
+        "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
+        "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
+        "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+        "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
+        "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_container_layout",
+        "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
+        "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
+        "cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
+        "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
+        "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+        "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+        "cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
+        "cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
+        "cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
+        "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+        "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+        "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+        "cronet_aml_third_party_abseil_cpp_absl_memory_memory",
+        "cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
+        "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+        "cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
+        "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+        "cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
+        "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
+        "cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
+        "cronet_aml_third_party_abseil_cpp_absl_random_random",
+        "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+        "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+        "cronet_aml_third_party_abseil_cpp_absl_status_status",
+        "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+        "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
+        "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+        "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+        "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+        "cronet_aml_third_party_abseil_cpp_absl_time_time",
+        "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+        "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+        "cronet_aml_third_party_abseil_cpp_absl_types_compare",
+        "cronet_aml_third_party_abseil_cpp_absl_types_optional",
+        "cronet_aml_third_party_abseil_cpp_absl_types_span",
+        "cronet_aml_third_party_abseil_cpp_absl_types_variant",
+        "cronet_aml_third_party_abseil_cpp_absl_utility_utility",
     ],
     cflags: [
         "-DABSL_ALLOCATOR_NOTHROW=1",
@@ -4231,95 +4500,15 @@
         "net/third_party/quiche/src/quiche/common/platform/default/",
         "third_party/abseil-cpp/",
         "third_party/boringssl/src/include/",
+        "third_party/protobuf/src/",
         "third_party/zlib/",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
 }
 
-// GN: //net/tools/root_store_tool:root_store_tool
-cc_binary {
-    name: "cronet_aml_net_tools_root_store_tool_root_store_tool",
-    srcs: [
-        ":cronet_aml_buildtools_third_party_libc___libc__",
-        ":cronet_aml_buildtools_third_party_libc__abi_libc__abi",
-        ":cronet_aml_net_cert_root_store_proto_full_gen",
-        "net/tools/root_store_tool/root_store_tool.cc",
-    ],
-    shared_libs: [
-        "libprotobuf-cpp-lite",
-    ],
-    static_libs: [
-        "cronet_aml_base_allocator_partition_allocator_partition_alloc",
-        "cronet_aml_base_base",
-        "cronet_aml_base_base_static",
-        "cronet_aml_base_third_party_double_conversion_double_conversion",
-        "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
-        "cronet_aml_base_third_party_symbolize_symbolize",
-        "cronet_aml_base_third_party_xdg_mime_xdg_mime",
-        "cronet_aml_base_third_party_xdg_user_dirs_xdg_user_dirs",
-        "cronet_aml_crypto_crypto",
-        "cronet_aml_third_party_icu_icui18n",
-        "cronet_aml_third_party_icu_icuuc_private",
-        "cronet_aml_third_party_libevent_libevent",
-        "cronet_aml_third_party_modp_b64_modp_b64",
-        "libssl",
-    ],
-    generated_headers: [
-        "cronet_aml_net_cert_root_store_proto_full_gen_headers",
-    ],
-    defaults: [
-        "cronet_aml_defaults",
-    ],
-    cflags: [
-        "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
-        "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
-        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
-        "-DDCHECK_ALWAYS_ON=1",
-        "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
-        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
-        "-DGOOGLE_PROTOBUF_NO_RTTI",
-        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
-        "-DHAVE_PTHREAD",
-        "-DLIBCXXABI_SILENT_TERMINATE",
-        "-DLIBCXX_BUILDING_LIBCXXABI",
-        "-DUSE_AURA=1",
-        "-DUSE_OZONE=1",
-        "-DUSE_UDEV",
-        "-D_DEBUG",
-        "-D_FILE_OFFSET_BITS=64",
-        "-D_GNU_SOURCE",
-        "-D_LARGEFILE64_SOURCE",
-        "-D_LARGEFILE_SOURCE",
-        "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
-        "-D_LIBCPP_BUILDING_LIBRARY",
-        "-D_LIBCPP_CONSTINIT=constinit",
-        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
-        "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
-        "-D_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))",
-        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
-        "-D__STDC_CONSTANT_MACROS",
-        "-D__STDC_FORMAT_MACROS",
-    ],
-    local_include_dirs: [
-        "./",
-        "buildtools/third_party/libc++/",
-        "buildtools/third_party/libc++/trunk/include",
-        "buildtools/third_party/libc++/trunk/src/",
-        "buildtools/third_party/libc++abi/trunk/include",
-        "third_party/abseil-cpp/",
-        "third_party/boringssl/src/include/",
-        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
-    ],
-    cpp_std: "c++20",
-    cppflags: [
-        "-fexceptions",
-    ],
-    rtti: true,
-}
-
 // GN: //net/traffic_annotation:traffic_annotation
-filegroup {
+cc_defaults {
     name: "cronet_aml_net_traffic_annotation_traffic_annotation",
     srcs: [
         "net/traffic_annotation/network_traffic_annotation_android.cc",
@@ -4342,11 +4531,11 @@
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
-        "libssl",
     ],
     defaults: [
         "cronet_aml_defaults",
@@ -4382,27 +4571,27 @@
 }
 
 // GN: //third_party/abseil-cpp:absl
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl",
 }
 
 // GN: //third_party/abseil-cpp/absl/algorithm:algorithm
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
 }
 
 // GN: //third_party/abseil-cpp/absl/algorithm:container
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:atomic_hook
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:base
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_base",
     srcs: [
         "third_party/abseil-cpp/absl/base/internal/cycleclock.cc",
@@ -4414,47 +4603,47 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/base:base_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:config
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_config",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:core_headers
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:cycleclock_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:dynamic_annotations
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:endian
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_endian",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:errno_saver
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:fast_type_id
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:log_severity
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
     srcs: [
         "third_party/abseil-cpp/absl/base/log_severity.cc",
@@ -4462,7 +4651,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/base:malloc_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
     srcs: [
         "third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc",
@@ -4470,12 +4659,12 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/base:prefetch
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
 }
 
 // GN: //third_party/abseil-cpp/absl/base:raw_logging_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
     srcs: [
         "third_party/abseil-cpp/absl/base/internal/raw_logging.cc",
@@ -4483,7 +4672,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/base:spinlock_wait
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
     srcs: [
         "third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc",
@@ -4491,7 +4680,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/base:strerror
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
     srcs: [
         "third_party/abseil-cpp/absl/base/internal/strerror.cc",
@@ -4499,7 +4688,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/base:throw_delegate
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
     srcs: [
         "third_party/abseil-cpp/absl/base/internal/throw_delegate.cc",
@@ -4507,72 +4696,72 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/cleanup:cleanup
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
 }
 
 // GN: //third_party/abseil-cpp/absl/cleanup:cleanup_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:btree
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_btree",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:common
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_common",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:common_policy_traits
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:compressed_tuple
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:container_memory
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:fixed_array
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:flat_hash_map
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:flat_hash_set
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:hash_function_defaults
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:hash_policy_traits
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:hashtable_debug_hooks
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:hashtablez_sampler
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
     srcs: [
         "third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc",
@@ -4581,42 +4770,42 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/container:inlined_vector
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:inlined_vector_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:layout
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_layout",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:node_hash_map
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:node_hash_set
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:node_slot_policy
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:raw_hash_map
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
 }
 
 // GN: //third_party/abseil-cpp/absl/container:raw_hash_set
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
     srcs: [
         "third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc",
@@ -4624,7 +4813,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/debugging:debugging_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
     srcs: [
         "third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc",
@@ -4634,7 +4823,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/debugging:demangle_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
     srcs: [
         "third_party/abseil-cpp/absl/debugging/internal/demangle.cc",
@@ -4642,7 +4831,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/debugging:examine_stack
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
     srcs: [
         "third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc",
@@ -4650,7 +4839,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/debugging:failure_signal_handler
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
     srcs: [
         "third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc",
@@ -4658,7 +4847,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/debugging:stacktrace
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
     srcs: [
         "third_party/abseil-cpp/absl/debugging/stacktrace.cc",
@@ -4666,7 +4855,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/debugging:symbolize
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
     srcs: [
         "third_party/abseil-cpp/absl/debugging/symbolize.cc",
@@ -4674,22 +4863,22 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/functional:any_invocable
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
 }
 
 // GN: //third_party/abseil-cpp/absl/functional:bind_front
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
 }
 
 // GN: //third_party/abseil-cpp/absl/functional:function_ref
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
 }
 
 // GN: //third_party/abseil-cpp/absl/hash:city
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_hash_city",
     srcs: [
         "third_party/abseil-cpp/absl/hash/internal/city.cc",
@@ -4697,7 +4886,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/hash:hash
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
     srcs: [
         "third_party/abseil-cpp/absl/hash/internal/hash.cc",
@@ -4705,7 +4894,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/hash:low_level_hash
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
     srcs: [
         "third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc",
@@ -4713,22 +4902,22 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/memory:memory
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_memory_memory",
 }
 
 // GN: //third_party/abseil-cpp/absl/meta:type_traits
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
 }
 
 // GN: //third_party/abseil-cpp/absl/numeric:bits
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
 }
 
 // GN: //third_party/abseil-cpp/absl/numeric:int128
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
     srcs: [
         "third_party/abseil-cpp/absl/numeric/int128.cc",
@@ -4736,12 +4925,12 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/numeric:representation
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
 }
 
 // GN: //third_party/abseil-cpp/absl/profiling:exponential_biased
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
     srcs: [
         "third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc",
@@ -4749,12 +4938,12 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/profiling:sample_recorder
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
 }
 
 // GN: //third_party/abseil-cpp/absl/random:distributions
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
     srcs: [
         "third_party/abseil-cpp/absl/random/discrete_distribution.cc",
@@ -4763,42 +4952,42 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:distribution_caller
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:fast_uniform_bits
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:fastmath
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:generate_real
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:iostream_state_saver
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:nonsecure_base
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:pcg_engine
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:platform
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
     srcs: [
         "third_party/abseil-cpp/absl/random/internal/randen_round_keys.cc",
@@ -4806,7 +4995,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:pool_urbg
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
     srcs: [
         "third_party/abseil-cpp/absl/random/internal/pool_urbg.cc",
@@ -4814,7 +5003,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:randen
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
     srcs: [
         "third_party/abseil-cpp/absl/random/internal/randen.cc",
@@ -4822,12 +5011,12 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:randen_engine
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
     srcs: [
         "third_party/abseil-cpp/absl/random/internal/randen_detect.cc",
@@ -4835,7 +5024,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes_impl
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
     srcs: [
         "third_party/abseil-cpp/absl/random/internal/randen_hwaes.cc",
@@ -4843,7 +5032,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:randen_slow
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
     srcs: [
         "third_party/abseil-cpp/absl/random/internal/randen_slow.cc",
@@ -4851,12 +5040,12 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:salted_seed_seq
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:seed_material
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
     srcs: [
         "third_party/abseil-cpp/absl/random/internal/seed_material.cc",
@@ -4864,27 +5053,27 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:traits
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:uniform_helper
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
 }
 
 // GN: //third_party/abseil-cpp/absl/random/internal:wide_multiply
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
 }
 
 // GN: //third_party/abseil-cpp/absl/random:random
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_random",
 }
 
 // GN: //third_party/abseil-cpp/absl/random:seed_gen_exception
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
     srcs: [
         "third_party/abseil-cpp/absl/random/seed_gen_exception.cc",
@@ -4892,7 +5081,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/random:seed_sequences
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
     srcs: [
         "third_party/abseil-cpp/absl/random/seed_sequences.cc",
@@ -4900,7 +5089,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/status:status
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_status_status",
     srcs: [
         "third_party/abseil-cpp/absl/status/status.cc",
@@ -4909,7 +5098,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/status:statusor
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
     srcs: [
         "third_party/abseil-cpp/absl/status/statusor.cc",
@@ -4917,7 +5106,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cord
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
     srcs: [
         "third_party/abseil-cpp/absl/strings/cord.cc",
@@ -4927,7 +5116,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cord_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
     srcs: [
         "third_party/abseil-cpp/absl/strings/internal/cord_internal.cc",
@@ -4941,7 +5130,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cordz_functions
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
     srcs: [
         "third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc",
@@ -4949,7 +5138,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cordz_handle
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
     srcs: [
         "third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc",
@@ -4957,7 +5146,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cordz_info
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
     srcs: [
         "third_party/abseil-cpp/absl/strings/internal/cordz_info.cc",
@@ -4965,22 +5154,22 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cordz_statistics
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cordz_update_scope
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:cordz_update_tracker
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
     srcs: [
         "third_party/abseil-cpp/absl/strings/internal/escaping.cc",
@@ -4990,12 +5179,12 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:str_format
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:str_format_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
     srcs: [
         "third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc",
@@ -5008,7 +5197,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/strings:strings
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
     srcs: [
         "third_party/abseil-cpp/absl/strings/ascii.cc",
@@ -5029,7 +5218,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/synchronization:graphcycles_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
     srcs: [
         "third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc",
@@ -5037,12 +5226,12 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/synchronization:kernel_timeout_internal
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
 }
 
 // GN: //third_party/abseil-cpp/absl/synchronization:synchronization
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
     srcs: [
         "third_party/abseil-cpp/absl/synchronization/barrier.cc",
@@ -5056,7 +5245,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/time/internal/cctz:civil_time
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
     srcs: [
         "third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc",
@@ -5064,7 +5253,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/time/internal/cctz:time_zone
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
     srcs: [
         "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc",
@@ -5080,7 +5269,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/time:time
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_time_time",
     srcs: [
         "third_party/abseil-cpp/absl/time/civil_time.cc",
@@ -5092,7 +5281,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/types:bad_optional_access
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
     srcs: [
         "third_party/abseil-cpp/absl/types/bad_optional_access.cc",
@@ -5100,7 +5289,7 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/types:bad_variant_access
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
     srcs: [
         "third_party/abseil-cpp/absl/types/bad_variant_access.cc",
@@ -5108,32 +5297,32 @@
 }
 
 // GN: //third_party/abseil-cpp/absl/types:compare
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_types_compare",
 }
 
 // GN: //third_party/abseil-cpp/absl/types:optional
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_types_optional",
 }
 
 // GN: //third_party/abseil-cpp/absl/types:span
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_types_span",
 }
 
 // GN: //third_party/abseil-cpp/absl/types:variant
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_types_variant",
 }
 
 // GN: //third_party/abseil-cpp/absl/utility:utility
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_abseil_cpp_absl_utility_utility",
 }
 
 // GN: //third_party/android_ndk:cpu_features
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_android_ndk_cpu_features",
     srcs: [
         "third_party/android_ndk/sources/android/cpufeatures/cpu-features.c",
@@ -5141,18 +5330,688 @@
 }
 
 // GN: //third_party/ashmem:ashmem
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_ashmem_ashmem",
     srcs: [
         "third_party/ashmem/ashmem-dev.c",
     ],
 }
 
+// GN: //third_party/boringssl:boringssl
+cc_library_static {
+    name: "cronet_aml_third_party_boringssl_boringssl",
+    host_supported: true,
+    defaults: [
+        "cronet_aml_defaults",
+        "cronet_aml_third_party_boringssl_boringssl_asm",
+        "cronet_aml_third_party_boringssl_src_third_party_fiat_fiat_license",
+    ],
+    cflags: [
+        "-DANDROID",
+        "-DANDROID_NDK_VERSION_ROLL=r23_1",
+        "-DBORINGSSL_ALLOW_CXX_RUNTIME",
+        "-DBORINGSSL_IMPLEMENTATION",
+        "-DBORINGSSL_NO_STATIC_INITIALIZER",
+        "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+        "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
+        "-DDCHECK_ALWAYS_ON=1",
+        "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+        "-DHAVE_SYS_UIO_H",
+        "-DOPENSSL_SMALL",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
+        "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
+        "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
+        "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D__STDC_CONSTANT_MACROS",
+        "-D__STDC_FORMAT_MACROS",
+    ],
+    local_include_dirs: [
+        "./",
+        "buildtools/third_party/libc++/",
+        "buildtools/third_party/libc++/trunk/include",
+        "buildtools/third_party/libc++abi/trunk/include",
+        "third_party/boringssl/src/include/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
+        "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
+    ],
+    cpp_std: "c++20",
+    arch: {
+        x86: {
+            srcs: [
+                ":cronet_aml_third_party_boringssl_boringssl_asm_x86",
+                "third_party/boringssl/err_data.c",
+                "third_party/boringssl/src/crypto/asn1/a_bitstr.c",
+                "third_party/boringssl/src/crypto/asn1/a_bool.c",
+                "third_party/boringssl/src/crypto/asn1/a_d2i_fp.c",
+                "third_party/boringssl/src/crypto/asn1/a_dup.c",
+                "third_party/boringssl/src/crypto/asn1/a_gentm.c",
+                "third_party/boringssl/src/crypto/asn1/a_i2d_fp.c",
+                "third_party/boringssl/src/crypto/asn1/a_int.c",
+                "third_party/boringssl/src/crypto/asn1/a_mbstr.c",
+                "third_party/boringssl/src/crypto/asn1/a_object.c",
+                "third_party/boringssl/src/crypto/asn1/a_octet.c",
+                "third_party/boringssl/src/crypto/asn1/a_print.c",
+                "third_party/boringssl/src/crypto/asn1/a_strex.c",
+                "third_party/boringssl/src/crypto/asn1/a_strnid.c",
+                "third_party/boringssl/src/crypto/asn1/a_time.c",
+                "third_party/boringssl/src/crypto/asn1/a_type.c",
+                "third_party/boringssl/src/crypto/asn1/a_utctm.c",
+                "third_party/boringssl/src/crypto/asn1/a_utf8.c",
+                "third_party/boringssl/src/crypto/asn1/asn1_lib.c",
+                "third_party/boringssl/src/crypto/asn1/asn1_par.c",
+                "third_party/boringssl/src/crypto/asn1/asn_pack.c",
+                "third_party/boringssl/src/crypto/asn1/f_int.c",
+                "third_party/boringssl/src/crypto/asn1/f_string.c",
+                "third_party/boringssl/src/crypto/asn1/posix_time.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_dec.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_enc.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_fre.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_new.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_typ.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_utl.c",
+                "third_party/boringssl/src/crypto/base64/base64.c",
+                "third_party/boringssl/src/crypto/bio/bio.c",
+                "third_party/boringssl/src/crypto/bio/bio_mem.c",
+                "third_party/boringssl/src/crypto/bio/connect.c",
+                "third_party/boringssl/src/crypto/bio/fd.c",
+                "third_party/boringssl/src/crypto/bio/file.c",
+                "third_party/boringssl/src/crypto/bio/hexdump.c",
+                "third_party/boringssl/src/crypto/bio/pair.c",
+                "third_party/boringssl/src/crypto/bio/printf.c",
+                "third_party/boringssl/src/crypto/bio/socket.c",
+                "third_party/boringssl/src/crypto/bio/socket_helper.c",
+                "third_party/boringssl/src/crypto/blake2/blake2.c",
+                "third_party/boringssl/src/crypto/bn_extra/bn_asn1.c",
+                "third_party/boringssl/src/crypto/bn_extra/convert.c",
+                "third_party/boringssl/src/crypto/buf/buf.c",
+                "third_party/boringssl/src/crypto/bytestring/asn1_compat.c",
+                "third_party/boringssl/src/crypto/bytestring/ber.c",
+                "third_party/boringssl/src/crypto/bytestring/cbb.c",
+                "third_party/boringssl/src/crypto/bytestring/cbs.c",
+                "third_party/boringssl/src/crypto/bytestring/unicode.c",
+                "third_party/boringssl/src/crypto/chacha/chacha.c",
+                "third_party/boringssl/src/crypto/cipher_extra/cipher_extra.c",
+                "third_party/boringssl/src/crypto/cipher_extra/derive_key.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_des.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_null.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_rc2.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_rc4.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_tls.c",
+                "third_party/boringssl/src/crypto/cipher_extra/tls_cbc.c",
+                "third_party/boringssl/src/crypto/conf/conf.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_apple.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_fuchsia.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_linux.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_win.c",
+                "third_party/boringssl/src/crypto/cpu_arm.c",
+                "third_party/boringssl/src/crypto/cpu_arm_linux.c",
+                "third_party/boringssl/src/crypto/cpu_intel.c",
+                "third_party/boringssl/src/crypto/cpu_ppc64le.c",
+                "third_party/boringssl/src/crypto/crypto.c",
+                "third_party/boringssl/src/crypto/curve25519/curve25519.c",
+                "third_party/boringssl/src/crypto/curve25519/spake25519.c",
+                "third_party/boringssl/src/crypto/des/des.c",
+                "third_party/boringssl/src/crypto/dh_extra/dh_asn1.c",
+                "third_party/boringssl/src/crypto/dh_extra/params.c",
+                "third_party/boringssl/src/crypto/digest_extra/digest_extra.c",
+                "third_party/boringssl/src/crypto/dsa/dsa.c",
+                "third_party/boringssl/src/crypto/dsa/dsa_asn1.c",
+                "third_party/boringssl/src/crypto/ec_extra/ec_asn1.c",
+                "third_party/boringssl/src/crypto/ec_extra/ec_derive.c",
+                "third_party/boringssl/src/crypto/ec_extra/hash_to_curve.c",
+                "third_party/boringssl/src/crypto/ecdh_extra/ecdh_extra.c",
+                "third_party/boringssl/src/crypto/ecdsa_extra/ecdsa_asn1.c",
+                "third_party/boringssl/src/crypto/engine/engine.c",
+                "third_party/boringssl/src/crypto/err/err.c",
+                "third_party/boringssl/src/crypto/evp/evp.c",
+                "third_party/boringssl/src/crypto/evp/evp_asn1.c",
+                "third_party/boringssl/src/crypto/evp/evp_ctx.c",
+                "third_party/boringssl/src/crypto/evp/p_dsa_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_ec.c",
+                "third_party/boringssl/src/crypto/evp/p_ec_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_ed25519.c",
+                "third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_hkdf.c",
+                "third_party/boringssl/src/crypto/evp/p_rsa.c",
+                "third_party/boringssl/src/crypto/evp/p_rsa_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_x25519.c",
+                "third_party/boringssl/src/crypto/evp/p_x25519_asn1.c",
+                "third_party/boringssl/src/crypto/evp/pbkdf.c",
+                "third_party/boringssl/src/crypto/evp/print.c",
+                "third_party/boringssl/src/crypto/evp/scrypt.c",
+                "third_party/boringssl/src/crypto/evp/sign.c",
+                "third_party/boringssl/src/crypto/ex_data.c",
+                "third_party/boringssl/src/crypto/fipsmodule/bcm.c",
+                "third_party/boringssl/src/crypto/fipsmodule/fips_shared_support.c",
+                "third_party/boringssl/src/crypto/hkdf/hkdf.c",
+                "third_party/boringssl/src/crypto/hpke/hpke.c",
+                "third_party/boringssl/src/crypto/hrss/hrss.c",
+                "third_party/boringssl/src/crypto/lhash/lhash.c",
+                "third_party/boringssl/src/crypto/mem.c",
+                "third_party/boringssl/src/crypto/obj/obj.c",
+                "third_party/boringssl/src/crypto/obj/obj_xref.c",
+                "third_party/boringssl/src/crypto/pem/pem_all.c",
+                "third_party/boringssl/src/crypto/pem/pem_info.c",
+                "third_party/boringssl/src/crypto/pem/pem_lib.c",
+                "third_party/boringssl/src/crypto/pem/pem_oth.c",
+                "third_party/boringssl/src/crypto/pem/pem_pk8.c",
+                "third_party/boringssl/src/crypto/pem/pem_pkey.c",
+                "third_party/boringssl/src/crypto/pem/pem_x509.c",
+                "third_party/boringssl/src/crypto/pem/pem_xaux.c",
+                "third_party/boringssl/src/crypto/pkcs7/pkcs7.c",
+                "third_party/boringssl/src/crypto/pkcs7/pkcs7_x509.c",
+                "third_party/boringssl/src/crypto/pkcs8/p5_pbev2.c",
+                "third_party/boringssl/src/crypto/pkcs8/pkcs8.c",
+                "third_party/boringssl/src/crypto/pkcs8/pkcs8_x509.c",
+                "third_party/boringssl/src/crypto/poly1305/poly1305.c",
+                "third_party/boringssl/src/crypto/poly1305/poly1305_arm.c",
+                "third_party/boringssl/src/crypto/poly1305/poly1305_vec.c",
+                "third_party/boringssl/src/crypto/pool/pool.c",
+                "third_party/boringssl/src/crypto/rand_extra/deterministic.c",
+                "third_party/boringssl/src/crypto/rand_extra/forkunsafe.c",
+                "third_party/boringssl/src/crypto/rand_extra/fuchsia.c",
+                "third_party/boringssl/src/crypto/rand_extra/passive.c",
+                "third_party/boringssl/src/crypto/rand_extra/rand_extra.c",
+                "third_party/boringssl/src/crypto/rand_extra/windows.c",
+                "third_party/boringssl/src/crypto/rc4/rc4.c",
+                "third_party/boringssl/src/crypto/refcount_c11.c",
+                "third_party/boringssl/src/crypto/refcount_lock.c",
+                "third_party/boringssl/src/crypto/rsa_extra/rsa_asn1.c",
+                "third_party/boringssl/src/crypto/rsa_extra/rsa_print.c",
+                "third_party/boringssl/src/crypto/siphash/siphash.c",
+                "third_party/boringssl/src/crypto/stack/stack.c",
+                "third_party/boringssl/src/crypto/thread.c",
+                "third_party/boringssl/src/crypto/thread_none.c",
+                "third_party/boringssl/src/crypto/thread_pthread.c",
+                "third_party/boringssl/src/crypto/thread_win.c",
+                "third_party/boringssl/src/crypto/trust_token/pmbtoken.c",
+                "third_party/boringssl/src/crypto/trust_token/trust_token.c",
+                "third_party/boringssl/src/crypto/trust_token/voprf.c",
+                "third_party/boringssl/src/crypto/x509/a_digest.c",
+                "third_party/boringssl/src/crypto/x509/a_sign.c",
+                "third_party/boringssl/src/crypto/x509/a_verify.c",
+                "third_party/boringssl/src/crypto/x509/algorithm.c",
+                "third_party/boringssl/src/crypto/x509/asn1_gen.c",
+                "third_party/boringssl/src/crypto/x509/by_dir.c",
+                "third_party/boringssl/src/crypto/x509/by_file.c",
+                "third_party/boringssl/src/crypto/x509/i2d_pr.c",
+                "third_party/boringssl/src/crypto/x509/name_print.c",
+                "third_party/boringssl/src/crypto/x509/rsa_pss.c",
+                "third_party/boringssl/src/crypto/x509/t_crl.c",
+                "third_party/boringssl/src/crypto/x509/t_req.c",
+                "third_party/boringssl/src/crypto/x509/t_x509.c",
+                "third_party/boringssl/src/crypto/x509/t_x509a.c",
+                "third_party/boringssl/src/crypto/x509/x509.c",
+                "third_party/boringssl/src/crypto/x509/x509_att.c",
+                "third_party/boringssl/src/crypto/x509/x509_cmp.c",
+                "third_party/boringssl/src/crypto/x509/x509_d2.c",
+                "third_party/boringssl/src/crypto/x509/x509_def.c",
+                "third_party/boringssl/src/crypto/x509/x509_ext.c",
+                "third_party/boringssl/src/crypto/x509/x509_lu.c",
+                "third_party/boringssl/src/crypto/x509/x509_obj.c",
+                "third_party/boringssl/src/crypto/x509/x509_req.c",
+                "third_party/boringssl/src/crypto/x509/x509_set.c",
+                "third_party/boringssl/src/crypto/x509/x509_trs.c",
+                "third_party/boringssl/src/crypto/x509/x509_txt.c",
+                "third_party/boringssl/src/crypto/x509/x509_v3.c",
+                "third_party/boringssl/src/crypto/x509/x509_vfy.c",
+                "third_party/boringssl/src/crypto/x509/x509_vpm.c",
+                "third_party/boringssl/src/crypto/x509/x509cset.c",
+                "third_party/boringssl/src/crypto/x509/x509name.c",
+                "third_party/boringssl/src/crypto/x509/x509rset.c",
+                "third_party/boringssl/src/crypto/x509/x509spki.c",
+                "third_party/boringssl/src/crypto/x509/x_algor.c",
+                "third_party/boringssl/src/crypto/x509/x_all.c",
+                "third_party/boringssl/src/crypto/x509/x_attrib.c",
+                "third_party/boringssl/src/crypto/x509/x_crl.c",
+                "third_party/boringssl/src/crypto/x509/x_exten.c",
+                "third_party/boringssl/src/crypto/x509/x_info.c",
+                "third_party/boringssl/src/crypto/x509/x_name.c",
+                "third_party/boringssl/src/crypto/x509/x_pkey.c",
+                "third_party/boringssl/src/crypto/x509/x_pubkey.c",
+                "third_party/boringssl/src/crypto/x509/x_req.c",
+                "third_party/boringssl/src/crypto/x509/x_sig.c",
+                "third_party/boringssl/src/crypto/x509/x_spki.c",
+                "third_party/boringssl/src/crypto/x509/x_val.c",
+                "third_party/boringssl/src/crypto/x509/x_x509.c",
+                "third_party/boringssl/src/crypto/x509/x_x509a.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_cache.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_data.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_map.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_node.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_tree.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_akey.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_akeya.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_alt.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_bcons.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_bitst.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_conf.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_cpols.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_crld.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_enum.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_extku.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_genn.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_ia5.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_info.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_int.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_lib.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_ncons.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_ocsp.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pci.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pcia.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pcons.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pmaps.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_prn.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_purp.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_skey.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_utl.c",
+                "third_party/boringssl/src/ssl/bio_ssl.cc",
+                "third_party/boringssl/src/ssl/d1_both.cc",
+                "third_party/boringssl/src/ssl/d1_lib.cc",
+                "third_party/boringssl/src/ssl/d1_pkt.cc",
+                "third_party/boringssl/src/ssl/d1_srtp.cc",
+                "third_party/boringssl/src/ssl/dtls_method.cc",
+                "third_party/boringssl/src/ssl/dtls_record.cc",
+                "third_party/boringssl/src/ssl/encrypted_client_hello.cc",
+                "third_party/boringssl/src/ssl/extensions.cc",
+                "third_party/boringssl/src/ssl/handoff.cc",
+                "third_party/boringssl/src/ssl/handshake.cc",
+                "third_party/boringssl/src/ssl/handshake_client.cc",
+                "third_party/boringssl/src/ssl/handshake_server.cc",
+                "third_party/boringssl/src/ssl/s3_both.cc",
+                "third_party/boringssl/src/ssl/s3_lib.cc",
+                "third_party/boringssl/src/ssl/s3_pkt.cc",
+                "third_party/boringssl/src/ssl/ssl_aead_ctx.cc",
+                "third_party/boringssl/src/ssl/ssl_asn1.cc",
+                "third_party/boringssl/src/ssl/ssl_buffer.cc",
+                "third_party/boringssl/src/ssl/ssl_cert.cc",
+                "third_party/boringssl/src/ssl/ssl_cipher.cc",
+                "third_party/boringssl/src/ssl/ssl_file.cc",
+                "third_party/boringssl/src/ssl/ssl_key_share.cc",
+                "third_party/boringssl/src/ssl/ssl_lib.cc",
+                "third_party/boringssl/src/ssl/ssl_privkey.cc",
+                "third_party/boringssl/src/ssl/ssl_session.cc",
+                "third_party/boringssl/src/ssl/ssl_stat.cc",
+                "third_party/boringssl/src/ssl/ssl_transcript.cc",
+                "third_party/boringssl/src/ssl/ssl_versions.cc",
+                "third_party/boringssl/src/ssl/ssl_x509.cc",
+                "third_party/boringssl/src/ssl/t1_enc.cc",
+                "third_party/boringssl/src/ssl/tls13_both.cc",
+                "third_party/boringssl/src/ssl/tls13_client.cc",
+                "third_party/boringssl/src/ssl/tls13_enc.cc",
+                "third_party/boringssl/src/ssl/tls13_server.cc",
+                "third_party/boringssl/src/ssl/tls_method.cc",
+                "third_party/boringssl/src/ssl/tls_record.cc",
+            ],
+        },
+        x86_64: {
+            srcs: [
+                "third_party/boringssl/err_data.c",
+                "third_party/boringssl/src/crypto/asn1/a_bitstr.c",
+                "third_party/boringssl/src/crypto/asn1/a_bool.c",
+                "third_party/boringssl/src/crypto/asn1/a_d2i_fp.c",
+                "third_party/boringssl/src/crypto/asn1/a_dup.c",
+                "third_party/boringssl/src/crypto/asn1/a_gentm.c",
+                "third_party/boringssl/src/crypto/asn1/a_i2d_fp.c",
+                "third_party/boringssl/src/crypto/asn1/a_int.c",
+                "third_party/boringssl/src/crypto/asn1/a_mbstr.c",
+                "third_party/boringssl/src/crypto/asn1/a_object.c",
+                "third_party/boringssl/src/crypto/asn1/a_octet.c",
+                "third_party/boringssl/src/crypto/asn1/a_print.c",
+                "third_party/boringssl/src/crypto/asn1/a_strex.c",
+                "third_party/boringssl/src/crypto/asn1/a_strnid.c",
+                "third_party/boringssl/src/crypto/asn1/a_time.c",
+                "third_party/boringssl/src/crypto/asn1/a_type.c",
+                "third_party/boringssl/src/crypto/asn1/a_utctm.c",
+                "third_party/boringssl/src/crypto/asn1/a_utf8.c",
+                "third_party/boringssl/src/crypto/asn1/asn1_lib.c",
+                "third_party/boringssl/src/crypto/asn1/asn1_par.c",
+                "third_party/boringssl/src/crypto/asn1/asn_pack.c",
+                "third_party/boringssl/src/crypto/asn1/f_int.c",
+                "third_party/boringssl/src/crypto/asn1/f_string.c",
+                "third_party/boringssl/src/crypto/asn1/posix_time.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_dec.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_enc.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_fre.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_new.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_typ.c",
+                "third_party/boringssl/src/crypto/asn1/tasn_utl.c",
+                "third_party/boringssl/src/crypto/base64/base64.c",
+                "third_party/boringssl/src/crypto/bio/bio.c",
+                "third_party/boringssl/src/crypto/bio/bio_mem.c",
+                "third_party/boringssl/src/crypto/bio/connect.c",
+                "third_party/boringssl/src/crypto/bio/fd.c",
+                "third_party/boringssl/src/crypto/bio/file.c",
+                "third_party/boringssl/src/crypto/bio/hexdump.c",
+                "third_party/boringssl/src/crypto/bio/pair.c",
+                "third_party/boringssl/src/crypto/bio/printf.c",
+                "third_party/boringssl/src/crypto/bio/socket.c",
+                "third_party/boringssl/src/crypto/bio/socket_helper.c",
+                "third_party/boringssl/src/crypto/blake2/blake2.c",
+                "third_party/boringssl/src/crypto/bn_extra/bn_asn1.c",
+                "third_party/boringssl/src/crypto/bn_extra/convert.c",
+                "third_party/boringssl/src/crypto/buf/buf.c",
+                "third_party/boringssl/src/crypto/bytestring/asn1_compat.c",
+                "third_party/boringssl/src/crypto/bytestring/ber.c",
+                "third_party/boringssl/src/crypto/bytestring/cbb.c",
+                "third_party/boringssl/src/crypto/bytestring/cbs.c",
+                "third_party/boringssl/src/crypto/bytestring/unicode.c",
+                "third_party/boringssl/src/crypto/chacha/chacha.c",
+                "third_party/boringssl/src/crypto/cipher_extra/cipher_extra.c",
+                "third_party/boringssl/src/crypto/cipher_extra/derive_key.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_des.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_null.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_rc2.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_rc4.c",
+                "third_party/boringssl/src/crypto/cipher_extra/e_tls.c",
+                "third_party/boringssl/src/crypto/cipher_extra/tls_cbc.c",
+                "third_party/boringssl/src/crypto/conf/conf.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_apple.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_fuchsia.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_linux.c",
+                "third_party/boringssl/src/crypto/cpu_aarch64_win.c",
+                "third_party/boringssl/src/crypto/cpu_arm.c",
+                "third_party/boringssl/src/crypto/cpu_arm_linux.c",
+                "third_party/boringssl/src/crypto/cpu_intel.c",
+                "third_party/boringssl/src/crypto/cpu_ppc64le.c",
+                "third_party/boringssl/src/crypto/crypto.c",
+                "third_party/boringssl/src/crypto/curve25519/curve25519.c",
+                "third_party/boringssl/src/crypto/curve25519/spake25519.c",
+                "third_party/boringssl/src/crypto/des/des.c",
+                "third_party/boringssl/src/crypto/dh_extra/dh_asn1.c",
+                "third_party/boringssl/src/crypto/dh_extra/params.c",
+                "third_party/boringssl/src/crypto/digest_extra/digest_extra.c",
+                "third_party/boringssl/src/crypto/dsa/dsa.c",
+                "third_party/boringssl/src/crypto/dsa/dsa_asn1.c",
+                "third_party/boringssl/src/crypto/ec_extra/ec_asn1.c",
+                "third_party/boringssl/src/crypto/ec_extra/ec_derive.c",
+                "third_party/boringssl/src/crypto/ec_extra/hash_to_curve.c",
+                "third_party/boringssl/src/crypto/ecdh_extra/ecdh_extra.c",
+                "third_party/boringssl/src/crypto/ecdsa_extra/ecdsa_asn1.c",
+                "third_party/boringssl/src/crypto/engine/engine.c",
+                "third_party/boringssl/src/crypto/err/err.c",
+                "third_party/boringssl/src/crypto/evp/evp.c",
+                "third_party/boringssl/src/crypto/evp/evp_asn1.c",
+                "third_party/boringssl/src/crypto/evp/evp_ctx.c",
+                "third_party/boringssl/src/crypto/evp/p_dsa_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_ec.c",
+                "third_party/boringssl/src/crypto/evp/p_ec_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_ed25519.c",
+                "third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_hkdf.c",
+                "third_party/boringssl/src/crypto/evp/p_rsa.c",
+                "third_party/boringssl/src/crypto/evp/p_rsa_asn1.c",
+                "third_party/boringssl/src/crypto/evp/p_x25519.c",
+                "third_party/boringssl/src/crypto/evp/p_x25519_asn1.c",
+                "third_party/boringssl/src/crypto/evp/pbkdf.c",
+                "third_party/boringssl/src/crypto/evp/print.c",
+                "third_party/boringssl/src/crypto/evp/scrypt.c",
+                "third_party/boringssl/src/crypto/evp/sign.c",
+                "third_party/boringssl/src/crypto/ex_data.c",
+                "third_party/boringssl/src/crypto/fipsmodule/bcm.c",
+                "third_party/boringssl/src/crypto/fipsmodule/fips_shared_support.c",
+                "third_party/boringssl/src/crypto/hkdf/hkdf.c",
+                "third_party/boringssl/src/crypto/hpke/hpke.c",
+                "third_party/boringssl/src/crypto/hrss/hrss.c",
+                "third_party/boringssl/src/crypto/lhash/lhash.c",
+                "third_party/boringssl/src/crypto/mem.c",
+                "third_party/boringssl/src/crypto/obj/obj.c",
+                "third_party/boringssl/src/crypto/obj/obj_xref.c",
+                "third_party/boringssl/src/crypto/pem/pem_all.c",
+                "third_party/boringssl/src/crypto/pem/pem_info.c",
+                "third_party/boringssl/src/crypto/pem/pem_lib.c",
+                "third_party/boringssl/src/crypto/pem/pem_oth.c",
+                "third_party/boringssl/src/crypto/pem/pem_pk8.c",
+                "third_party/boringssl/src/crypto/pem/pem_pkey.c",
+                "third_party/boringssl/src/crypto/pem/pem_x509.c",
+                "third_party/boringssl/src/crypto/pem/pem_xaux.c",
+                "third_party/boringssl/src/crypto/pkcs7/pkcs7.c",
+                "third_party/boringssl/src/crypto/pkcs7/pkcs7_x509.c",
+                "third_party/boringssl/src/crypto/pkcs8/p5_pbev2.c",
+                "third_party/boringssl/src/crypto/pkcs8/pkcs8.c",
+                "third_party/boringssl/src/crypto/pkcs8/pkcs8_x509.c",
+                "third_party/boringssl/src/crypto/poly1305/poly1305.c",
+                "third_party/boringssl/src/crypto/poly1305/poly1305_arm.c",
+                "third_party/boringssl/src/crypto/poly1305/poly1305_vec.c",
+                "third_party/boringssl/src/crypto/pool/pool.c",
+                "third_party/boringssl/src/crypto/rand_extra/deterministic.c",
+                "third_party/boringssl/src/crypto/rand_extra/forkunsafe.c",
+                "third_party/boringssl/src/crypto/rand_extra/fuchsia.c",
+                "third_party/boringssl/src/crypto/rand_extra/passive.c",
+                "third_party/boringssl/src/crypto/rand_extra/rand_extra.c",
+                "third_party/boringssl/src/crypto/rand_extra/windows.c",
+                "third_party/boringssl/src/crypto/rc4/rc4.c",
+                "third_party/boringssl/src/crypto/refcount_c11.c",
+                "third_party/boringssl/src/crypto/refcount_lock.c",
+                "third_party/boringssl/src/crypto/rsa_extra/rsa_asn1.c",
+                "third_party/boringssl/src/crypto/rsa_extra/rsa_print.c",
+                "third_party/boringssl/src/crypto/siphash/siphash.c",
+                "third_party/boringssl/src/crypto/stack/stack.c",
+                "third_party/boringssl/src/crypto/thread.c",
+                "third_party/boringssl/src/crypto/thread_none.c",
+                "third_party/boringssl/src/crypto/thread_pthread.c",
+                "third_party/boringssl/src/crypto/thread_win.c",
+                "third_party/boringssl/src/crypto/trust_token/pmbtoken.c",
+                "third_party/boringssl/src/crypto/trust_token/trust_token.c",
+                "third_party/boringssl/src/crypto/trust_token/voprf.c",
+                "third_party/boringssl/src/crypto/x509/a_digest.c",
+                "third_party/boringssl/src/crypto/x509/a_sign.c",
+                "third_party/boringssl/src/crypto/x509/a_verify.c",
+                "third_party/boringssl/src/crypto/x509/algorithm.c",
+                "third_party/boringssl/src/crypto/x509/asn1_gen.c",
+                "third_party/boringssl/src/crypto/x509/by_dir.c",
+                "third_party/boringssl/src/crypto/x509/by_file.c",
+                "third_party/boringssl/src/crypto/x509/i2d_pr.c",
+                "third_party/boringssl/src/crypto/x509/name_print.c",
+                "third_party/boringssl/src/crypto/x509/rsa_pss.c",
+                "third_party/boringssl/src/crypto/x509/t_crl.c",
+                "third_party/boringssl/src/crypto/x509/t_req.c",
+                "third_party/boringssl/src/crypto/x509/t_x509.c",
+                "third_party/boringssl/src/crypto/x509/t_x509a.c",
+                "third_party/boringssl/src/crypto/x509/x509.c",
+                "third_party/boringssl/src/crypto/x509/x509_att.c",
+                "third_party/boringssl/src/crypto/x509/x509_cmp.c",
+                "third_party/boringssl/src/crypto/x509/x509_d2.c",
+                "third_party/boringssl/src/crypto/x509/x509_def.c",
+                "third_party/boringssl/src/crypto/x509/x509_ext.c",
+                "third_party/boringssl/src/crypto/x509/x509_lu.c",
+                "third_party/boringssl/src/crypto/x509/x509_obj.c",
+                "third_party/boringssl/src/crypto/x509/x509_req.c",
+                "third_party/boringssl/src/crypto/x509/x509_set.c",
+                "third_party/boringssl/src/crypto/x509/x509_trs.c",
+                "third_party/boringssl/src/crypto/x509/x509_txt.c",
+                "third_party/boringssl/src/crypto/x509/x509_v3.c",
+                "third_party/boringssl/src/crypto/x509/x509_vfy.c",
+                "third_party/boringssl/src/crypto/x509/x509_vpm.c",
+                "third_party/boringssl/src/crypto/x509/x509cset.c",
+                "third_party/boringssl/src/crypto/x509/x509name.c",
+                "third_party/boringssl/src/crypto/x509/x509rset.c",
+                "third_party/boringssl/src/crypto/x509/x509spki.c",
+                "third_party/boringssl/src/crypto/x509/x_algor.c",
+                "third_party/boringssl/src/crypto/x509/x_all.c",
+                "third_party/boringssl/src/crypto/x509/x_attrib.c",
+                "third_party/boringssl/src/crypto/x509/x_crl.c",
+                "third_party/boringssl/src/crypto/x509/x_exten.c",
+                "third_party/boringssl/src/crypto/x509/x_info.c",
+                "third_party/boringssl/src/crypto/x509/x_name.c",
+                "third_party/boringssl/src/crypto/x509/x_pkey.c",
+                "third_party/boringssl/src/crypto/x509/x_pubkey.c",
+                "third_party/boringssl/src/crypto/x509/x_req.c",
+                "third_party/boringssl/src/crypto/x509/x_sig.c",
+                "third_party/boringssl/src/crypto/x509/x_spki.c",
+                "third_party/boringssl/src/crypto/x509/x_val.c",
+                "third_party/boringssl/src/crypto/x509/x_x509.c",
+                "third_party/boringssl/src/crypto/x509/x_x509a.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_cache.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_data.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_map.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_node.c",
+                "third_party/boringssl/src/crypto/x509v3/pcy_tree.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_akey.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_akeya.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_alt.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_bcons.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_bitst.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_conf.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_cpols.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_crld.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_enum.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_extku.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_genn.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_ia5.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_info.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_int.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_lib.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_ncons.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_ocsp.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pci.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pcia.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pcons.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_pmaps.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_prn.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_purp.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_skey.c",
+                "third_party/boringssl/src/crypto/x509v3/v3_utl.c",
+                "third_party/boringssl/src/ssl/bio_ssl.cc",
+                "third_party/boringssl/src/ssl/d1_both.cc",
+                "third_party/boringssl/src/ssl/d1_lib.cc",
+                "third_party/boringssl/src/ssl/d1_pkt.cc",
+                "third_party/boringssl/src/ssl/d1_srtp.cc",
+                "third_party/boringssl/src/ssl/dtls_method.cc",
+                "third_party/boringssl/src/ssl/dtls_record.cc",
+                "third_party/boringssl/src/ssl/encrypted_client_hello.cc",
+                "third_party/boringssl/src/ssl/extensions.cc",
+                "third_party/boringssl/src/ssl/handoff.cc",
+                "third_party/boringssl/src/ssl/handshake.cc",
+                "third_party/boringssl/src/ssl/handshake_client.cc",
+                "third_party/boringssl/src/ssl/handshake_server.cc",
+                "third_party/boringssl/src/ssl/s3_both.cc",
+                "third_party/boringssl/src/ssl/s3_lib.cc",
+                "third_party/boringssl/src/ssl/s3_pkt.cc",
+                "third_party/boringssl/src/ssl/ssl_aead_ctx.cc",
+                "third_party/boringssl/src/ssl/ssl_asn1.cc",
+                "third_party/boringssl/src/ssl/ssl_buffer.cc",
+                "third_party/boringssl/src/ssl/ssl_cert.cc",
+                "third_party/boringssl/src/ssl/ssl_cipher.cc",
+                "third_party/boringssl/src/ssl/ssl_file.cc",
+                "third_party/boringssl/src/ssl/ssl_key_share.cc",
+                "third_party/boringssl/src/ssl/ssl_lib.cc",
+                "third_party/boringssl/src/ssl/ssl_privkey.cc",
+                "third_party/boringssl/src/ssl/ssl_session.cc",
+                "third_party/boringssl/src/ssl/ssl_stat.cc",
+                "third_party/boringssl/src/ssl/ssl_transcript.cc",
+                "third_party/boringssl/src/ssl/ssl_versions.cc",
+                "third_party/boringssl/src/ssl/ssl_x509.cc",
+                "third_party/boringssl/src/ssl/t1_enc.cc",
+                "third_party/boringssl/src/ssl/tls13_both.cc",
+                "third_party/boringssl/src/ssl/tls13_client.cc",
+                "third_party/boringssl/src/ssl/tls13_enc.cc",
+                "third_party/boringssl/src/ssl/tls13_server.cc",
+                "third_party/boringssl/src/ssl/tls_method.cc",
+                "third_party/boringssl/src/ssl/tls_record.cc",
+            ],
+        },
+    },
+}
+
+// GN: //third_party/boringssl:boringssl_asm
+cc_defaults {
+    name: "cronet_aml_third_party_boringssl_boringssl_asm",
+    srcs: [
+        "third_party/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/aesni-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/ghash-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/md5-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/p256-x86_64-asm.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/rdrand-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/rsaz-avx2.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/sha1-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/sha256-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/sha512-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/x86_64-mont.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/x86_64-mont5.S",
+        "third_party/boringssl/linux-x86_64/crypto/test/trampoline-x86_64.S",
+        "third_party/boringssl/src/crypto/hrss/asm/poly_rq_mul.S",
+    ],
+}
+
+// GN: //third_party/boringssl:boringssl_asm(//build/toolchain/android:android_clang_x86)
+cc_defaults {
+    name: "cronet_aml_third_party_boringssl_boringssl_asm___build_toolchain_android_android_clang_x86__x86",
+    srcs: [
+        "third_party/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/aesni-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/ghash-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/md5-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/p256-x86_64-asm.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/rdrand-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/rsaz-avx2.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/sha1-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/sha256-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/sha512-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/x86_64-mont.S",
+        "third_party/boringssl/linux-x86_64/crypto/fipsmodule/x86_64-mont5.S",
+        "third_party/boringssl/linux-x86_64/crypto/test/trampoline-x86_64.S",
+        "third_party/boringssl/src/crypto/hrss/asm/poly_rq_mul.S",
+    ],
+    target: {
+        android_x86: {
+            srcs: [
+                "third_party/boringssl/linux-x86/crypto/chacha/chacha-x86.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/aesni-x86.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/bn-586.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/co-586.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/ghash-ssse3-x86.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/ghash-x86.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/md5-586.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/sha1-586.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/sha256-586.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/sha512-586.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/vpaes-x86.S",
+                "third_party/boringssl/linux-x86/crypto/fipsmodule/x86-mont.S",
+                "third_party/boringssl/linux-x86/crypto/test/trampoline-x86.S",
+            ],
+        },
+    },
+}
+
+// GN: //third_party/boringssl/src/third_party/fiat:fiat_license
+cc_defaults {
+    name: "cronet_aml_third_party_boringssl_src_third_party_fiat_fiat_license",
+}
+
 // GN: //third_party/brotli:common
 cc_library_static {
     name: "cronet_aml_third_party_brotli_common",
     srcs: [
-        ":cronet_aml_third_party_brotli_headers",
         "third_party/brotli/common/constants.c",
         "third_party/brotli/common/context.c",
         "third_party/brotli/common/dictionary.c",
@@ -5162,6 +6021,7 @@
     ],
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_third_party_brotli_headers",
     ],
     cflags: [
         "-DANDROID",
@@ -5195,7 +6055,6 @@
 cc_library_static {
     name: "cronet_aml_third_party_brotli_dec",
     srcs: [
-        ":cronet_aml_third_party_brotli_headers",
         "third_party/brotli/dec/bit_reader.c",
         "third_party/brotli/dec/decode.c",
         "third_party/brotli/dec/huffman.c",
@@ -5206,6 +6065,7 @@
     ],
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_third_party_brotli_headers",
     ],
     cflags: [
         "-DANDROID",
@@ -5236,7 +6096,7 @@
 }
 
 // GN: //third_party/brotli:headers
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_brotli_headers",
 }
 
@@ -5488,6 +6348,7 @@
     static_libs: [
         "cronet_aml_third_party_icu_icuuc_private",
     ],
+    host_supported: true,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -5496,6 +6357,7 @@
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_DLOPEN=0",
@@ -5503,7 +6365,10 @@
         "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
         "-DUCONFIG_ONLY_HTML_CONVERSION=1",
         "-DUCONFIG_USE_WINDOWS_LCID_MAPPING_API=0",
+        "-DUSE_AURA=1",
         "-DUSE_CHROMIUM_ICU=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-DU_CHARSET_IS_UTF8=1",
         "-DU_ENABLE_DYLOAD=0",
         "-DU_ENABLE_RESOURCE_TRACING=0",
@@ -5512,7 +6377,10 @@
         "-DU_STATIC_IMPLEMENTATION",
         "-DU_USING_ICU_NAMESPACE=0",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -5525,6 +6393,8 @@
         "buildtools/third_party/libc++abi/trunk/include",
         "third_party/icu/source/common/",
         "third_party/icu/source/i18n/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -5535,7 +6405,6 @@
 cc_library_static {
     name: "cronet_aml_third_party_icu_icuuc_private",
     srcs: [
-        ":cronet_aml_third_party_icu_icuuc_public",
         "third_party/icu/source/common/appendable.cpp",
         "third_party/icu/source/common/bmpset.cpp",
         "third_party/icu/source/common/brkeng.cpp",
@@ -5736,14 +6605,17 @@
         "third_party/icu/source/common/wintz.cpp",
         "third_party/icu/source/stubdata/stubdata.cpp",
     ],
+    host_supported: true,
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_third_party_icu_icuuc_public",
     ],
     cflags: [
         "-DANDROID",
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_DLOPEN=0",
@@ -5751,7 +6623,10 @@
         "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
         "-DUCONFIG_ONLY_HTML_CONVERSION=1",
         "-DUCONFIG_USE_WINDOWS_LCID_MAPPING_API=0",
+        "-DUSE_AURA=1",
         "-DUSE_CHROMIUM_ICU=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-DU_CHARSET_IS_UTF8=1",
         "-DU_COMMON_IMPLEMENTATION",
         "-DU_ENABLE_DYLOAD=0",
@@ -5761,7 +6636,10 @@
         "-DU_STATIC_IMPLEMENTATION",
         "-DU_USING_ICU_NAMESPACE=0",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -5776,6 +6654,8 @@
         "buildtools/third_party/libc++abi/trunk/include",
         "third_party/icu/source/common/",
         "third_party/icu/source/i18n/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
@@ -5783,7 +6663,7 @@
 }
 
 // GN: //third_party/icu:icuuc_public
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_icu_icuuc_public",
 }
 
@@ -5806,6 +6686,7 @@
         "third_party/libevent/signal.c",
         "third_party/libevent/strlcpy.c",
     ],
+    host_supported: true,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -5814,12 +6695,19 @@
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_CONFIG_H",
         "-DHAVE_SYS_UIO_H",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -5831,9 +6719,26 @@
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
         "third_party/libevent/android/",
+        "third_party/libevent/linux/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
+    target: {
+        android_x86_64: {
+            srcs: [
+                "third_party/libevent/android/config.h",
+                "third_party/libevent/android/event-config.h",
+            ],
+        },
+        host: {
+            srcs: [
+                "third_party/libevent/linux/config.h",
+                "third_party/libevent/linux/event-config.h",
+            ],
+        },
+    },
 }
 
 // GN: //third_party/metrics_proto:metrics_proto
@@ -5869,9 +6774,9 @@
         "third_party/metrics_proto/user_demographics.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/external/chromium_org/third_party/metrics_proto/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/external/chromium_org/third_party/metrics_proto/ $(in)",
     out: [
         "external/chromium_org/third_party/metrics_proto/call_stack_profile.pb.cc",
         "external/chromium_org/third_party/metrics_proto/cast_logs.pb.cc",
@@ -5936,9 +6841,9 @@
         "third_party/metrics_proto/user_demographics.proto",
     ],
     tools: [
-        "aprotoc",
+        "cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_",
     ],
-    cmd: "$(location aprotoc) --proto_path=external/chromium_org/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/external/chromium_org/third_party/metrics_proto/ $(in)",
+    cmd: "$(location cronet_aml_third_party_protobuf_protoc___build_toolchain_linux_clang_x64_) --proto_path=external/chromium_org/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/external/chromium_org/third_party/metrics_proto/ $(in)",
     out: [
         "external/chromium_org/third_party/metrics_proto/call_stack_profile.pb.h",
         "external/chromium_org/third_party/metrics_proto/cast_logs.pb.h",
@@ -5981,6 +6886,7 @@
     srcs: [
         "third_party/modp_b64/modp_b64.cc",
     ],
+    host_supported: true,
     defaults: [
         "cronet_aml_defaults",
     ],
@@ -5989,11 +6895,18 @@
         "-DANDROID_NDK_VERSION_ROLL=r23_1",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_SYS_UIO_H",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
@@ -6006,21 +6919,431 @@
         "buildtools/third_party/libc++/",
         "buildtools/third_party/libc++/trunk/include",
         "buildtools/third_party/libc++abi/trunk/include",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
 }
 
+// GN: //third_party/protobuf:protobuf_full
+cc_library_static {
+    name: "cronet_aml_third_party_protobuf_protobuf_full",
+    srcs: [
+        "third_party/protobuf/src/google/protobuf/any.cc",
+        "third_party/protobuf/src/google/protobuf/any.pb.cc",
+        "third_party/protobuf/src/google/protobuf/any_lite.cc",
+        "third_party/protobuf/src/google/protobuf/api.pb.cc",
+        "third_party/protobuf/src/google/protobuf/arena.cc",
+        "third_party/protobuf/src/google/protobuf/arenastring.cc",
+        "third_party/protobuf/src/google/protobuf/arenaz_sampler.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/importer.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/parser.cc",
+        "third_party/protobuf/src/google/protobuf/descriptor.cc",
+        "third_party/protobuf/src/google/protobuf/descriptor.pb.cc",
+        "third_party/protobuf/src/google/protobuf/descriptor_database.cc",
+        "third_party/protobuf/src/google/protobuf/duration.pb.cc",
+        "third_party/protobuf/src/google/protobuf/dynamic_message.cc",
+        "third_party/protobuf/src/google/protobuf/empty.pb.cc",
+        "third_party/protobuf/src/google/protobuf/extension_set.cc",
+        "third_party/protobuf/src/google/protobuf/extension_set_heavy.cc",
+        "third_party/protobuf/src/google/protobuf/field_mask.pb.cc",
+        "third_party/protobuf/src/google/protobuf/generated_enum_util.cc",
+        "third_party/protobuf/src/google/protobuf/generated_message_bases.cc",
+        "third_party/protobuf/src/google/protobuf/generated_message_reflection.cc",
+        "third_party/protobuf/src/google/protobuf/generated_message_tctable_full.cc",
+        "third_party/protobuf/src/google/protobuf/generated_message_tctable_lite.cc",
+        "third_party/protobuf/src/google/protobuf/generated_message_util.cc",
+        "third_party/protobuf/src/google/protobuf/implicit_weak_message.cc",
+        "third_party/protobuf/src/google/protobuf/inlined_string_field.cc",
+        "third_party/protobuf/src/google/protobuf/io/coded_stream.cc",
+        "third_party/protobuf/src/google/protobuf/io/gzip_stream.cc",
+        "third_party/protobuf/src/google/protobuf/io/io_win32.cc",
+        "third_party/protobuf/src/google/protobuf/io/printer.cc",
+        "third_party/protobuf/src/google/protobuf/io/strtod.cc",
+        "third_party/protobuf/src/google/protobuf/io/tokenizer.cc",
+        "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc",
+        "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc",
+        "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
+        "third_party/protobuf/src/google/protobuf/map.cc",
+        "third_party/protobuf/src/google/protobuf/map_field.cc",
+        "third_party/protobuf/src/google/protobuf/message.cc",
+        "third_party/protobuf/src/google/protobuf/message_lite.cc",
+        "third_party/protobuf/src/google/protobuf/parse_context.cc",
+        "third_party/protobuf/src/google/protobuf/reflection_ops.cc",
+        "third_party/protobuf/src/google/protobuf/repeated_field.cc",
+        "third_party/protobuf/src/google/protobuf/repeated_ptr_field.cc",
+        "third_party/protobuf/src/google/protobuf/service.cc",
+        "third_party/protobuf/src/google/protobuf/source_context.pb.cc",
+        "third_party/protobuf/src/google/protobuf/struct.pb.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/bytestream.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/common.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/int128.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/status.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/statusor.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/stringpiece.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/strutil.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/substitute.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/time.cc",
+        "third_party/protobuf/src/google/protobuf/text_format.cc",
+        "third_party/protobuf/src/google/protobuf/timestamp.pb.cc",
+        "third_party/protobuf/src/google/protobuf/type.pb.cc",
+        "third_party/protobuf/src/google/protobuf/unknown_field_set.cc",
+        "third_party/protobuf/src/google/protobuf/util/delimited_message_util.cc",
+        "third_party/protobuf/src/google/protobuf/util/field_comparator.cc",
+        "third_party/protobuf/src/google/protobuf/util/field_mask_util.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/error_listener.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/type_info.cc",
+        "third_party/protobuf/src/google/protobuf/util/internal/utility.cc",
+        "third_party/protobuf/src/google/protobuf/util/json_util.cc",
+        "third_party/protobuf/src/google/protobuf/util/message_differencer.cc",
+        "third_party/protobuf/src/google/protobuf/util/time_util.cc",
+        "third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc",
+        "third_party/protobuf/src/google/protobuf/wire_format.cc",
+        "third_party/protobuf/src/google/protobuf/wire_format_lite.cc",
+        "third_party/protobuf/src/google/protobuf/wrappers.pb.cc",
+    ],
+    static_libs: [
+        "cronet_aml_third_party_zlib_zlib",
+    ],
+    host_supported: true,
+    device_supported: false,
+    defaults: [
+        "cronet_aml_defaults",
+    ],
+    cflags: [
+        "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+        "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
+        "-DDCHECK_ALWAYS_ON=1",
+        "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
+        "-DGOOGLE_PROTOBUF_NO_RTTI",
+        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
+        "-DHAVE_PTHREAD",
+        "-DHAVE_ZLIB",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
+        "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
+        "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
+        "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-UANDROID",
+    ],
+    local_include_dirs: [
+        "./",
+        "buildtools/third_party/libc++/",
+        "buildtools/third_party/libc++/trunk/include",
+        "buildtools/third_party/libc++abi/trunk/include",
+        "third_party/protobuf/src/",
+        "third_party/zlib/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
+    ],
+    cpp_std: "c++20",
+}
+
+// GN: //third_party/protobuf:protobuf_lite
+cc_library_static {
+    name: "cronet_aml_third_party_protobuf_protobuf_lite",
+    srcs: [
+        "third_party/protobuf/src/google/protobuf/any_lite.cc",
+        "third_party/protobuf/src/google/protobuf/arena.cc",
+        "third_party/protobuf/src/google/protobuf/arenastring.cc",
+        "third_party/protobuf/src/google/protobuf/arenaz_sampler.cc",
+        "third_party/protobuf/src/google/protobuf/extension_set.cc",
+        "third_party/protobuf/src/google/protobuf/generated_enum_util.cc",
+        "third_party/protobuf/src/google/protobuf/generated_message_tctable_lite.cc",
+        "third_party/protobuf/src/google/protobuf/generated_message_util.cc",
+        "third_party/protobuf/src/google/protobuf/implicit_weak_message.cc",
+        "third_party/protobuf/src/google/protobuf/inlined_string_field.cc",
+        "third_party/protobuf/src/google/protobuf/io/coded_stream.cc",
+        "third_party/protobuf/src/google/protobuf/io/io_win32.cc",
+        "third_party/protobuf/src/google/protobuf/io/strtod.cc",
+        "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc",
+        "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc",
+        "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
+        "third_party/protobuf/src/google/protobuf/map.cc",
+        "third_party/protobuf/src/google/protobuf/message_lite.cc",
+        "third_party/protobuf/src/google/protobuf/parse_context.cc",
+        "third_party/protobuf/src/google/protobuf/repeated_field.cc",
+        "third_party/protobuf/src/google/protobuf/repeated_ptr_field.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/bytestream.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/common.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/int128.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/status.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/statusor.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/stringpiece.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/strutil.cc",
+        "third_party/protobuf/src/google/protobuf/stubs/time.cc",
+        "third_party/protobuf/src/google/protobuf/wire_format_lite.cc",
+    ],
+    shared_libs: [
+        "liblog",
+    ],
+    defaults: [
+        "cronet_aml_defaults",
+    ],
+    cflags: [
+        "-DANDROID",
+        "-DANDROID_NDK_VERSION_ROLL=r23_1",
+        "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+        "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DDCHECK_ALWAYS_ON=1",
+        "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
+        "-DGOOGLE_PROTOBUF_NO_RTTI",
+        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
+        "-DHAVE_PTHREAD",
+        "-DHAVE_SYS_UIO_H",
+        "-D_DEBUG",
+        "-D_GNU_SOURCE",
+        "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+    ],
+    local_include_dirs: [
+        "./",
+        "buildtools/third_party/libc++/",
+        "buildtools/third_party/libc++/trunk/include",
+        "buildtools/third_party/libc++abi/trunk/include",
+        "third_party/protobuf/src/",
+        "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
+    ],
+    cpp_std: "c++20",
+}
+
+// GN: //third_party/protobuf:protoc
+cc_binary {
+    name: "cronet_aml_third_party_protobuf_protoc",
+    srcs: [
+        "third_party/protobuf/src/google/protobuf/compiler/main.cc",
+    ],
+    static_libs: [
+        "cronet_aml_third_party_protobuf_protobuf_full",
+        "cronet_aml_third_party_protobuf_protoc_lib",
+        "cronet_aml_third_party_zlib_zlib",
+    ],
+    host_supported: true,
+    device_supported: false,
+    defaults: [
+        "cronet_aml_buildtools_third_party_libc___libc__",
+        "cronet_aml_buildtools_third_party_libc__abi_libc__abi",
+        "cronet_aml_buildtools_third_party_libunwind_libunwind",
+        "cronet_aml_defaults",
+    ],
+    cflags: [
+        "-DANDROID",
+        "-DANDROID_NDK_VERSION_ROLL=r23_1",
+        "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+        "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
+        "-DDCHECK_ALWAYS_ON=1",
+        "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
+        "-DGOOGLE_PROTOBUF_NO_RTTI",
+        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
+        "-DHAVE_PTHREAD",
+        "-DHAVE_SYS_UIO_H",
+        "-DLIBCXXABI_SILENT_TERMINATE",
+        "-DLIBCXX_BUILDING_LIBCXXABI",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
+        "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
+        "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
+        "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+        "-D_LIBCPP_BUILDING_LIBRARY",
+        "-D_LIBCPP_CONSTINIT=constinit",
+        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+        "-D_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))",
+        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D_LIBUNWIND_IS_NATIVE_ONLY",
+    ],
+    local_include_dirs: [
+        "./",
+        "buildtools/third_party/libc++/",
+        "buildtools/third_party/libc++/trunk/include",
+        "buildtools/third_party/libc++/trunk/src/",
+        "buildtools/third_party/libc++abi/trunk/include",
+        "buildtools/third_party/libunwind/trunk/include/",
+        "third_party/protobuf/src/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
+        "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
+    ],
+    cpp_std: "c++20",
+    cppflags: [
+        "-fexceptions",
+    ],
+    rtti: true,
+}
+
+// GN: //third_party/protobuf:protoc_lib
+cc_library_static {
+    name: "cronet_aml_third_party_protobuf_protoc_lib",
+    srcs: [
+        "third_party/protobuf/src/google/protobuf/compiler/code_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_kotlin_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/js/js_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/plugin.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/python/python_helpers.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/python/python_pyi_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/subprocess.cc",
+        "third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc",
+    ],
+    static_libs: [
+        "cronet_aml_third_party_protobuf_protobuf_full",
+        "cronet_aml_third_party_zlib_zlib",
+    ],
+    host_supported: true,
+    device_supported: false,
+    defaults: [
+        "cronet_aml_defaults",
+    ],
+    cflags: [
+        "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+        "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
+        "-DDCHECK_ALWAYS_ON=1",
+        "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
+        "-DGOOGLE_PROTOBUF_NO_RTTI",
+        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
+        "-DHAVE_PTHREAD",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
+        "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
+        "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
+        "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+        "-UANDROID",
+    ],
+    local_include_dirs: [
+        "./",
+        "buildtools/third_party/libc++/",
+        "buildtools/third_party/libc++/trunk/include",
+        "buildtools/third_party/libc++abi/trunk/include",
+        "third_party/protobuf/src/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
+    ],
+    cpp_std: "c++20",
+}
+
 // GN: //third_party/zlib:zlib
 cc_library_static {
     name: "cronet_aml_third_party_zlib_zlib",
     srcs: [
-        ":cronet_aml_third_party_android_ndk_cpu_features",
-        ":cronet_aml_third_party_zlib_zlib_adler32_simd",
-        ":cronet_aml_third_party_zlib_zlib_common_headers",
-        ":cronet_aml_third_party_zlib_zlib_crc32_simd",
-        ":cronet_aml_third_party_zlib_zlib_inflate_chunk_simd",
-        ":cronet_aml_third_party_zlib_zlib_slide_hash_simd",
         "third_party/zlib/adler32.c",
         "third_party/zlib/compress.c",
         "third_party/zlib/cpu_features.c",
@@ -6037,8 +7360,15 @@
         "third_party/zlib/uncompr.c",
         "third_party/zlib/zutil.c",
     ],
+    host_supported: true,
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_third_party_android_ndk_cpu_features",
+        "cronet_aml_third_party_zlib_zlib_adler32_simd",
+        "cronet_aml_third_party_zlib_zlib_common_headers",
+        "cronet_aml_third_party_zlib_zlib_crc32_simd",
+        "cronet_aml_third_party_zlib_zlib_inflate_chunk_simd",
+        "cronet_aml_third_party_zlib_zlib_slide_hash_simd",
     ],
     cflags: [
         "-DADLER32_SIMD_SSSE3",
@@ -6047,23 +7377,32 @@
         "-DCRC32_SIMD_SSE42_PCLMUL",
         "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
         "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+        "-DCR_SYSROOT_KEY=20220331T153654Z-0",
         "-DDCHECK_ALWAYS_ON=1",
         "-DDEFLATE_SLIDE_HASH_SSE2",
         "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
         "-DHAVE_SYS_UIO_H",
         "-DINFLATE_CHUNK_READ_64LE",
         "-DINFLATE_CHUNK_SIMD_SSE2",
+        "-DUSE_AURA=1",
+        "-DUSE_OZONE=1",
+        "-DUSE_UDEV",
         "-DX86_NOT_WINDOWS",
         "-DZLIB_DEBUG",
         "-DZLIB_IMPLEMENTATION",
         "-D_DEBUG",
+        "-D_FILE_OFFSET_BITS=64",
         "-D_GNU_SOURCE",
+        "-D_LARGEFILE64_SOURCE",
+        "-D_LARGEFILE_SOURCE",
         "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
         "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
         "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
         "-D__STDC_CONSTANT_MACROS",
         "-D__STDC_FORMAT_MACROS",
+        "-mpclmul",
+        "-mssse3",
     ],
     local_include_dirs: [
         "./",
@@ -6072,13 +7411,15 @@
         "buildtools/third_party/libc++abi/trunk/include",
         "third_party/android_ndk/sources/android/cpufeatures/",
         "third_party/zlib/",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
+        "build/linux/debian_bullseye_amd64-sysroot/usr/include",
         "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
     ],
     cpp_std: "c++20",
 }
 
 // GN: //third_party/zlib:zlib_adler32_simd
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_zlib_zlib_adler32_simd",
     srcs: [
         "third_party/zlib/adler32_simd.c",
@@ -6086,12 +7427,12 @@
 }
 
 // GN: //third_party/zlib:zlib_common_headers
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_zlib_zlib_common_headers",
 }
 
 // GN: //third_party/zlib:zlib_crc32_simd
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_zlib_zlib_crc32_simd",
     srcs: [
         "third_party/zlib/crc32_simd.c",
@@ -6100,7 +7441,7 @@
 }
 
 // GN: //third_party/zlib:zlib_inflate_chunk_simd
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_zlib_zlib_inflate_chunk_simd",
     srcs: [
         "third_party/zlib/contrib/optimizations/inffast_chunk.c",
@@ -6109,7 +7450,7 @@
 }
 
 // GN: //third_party/zlib:zlib_slide_hash_simd
-filegroup {
+cc_defaults {
     name: "cronet_aml_third_party_zlib_zlib_slide_hash_simd",
 }
 
@@ -6137,7 +7478,6 @@
 cc_library_static {
     name: "cronet_aml_url_url",
     srcs: [
-        ":cronet_aml_ipc_param_traits",
         "url/gurl.cc",
         "url/origin.cc",
         "url/scheme_host_port.cc",
@@ -6171,11 +7511,12 @@
         "cronet_aml_base_base_static",
         "cronet_aml_base_third_party_double_conversion_double_conversion",
         "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+        "cronet_aml_third_party_boringssl_boringssl",
         "cronet_aml_third_party_icu_icui18n",
         "cronet_aml_third_party_icu_icuuc_private",
         "cronet_aml_third_party_libevent_libevent",
         "cronet_aml_third_party_modp_b64_modp_b64",
-        "libssl",
+        "cronet_aml_third_party_zlib_zlib",
     ],
     generated_headers: [
         "cronet_aml_base_debugging_buildflags",
@@ -6193,6 +7534,7 @@
     ],
     defaults: [
         "cronet_aml_defaults",
+        "cronet_aml_ipc_param_traits",
     ],
     cflags: [
         "-DANDROID",
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index d3b2a56..24d5584 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -91,7 +91,6 @@
 
 # Include directories that will be removed from all targets.
 local_include_dirs_denylist = [
-    'third_party/protobuf/src/',
 ]
 
 # Name of the module which settings such as compiler flags for all other
@@ -108,7 +107,12 @@
 android_protobuf_src = 'external/protobuf/src'
 
 # Compiler flags which are passed through to the blueprint.
-cflag_allowlist = r'^-DPERFETTO.*$'
+cflag_allowlist = [
+  # needed for zlib:zlib
+  "-mpclmul",
+  # needed for zlib:zlib
+  "-mssse3",
+]
 
 # Additional arguments to apply to Android.bp rules.
 additional_args = {
@@ -129,130 +133,11 @@
     ],
 }
 
-
-def enable_gtest_and_gmock(module):
-  module.static_libs.add('libgmock')
-  module.static_libs.add('libgtest')
-  if module.name != 'perfetto_gtest_logcat_printer':
-    module.whole_static_libs.add('perfetto_gtest_logcat_printer')
-
-
-def enable_protobuf_full(module):
-  if module.type == 'cc_binary_host':
-    module.static_libs.add('libprotobuf-cpp-full')
-  elif module.host_supported:
-    module.host.static_libs.add('libprotobuf-cpp-full')
-    module.android.shared_libs.add('libprotobuf-cpp-full')
-  elif module.type not in ['genrule', 'filegroup']:
-    module.shared_libs.add('libprotobuf-cpp-full')
-
-
-def enable_protobuf_lite(module):
-  if module.type not in ['genrule', 'filegroup']:
-    module.shared_libs.add('libprotobuf-cpp-lite')
-
-
-def enable_protoc_lib(module):
-  if module.type == 'cc_binary_host':
-    module.static_libs.add('libprotoc')
-  else:
-    module.shared_libs.add('libprotoc')
-
-
-def enable_libunwindstack(module):
-  if module.name != 'heapprofd_standalone_client':
-    module.shared_libs.add('libunwindstack')
-    module.shared_libs.add('libprocinfo')
-    module.shared_libs.add('libbase')
-  else:
-    module.static_libs.add('libunwindstack')
-    module.static_libs.add('libprocinfo')
-    module.static_libs.add('libbase')
-    module.static_libs.add('liblzma')
-    module.static_libs.add('libdexfile_support')
-    module.runtime_libs.add('libdexfile')  # libdexfile_support dependency
-
-
-def enable_libunwind(module):
-  # libunwind is disabled on Darwin so we cannot depend on it.
-  pass
-
-
-def enable_sqlite(module):
-  if module.type == 'cc_binary_host':
-    module.static_libs.add('libsqlite')
-    module.static_libs.add('sqlite_ext_percentile')
-  elif module.host_supported:
-    # Copy what the sqlite3 command line tool does.
-    module.android.shared_libs.add('libsqlite')
-    module.android.shared_libs.add('libicu')
-    module.android.shared_libs.add('liblog')
-    module.android.shared_libs.add('libutils')
-    module.android.static_libs.add('sqlite_ext_percentile')
-    module.host.static_libs.add('libsqlite')
-    module.host.static_libs.add('sqlite_ext_percentile')
-  else:
-    module.shared_libs.add('libsqlite')
-    module.shared_libs.add('libicu')
-    module.shared_libs.add('liblog')
-    module.shared_libs.add('libutils')
-    module.static_libs.add('sqlite_ext_percentile')
-
-
-def enable_zlib(module):
-  if module.type == 'cc_binary_host':
-    module.static_libs.add('libz')
-  elif module.host_supported:
-    module.android.shared_libs.add('libz')
-    module.host.static_libs.add('libz')
-  else:
-    module.shared_libs.add('libz')
-
-
-def enable_uapi_headers(module):
-  module.include_dirs.add('bionic/libc/kernel')
-
-
-def enable_bionic_libc_platform_headers_on_android(module):
-  module.header_libs.add('bionic_libc_platform_headers')
-
-
-def enable_boringssl(module):
-  if module.type not in ['genrule', 'filegroup']:
-    module.static_libs.add('libssl')
-
-
 # Android equivalents for third-party libraries that the upstream project
 # depends on.
 builtin_deps = {
-    '//gn:default_deps':
+    '//net/tools/root_store_tool:root_store_tool':
         lambda x: None,
-    '//gn:gtest_main':
-        lambda x: None,
-    '//gn:gtest_and_gmock':
-        enable_gtest_and_gmock,
-    '//gn:libunwind':
-        enable_libunwind,
-    '//gn:libunwindstack':
-        enable_libunwindstack,
-    '//gn:sqlite':
-        enable_sqlite,
-    '//gn:zlib':
-        enable_zlib,
-    '//gn:bionic_kernel_uapi_headers':
-        enable_uapi_headers,
-    '//src/profiling/memory:bionic_libc_platform_headers_on_android':
-        enable_bionic_libc_platform_headers_on_android,
-    '//third_party/protobuf:protoc':
-      lambda x: None,
-    '//third_party/protobuf:protobuf_full':
-        enable_protobuf_full,
-    '//third_party/protobuf:protobuf_lite':
-        enable_protobuf_lite,
-    '//third_party/protobuf:protoc_lib':
-        enable_protoc_lib,
-    '//third_party/boringssl:boringssl':
-        enable_boringssl,
 }
 
 # ----------------------------------------------------------------------------
@@ -314,6 +199,7 @@
 
   def __init__(self, name):
     self.name = name
+    self.srcs = set()
     self.shared_libs = set()
     self.static_libs = set()
     self.whole_static_libs = set()
@@ -324,6 +210,7 @@
 
   def to_string(self, output):
     nested_out = []
+    self._output_field(nested_out, 'srcs')
     self._output_field(nested_out, 'shared_libs')
     self._output_field(nested_out, 'static_libs')
     self._output_field(nested_out, 'whole_static_libs')
@@ -351,7 +238,7 @@
     self.gn_target = gn_target
     self.name = name
     self.srcs = set()
-    self.comment = 'GN: ' + gn_utils.label_without_toolchain(gn_target)
+    self.comment = 'GN: ' + gn_target
     self.shared_libs = set()
     self.static_libs = set()
     self.whole_static_libs = set()
@@ -359,6 +246,7 @@
     self.tools = set()
     self.cmd = None
     self.host_supported = False
+    self.device_supported = True
     self.vendor_available = False
     self.init_rc = set()
     self.out = set()
@@ -373,8 +261,15 @@
     self.header_libs = set()
     self.required = set()
     self.tool_files = set()
-    self.android = Target('android')
-    self.host = Target('host')
+    # target contains a dict of Targets indexed by os_arch.
+    # example: { 'android_x86': Target('android_x86')
+    self.target = dict()
+    self.target['android'] = Target('android')
+    self.target['android_x86'] = Target('android_x86')
+    self.target['android_x86_64'] = Target('android_x86_64')
+    self.target['android_arm'] = Target('android_arm')
+    self.target['android_arm64'] = Target('android_arm64')
+    self.target['host'] = Target('host')
     self.stl = None
     self.cpp_std = None
     self.dist = dict()
@@ -396,6 +291,7 @@
     self.stubs = {}
     self.cppflags = set()
     self.rtti = False
+    self.arch = dict()
 
   def to_string(self, output):
     if self.comment:
@@ -411,6 +307,8 @@
     self._output_field(output, 'cmd', sort=False)
     if self.host_supported:
       self._output_field(output, 'host_supported')
+    if not self.device_supported:
+      self._output_field(output, 'device_supported')
     if self.vendor_available:
       self._output_field(output, 'vendor_available')
     self._output_field(output, 'init_rc')
@@ -442,10 +340,14 @@
     self._output_field(output, 'cppflags')
     if self.rtti:
       self._output_field(output, 'rtti')
+    self._output_field(output, 'arch')
 
     target_out = []
-    self._output_field(target_out, 'android')
-    self._output_field(target_out, 'host')
+    for arch, target in sorted(self.target.items()):
+      # _output_field calls getattr(self, arch).
+      setattr(self, arch, target)
+      self._output_field(target_out, arch)
+
     if target_out:
       output.append('    target: {')
       for line in target_out:
@@ -459,7 +361,7 @@
     if self.type == 'cc_binary_host':
       raise Exception('Adding Android static lib for host tool is unsupported')
     elif self.host_supported:
-      self.android.static_libs.add(lib)
+      self.target['android'].static_libs.add(lib)
     else:
       self.static_libs.add(lib)
 
@@ -467,7 +369,7 @@
     if self.type == 'cc_binary_host':
       raise Exception('Adding Android shared lib for host tool is unsupported')
     elif self.host_supported:
-      self.android.shared_libs.add(lib)
+      self.target['android'].shared_libs.add(lib)
     else:
       self.shared_libs.add(lib)
 
@@ -475,6 +377,9 @@
     value = getattr(self, name)
     return write_blueprint_key_value(output, name, value, sort)
 
+  def is_compiled(self):
+    return self.type not in ('genrule', 'filegroup', 'cc_defaults')
+
 
 class Blueprint(object):
   """In-memory representation of an Android.bp file."""
@@ -498,12 +403,13 @@
 
 def label_to_module_name(label):
   """Turn a GN label (e.g., //:perfetto_tests) into a module name."""
-  # If the label is explicibly listed in the default target list, don't prefix
-  # its name and return just the target name. This is so tools like
-  # "traceconv" stay as such in the Android tree.
-  label_without_toolchain = gn_utils.label_without_toolchain(label)
-  module = re.sub(r'^//:?', '', label_without_toolchain)
+  module = re.sub(r'^//:?', '', label)
   module = re.sub(r'[^a-zA-Z0-9_]', '_', module)
+
+  # If it's required to support multi toolchain for more targets, it's better to avoid hardcoding.
+  if label == "//third_party/boringssl:boringssl_asm(//build/toolchain/android:android_clang_x86)":
+    module += "_x86"
+
   if not module.startswith(module_prefix):
     return module_prefix + module
   return module
@@ -531,13 +437,15 @@
     """
   assert (target.type == 'proto_library')
 
-  tools = {'aprotoc'}
+  protoc_gn_target_name = "//third_party/protobuf:protoc(//build/toolchain/linux:clang_x64)"
+  protoc_module_name = label_to_module_name(protoc_gn_target_name)
+  tools = {protoc_module_name}
   cpp_out_dir = '$(genDir)/%s/%s/' % (tree_path, target.proto_in_dir)
   target_module_name = label_to_module_name(target.name)
 
   # In GN builds the proto path is always relative to the output directory
   # (out/tmp.xxx).
-  cmd = ['$(location aprotoc)']
+  cmd = ['$(location %s)' % protoc_module_name]
   cmd += ['--proto_path=%s/%s' % (tree_path, target.proto_in_dir)]
 
   if buildtools_protobuf_src in target.proto_paths:
@@ -1045,9 +953,14 @@
 
 
 def _get_cflags(target):
-  cflags = {flag for flag in target.cflags if re.match(cflag_allowlist, flag)}
+  cflags = {flag for flag in target.cflags if flag in cflag_allowlist}
   # Consider proper allowlist or denylist if needed
   cflags |= set("-D%s" % define.replace("\"", "\\\"") for define in target.defines)
+  # -DANDROID is added by default but target.defines contain -DANDROID if it's required.
+  # So adding -UANDROID to cancel default -DANDROID if it's not specified.
+  # This is needed for some targets(e.g. symbolize)
+  if "ANDROID" not in target.defines:
+    cflags.add("-UANDROID")
   return cflags
 
 
@@ -1068,13 +981,11 @@
   target = gn.get_target(gn_target_name)
   log.info('create modules for %s (%s)', target.name, target.type)
 
-  name_without_toolchain = gn_utils.label_without_toolchain(target.name)
   if target.type == 'executable':
-    if target.toolchain == gn_utils.HOST_TOOLCHAIN:
-      module_type = 'cc_binary_host'
-    elif target.testonly:
+    if target.testonly:
       module_type = 'cc_test'
     else:
+      # Can be used for both host and device targets.
       module_type = 'cc_binary'
     module = Module(module_type, bp_module_name, gn_target_name)
   elif target.type == 'static_library':
@@ -1082,7 +993,7 @@
   elif target.type == 'shared_library':
     module = Module('cc_library_shared', bp_module_name, gn_target_name)
   elif target.type == 'source_set':
-    module = Module('filegroup', bp_module_name, gn_target_name)
+    module = Module('cc_defaults', bp_module_name, gn_target_name)
   elif target.type == 'group':
     # "group" targets are resolved recursively by gn_utils.get_target().
     # There's nothing we need to do at this level for them.
@@ -1094,10 +1005,10 @@
   elif target.type == 'action':
     if 'gen_amalgamated_sql_metrics' in target.name:
       module = create_amalgamated_sql_metrics_module(blueprint, target)
-    elif re.match('.*gen_cc_.*_descriptor$', name_without_toolchain):
+    elif re.match('.*gen_cc_.*_descriptor$', target.name):
       module = create_cc_proto_descriptor_module(blueprint, target)
     elif target.type == 'action' and \
-        name_without_toolchain == gn_utils.GEN_VERSION_TARGET:
+        target.name == gn_utils.GEN_VERSION_TARGET:
       module = create_gen_version_module(blueprint, target, bp_module_name)
     else:
       module = create_action_module(blueprint, target)
@@ -1116,13 +1027,17 @@
     raise Error('Unknown target %s (%s)' % (target.name, target.type))
 
   blueprint.add_module(module)
-  module.host_supported = (name_without_toolchain in target_host_supported)
   module.init_rc = target_initrc.get(target.name, [])
   module.srcs.update(
       gn_utils.label_to_path(src)
       for src in target.sources
       if is_supported_source_file(src) and not src.startswith("//out/test"))
 
+  # Add arch-specific properties
+  for arch_name, arch in target.arch.items():
+    module.target[arch_name].srcs.update(gn_utils.label_to_path(src)
+                                         for src in arch.sources)
+
   local_include_dirs_set = set()
   if target.type in gn_utils.LINKER_UNIT_TYPES:
     module.cflags.update(_get_cflags(target))
@@ -1153,10 +1068,15 @@
     # include. So adding sysroot include at the end.
     for flag in target.cflags:
       if '--sysroot' in flag:
-        module.local_include_dirs.append(flag[len('--sysroot=../../'):] + "/usr/include")
+        sysroot = flag[len('--sysroot=../../'):]
+        if sysroot == "build/linux/debian_bullseye_amd64-sysroot":
+          module.local_include_dirs.append(sysroot + "/usr/include/x86_64-linux-gnu")
+        module.local_include_dirs.append(sysroot + "/usr/include")
 
-  module_is_compiled = module.type not in ('genrule', 'filegroup')
-  if module_is_compiled:
+  if module.is_compiled():
+    module.host_supported = target.host_supported()
+    module.device_supported = target.device_supported()
+
     # Don't try to inject library/source dependencies into genrules or
     # filegroups because they are not compiled in the traditional sense.
     module.defaults = [defaults_module]
@@ -1188,8 +1108,8 @@
   for dep_name in all_deps:
     # |builtin_deps| override GN deps with Android-specific ones. See the
     # config in the top of this file.
-    if gn_utils.label_without_toolchain(dep_name) in builtin_deps:
-      builtin_deps[gn_utils.label_without_toolchain(dep_name)](module)
+    if dep_name in builtin_deps:
+      builtin_deps[dep_name](module)
       continue
 
     dep_module = create_modules_from_target(blueprint, gn, dep_name)
@@ -1206,8 +1126,9 @@
         module.genrule_headers.add(dep_module.name)
         module.genrule_headers.update(dep_module.genrule_headers)
 
-    # For filegroups and genrule, recurse but don't apply the deps.
-    if not module_is_compiled:
+    # For cc_defaults, filegroups, and genrule, recurse but don't apply the
+    # deps.
+    if not module.is_compiled():
       continue
 
     if dep_module is None:
@@ -1216,8 +1137,8 @@
       module.shared_libs.add(dep_module.name)
     elif dep_module.type == 'cc_library_static':
       module.static_libs.add(dep_module.name)
-    elif dep_module.type == 'filegroup':
-      module.srcs.add(':' + dep_module.name)
+    elif dep_module.type == 'cc_defaults':
+      module.defaults.append(dep_module.name)
     elif dep_module.type == 'genrule':
       module.generated_headers.update(dep_module.genrule_headers)
       module.srcs.update(dep_module.genrule_srcs)
@@ -1229,6 +1150,25 @@
       raise Error('Unknown dep %s (%s) for target %s' %
                   (dep_module.name, dep_module.type, module.name))
 
+  # TODO: support arch difference in generic way
+  # Currently, it is expected that only a couple of modules (e.g. partition_alloc, boringssl)
+  # need arch condition. So, for now, hardcoding arch condition
+  if module.name == "cronet_aml_base_allocator_partition_allocator_partition_alloc":
+    x86_srcs = module.srcs.copy()
+    x86_srcs.discard(
+      "base/allocator/partition_allocator/starscan/stack/asm/x64/push_registers_asm.cc")
+    x86_srcs.add("base/allocator/partition_allocator/starscan/stack/asm/x86/push_registers_asm.cc")
+    module.arch['x86'] = {'srcs': x86_srcs}
+    module.arch['x86_64'] = {'srcs': module.srcs.copy()}
+    module.srcs.clear()
+  elif module.name == "cronet_aml_third_party_boringssl_boringssl":
+    x86_srcs = module.srcs.copy()
+    x86_srcs.discard(":cronet_aml_third_party_boringssl_boringssl_asm")
+    x86_srcs.add(":cronet_aml_third_party_boringssl_boringssl_asm_x86")
+    module.arch['x86'] = {'srcs': x86_srcs}
+    module.arch['x86_64'] = {'srcs': module.srcs.copy()}
+    module.srcs.clear()
+
   return module
 
 def create_java_module(blueprint, gn):
@@ -1280,6 +1220,8 @@
       '-Wno-unused-parameter',
       '-Wno-deprecated-non-prototype', # needed for zlib
       '-fvisibility=hidden',
+      '-Wno-ambiguous-reversed-operator', # needed for icui18n
+      '-Wno-unreachable-code-loop-increment', # needed for icui18n
       '-O2',
   ]
   defaults.stl = 'none'
@@ -1288,6 +1230,14 @@
   for target in targets:
     create_modules_from_target(blueprint, gn, target)
 
+  # Currently, multi tool chain is not supported for all targets and create_modules_from_target can
+  # not reach to this target by following the dependency.
+  # So it's required to specify explicitly.
+  boringssl_gn_target_name = ('//third_party/boringssl:boringssl_asm' +
+                             '(//build/toolchain/android:android_clang_x86)')
+  gn.parse_gn_desc(desc, boringssl_gn_target_name)
+  create_modules_from_target(blueprint, gn, boringssl_gn_target_name)
+
   create_java_module(blueprint, gn)
   update_jni_registration_module(blueprint, gn)
 
@@ -1349,8 +1299,13 @@
   with open(args.desc) as f:
     desc = json.load(f)
 
-  gn = gn_utils.GnParser(desc)
-  blueprint = create_blueprint_for_targets(gn, desc, args.targets or default_targets)
+  gn = gn_utils.GnParser()
+  targets = args.targets or default_targets
+  for target in targets:
+    # TODO: pass desc to parse_gn_desc() to support parsing multiple desc files
+    # for different target architectures.
+    gn.parse_gn_desc(desc, target)
+  blueprint = create_blueprint_for_targets(gn, desc, targets)
   project_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
   tool_name = os.path.relpath(os.path.abspath(__file__), project_root)
 
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index 1399fcf..494ed25 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -29,8 +29,6 @@
 
 BUILDFLAGS_TARGET = '//gn:gen_buildflags'
 GEN_VERSION_TARGET = '//src/base:version_gen_h'
-TARGET_TOOLCHAIN = '//gn/standalone/toolchain:gcc_like_host'
-HOST_TOOLCHAIN = '//gn/standalone/toolchain:gcc_like_host'
 LINKER_UNIT_TYPES = ('executable', 'shared_library', 'static_library')
 
 # TODO(primiano): investigate these, they require further componentization.
@@ -94,6 +92,12 @@
         Maked properties are propagated up the dependency chain when a
         source_set dependency is encountered.
         """
+    class Arch():
+      """Architecture-dependent properties
+        """
+      def __init__(self):
+        self.sources = set()
+
 
     def __init__(self, name, type):
       self.name = name  # e.g. //src/ipc:ipc
@@ -144,6 +148,17 @@
       # placeholder target once we hit //gn:protoc or similar.
       self.is_third_party_dep_ = False
 
+      # TODO: come up with a better way to only run this once.
+      # is_finalized tracks whether finalize() was called on this target.
+      self.is_finalized = False
+      self.arch = dict()
+
+    def host_supported(self):
+      return 'host' in self.arch
+
+    def device_supported(self):
+      return any([name.startswith('android') for name in self.arch.keys()])
+
     def __lt__(self, other):
       if isinstance(other, self.__class__):
         return self.name < other.name
@@ -165,8 +180,24 @@
                   'libs', 'proto_paths'):
         self.__dict__[key].update(other.__dict__.get(key, []))
 
-  def __init__(self, gn_desc):
-    self.gn_desc_ = gn_desc
+    def finalize(self):
+      """Move common properties out of arch-dependent subobjects to Target object.
+
+        TODO: find a better name for this function.
+        """
+      if self.is_finalized:
+        return
+      self.is_finalized = True
+
+      # Target contains the intersection of arch-dependent properties
+      self.sources = set.intersection(*[arch.sources for arch in self.arch.values()])
+
+      # Deduplicate arch-dependent properties
+      for arch in self.arch.keys():
+        self.arch[arch].sources -= self.sources
+
+
+  def __init__(self):
     self.all_targets = {}
     self.linker_units = {}  # Executables, shared or static libraries.
     self.source_sets = {}
@@ -195,39 +226,53 @@
     # TODO: There are some other possible variations we might need to support.
     return target.type == 'group' and re.match('.*_java$', target.name)
 
+  def _get_arch(self, toolchain):
+    if toolchain == '//build/toolchain/android:android_clang_x86':
+      return 'android_x86'
+    elif toolchain == '//build/toolchain/android:android_clang_x64':
+      return 'android_x86_64'
+    elif toolchain == '//build/toolchain/android:android_clang_arm':
+      return 'android_arm'
+    elif toolchain == '//build/toolchain/android:android_clang_arm64':
+      return 'android_arm64'
+    else:
+      return 'host'
 
   def get_target(self, gn_target_name):
     """Returns a Target object from the fully qualified GN target name.
 
+      get_target() requires that parse_gn_desc() has already been called.
+      """
+    # Run this every time as parse_gn_desc can be called at any time.
+    for target in self.all_targets.values():
+      target.finalize()
+
+    return self.all_targets[label_without_toolchain(gn_target_name)]
+
+  def parse_gn_desc(self, gn_desc, gn_target_name):
+    """Parses a gn desc tree and resolves all target dependencies.
+
         It bubbles up variables from source_set dependencies as described in the
         class-level comments.
         """
-    target = self.all_targets.get(gn_target_name)
-    if target is not None:
+    # Use name without toolchain for targets to support targets built for
+    # multiple archs.
+    target_name = label_without_toolchain(gn_target_name)
+    target = self.all_targets.get(target_name)
+    desc = gn_desc[gn_target_name]
+    arch = self._get_arch(desc['toolchain'])
+    if target is None:
+      target = GnParser.Target(target_name, desc['type'])
+      self.all_targets[target_name] = target
+
+    if arch not in target.arch:
+      target.arch[arch] = GnParser.Target.Arch()
+    else:
       return target  # Target already processed.
 
-    desc = self.gn_desc_[gn_target_name]
-    target = GnParser.Target(gn_target_name, desc['type'])
     target.testonly = desc.get('testonly', False)
-    target.toolchain = desc.get('toolchain', None)
-    self.all_targets[gn_target_name] = target
 
-    # TODO: determine if below comment should apply for cronet builds in Android.
-    # We should never have GN targets directly depend on buidtools. They
-    # should hop via //gn:xxx, so we can give generators an opportunity to
-    # override them.
-    # Specifically allow targets to depend on libc++ and libunwind.
-    if not any(match in gn_target_name for match in ['libc++', 'libunwind']):
-      assert (not gn_target_name.startswith('//buildtools'))
-
-
-    # Don't descend further into third_party targets. Genrators are supposed
-    # to either ignore them or route to other externally-provided targets.
-    if gn_target_name.startswith('//gn'):
-      target.is_third_party_dep_ = True
-      return target
-
-    proto_target_type, proto_desc = self.get_proto_target_type(target)
+    proto_target_type, proto_desc = self.get_proto_target_type(gn_desc, gn_target_name)
     if proto_target_type is not None:
       self.proto_libs[target.name] = target
       target.type = 'proto_library'
@@ -235,18 +280,21 @@
       target.proto_paths.update(self.get_proto_paths(proto_desc))
       target.proto_exports.update(self.get_proto_exports(proto_desc))
       target.proto_in_dir = self.get_proto_in_dir(proto_desc)
-      target.sources.update(proto_desc.get('sources', []))
-      assert (all(x.endswith('.proto') for x in target.sources))
+      for gn_proto_deps_name in proto_desc.get('deps', []):
+        dep = self.parse_gn_desc(gn_desc, gn_proto_deps_name)
+        target.deps.add(dep.name)
+      target.arch[arch].sources.update(proto_desc.get('sources', []))
+      assert (all(x.endswith('.proto') for x in target.arch[arch].sources))
     elif target.type == 'source_set':
       self.source_sets[gn_target_name] = target
-      target.sources.update(desc.get('sources', []))
+      target.arch[arch].sources.update(desc.get('sources', []))
     elif target.type in LINKER_UNIT_TYPES:
       self.linker_units[gn_target_name] = target
-      target.sources.update(desc.get('sources', []))
+      target.arch[arch].sources.update(desc.get('sources', []))
     elif target.type in ['action', 'action_foreach']:
       self.actions[gn_target_name] = target
       target.inputs.update(desc.get('inputs', []))
-      target.sources.update(desc.get('sources', []))
+      target.arch[arch].sources.update(desc.get('sources', []))
       outs = [re.sub('^//out/.+?/gen/', '', x) for x in desc['outputs']]
       target.outputs.update(outs)
       target.script = desc['script']
@@ -276,25 +324,25 @@
     target.include_dirs.update(desc.get('include_dirs', []))
 
     # Recurse in dependencies.
-    for dep_name in desc.get('deps', []):
-      dep = self.get_target(dep_name)
+    for gn_dep_name in desc.get('deps', []):
+      dep = self.parse_gn_desc(gn_desc, gn_dep_name)
       if dep.is_third_party_dep_:
-        target.deps.add(dep_name)
+        target.deps.add(dep.name)
       elif dep.type == 'proto_library':
-        target.proto_deps.add(dep_name)
-        target.transitive_proto_deps.add(dep_name)
+        target.proto_deps.add(dep.name)
+        target.transitive_proto_deps.add(dep.name)
         target.proto_paths.update(dep.proto_paths)
         target.transitive_proto_deps.update(dep.transitive_proto_deps)
       elif dep.type == 'source_set':
-        target.source_set_deps.add(dep_name)
+        target.source_set_deps.add(dep.name)
         target.update(dep)  # Bubble up source set's cflags/ldflags etc.
       elif dep.type == 'group':
         target.update(dep)  # Bubble up groups's cflags/ldflags etc.
       elif dep.type in ['action', 'action_foreach', 'copy']:
         if proto_target_type is None:
-          target.deps.add(dep_name)
+          target.deps.add(dep.name)
       elif dep.type in LINKER_UNIT_TYPES:
-        target.deps.add(dep_name)
+        target.deps.add(dep.name)
       elif dep.type == 'java_group':
         # Explicitly break dependency chain when a java_group is added.
         # Java sources are collected and eventually compiled as one large
@@ -304,9 +352,10 @@
       if dep.type == 'static_library':
         # Bubble up static_libs. Necessary, since soong does not propagate
         # static_libs up the build tree.
-        target.transitive_static_libs_deps.add(dep_name)
-        target.transitive_static_libs_deps.update(dep.transitive_static_libs_deps)
-        target.deps.update(target.transitive_static_libs_deps)
+        target.transitive_static_libs_deps.add(dep.name)
+
+      target.transitive_static_libs_deps.update(dep.transitive_static_libs_deps)
+      target.deps.update(target.transitive_static_libs_deps)
 
       # Collect java sources. Java sources are kept inside the __compile_java target.
       # This target can be used for both host and target compilation; only add
@@ -337,7 +386,7 @@
     args = proto_desc.get('args')
     return re.sub('^\.\./\.\./', '', args[args.index('--proto-in-dir') + 1])
 
-  def get_proto_target_type(self, target):
+  def get_proto_target_type(self, gn_desc, gn_target_name):
     """ Checks if the target is a proto library and return the plugin.
 
         Returns:
@@ -347,13 +396,13 @@
             json desc of the target with the .proto sources (_gen target for
             non-descriptor types or the target itself for descriptor type).
         """
-    parts = target.name.split('(', 1)
+    parts = gn_target_name.split('(', 1)
     name = parts[0]
     toolchain = '(' + parts[1] if len(parts) > 1 else ''
 
     # Descriptor targets don't have a _gen target; instead we look for the
     # characteristic flag in the args of the target itself.
-    desc = self.gn_desc_.get(target.name)
+    desc = gn_desc.get(gn_target_name)
     if '--descriptor_set_out' in desc.get('args', []):
       return 'descriptor', desc
 
@@ -365,7 +414,7 @@
 
     # In all other cases, we want to look at the _gen target as that has the
     # important information.
-    gen_desc = self.gn_desc_.get('%s_gen%s' % (name, toolchain))
+    gen_desc = gn_desc.get('%s_gen%s' % (name, toolchain))
     if gen_desc is None or gen_desc['type'] != 'action':
       return None, None
     if gen_desc['script'] != '//tools/protoc_wrapper/protoc_wrapper.py':