I have used Android Studio to build my Android App. I have found numerous tutorials for generating the apk file, but now that I have done that how do I send my app to somebody? The apk file is called app-release.apk. It doesn't even show the name of my app. Can I change the name? Can I package it somehow and add an image?
The APK is the file that you use to install an app in some Android device. If you have an APK file, it is already packaged, just send it to your friend.
And yes, you can change the file name, but that will not have any kind of effect on the app, it is just changing the file name...
What do you mean by package it??
You can surely change the name by RENAMING it . And as for the icon you can add an image to the drawable folder and then set the icon for it.
The icon can be set in the ActivityManifest file. Here is how to do it--
In the android manifest file there is a android:icon just set the location of your image .
https://i.stack.imgur.com/1x30x.png
The name of the application is stored in your AndroidManifest.xml file
<application
android:label="NAME OF APPLICATION"
You can rename the .APK file to anything you like, it does not change the name of the application.
The APK file can be sent to others for installation.
The apk file is only recognized on an android system. Any other system (Windows for example) wouldn't bother trying to show the app's icon even if you set it properly in the manifest. As for renaming it, you can rename it to whatever you want as long as you keep the apk extension. The real app name that will show when installed is set in your manifest file. And packaging it? you already done that by generating the apk! However if the person receiving your app wants to install it, it has to enable "Unknown sources" in Setting > Security > Unknown sources as your application is not coming from the play store.
I am compiling a ROM from source (say CM12.1)
I have obtained the source code and am ready to build.
However I wish to add an app (say ES file explorer) as a user app and another app(say Titanium) as a system app. Also I need to copy a file to one of the system folders.
How is this done?
I dont have the source code of those apps and hence cant compile from
source.
You will have to add the source code of the app the the packages/apps folder. Remove any precompiled files that exist.
Add the android.mk file. You can copy from it from the already available apps in the packages/apps folder and customize it for your app.
Add the app name to core.mk file in build/target/product
Build the ROM and it should have your file.
In android how to get which compiled version((compiled with)(library file version)) They used in the project By using .apk file
I decompiled the apk and check it. But i can,t able know that.
In AndroidManifest.xml They didn't mentioned like "android:minSdkVersion" and "android:targetSdkVersion".That's Why i am asked this question
Thanks In advance
.apk is just a simple archive file. You can open it with WinRar for example and find the AndroidManifest.xml file inside that archive and you should have a line that starts with android:minSdkVersion and android:targetSdkVersion. The former is what's the oldest version of Android that the application supports and the latter is the target devices i.e. the version of SDK that compiled the code.
I have created build.xml in build folder. I want to create .apk file using build script.
I have used the required code from build.xml file stored under /android-sdks/tools/ant folder.
Now when I run debug target; I am getting "The system cannot find the file specified" error for target; since now it cannot find AndroidManifest.xml file under /build folder.
Can anybody tell me where can I specify path of AndroidManifest.xml for android specific ant targets?
Thanks in advance.
I'm afraid you can't, at least (still) not yet.
gettype.java (see e.g. here) doesn't check the manifest.file property, but just an internal constant:
File manifest = new File(antProject.getBaseDir(), SdkConstants.FN_ANDROID_MANIFEST_XML);
(See also this blog entry about using multiple variants of the same code base, he had the same problem with his manifest files, and needed to copy them around to overcome it.)
Is it possible to view Androidmanifest.xml file?
I just changed the extension of the apk file to zip. This zip file contains the Androidmanifest.xml file. But I am unable view the contents of Androidmanifest.xml. It is fully encrypted.
How can I view the Androidmanifest.xml file?
Yes you can view XML files of an Android APK file. There is a tool for this: android-apktool
It is a tool for reverse engineering 3rd
party, closed, binary Android apps
How to do this on your Windows System:
Download apktool-install-windows-* file
Download apktool-* file
Unpack both to your Windows directory
Now copy the APK file also in that directory and run the following command in your command prompt:
apktool d HelloWorld.apk ./HelloWorld
This will create a directory "HelloWorld" in your current directory. Inside it you can find the AndroidManifest.xml file in decrypted format, and you can also find other XML files inside the "HelloWorld/res/layout" directory.
Here HelloWorld.apk is your Android APK file.
See the below screen shot for more information:
Android Studio can now show this. Go to Build > Analyze APK... and select your apk. Then you can see the content of the AndroidManifest file.
aapt d xmltree com.package.apk AndroidManifest.xml
will dump the AndroidManifest.xml from the specified APK. It's not in XML form, but you can still read it.
aapt (Android Asset Packaging Tool) is a built in tool that comes with the Android SDK.
Google has just released a cross-platform open source tool for inspecting APKs (among many other binary Android formats):
ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and show important info such as class interfaces and members, dex counts and dependencies. ClassyShark supports multiple formats including libraries (.dex, .aar, .so), executables (.apk, .jar, .class) and all Android binary XMLs: AndroidManifest, resources, layouts etc.
Install version 8.2:
wget https://github.com/google/android-classyshark/releases/download/8.2/ClassyShark.jar
Run:
java -jar ClassyShark.jar -open <file.apk>
In this thread, Dianne Hackborn tells us we can get info out of the AndroidManifest using aapt.
I whipped up this quick unix command to grab the version info:
aapt dump badging my.apk | sed -n "s/.*versionName='\([^']*\).*/\1/p"
You can use apkanalyzer, the command-line version of the APK Analyzer bundled with the Android SDK. Just execute the following command on the CLI:
/path/to/android-sdk/tools/bin/apkanalyzer manifest print /path/to/app.apk
You only have to replace /path/to/android-sdk with the correct path to your version of the Android SDK, and /path/to/app.apk with the path to your APK file.
You can use this command: save to file AndroidManifest.txt
aapt dump xmltree gmail.apk AndroidManifest.xml > AndroidManifest.txt
To decode the AndroidManifest.xml file using axmldec:
axmldec -o output.xml AndroidManifest.xml
or
axmldec -o output.xml AndroidApp.apk
Aapt2, included in the Android SDK build tools can do this - no third party tools needed.
$(ANDROID_SDK)/build-tools/28.0.3/aapt2 d --file AndroidManifest.xml app-foo-release.apk
Starting with build-tools v29 you have to add the command xmltree:
$(ANDROID_SDK)/build-tools/29.0.3/aapt2 d xmltree --file AndroidManifest.xml app-foo-release.apk
The AXMLParser and APKParser.jar can also do the job, you can see the link. AXMLParser
There is an online tool that lets you upload an APK It decompiles it and finally lets you to download a zip with all sources, manifest XML file and so on decompiled, all of that without having to install any program on your computer:
http://www.javadecompilers.com/apk
Also if you wish just to check on some params you can, by their UI
All these answers seem a bit over-engineered!
Just grab this chrome extension: https://chrome.google.com/webstore/detail/apk-downloader/fgljidimohbcmjdabiecfeikkmpbjegm
Download the .apk file you want from the playstore using the above extension.
Upload the .apk to this online tool to grab the manifest.xml: https://www.sisik.eu/apk-tool
You can also use my app, App Detective to view the manifest file of any app you have installed on your device.
This is an old thread, but I thought I would mention, of your phone has root, you can view it directly on your phone using the root explorer app. You don't even have to extract it to see.
Another useful (Python-based) tool for this is Androguard, using its axml sub-command:
androguard axml my.apk -o my.xml
This extracts and decodes the app manifest in one go. Unlike apktool this doesn't unpack anything else.
Another option is to use Jadx: https://github.com/skylot/jadx
Just open your APK and in treeview select "AndroidManifest.xml".
It will be readable just like that.
The file needs to be decompiled (or deodex'd not sure which one). But here's another way to do it:
-Download free Tickle My Android tool on XDA: https://forum.xda-developers.com/showthread.php?t=1633333https://forum.xda-developers.com/showthread.php?t=1633333
-Unzip
-Copy APK into \_WorkArea1\_in\ folder
-Open "Tickle My Android.exe"
-Theming Menu
-Decompile Files->Any key to continue (ignore warning)
-Decompile Files->1->[Enter]->y[Enter]
-Wait for it to decompile in new window... Done when new window closes
-Decompiled/viewable files will be here: \_WorkArea3\_working\[App]\