Fasthub: App Icon broken since v2.5.1

Created on 28 May 2017  ยท  34Comments  ยท  Source: k0shk0sh/FastHub

  • FastHub Version: 2.5.1 & 2.5.3
  • Android Version: n/a
  • Phone Model: n/a

Since v2.5.1, app icons are broken. Seems the Manifest got slightly messed up:

application-icon-120:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-160:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-240:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-320:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-480:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-640:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-65534:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-65535:'res/mipmap-anydpi-v26/ic_launcher.xml'
application: label='FastHub' icon='res/mipmap-anydpi-v26/ic_launcher.xml'

Same section from v2.1.0 (last version where it was OK):

application-icon-120:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application-icon-65534:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-65535:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application: label='FastHub' icon='res/mipmap-mdpi-v4/ic_launcher.png'

Note: While it was working, the icons were .png. It stopped working when they were specified as .xml (which is no graphic).

Maintenance

Most helpful comment

I've left the notification marked in my inbox. If the update is through, I plan to let you know. I hopefully don't miss that when everything works out fine :stuck_out_tongue_winking_eye:

All 34 comments

mipmap-anydpi-v26 is for the Adaptive Icon, the other folders contain the proper file.

The files are there, just the Manifest points to the XML instead of the PNG โ€“ which causes e.g. fdroid-server to fail extracting them.

@IzzySoft The manifest can't point to a specific file extension. As long as you're not compiling on v26 ( O ), you'll be served PNG files.

Also, we dropped support for F-Droid in 2.5.0.

I've just checked the file attached to the resp. releases/ with aapt d badging (that's what above output is from). Not sure what you mean by saying you "dropped support for F-Droid"; I was speaking about this one :wink:

@IzzySoft could you try with 2.5.3 and let me know if its still exists?

_Sent from my Htc m8 using FastHub_

@k0shk0sh I'll let you know when I'm back home this evening. Until then, my auto-updater should already have grabbed it and reports are in my Inbox :innocent:

OK, no alert today. But then, 2.5.3 was already pulled it yesterday (and I had it corrected manually), so it wasn't replaced. Checking the 2.5.3 file currently attached with aapt d badging (which is what fdroid-server does) I'm afraid it would yield the same issue still, as the icon file entries still point to .xml files, which fdroid-server obviously cannot deal with:

application-icon-120:'res/mipmap-anydpi-v26/ic_launcher.xml'

(fdroid-server then tries direct image operations on those, which for obvious reasons does not work).

aapt d xmlstrings FastHub-2.5.3.apk res/mipmap-anydpi-v26/ic_launcher.xml doesn't turn up any image files either, so I wonder how that should work anyway. Haven't seen that with any other APK, either: there are almost 300 apps in my repo currently, none of them has XML in that place.

well idk @IzzySoft tbh, it seems working for my side, what I meant is that the app launcher icon is showing.

Tbh2, I haven't it installed โ€“ I just noticed the fdroid-server update script failed extracting them, and thus the app showed up w/o icon in the repo.

So we have probably 3 choices: 1) blaming it on the fdroid-server (asking them to deal with this case โ€“ for which we might need to provide some background details, which probably is something like this?), 2) changing the application-icon* entries to point to .png files again, or 3) ignoring the issue altogether (in which case I had to switch to manual updates of your .apk to my repo as I'd have to manually fix the issue each time, which of course wouldn't be that regular anymore as the current ~24h after your releasing it).

As you can see from image below, it will by default point to the png however on Android O it will take the xml file, I guess fdroid needs to deal with this and not us (including you of course).

So its really up to you now to either close this issue, keep it open until Fdroid migrates to android O.

screen shot 2017-05-30 at 8 42 08 pm

Respected, of course (though I had hoped you'd switch back to declaring the .png for the application icon). I might try how the aapt of Android-O reacts on it (though O isn't even released yet), as that's what is currently used to gather those details.

Apart from that, I know that the F-Droid team is on the way to switch away from aapt in favor of some Python library. Still, both would return the .xml here, so the question is to deal with that in a proper way โ€“ however it was obtained. Do you know of a simple way to convert that XML into some PNG? That would allow me creating a work-around at least, until it's finally fixed. On my search for such a converter, I only found this SO post (dated 12/2016, i.e. 5 month ago), which basically says "Application launcher icon should be in png format" โ€“ and that there is no easy automated way to convert. On the other hand, there's svg2png which allows a developer to maintain the application icon in SVG format โ€“ and create the necessary .png files at compile time :wink:

@JediBurrell any idea on this?
@IzzySoft another thing I could think of, is separate flavor for this case that targeting 25 instead of 26. I'll see about it later however I still strive for better way.

_Sent from my Htc m8 using FastHub_

Kosh, I of course accept whatever decision you make. I just need to see to make the best of it. If it stays with those XML icons, I'd need to find a way to convert them โ€“ and adjust my framework to automatically deal with it.

@IzzySoft btw, there will be another problem which is the signing key, as of 2.5.+ the signing is different from what it used to be, because now i'm relying on a public key to sign & then google play store will sign it with my private uploaded key store in their server, that's why I have uploaded the public key store in here :D .. It definitely has to be a separate flavour, I'll do that and hopefully can release very soon.

