Thursday, February 27, 2014

Unity3D - Android Manifest File Management - How to modify without extracting it from the apk file?

You don't need to extract apk to modify unity3d created android manifest file.

All you have to do is

 1)Open your project and build your unity3d project for android. (does not matter 3d or 2d just build your application for android)

2) DO NOT close unity yet!

3) DO NOT close / change your project yet!

 Now go to your project directory in t your operating system.

You will see a new directory there, named as "Temp" Temp directory do exists until you close unity or change / close your unity project. That is why you must keep unity open.

 Ok, now enter Temp directory , you will see another directory named as "StagingArea", enter that directory and you will see your AndroidManifest.xml file.

 Now copy that file into some other place, make your modifications on that new file.

Now if you want Unity3d to use your newly created manifest file, follow steps below:

 When you are ready , go to your unity 3d project main directory.

 1) Enter into " Assets" directory,

 2) Create a new folder named as " Plugins" (if there is already a plugin directory use that one)

 3) Create a new folder named as " Android" (if there is already a plugin directory use that one)

 4) Put your modified AndroidManifest.xml into this Android directory.

 5) Build your Unity3d project again.

That is all.  You will see that in your Temp directory, Unity3d generates new AndroidManifest.xml file which contains your newly modified manifest file.

2 comments:

  1. Thank you :-D
    for : Such a good answer

    ReplyDelete
  2. Thank you so much. I couldn't find how to modify my manifest file ;)

    ReplyDelete