When my server gaves apk file to user, I need to put some values In this file, for j2me platform I use JAD file, and put my values there:
MY_KEY: SomeKeyValue
MY_KEY2: SomeKeyValue2
When j2me application starts on device, I can access this values through System.getProperty.
How can I do the same on android platform?
How can I do the same on android
platform?
You cannot "do the same on android platform" for applications distributed through the Android Market. An APK file is digitally signed and cannot be modified once signed and uploaded to the Market.
You mention "When my server gaves apk file to user", suggesting you are not using the Market. In that case, when the user requests the APK:
Create a copy of your project directory (with compiled classes)
Modify an XML resource (res/xml/) with the data you want for the user
Use Ant to package and sign the APK file using the SDK tools
Serve the result
I do not know of anyone doing this, so I cannot point you to any code that implements the technique.
Related
We have a situation that is requiring me to create a stand-alone APK that will install media files only, that can be access by other system software. On this platform, there are no concerns for file access. I only need a method for bundling the media files into an APK, so that deployment would be simple
APK stands for Android Application Package. There should be at least one activity if you would like to publish it on Google.Play.
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
Let's say I have a Cordova application with an id of com.StackOverflowExample.MyQuestion, which I created with Cordova 3 using the CLI (cordova create). I have added iOS and Android platforms for my app, and have submitted the app to Apple and to Google Play. Now, however, after submitting my app to Play, I seem to have misplaced my password for the keystore I used to sign my APK file. I have tried everything, and there is no way I will recover it.
Because Google Play does not allow me to sign a subsequent APK submitted to Play under the same app ID as a prior APK signed by a different keystore, I know I need to create a new app ID and start over in Android. I realize this will require my users to download a new application, but I have no other choice at this point.
What I would like to avoid, is having this problem spill over into Apple, where I have already created all of my certificates, provisioning profiles, keys, signing requests, etc. and uploaded an IPA with a bundle identifier the same as the app ID of the first APK I submitted to Google Play.
By default, when using the CLI, Cordova adds whatever platforms you specify using a single app ID, which you supply when you run cordova create.
What I'd like to know is: Is it possible, when running cordova platform add to add a new platform under a custom app ID, and, as a result, to have different platforms have different app IDs within the same Cordova application?
This is now built into CLI (finally):
In you your config.xml file-
Example:
<widget
android-packageName="com.example.android"
ios-CFBundleIdentifier="com.example.ios">
Source:
https://github.com/apache/cordova-common/blob/master/src/ConfigParser/ConfigParser.js#L105-L113
Yes, you can do that. There is more option for them, it's depends on how do you build your Android application (how do you create your apk).
If you create the apk using cordova, first you have to decode your apk:
apktool d <apkname>.apk <directory to decode>
e.g:
apktool d your.apk decodedir
Change the package="com.StackOverflowExample.MyQuestion" string in AndroidManifest.xml.
Encode your apk:
apktool b <directory> <new apk name>
e.g:
apktool b testdir/ your.repacked.apk
If you create the apk using any Android developer tools, you can change the id in the appropriate xml file (AndroidManifest.xml), and build the app.
Hi i am new to android development.
I am creating one application. I need to send sample application to client for testing purpose.
In iPhone development we can send .ipa file to client using TestFlightApp. Is there any way to do this similar way for Android application testing.
Please help me in this issue.
Thanks in advance
each time you build your application, an apk file is created in your project's bin folder. you can use that file for testing purposes
Right click on your application project folder
Scroll down to Android tools
click on : Export as signed Android application
Use the debug key located on your sdk folder to sign the app
,the password's key : android
and you will get a debug signed apk ready to install on any device .
To keep track of your apks you may create a string variable and use it as build tag so you don't get confused by multiple apks .
I'm doing so on my project , you can also create an unsigned apk but I don't know if you will be able to install it on a real device .
Some use maven to build the apk but it's more complicated .
Each and every android application is bundled as an apk file. When an apk file is installed different entites (files) of the application are stored in different parts of the system. For example i have found that real player stores its files in the following places of the android file system
/data/data/com.real.RealPlayer
/data/app/com.real.RealPlayer-1.apk
/data/dalvik-cache/data#app#com.real.RealPlayer-1.apk#classes.dex
/data/system/packages.list
/data/system/packages.xml
/data/data/com.sec.android.app.twlauncher/databases/launcher.db
How can i do this for every installed application on my phone/emulator?? Is it the right way to parse apk file and find the places where all the parts of the app are stored?? Any ideas?
On normal non-rooted phones an application can see only its own files, due to security restrictions.