Install same .apk file on different Android platforms - android

Can the same android apk file be installed on different Android platforms - say, one on Intel x86 and another running on ARM? Does the .apk file need to be compiled separately with different configuration settings for different platforms?

You will build with your existing config and generate single .apk file and Multiple Apk Support feature will handle the rest.
Refer this : Multiple APK Support

Related

how to build APK files for applications developed using Flet (python)

in flutter i can build APK files for Android applications using
flutter build apk
how to build APK files for applications developed using Flet (python)?
flet currently does not have support for mobile platforms. But it will be soon.
Take a look here.

AAB file is too larger than IPA file after production build in React Native

I have been working on React-Native for 3 months. All these days I was building the app only for android platform and the size of AAB file was 36.5 MB, Today I built my app to iOS (IPA File). The size of IPA file is just 5.6 MB.
No code changes,
No new library installations,
But why both files have a huge difference in size?
Thank you!
App bundles(AAB) cannot be installed as Android apps on user devices. Instead, they are meant to be used for generating APK files for specific device configurations. Different APK files are generated for different CPU architectures by the Play Store, the huge size difference may be because it contains information that is required to create APK for multiple device configurations.
You can use bundle tools to generate APKs locally https://developer.android.com/studio/command-line/bundletool

How do I make A Windows Computer recognize an APK File without installing Bluestacks?

APK Files aren't recognizable files like executable files; they won’t run on a double click. That's why we need a player/emulator like Bluestacks/Andy/Droid to play them.
So what should I do to extract all the info about an APK without installing it and running it on a device?
You can get some limited information about an APK by extracting it. An APK is essentially a zip file containing manifest, resources, assets and classes which together make up the application. Change the .apk' extension to.zip` and extract it using built-in Windows tools. Note that most contents won't be human-readable.
APK-Info
APK-Info is a Windows tool to get detailed info about an apk file.
Allows you to view:
application icon
package name
name (in all languages)
version
build number
the minimum, maximum, and target version of the SDK (Android)
supported density (DPI) and screen size
architecture (ABI)
supported textures
permissions
features
signature
OpenGL ES version
whether app supports Android TV, Wear OS, and/or Android Auto
locales
a variety of hashes (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)
and a lot of other information
Using
You can open the APK file in APK-Info using one of the following methods:
Start APK-Info, and then select the APK file in the dialog.
Open the APK file by clicking on the open button in the dialog.
Drag the APK file to APK-Info.exe or its shortcut.
Drag the APK file into the running APK-Info window.
Open the APK file by double-clicking, after installing APK-Info, as a program for opening APK files (via explorer or attached .cmd file).
https://github.com/Enyby/APK-Info

Produce an APK for multiple architectures for Qt projects

In 3d party APK files I notice there are folders for different architectures - armv7, arm64, x86, mips - so a single APK works for multiple architectures, supported by Android.
However, I don't seem to find a way to do that with Qt projects. I have a project that targets multiple architectures, but I can only produce an APK for an architecture at a time, only for the currently active project kit.
Is it possible to produce such a muti-arch APK for a Qt projects?
I have found a work-around for this problem. I came across this problem when my Qt application had to comply to Google's requirement of providing 64 binaries for 64 bit architecture. Although this process is not totally automated but it works.
1- Build your APKs for different architectures(in my case armeabi-v7a and arm64-v8a)
2- Open all APKs for editing with any compression/decompression software(I used the default provided by Ubuntu. On windows you can use WinRaR)
3- Go to "lib" folder and copy the folder named with the architecture (arm64-v8a, armeabi-v7a, etc.)
4- Consolidate all the copied folders from step#3 into the lib folder of any one APK. Now we will use this APK to move forward
5- Go to the folder named "META-INF" on APK root and delete files *.RSA and *.SF
6- Now close the APK file.
7- Go to https://github.com/patrickfav/uber-apk-signer and download the Jar file. You can use this tool to zipalign and sign your package again. Use the jar as follows.
java -jar uber-apk-signer-1.0.0.jar --apks ./android-build-release-signed.apk --ks android_release.keystore --ksAlias your_certificate_alias
Now you can publish the final APK to Google Play. Cheers!

How can I publish to play store the x86 and ARM apks of my cordova-crosswalk app?

My app is developped/published with Cordova and Crosswalk. Crosswalk generates an apk for ARM cpus and another one for x86 cpus.
At the moment, when I upload my ARM apk to the play store and then try to upload the x86 one, it prevents me from doing so and display a message that says that I cannot have two apk with the same version code.
It seems it's possible to upload on the play store multiple apk files for the same version of an application byt filtering the devices targetted by each apk file.
However, it seems to require the use of an "Application.mk" file that the Cordova project structure doesn't seem to have by default.
How can I include an Application.mk file within my apks so that both the ARM and the x86 with the same version code will be uploadable to the Play store ?
It's absolutily possible.
This feature receve the name of: Multiple APK
You don't need to use the 'Application.mk'
The process is simple:
In Developer Console, switch to Advanced Mode (click the Switch to advanced mode button at the top right of the APK tab - note that you must have uploaded at least one APK for that button to appear)
Upload the two APK
Publish!
There's some rules to use multiple APK, but if you use the files generated by cordova crosswalk, you have nothing to worry about.
The problem that you described with version code, happens beacuse each app must have a different version code. In my case, I use ionic framework (extends cordova) and in the build process, it generated a diferent version code por each apk, so I had no problem. If it not happens for you, you can try to change de android:versionCode directly on the AndroidManifest.xml file.
Here is how my manifest looks like:
<manifest
android:hardwareAccelerated="true"
android:versionCode="102"
android:versionName="0.1.2"
package="br.org.yyyyyyy.xxxxxxxxxx"
xmlns:android="http://schemas.android.com/apk/res/android">
In my case, the arm7 apk, the
android:versionCode="102"
And in x86 apk the
android:versionCode="104"
References:
Android Multiple APKs DOC
Maintaining Multiple APKs DOC
I`m doing simple way. Example your main v code is 102, so you build first arm with 102 v code, and upload. Until upload runs, you can go change v code in manifest and in build grade to 103 and build another one x86. Easy and simple.
I think things have changed in the past year. I used the same version code and uploaded both apks (one at a time - in the normal way). Google Play auto-detected that they were targeted to different native platforms, and allowed both to be entered into production.
The cordova-crosswalk doc instructs how to make an apk that works for both arm and x86. The problem is that it makes a huge apk.
If you really want to make two apks, you can try (sorry not tested yet) to create the Application.mk file in the folder platforms/android/jni
For arm you'd put this line in Application.mk :
APP_ABI := armeabi armeabi-v7a
And for intel x86 :
APP_ABI := x86
And you have to change AndroidManifest.xml to have a different version for each platform (following the instructions in the link you provided).
Be carefull, if you run cordova build android again, it will probably replace all the content of platforms/android, and your changes will be lost.
To build the project use
platforms\android\cordova\build.bat -release
instead of
cordova build android --release

Categories

Resources