I did clone android project from GitHub and i wanted to change it.
the app got permission for .ACCESS_COARSE_LOCATION. but there isn't any permission like that.
I searched that permission in the app folder and i found it in another manifest with this path AppName/build/intermediates/manifests/full/debug
I tried to remove this permission but when i open project in android studio the permission come back!
what should i do to remove this?
consider there isn't any permission like that in the main manifest in android studio.
As Code-Apprentice said all the files under the build folder are auto-generated when you compile your app. Editing it won't have any effect, rather you should try to analyse from where this permission is coming!
Manifest is getting merged with libraries and other modules and then merged manifest actually goes into the apk. You can always analyse merged manifest apk by checking "Merged Manifest" tab and click on permission or any components to see from which modules/libraries it is exactly coming!
All files under the build folder are generated when you compile your app. Editing these files directly will have no effect. Instead, you need to edit the source that these files are generated from. Some of the generated AndroidManifest.xml comes from the app/build.gradle file and the rest comes from app/src/main/AndroidManifest.xml. You should edit these as needed.
Related
Let's say I have the following import inside my application build.gradle file:
implementation "com.facebook.android:facebook-android-sdk:4.28.0"
I want to see the AndroidManifest.xml of this package. How do I go about doing this?
You can check it in your AS,For example,I want to check com.android.support:design-27.0.2's AndroidManifest.xml file
step 1
step 2
step 3
Reedit for step 1
Download the aar by searching in this website :
https://search.maven.org/search?q=a:facebook-android-sdk
Then extract the aar file using 7ZIP and you will see the android manifest however, I believe you won't see the full file content due to some protections against reverse engineering.
You can download it as JAR instead and use some tools to try to decompile it.
You can find the aar file in the
cd ~/.gradle/caches/modules-2/files-2.1/com.facebook.android/facebook-android-sdk
directory, unzip the aar, you will get the file.
I want to know how to implement a apk editor which can edit app name and version.
A way I can figure out takes several steps:
unzip apk file
modify app name and version in AndroidManifest.xml
replace the AndroidManifest.xml with the modified one
compress them into a new apk file
sign and align it
I can do all the steps above except Step 2. The AndroidManifest.xml file is compiled and cannot be parsed as normal xml file. I know apktool can compile and decompile it but I cannot find a easy way to run apktool on Android after several hours searching. I also cannot find any open-source apk editors(what I need is not only a apk editor, I want to develop another app based on it).
Finally I find some projects for reading and writing AXML(Android XML) and resources.arsc:
ArscEditor
axml
So I can wirte an apk builder with them. For more information, see my repo Auto.js-ApkBuilder.
After creating a new application with android studio.
I see a manifest file in MyApplication/app/src/main/AndroidManifest.xml.
I changed the version code and version name in this file and tried to display them dynamically. However they were still displaying 1, and 1.0.
I looked into the hardisk and Saw a folder in the path:
C:...\MyApplication\app\build\intermediates\manifests\debug\AndroidManifest.xml
using an external editor I changed the values in this file However still getting version 1 on my logs.
Where can I find this Manifest folder/file through android studio?
The version code and version name are generally set in your application module's build.gradle file. If there are values there, they override what's in your manifest file.
The file you found in an "intermediates" folder is part of the build process, and if you modify it directly, your changes will quickly be lost when that file is rebuilt.
I'm installing my project apk file on device and I can view all its database inside
/data/data/com.myapp
but did not find manifest file.
I go on
data/data/myapp
and I find only libs and database. I want to find manifiest file. How can I find the manifest file?
Note
My device is rooted.
The AndroidManifest.xml gets bundled by AAPT into the .apk file. It is not stored by itself on the file system.
For more information please look at how Building and Running is performed.
I am trying to load an app to the Android Market. Below are the instructions I am using from the following website to prepare my application for submission:
http://android.xamarin.com/Documentation/Guides/Preparing_Package_for_Android_Marketplace
This following message is at the beginning of the instructions. But no instructions on how to add this to the AndroidManifest.xml file.
In order for the Android Market to accept your application, it must
define an application level icon. Ensure a line like this
exists in your AndroidManifest.xml:
<application android:label="MyApplication" android:icon="#drawable/icon">
A future release will provide better support for setting this.
The very first item has me stumped because I am getting the following error when I try to upload my application to the Market.
"The icon path specified by the manifest is not in the apk."
My question is, how do I add the application level icon statement to the manifest file?
Thanks.
p.s. The app deploys to both the emulator and local Android device in debug and release modes with no errors.
You can add a manifest file to your project by bringing up the property pages for your project, going to the Android Manifest tab, and doing the 'add AndroidManifest.xml' link.
Now there should be a file called "AndroidManifest.xml" in the Properties folder in your project.
Add the line specified to this file, replacing any existing element.
I had the same issue and it had nothing to do with the icon. I had an application class (GlobalVars extends Applications) and this was defined in the manifest as different: <application android:name=".GlobalVars" /> I deleted this and added android:name="com.example.myapp.GlobalVars" to the application declaration.
If it is the icon you may have drawable-hdpi, -ldpi, -mdpi folders, and no drawable folder. Or have a drawable folder but the icon is not in it.
Can you post the relevant snippet from your AndroidManifest.xml file? Whatever you have as the android:icon attribute ("#drawable/icon" in the example) is what the apk will be looking for. You can set this manually in the xml file, or by using the wizard in the ADT plugin for Eclipse. If this is set correctly, this means you should have a file called icon.png in one of your drawable folders. If you don't have an icon.png, can you post your folder structure?
In an app I've uploaded to the market, I have the same attribute - #drawable/icon - in my manifest, and therefore I am required to have a file called icon.png in my project. In my case, I have three different icon.png files in my various density-based drawable folders (res/drawable-hdpi, res/drawable-mdpi, res/drawable-ldpi). In your case, you need to at least have res/drawable/icon.png.
This error can also be generated if the manifest xml includes more than one < application > node.