Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues parsing AndroidManifest files #33

Closed
7a opened this issue Mar 28, 2016 · 2 comments
Closed

Issues parsing AndroidManifest files #33

7a opened this issue Mar 28, 2016 · 2 comments
Assignees
Labels

Comments

@7a
Copy link

7a commented Mar 28, 2016

When you try to analyse the android webview base.apk from a device running Android 6, you get:

Traceback (most recent call last):
File "qark.py", line 494, in
manifestInXML = minidom.parseString(mfbuff).toxml()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 22, column 14

The Manifest file extracted via apktool is:


<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.webview" platformBuildVersionCode="23" platformBuildVersionName="6.0-2166767">
    <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
    <application android:icon="@drawable/icon_webview" android:label="Android System WebView" android:multiArch="true">
        <activity android:label="@string/license_activity_title" android:name="com.android.webview.chromium.LicenseActivity">
            <intent-filter>
                <action android:name="android.settings.WEBVIEW_LICENSE"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED" android:value="true"/>
        </activity>
        <provider android:authorities="com.google.android.webview.LicenseContentProvider" android:exported="true" android:name="com.android.webview.chromium.LicenseContentProvider"/>
        <meta-data android:name="com.android.webview.WebViewLibrary" android:value="libwebviewchromium.so"/>
    </application>
</manifest>
@SecBro1 SecBro1 added the bug label Apr 16, 2016
@tushardalvi tushardalvi self-assigned this Apr 26, 2016
@tushardalvi
Copy link
Contributor

We have instrumented apktool to resolve the parsing issues. Please let us know if you are still able to reproduce this issue using any other APK.

@schniggie
Copy link

Just installed the latest version and get the same error when trying to open the latest Netflix app (https://www.apkmirror.com/apk/netflix-inc/netflix/netflix-6-5-2-build-28341-release/netflix-6-5-2-build-28341-android-apk-download/).

Here is my output:
Enter your choice:1

Please enter the full path to your APK (ex. /foo/bar/pineapple.apk):
Path:/root/Downloads/com.netflix.mediaclient_6.5.2_build_28341.apk
INFO - Unpacking /root/Downloads/com.netflix.mediaclient_6.5.2_build_28341.apk
INFO - Zipfile: <zipfile.ZipFile object at 0x7f4665696990>
INFO - Extracted APK to /root/Downloads/com.netflix.mediaclient_6.5.2_build_28341/
/root/Downloads/apktool/AndroidManifest.xml
Traceback (most recent call last):
  File "qark/qarkMain.py", line 1284, in <module>
    nonAutomatedParseArgs()
  File "qark/qarkMain.py", line 465, in nonAutomatedParseArgs
    main()
  File "qark/qarkMain.py", line 664, in main
    common.manifest = minidom.parseString(common.manifest).toxml()
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27, column 292

Thanks and BR schniggie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants