kuter007 / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
0 stars 0 forks source link

Apktool 2.0.0 RC2 does not decode versionName or versionCode at all #695

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Decode com.adobe.reader.apk from 
https://code.google.com/p/android-apktool/issues/detail?id=401
2. Check AndroidManifest.xml for versionName or versionCode

What is the expected output? What do you see instead?

I'd expect to see versionName and versionCode as reported by aapt:

$ aapt dump badging com.adobe.reader.apk | grep version
package: name='com.adobe.reader' versionCode='69805' versionName='10.4.2' 
platformBuildVersionName=''

But AndroidManifest.xml does not contain versionName or versionCode at all.

What version of the product are you using? On what operating system?

Apktool 2.0.0 RC2 on Windows 8 x64, Android build tools 21.0.2.

Original issue reported on code.google.com by sschuberth on 4 Nov 2014 at 3:48

GoogleCodeExporter commented 9 years ago
This is by design. Leaving the value in the manifest is ignored by aapt. They 
have to be passed via parameter. These values are pulled into apktool.yml then 
applied during rebuild.

If you want the manifest file to match the original as nearly as possible and 
don't care about recompiling. You can use --match-original or -m which will 
leave the manifest untouched.

Original comment by connor.tumbleson on 4 Nov 2014 at 3:53

GoogleCodeExporter commented 9 years ago
Ah, thanks! I guess the underlying reason is that specifying versionCode and 
versionName is done through build.gradle now instead of via AndroidManifest.xml 
when building apps with the new Gradle build system.

Original comment by sschuberth on 4 Nov 2014 at 3:55