Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6693] Not able to generate Android unsigned apk package using CLI commands

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2021-04-26T19:45:19.000+0000
Affected Version/sAppcelerator Studio 4.3.0
Fix Version/sn/a
ComponentsAppcelerator CLI
Labelsn/a
Reportershishir.roy
AssigneeJoshua Quick
Created2021-04-23T12:57:58.000+0000
Updated2021-04-26T19:45:19.000+0000

Description

Hi Team, After upgrading and building with latest Appcelerator and Android SDK 10, I am not getting Android unsigned apk package. We have a build configure to run the below CLI command: appc run --platform android -b With the same command i used to get the unsigned package, but after upgrade i am not getting. And we have requirment to get the unsigned build only. So please provide the steps for getting the unsigned build.

Attachments

FileDateSize
Capture.JPG2021-04-24T14:53:28.000+000090141

Comments

  1. Joshua Quick 2021-04-23

    If you want to disable digital signing of "release" APKs, then you can do so by adding a "build.gradle" file under your project's ./platform/android folder like this...
       android {
       	buildTypes {
       		release {
       			signingConfig null
       		}
       	}
       }
       
    Just note that appc run will end with a build error because it failed to find the signed APK. You can ignore this error and instead grab the unsigned APK yourself under the following folder... ./build/android/app/build/outputs/apk/debug
  2. shishir.roy 2021-04-24

    Thanks for the response. As per above information, I have done the needful and found still apk under mention path is Signed by Appcelerator. I have run the jarsigner on the apk and verified. Attached screenshot for the details. My requirement was to get the release build without signed apk and later will sign with our ceritificate and then will upload in play store. Please provide the steps for the same. !Capture.JPG|thumbnail!
  3. Michael Gangolf 2021-04-25

    is your apk called: app-release-unsigned.apk? If not there is something wrong. I do the same to get an unsigned APK: add the parts to the build.gradle and then I build a "normal" store release: ti build -p android -K file.keystore -T dist-playstore The build will fail with an error at the end "Error: Failed to find built APK file" and I find my unsigned APK in: /build/android/app/build/outputs/apk/release and the jarsigner output looks like this:
       jarsigner --verify app-release-unsigned.apk
       no manifest.
       jar is unsigned.
       
  4. shishir.roy 2021-04-26

    No, apk output is app-debug.apk inside \build\android\app\build\outputs\apk\debug. With below configuration, I don't see the "release" folder as an outcome. android { buildTypes { release { signingConfig null } } } I don't want to build with "ti build -p android -K file.keystore -T dist-playstore" because we have separate apk build server which will signed apk. My requirement is to get the released unsigned apk as an output. Please provide steps for the same.
  5. Michael Gangolf 2021-04-26

    If you want to build a "-b" debug version, then you just have to change release to debug in the build.gradle file. So
       android {
        buildTypes {
            debug {
                signingConfig null
            }
        }
       }
       
    but keep in mind: it will build a debug version which shouldn't be released to the store. And since you've said {noformat} My requirement is to get the released unsigned apk as an output. {noformat} you should follow the steps I've posted and build a release version.
  6. shishir.roy 2021-04-26

    Thanks for the update, you can resolved this ticket.

JSON Source