Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90da11c0 authored by Iurii Makhno's avatar Iurii Makhno Committed by Android (Google) Code Review
Browse files

Merge "Allow to use 'aapt2 dump' to analyze APKs generated by aapt/custom tools."

parents 37f3eda7 32c0c037
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -108,4 +108,21 @@ TEST_F(DumpTest, DumpBadgingPermissionsOnly) {
  ASSERT_EQ(output, expected);
}

TEST_F(DumpTest, DumpBadgingApkBuiltWithAaptAndTagsInWrongPlace) {
  auto apk_path = file::BuildPath({android::base::GetExecutableDirectory(), "integration-tests",
                                   "DumpTest", "built_with_aapt.apk"});
  auto loaded_apk = LoadedApk::LoadApkFromPath(apk_path, &noop_diag);

  std::string output;
  DumpBadgingToString(loaded_apk.get(), &output, /* include_meta_data= */ false,
                      /* only_permissions= */ false);

  std::string expected;
  auto expected_path =
      file::BuildPath({android::base::GetExecutableDirectory(), "integration-tests", "DumpTest",
                       "built_with_aapt_expected.txt"});
  ::android::base::ReadFileToString(expected_path, &expected);
  ASSERT_EQ(output, expected);
}

}  // namespace aapt
+163 −116

File changed.

Preview size limit exceeded, changes collapsed.

+930 B

File added.

No diff preview for this file type.

+11 −0
Original line number Diff line number Diff line
package: name='com.aapt.app' versionCode='222' versionName='222' platformBuildVersionName='12' platformBuildVersionCode='32' compileSdkVersion='32' compileSdkVersionCodename='12'
sdkVersion:'22'
targetSdkVersion:'32'
application: label='App' icon=''
feature-group: label=''
  uses-feature: name='android.hardware.faketouch'
  uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales:
densities:
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ provides-component:'ime'
provides-component:'wallpaper'
provides-component:'accessibility'
provides-component:'print-service'
provides-component:'payment'
provides-component:'search'
provides-component:'document-provider'
provides-component:'notification-listener'
Loading