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

[BUG] Attributes are garbled in Android Manifiest and other XML res files. #3006

Closed
Jenner369 opened this issue Feb 25, 2023 · 2 comments
Closed

Comments

@Jenner369
Copy link

Information

  1. Apktool Version 2.7.0
  2. Windows 10
  3. APK Pure: https://m.apkpure.com/es/directv-go-i-l/com.directv.dtvlatam/download/2040000126-APK

Stacktrace/Logcat

Include stacktrace here
I: Using Apktool 2.7.0 on DGO_5.1.0_Apkpure.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\myuser\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
[Fatal Error] :2:44: Element type "manifest" must be followed by either attribute specifications, ">" or "/>".
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory

Outputted Manifest:

<manifest android:versionCode="2040000115" ="5.1.0" ="32" ="12" package="com.directv.dtvlatam" platformBuildVersionCode="32" platformBuildVersionName="12"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission ="android.permission.INTERNET" />
    <uses-feature ="android.hardware.touchscreen" ="false" />
    <uses-feature ="android.software.leanback" ="true" />
    <uses-feature ="android.hardware.screen.portrait" ="false" />
    <uses-permission ="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission ="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission ="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission ="android.permission.WAKE_LOCK" />
    <uses-permission ="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission ="com.google.android.gms.permission.AD_ID" />
    <uses-permission ="android.permission.FOREGROUND_SERVICE" />
    <uses-permission ="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
    <uses-permission ="android.permission.RECEIVE_BOOT_COMPLETED" />
<application ="@style/2131952562" ="@string/app_name" android:icon="@mipmap/ic_logo" ="x.StreamingResponse$Companion" ="true" ="@mipmap/ic_logo" ="true" ="@drawable/2131230832" ="x.setMaxElementsWrap">
        <activity android:name="com.directvgo.feature.tv.splash.SplashActivity" android:exported="true" ="landscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.directvgo.feature.tv.login.WelcomeActivity" android:exported="false" />
        <activity android:name="com.directvgo.feature.tv.login.LoginActivity" android:exported="false" ="true" />
        <activity android:name="com.directvgo.feature.tv.splash.UpdateActivity" android:exported="false" />
        <activity android:name="com.directvgo.feature.tv.settings.ExitActivity" android:exported="false" />
        <activity android:name="com.directvgo.feature.tv.settings.SubSectionActivity" android:exported="false" />
        <activity android:name="com.directvgo.feature.tv.home.PageActivity" android:exported="true" />
        <activity android:name="com.directvgo.feature.tv.home.ExitActivity" android:exported="true" />
        <activity android:name="com.directvgo.feature.tv.home.collection.CollectionActivity" android:exported="true" />
        <activity ="@style/2131952564" android:name="com.directvgo.feature.tv.player.PlayerActivity" android:exported="false" ="landscape" />
        <activity android:name="com.directvgo.feature.tv.pdp.PdpActivity" android:exported="false" />
