mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-21 01:07:34 +01:00
feat: Introduce --no-compile-sdk-metadata (#3208)
* feat: ignore sdk metadata during aapt2 * test: adjust test suite for aapt2 change
This commit is contained in:
parent
5d5c33aba6
commit
7f0d94ede9
@ -182,6 +182,8 @@ public class AaptInvoker {
|
||||
|
||||
cmd.add("--allow-reserved-package-id");
|
||||
|
||||
cmd.add("--no-compile-sdk-metadata");
|
||||
|
||||
if (mApkInfo.sparseResources) {
|
||||
cmd.add("--enable-sparse-encoding");
|
||||
}
|
||||
|
@ -75,9 +75,9 @@ public class DebuggableFalseChangeToTrueTest extends BaseTest {
|
||||
String apk = "issue2328-debuggable-flase-new";
|
||||
|
||||
String expected = TestUtils.replaceNewlines("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>" +
|
||||
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" android:compileSdkVersion=\"23\" " +
|
||||
"android:compileSdkVersionCodename=\"6.0-2438415\" package=\"com.ibotpeaches.issue2328\" platformBuildVersionCode=\"23\" " +
|
||||
"platformBuildVersionName=\"6.0-2438415\"> <application android:debuggable=\"true\"/></manifest>");
|
||||
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" " +
|
||||
"package=\"com.ibotpeaches.issue2328\" platformBuildVersionCode=\"20\" " +
|
||||
"platformBuildVersionName=\"4.4W.2-1537038\"> <application android:debuggable=\"true\"/></manifest>");
|
||||
|
||||
byte[] encoded = Files.readAllBytes(Paths.get(sTmpDir + File.separator + apk + File.separator + "AndroidManifest.xml"));
|
||||
String obtained = TestUtils.replaceNewlines(new String(encoded));
|
||||
|
@ -75,9 +75,9 @@ public class DebuggableTrueAddedTest extends BaseTest {
|
||||
String apk = "issue2328-debuggable-missing-new";
|
||||
|
||||
String expected = TestUtils.replaceNewlines("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>" +
|
||||
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" android:compileSdkVersion=\"23\" " +
|
||||
"android:compileSdkVersionCodename=\"6.0-2438415\" package=\"com.ibotpeaches.issue2328\" platformBuildVersionCode=\"23\" " +
|
||||
"platformBuildVersionName=\"6.0-2438415\"> <application android:debuggable=\"true\"/></manifest>");
|
||||
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" " +
|
||||
"package=\"com.ibotpeaches.issue2328\" platformBuildVersionCode=\"20\" " +
|
||||
"platformBuildVersionName=\"4.4W.2-1537038\"> <application android:debuggable=\"true\"/></manifest>");
|
||||
|
||||
byte[] encoded = Files.readAllBytes(Paths.get(sTmpDir + File.separator + apk + File.separator + "AndroidManifest.xml"));
|
||||
String obtained = TestUtils.replaceNewlines(new String(encoded));
|
||||
|
@ -75,9 +75,9 @@ public class DebuggableTrueRetainedTest extends BaseTest {
|
||||
String apk = "issue2328-debuggable-true-new";
|
||||
|
||||
String expected = TestUtils.replaceNewlines("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>" +
|
||||
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" android:compileSdkVersion=\"23\" " +
|
||||
"android:compileSdkVersionCodename=\"6.0-2438415\" package=\"com.ibotpeaches.issue2328\" platformBuildVersionCode=\"23\" " +
|
||||
"platformBuildVersionName=\"6.0-2438415\"> <application android:debuggable=\"true\"/></manifest>");
|
||||
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" " +
|
||||
"package=\"com.ibotpeaches.issue2328\" platformBuildVersionCode=\"20\" " +
|
||||
"platformBuildVersionName=\"4.4W.2-1537038\"> <application android:debuggable=\"true\"/></manifest>");
|
||||
|
||||
byte[] encoded = Files.readAllBytes(Paths.get(sTmpDir + File.separator + apk + File.separator + "AndroidManifest.xml"));
|
||||
String obtained = TestUtils.replaceNewlines(new String(encoded));
|
||||
|
Loading…
x
Reference in New Issue
Block a user