Oops โ€“ I wasn't aware of that! Yes, a separate "flavour" would be great. Whenever it's ready and available, let me know (e.g. by updating this issue). Apart from that: would you want me to "reset" to the last version before 2.5 (to avoid confusion on the users' end), and set the update mode to manual? As soon as the "new flavour" is available, I then could turn auto-updates on again.

@IzzySoft Hi Izzy, sorry to get back late at this, well I tried to do the flavors, however I'll end up doing the same thing I did which because of it I dropped the Fdroid support as it was hard maintaining two files, i'm sure you know what I meant, there are some stuff that are being used that require android 26 and it seems like that's the new way of how Android is generating new apks since they now support split apks. i'm left speechless on what to tell you more. any ideas from your side?

@IzzySoft what I did, I have uploaded new apk base on old signing configuration. so to avoid your users to uninstall & install the app. ;)

@k0shk0sh I'm no dev, so I don't have that much ideas (and btw, the latest .apk still has the icons point to XML). I thought maybe just "targeting" a lower version might take care for that โ€“ but that's obviously not the case (the app targets 5.0). Maybe checking on StackOverflow for advice? The Stack Exchange network is always a very helpful resource.

If I understand correctly, you want to have Adaptive Icons. That page describes two approaches, only the second results in ic_launcher.xml if I'm right.

Meanwhile thanks for (hopefully) having solved that signature problem. I shall then better remove the two previous versions which have a different sig?

@k0shk0sh Just to let you know: I've opened an issue on fdroidserver on the topic. Let's see where that brings us.

@IzzySoft glad to hear that :)

_Sent from my Samsung SM-G950F using FastHub Debug_

@IzzySoft Hi izzy, any news on this? I'll be releasing new version tomorrow that officially supports 26.

_Sent from my Samsung SM-G950F using FastHub Debug_

I'll have to fix it manually then again. The issue was taken by Fdroid (with them detecting only then how much they are already affected themselves โ€“ so they have an interest to fix it), but it's still WIP. Oh, fixed a week ago. But there are some other issues preventing me from updating to that. Let me see whether I can apply that patch manually meanwhile, should be easy.

(Edit: Patch backported to my local installation. Tomorrow we'll know whether it works :wink:)

Thanks for caring and forewarning!

@IzzySoft nice, thanks for the detailed info @IzzySoft .

Thanks for caring and forewarning!

No problem about that, you were the first to contribute to FastHub and that's something I can't forget ๐Ÿ˜‰

I've left the notification marked in my inbox. If the update is through, I plan to let you know. I hopefully don't miss that when everything works out fine :stuck_out_tongue_winking_eye:

I'll remind you if I were free by that time :)

@IzzySoft 4.0.0 is released and uploaded to releases.

Thanks! Unfortunately, the backported patch didn't catch the correct icon. Checked it: they only considered the res/drawable* directories, while the ic_launcher.png files are in res/midmap* (not only for FastHub, so not your fault). So I patched the patch (LOL) and hope it will work out next time. For this time, manual intervention did the job once again (for two apps today).

If you could drop me another note with the next release (either shortly before or after), I'd very much appreciate that! Otherwise I'll only notice if it fails again (no harm done, just no icon there then) โ€ฆ

@IzzySoft 4.0.1 was released after 4.0.0 (about an hour apart)

Yes, that was the one processed. Hm, that means I could try with 4.0.0 to see if my "patched patch" does its job? Good point.

TestTestTest

OK, patched the patched patch once more. Still throws a warning I cannot explain (about a valid PNG it cannot identify as such), but all icons are found fine \o/ :tada:

Mission accomplished I'd say โ€“ still waiting for the next auto-update to approve that :stuck_out_tongue_winking_eye:

Thanks for the pointer, @yakov116 !

PS: ApkSigner reports some issues with the 4.x .apk files (just noticed when I tried to port my patchPatchPatch back to the latest FdroidServer code and used your APKs for testing):

WARNING: META-INF/CHANGES not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/LICENSE not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/README not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/app_release.kotlin_module not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/firebase-database-kotlin_release.kotlin_module not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/info.xml not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/jdom-info.xml not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/kotlin-runtime.kotlin_module not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/kotlin-stdlib-jre7.kotlin_module not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/kotlin-stdlib.kotlin_module not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/com.google.protobuf.GeneratedExtensionRegistryLoader not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.

Just a note, I thought you might wish to check.

The 4.0.1 apk is wrong. I'll update it after a while

_Sent from my Samsung SM-G950F using FastHub_

@IzzySoft hello Izzy, any news on this?

_Sent from my Samsung SM-G950F using FastHub Debug_

No more "manual corrections" necessary. F-Droid still yields a warning about a missing icon โ€“ but ends up having the correct one linked, so I simply ignore the warning. FastHub 4.0.2 and 4.0.3 seem to have been pulled from here and added to my repo just fine, and I don't remember any "error report" in addition to the one above โ€“ so I'd say "all green".

Though for cleanliness we should address those warning (I currently lack the time for that) โ€“ but that's nothing really affecting this issue anymore :wink:

Thanks for the heads-up and interest in how things have proceeded! I'd say feel free to close this issue (which I consider "solved by patching fdroidserver" in the master repo there, so it should stick).

@IzzySoft awesome, glad to hear that Izzy.

_Sent from my Samsung SM-G950F using FastHub Debug_

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DroidFreak32 picture DroidFreak32  ยท  3Comments

failex234 picture failex234  ยท  3Comments

Janrupf picture Janrupf  ยท  3Comments

MartinX3 picture MartinX3  ยท  3Comments

camillo777 picture camillo777  ยท  3Comments