DexPatcher / dexpatcher-gradle-tools

[DEPRECATED] Locally-installed tools required by the DexPatcher Gradle v1 plugins
https://dexpatcher.github.io/
10 stars 9 forks source link

AndroidManifest Inheritance Issues #2

Closed gambogo closed 8 years ago

gambogo commented 8 years ago

Hi Lanchon,

I can't re-open previous issue so i created new issue relate to AndroidManifest and i need your favour.

In manifest, i recognized that out patched apk doesn't inherit receiver tag from original manifest, i knew that because i couldn't receive Push Notification, Login Google Account. I declared tag and Launcher Activity tag like your example but it's not working with google service.

So i have 2 questions:

  1. How can i fully inherit from the original manifest including receiver intent-filter tags ?
  2. When compiling many warning showing, is it causing the inherit issue application attributes ?

Thank you so much

Log warning:

Warning: /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:15:5 Warning: Element uses-permission#android.permission.ACCESS_NETWORK_STATE at patched-app:source:unspecified:15:5 duplicated with element declared at patched-app:source:unspecified:13:5 Warning: /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:17:5 Warning: Element uses-permission#android.permission.INTERNET at patched-app:source:unspecified:17:5 duplicated with element declared at patched-app:source:unspecified:12:5 Warning: /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:19:5 Warning: Element uses-permission#android.permission.INTERNET at patched-app:source:unspecified:19:5 duplicated with element declared at patched-app:source:unspecified:17:5 Warning: /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:20:5 Warning: Element uses-permission#android.permission.ACCESS_NETWORK_STATE at patched-app:source:unspecified:20:5 duplicated with element declared at patched-app:source:unspecified:15:5 Warning: /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:21:5 Warning: Element uses-permission#android.permission.INTERNET at patched-app:source:unspecified:21:5 duplicated with element declared at patched-app:source:unspecified:19:5 Warning: /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:22:5 Warning: Element uses-permission#android.permission.ACCESS_NETWORK_STATE at patched-app:source:unspecified:22:5 duplicated with element declared at patched-app:source:unspecified:20:5 /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:15:5 Warning: Element uses-permission#android.permission.ACCESS_NETWORK_STATE at patched-app:source:unspecified:15:5 duplicated with element declared at patched-app:source:unspecified:13:5 /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:17:5 Warning: Element uses-permission#android.permission.INTERNET at patched-app:source:unspecified:17:5 duplicated with element declared at patched-app:source:unspecified:12:5 /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:19:5 Warning: Element uses-permission#android.permission.INTERNET at patched-app:source:unspecified:19:5 duplicated with element declared at patched-app:source:unspecified:17:5 /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:20:5 Warning: Element uses-permission#android.permission.ACCESS_NETWORK_STATE at patched-app:source:unspecified:20:5 duplicated with element declared at patched-app:source:unspecified:15:5 /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:21:5 Warning: Element uses-permission#android.permission.INTERNET at patched-app:source:unspecified:21:5 duplicated with element declared at patched-app:source:unspecified:19:5 /Users/gambogo/Desktop/Debugging/1dexpatcher/BattleMod/patched-app/patched/build/intermediates/exploded-aar/patched-app/source/unspecified/AndroidManifest.xml:22:5 Warning: Element uses-permission#android.permission.ACCESS_NETWORK_STATE at patched-app:source:unspecified:22:5 duplicated with element declared at patched-app:source:unspecified:20:5

gambogo commented 8 years ago

Here is my manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mod.myapp"
    xmlns:tools="http://schemas.android.com/tools">

    <application>

        <activity android:name="my.app.id">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>
Lanchon commented 8 years ago

hi,

the proper name -for when you google- is not "manifest inheritance", it is "manifest merging".

1) "i recognized that out patched apk doesn't inherit receiver tag from original manifest, i knew that because i couldn't receive Push Notification, Login Google Account."

if you want to debug a problem with the manifest, then LOOK AT THE MANIFEST. don't just guess what's wrong because push is not working. there are many reasons why google services can be failing. in the build intermediates directory you'll find the result of manifest merger. look at that, and debug it if it has issues.

2) in order to do manifest merging you need to study how it works. this is part of android, read here:

http://developer.android.com/tools/building/manifest-merge.html http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger

in particular pay attention to this: http://developer.android.com/tools/building/manifest-merge.html#markers-selectors


so...

it looks like you might be having two problems: -signing with the wrong key (also make sure you build Release) -not merging the manifests correctly

Lanchon commented 8 years ago

btw, even if the issue is closed, you can comment again. and i'll get the messages.

i can reopen it if needed.

gambogo commented 8 years ago

ok i will debug base on your answers