2

I need to generate an APK in android studio that is unsigned. I saw a few other questions about this.

Export unsigned apk from a Gradle Project in Android Studio

The best answer I saw was to go into the gradle tasks an execute assembleRelease. This generates two apks in the /build/output/apk folder one says app-release-unaligned.apk.

Is unaligned the same thing as unsigned?

Is the debug build type the same thing as unsigned?

I also tried adding a second build type where I don't specify a signing config but then the IDE just complains that t

Brian
  • 4,328
  • 13
  • 58
  • 103
  • It seems that this is possible to do, based on this question: https://stackoverflow.com/questions/27321979/generating-unsigned-release-apk-with-android-studio – Arthulia May 26 '17 at 16:56

2 Answers2

4

No and No.

Unaligned refers to how the data is structured within the APK (zip file). A utility called zipalign modifies the APK to align data in a way that is optimised for readers. Unaligned simply skips the zipalign stage. It has nothing to do with APK signing.

Debug is simply a mode where a flag is set within your App to indicate to Android that your App can be launched with (or attached to by) a debugger. Again, technically, it has nothing to do with signing your App, but it is common practise to use a different signing key for debugging your App and only signing a final/release build with your real App signing key (which should be kept secure).

adelphus
  • 10,116
  • 5
  • 36
  • 46
  • So how do I generate an unsigned apk then? – Brian Sep 29 '15 at 23:59
  • None of [these answers](http://stackoverflow.com/questions/17466227/android-build-unsigned-apk-with-gradle) helped? Why do you need to do it in Android Studio? – adelphus Sep 30 '15 at 00:02
  • not so far, when I run the assemble gradle tasks it still just spits out a 4 apks, debug-aligned.apk debug.apk release-unaligned.apk and release.apk. How can I do it outside of andorid studio? – Brian Sep 30 '15 at 00:11
0

I need to generate an APK in android studio that is unsigned.

This is not possible. Android requires that all APKs be digitally signed with a certificate before they can be installed. The system will not install an application on an emulator or a device if it is not signed.

You can read the official developer document for more details on the process of how to do the signing of APK, for your app's debug build or release build, but you have to sign APK, then only it can be installed on the Android device.

AADProgramming
  • 6,077
  • 11
  • 38
  • 58
  • What if I'm building it for a client who is responsible for signing and placing on the play store? It seems like this question says I can do it... https://stackoverflow.com/questions/27321979/generating-unsigned-release-apk-with-android-studio – Arthulia May 26 '17 at 16:53