23

I would like to edit the Androidmanifest.XML file after packaging the Apk for strange reasons

For more info visit this post How to Exclude Devices with low RAM in Google play store

Please do explain if possible.It is an unsigned apk BTW.

Community
  • 1
  • 1
Ram Kumar
  • 828
  • 2
  • 10
  • 27
  • @MaulikSheth Thanks for Claryifying – Ram Kumar Oct 29 '13 at 16:46
  • Of course it is possible to edit manifest, although there's certain things you CANNOT do, like changing package name, but you can definitely edit it in order to update/add activities, change versioncode, minsdkversion etc, of course all these changes should be done with an update to your whole app in the playstore... – Martin Cazares Oct 29 '13 at 16:56
  • @MartinCazares Will it be possible to add filters? I mean to restrict screen sizes. – Ram Kumar Oct 29 '13 at 17:00
  • Definitely, but as i said, you should upload a new apk with this specs and the new devices trying to install must fill the requirements, you can also be more restrictive in the SDK version if you want... – Martin Cazares Oct 29 '13 at 17:02
  • @MartinCazares Can you explain how to add filters? What i do is make game in construct 2.Export it for android and compile it online and they mail me unsigned apk. – Ram Kumar Oct 29 '13 at 17:06

2 Answers2

18

Try this under Linux:

cd tmp ; wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.4.0.jar
mv apktool_2.4.0.jar apktool.jar
mv apktool* /usr/local/bin
chmod a+x /usr/local/bin/apktool*

Then, you can decompile the APK with:

apktool d your-app.apk

Then, you can edit AndroidManifest.xml under the folder your-app generated by the previous command. Then, you can compile again with:

apktool b your-app

Then, you have to sign again you APP, you can use your own keystore (p.e generated by Android Studio), or create new one with the following procedure:

keytool -genkey -v -keystore keyStore.keystore -alias app -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keyStore.keystore your-app/dist/your-app.apk app

Finally you have your APK again. You can copy it from "your-app/dist/your-app.apk" file.

Hope that helps!

Bluebot
  • 166
  • 15
Julian Rios
  • 2,431
  • 2
  • 7
  • 9
15

You can decompile your apk with apktool and your manifest will be readable. After editing your manifest you can compile and create apk again. Remember to sign you apk after creating new apk.

Similar question 1
Similar question 2

Community
  • 1
  • 1
Devrim
  • 15,345
  • 4
  • 66
  • 74