<meta-data android:name="a" android:value="" />
        <activity android:name=".cast.CastExpandedControllerActivity" android:exported="true" ="singleTask" ="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
            <meta-data android:name="android.support.PARENT_ACTIVITY" android:value="com.directvgo.feature.home.MainActivity" />
        </activity>
        <service ="x.FootballStatsView$initView$lambda-2$$inlined$observeGabaViewModel$default$1" android:exported="false" ="true">
            <meta-data ="com.google.firebase.components:com.google.firebase.perf.ktx.FirebasePerfKtxRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.crashlytics.ktx.FirebaseCrashlyticsKtxRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.analytics.ktx.FirebaseAnalyticsKtxRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.messaging.ktx.FirebaseMessagingKtxRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.ktx.FirebaseCommonKtxRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.perf.FirebasePerfRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.crashlytics.CrashlyticsRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.remoteconfig.RemoteConfigRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
            <meta-data ="com.google.firebase.components:com.google.firebase.abt.component.AbtRegistrar" ="com.google.firebase.components.ComponentRegistrar" />
        </service>
        <provider ="x.HeadToHeadUiMapper$mapFrom$1" android:exported="false" ="com.directv.dtvlatam.firebaseperfprovider" ="101" />
        <service ="x.access$installExtensions" android:exported="false">
            <intent-filter ="-1">
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <receiver ="com.google.firebase.iid.FirebaseInstanceIdReceiver" ="com.google.android.c2dm.permission.SEND" android:exported="true">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </receiver>
        <service ="x.ThumbnailImage" android:exported="false" ="true">
            <intent-filter ="-500">
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <provider ="com.google.firebase.provider.FirebaseInitProvider" android:exported="false" ="com.directv.dtvlatam.firebaseinitprovider" ="100" ="true" />
        <receiver ="com.google.android.gms.cast.framework.media.MediaIntentReceiver" android:exported="false" />
        <service ="com.google.android.gms.cast.framework.media.MediaNotificationService" android:exported="false" ="mediaPlayback" />
        <service ="com.google.android.gms.cast.framework.ReconnectionService" android:exported="false" />
        <activity ="@android:style/Theme.Translucent.NoTitleBar" android:name="x.zzgg" android:exported="false" />
        <receiver ="com.google.android.gms.measurement.AppMeasurementReceiver" ="true" android:exported="false" />
        <service ="com.google.android.gms.measurement.AppMeasurementService" ="true" android:exported="false" />
        <service ="com.google.android.gms.measurement.AppMeasurementJobService" ="android.permission.BIND_JOB_SERVICE" ="true" android:exported="false" />
        <meta-data android:name="com.google.android.gms.version" android:value="12451000" />
        <activity ="@android:style/Theme.NoDisplay" android:name="x.WebSocketCapability" android:exported="false" ="com.directv.dtvlatam.NotificationProxyActivity" ="singleInstance" />
        <activity ="@style/2131952756" android:name="x.post$default" android:exported="false">
            <meta-data android:name="a" android:value="" />
        </activity>
... and more like that

There are XML files in the res folder that are missing their attribute name like that.

Exception on rebuild:

I: Using Apktool 2.7.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
[Fatal Error] :2:44: Element type "manifest" must be followed by either attribute specifications, ">" or "/>".
I: Checking whether resources has changed...
I: Building resources...
W: C:\Users\myuser\Desktop\Decompiler\myapks\.\DGO_5.1.0_Apkpure\AndroidManifest.xml:2: error: Error parsing XML: not well-formed (invalid token)
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\myuser\AppData\Local\Temp\brut_util_Jar_134506757857479403998693544342979405240.tmp, p, --forced-package-id, 127, --version-code, 2040000115, --no-version-vectors, -F, C:\Users\myuser\AppData\Local\Temp\APKTOOL7325651262541043323.tmp, -e, C:\Users\myuser\AppData\Local\Temp\APKTOOL12173834295697035743.tmp, -0, arsc, -I, C:\Users\myuser\AppData\Local\apktool\framework\1.apk, -S, C:\Users\myuser\Desktop\Decompiler\myapks\.\DGO_5.1.0_Apkpure\res, -M, C:\Users\myuser\Desktop\Decompiler\myapks\.\DGO_5.1.0_Apkpure\AndroidManifest.xml]

Steps to Reproduce

  1. apktool d .\DGO_4.5.0_Apkpure.apk
  2. apktool b .\DGO_5.1.0_Apkpure\

Frameworks

Not applicable

APK

https://m.apkpure.com/es/directv-go-i-l/com.directv.dtvlatam/download/2040000126-APK

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Doesn't work
  2. If you are trying to install a modified apk, did you resign it? -
  3. Are you using the latest apktool version? Yes
@alkeryn

This comment was marked as spam.

@iBotPeaches
Copy link
Owner

Thanks for the report. This is already exists in our backlog as two different iterations.

Closing for those.

@iBotPeaches iBotPeaches closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants