I use my old phone (Redmi 6 running Android 9, MIUI 11, armv7 architecture) for teaching myself mobile programming and my new phone (Redmi 10C running Android 13, MIUI 14, aarch64 architecture) as my daily. I don't like putting my daily use phone into developer mode, and in fact Xiaomi makes it very painful to do so.
I heard that you can copy APKs from device to device so tried sharing an app I'm coding myself from my dev phone to my main phone, using Bluetooth.
When I try to install the APK I get the error
App not installed as package appears to be invalid:
Now I know APK files are ZIP archives so I checked it is a ZIP archive and it doesn't look like the file was truncated or corrupted in any way.
I went further and copied it back to my dev phone and it did install there without complaint so that to means it's not "invalid" in the usual sense.
Is this just a misleading error? Is this the standard error message that covers every APK installation problem and not just whether the APK is valid? Does it mean my two phones have different CPU architectures? Does it mean the APK is not signed? Is it some other kind of security issue? Is there a way to get more detailed information about why it failed to install?
I tried installing f-droid from an APK and that went smoothly, so it's not all APKs.
I looked into my APKs and none of them have a
lib directory and hence no architecture-specific native code. So that rules out armv7 vs aarch64 being the problem.
My APKs have no
CERT.SF files in them, which I think means that are not signed. This is my best guess.