pyoncord / BunnyManager

A manager designed to install Bunny, a mod for Discord mobile apps, on non-rooted Android devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App does not report/detect MTP host being blocked by firewall, leaving the user waiting endlessly when downloading

MinekPo1 opened this issue · comments

I have an aggressive firewall installed on my android device which blocks most apps from contacting the internet.

While I did whitelist Bunny manager, MTP host was not whitelisted, which was not shown to me, I was waiting with a spinner in front of me.

What the fuck is MTP

also didn't know, Media Transfer Protocol (wikipedia, android docs), it seems DownloadManager is handled by the same app as MTP stuff ig, sorry for not including that detail.

Taking a peek into the code, it seems the error is here:

when (status) {
    DownloadManager.STATUS_PENDING, DownloadManager.STATUS_PAUSED ->
        onProgressUpdate(null)

    // [...]
}

You might want to differentiate STATUS_PAUSED from STATUS_PENDING and inform the user that their device might be preventing the download to continue. It seems that this can also happen if the user is not connected to the internet (this might be checked somewhere else, but there is probably some timing "attack" with the user loosing connection at the right time), or some not amazingly documented case which triggers "when the download exceeds a size limit for downloads over the mobile network" (does this apply in this case? I don't know)

tbh not high priority as most likely will only happen to users with a aggressive firewall who presumably would be able to figure out something is off

I also had an issue with downloading, as I use https://github.com/TrackerControl/tracker-control-android on my phone which I had to also block untrustworthy connections for system apps including Downloads (com.android.providers.downloads.ui). And for some reason the downloads initiated by Bunny Manager (most likely the connection to tracker.vendetta.rocks) just did not do anything, even though I allowed Bunny Manager unrestricted internet access. After checking out the source code I figured out that the connections went through the Android DownloadManager.

Because of that I would also really appreciate better error handling from Bunny Manager in regard to the DownloadManager calls.