gn2bp: Use AOSP libc and NDK

* Deleted the dependency on chromium libc and Android NDK.
* This is a tweak for an upstream problem as libbase has a dependency on libmedia without declaring it.

Change-Id: I77655b8d550a51d256d9b33c07d6eb69971f3811
Test: m cronet_aml_base_base
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 8ea9633..454cfec 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -931,6 +931,7 @@
     ],
     header_libs: [
         "jni_headers",
+        "media_ndk_headers",
     ],
     cpp_std: "c++20",
     target: {
@@ -3377,24 +3378,6 @@
         "-fvisibility=hidden",
     ],
     stl: "none",
-    target: {
-        android_x86: {
-            export_system_include_dirs: [
-                "build/linux/debian_bullseye_i386-sysroot/usr/include",
-            ],
-        },
-        android_x86_64: {
-            export_system_include_dirs: [
-                "build/linux/debian_bullseye_amd64-sysroot/usr/include",
-                "build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu",
-            ],
-        },
-        host: {
-            export_system_include_dirs: [
-                "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include",
-            ],
-        },
-    },
 }
 
 // GN: //ipc:param_traits
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 3ec96f7..fcb7bb3 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -131,6 +131,9 @@
         # that doesn't depend on rtti. undefined symbol: typeinfo 'class' errors appears.
         ('rtti', True), # go/undefined-symbol-typeinfo
     ],
+    'cronet_aml_base_base': [
+        ('header_libs', set(["media_ndk_headers"])),
+    ],
 }
 
 # Android equivalents for third-party libraries that the upstream project
@@ -1219,19 +1222,6 @@
       '-Wno-unreachable-code-loop-increment', # needed for icui18n
       '-O2',
   ]
-  # TODO: can we get these from somewhere else?
-  # TODO: what to do for arm?
-  defaults.target['android_x86'].export_system_include_dirs = [
-      'build/linux/debian_bullseye_i386-sysroot/usr/include',
-  ]
-  defaults.target['android_x86_64'].export_system_include_dirs = [
-      'build/linux/debian_bullseye_amd64-sysroot/usr/include',
-      'build/linux/debian_bullseye_amd64-sysroot/usr/include/x86_64-linux-gnu',
-  ]
-  defaults.target['host'].export_system_include_dirs = [
-      # TODO: do we need this?
-      'third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include',
-  ]
   defaults.stl = 'none'
   blueprint.add_module(defaults)