Re-sign APK to prevent updating - crashes "divide by zero" I'm using an app that has been updated, but doesn't work on my phone on the current version. So I'm currently using an older one. But of course it always shows up with an update in the PlayStore.

Now I've found one workaround to be signing the apk with my own key. Therefor, it would not be recognized anymore by the PlayStore. It is a banking app (code verification). The app at first seems fine. Unfortunately, when I try to scan the activation code, the self-signed version crashes. Via adb logcat it throws this error:

java.lang.ArithmeticException: divide by zero

Is this some kind of security mechanism inside the app to check whether the certificate is the correct one? Shouldn't it be possible to alter this check? Or is there a way to trace with action causes the divide by zero exception?
Dude, just tell Google Play not to automatically update the application.

Given that this is a banking app, I would be VERY surprised if there was not some kind of anti-tamper mechanism in place, and this could be a part of it. Of course, this could have been a basic coding screw-up too. From the information you provide, we simply do now know.

Apktool might give you more information as to what is going wrong.