sky201503 / android-apktool-1

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

Latest Apktool removing tag <uses-sdk> from AndroidManifest.xml after unpacking apk #366

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi All,

I have downloaded latest apktool.jar from the following url --

http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.5.0.tar.
bz2&can=2&q= 

Then I used above jar to unpack one apk(attached with issue) with following 
command --

apktool d -f -s ICS.apk

I observe that one entry is missing from  AndroidManifest.xml after unpacking 
apk as below -

 <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />

 I tested the above scenario with old apktool.jar. It works fine.

I have attached apk & necessary files along with the mail..

Original issue reported on code.google.com by ashiqsay...@gmail.com on 5 Dec 2012 at 11:20

Attachments:

GoogleCodeExporter commented 9 years ago
It does seem after reading that line from the manifest we forget to pass it 
back to the XML parser so it disappears :/

but then aapt has the correct commands to re-add it to manifest. Will have to 
double check.

Original comment by connor.tumbleson on 8 Dec 2012 at 8:56

GoogleCodeExporter commented 9 years ago
please update if it is fixed

Original comment by ashiqsay...@gmail.com on 10 Dec 2012 at 1:28

GoogleCodeExporter commented 9 years ago
Fixed in v1.5.1

<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="1700" android:versionName="4.2-517167" 
coreApp="true" package="com.google.android.inputmethod.latin"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16">

Original comment by connor.tumbleson on 17 Dec 2012 at 6:55

GoogleCodeExporter commented 9 years ago
I downloaded the latest version of apktool 1.5.1  on windows. But still it 
removes the uses-sdk tag.

Original comment by ashiqsay...@gmail.com on 4 Jan 2013 at 10:07

GoogleCodeExporter commented 9 years ago
yes, i have the same problem.please fix it.

Original comment by helin.qi...@gmail.com on 5 Jan 2013 at 1:42

GoogleCodeExporter commented 9 years ago
I see this issue with a test app with code build from the latest repository.
A fix will be great since my business logic requires these tag for processing.

Original comment by rohankap...@gmail.com on 16 Jan 2013 at 3:25

GoogleCodeExporter commented 9 years ago
Tested on OSX still present in 1.5.2

Original comment by MonacoDe...@gmail.com on 5 Sep 2013 at 10:06

GoogleCodeExporter commented 9 years ago
Not a bug.

It must be added at aapt level via apktool.yml, it cannot be left in manifest 
and recompiled.

If you require it to be there for analysis purposes, you will have to wait for 
2.0 with the --analysis-mode option

Original comment by connor.tumbleson on 5 Sep 2013 at 10:08