3

It's about an .apk (Inbox by Gmail) that requires Android 4.1 and up.
Trying to install it in my phone which has Android 4.0.4
it shows that "there is a problem parsing the package".
I have enabled installing .apk from sources that aren't from the Play Store on my phone.

As I've read this is caused because the .apk requires a different device API level than that of the phone.

Is there a way to convert/repack the .apk so that it can be installed to my phone?

  • It'd be easier to flash a new version of android than to make something work on an older OS. – Seiyria Apr 27 '15 at 17:05
7

Short answer: No.

Simple repacking cannot solve the compatibility problem. If an app requires "at least Android XX", that usually means it needs some conditions not met before it. There are new OS features introduced with each Android version, libraries get additional APIs/features, etc. – nothing of that can be solved by "repacking" the installation package. If the (required) functionality cannot be provided by the Android version your device is running, the app cannot work (correctly) – even if you were able to install it.

  • 1
    That's also true, @Falco (the developer is free to set min and max API level to what he wants, basically). But even then, simple repacking wouldn't do the trick. Please note the error the OP included: there is a problem parsing the package – definitely pointing to a "newer feature being addressed" which the currently used Android version doesn't know about (or, of course, a broken package – in which case "simple repacking" couldn't solve the issue either). – Izzy Apr 27 '15 at 11:35
  • 2
    @Falco I can agree to that, yes. But this way you'll always risk having an "only partly working app" – you never can say what will work and what not. You risk force-closes and data loss as well. This is not something I'd recommend the "standard user" or even "novice" – though it might be a valid option for an "experienced user" to play with and, if it works out, offer the "reworked package" along with hints and warnings (what sometimes is done on XDA). Such an "experienced user" wouldn't ask this question, obviously – which is why I didn't include that with my answer :) – Izzy Apr 27 '15 at 11:57
  • 1
    Note as well that "repacking" would void the package signature (you'd have to sign it with your own key), and thus not be "compatible" with a previously installed .apk (it would refuse update – you'd have to uninstall first) or with a later "official update" that might be available for your Android version (admitted, an unlikely update – but things happen). Again nothing a "novice" could easily handle (not if the data should be kept, at least). – Izzy Apr 27 '15 at 12:00
  • 1
    Just for reference, I just used apktool to decode the apk, then edited in the apktool.yml file the line minSdkVersion: '16' (Android 4.1) into minSdkVersion: '15' (Android 4.0.3/4.0.4) and rebuild it using apktool. Then I copied it back to the phone and tried to install it: No more there is a problem parsing the package". It begins the installation, but a few seconds later shows "Inbox - X Application not installed". – darkred Apr 27 '15 at 12:31
  • 1
    Confirms my suspicions :) – Izzy Apr 27 '15 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.