1

I have an early build of CM12.1 running on my ZenFone 2 and I'm working on trying to get the ASUS camera app to work with it, however when I try to install the apk, it fails.

adb install gives me Failure: [INSTALL_FAILED_DEXOPT]. I was wondering if there was any way I can "hack" the apk in order to force it to install the app anyway, instead of throwing an error.

  • Even if there were, you wouldn't benefit from that. "DEX" stands for "Dalvik EXecutable"; if that cannot be created, the app won't run. If you wonder why that happens on Android 5.x which is using ART instead of Dalvik, that might be due to the fact the first steps of building the ART code are pretty similar to those used on Dalvik (for compatibility reasons; see Wikipedia: To maintain backward compatibility, ART uses the same input bytecode as Dalvik, supplied through standard .dex files as part of APK files …) – Izzy Jul 23 '15 at 16:29
  • camera is usually a system app ,you need to push it to /system/priv-app via adb push command – lord-ralf-adolf Jul 23 '15 at 17:30
  • @lord-ralf-adolf Why /system/priv-app and not /system/app? – Firelord Jul 23 '15 at 20:47
  • @Firelord well since kitkat ,not all apps on system partition have the system level permission ,for example no app can access WRITE_SECURE_SETTINGS if it is not under /system/priv-app ,stock cameras apps needs that permission and more so it have to be putted there ,priv-app was created for manufacturers so they can limit permissions to pre-installed apps ,putting apps under /system/app will prevent user from deleting them and at the same time no extra permissions will be granted for that app – lord-ralf-adolf Jul 23 '15 at 21:30
  • 1
    of course @Firelord here for the WRITE_SECURE_SETTINGS read it in the official android devlopers >> developer.android.com/reference/android/… for the /system/priv-app and system/app ,I red it somewhere ,I forgot where ,but I use it all the time and when I put my apps under /system/app I can't get the rights to use system level permissions – lord-ralf-adolf Jul 23 '15 at 23:37
1

That type of issue is mostly often caused by an app going over something called a "Dex limit", which has to do with the external libraries an app uses. If you're interested, there's an explanation over on Stack Overflow.

This type of problem has been solved for some people by wiping the device and reflashing.

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.