Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
apktools and admob: not working #623
Original issue 513 created by euquiq on 2013-09-10T15:37:50.000Z:
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
in its AndroidManifest.xml
What is the expected output? What do you see instead?
After decompiling, the AndroidManifest.xml shows:
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode"/>
Notice the missing "|screenSize|smallestScreenSize"
What version of the product are you using? On what operating system?
Windows 2003, I tried Apktools 1.5.1 and 1.5.2 ... currently I am trying with apktools.jar beta version 5, just in case, but every version has the same behavior.
Please provide any additional information below.
As a result, the recompiled APK wont show admob ads, but instead the dreaded red box stating that there is something missing in the AndroidManifest.xml
After decompiling, I also tried to manually edit the AndroidManifest.XML and add the "|screenSize|smallestScreenSize" but then when recompiling, the apktool throws the following error:
Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize')
Comment #1 originally posted by connor.tumbleson on 2013-09-10T16:01:34.000Z:
The "String types" isn't an apktool error. That is AAPT. That makes me think that there is a newer Admob SDK that maybe you aren't using.
Either way smallestScreenSize and screenSize I see http://developer.android.com/guide/topics/manifest/activity-element.html#config there, so it shouldn't be stripping them.
Can I have the apk? If not, just hook the admob SDK into a test apk for me and attach that. I'll take a look this weekend.
Comment #4 originally posted by connor.tumbleson on 2013-09-14T15:02:46.000Z:
and examining the manifest, I get this: http://pastebin.com/hssTyncv
Looks fine to me. Though, I am on Ubuntu 13.10. I'll go check on a Windows computer.
Comment #6 originally posted by connor.tumbleson on 2013-09-14T15:11:45.000Z:
http://pastebin.com/6G1cKtqP (Win8 decompiled)
Comment #7 originally posted by connor.tumbleson on 2013-09-14T17:48:35.000Z:
Comment #8 originally posted by euquiq on 2013-09-14T18:59:09.000Z:
And hence, when I recompile it, the admob ads are not showing :( just as before.
C:\android\webviewer\prueba>apktool d webviewer.apk
Comment #10 originally posted by euquiq on 2013-09-14T20:33:28.000Z:
Because of your last comment, I did a disk-wide search of apktool.jar and found it inside c:/windows ... I replaced THAT apktool.jar and things started working OK ! Your 2.06b is working as a charm. This seems to have been the problem with the earlier versions I tried too.
Mistery solved. Sorry to use up your time like this. Thanks !
Comment #11 originally posted by euquiq on 2013-09-14T20:40:55.000Z:
Comment #12 originally posted by connor.tumbleson on 2013-09-18T02:29:22.000Z:
While this would be helpful to debug problems, I don't really want to add anymore output to apktool at all. Unless its useful to have like
Apktool x.x.x decoding filename....
(I've asked the IRC channel. I'll gather opinions. If you see a commit about it, I merged it).