Updating Android App - How to?

Discussion in 'Technical Discussion' started by ruhm64, Dec 27, 2015.

  1. ruhm64

    ruhm64 Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    168
    Likes Received:
    47
    Hi, I am having a bear of a time trying to get my app updated on the Android side. Using Eclipse. Using a Mac. I have had issues before and had to re-do the entire app in the store. I am trying not to have to deal with that again.

    I get the workspace folder to open and it has the last version already in it. When we export from BB to Android, are we not to give it a new name and just override the already existing or will the screw it up? I am not going to touch it until I hear someone who has skills with the Eclipse. I find it annoying. There isn't anything on here, stack overflow, YouTube or Google Dev with a walk-through on how to do it without jacking everything up.

    I know there are plenty of devs that have Android apps with updates out there. Please help me and anyone else after my asking.
     
  2. Aaron F

    Aaron F Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    146
    Likes Received:
    161
    I think you should just create a new workspace called MyGame2 and import the new version. When you export make sure to use the same Keystore for the APK and set the build number to 2 for example.
     
    Deliverbo and ruhm64 like this.
  3. ruhm64

    ruhm64 Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    168
    Likes Received:
    47
    Thank you @Aaron F !!
    I will now leave myself (and for others) directions for the future...
    1. Create new workspace folder in same containing folder where original workspace folder is.
    2. Right Click com.nameofcompany.appname > Android Tools > Export Signed Application Package
    3. Make project file name
    4. Keystore Selection - Use Existing Keystore - Location of your Keystore file (This is a must, remember where you put the original, or you're starting over again Mike! ... or anyone else who runs into this)
    5. Enter your password > Next
    6. Key Alias Selection (You probably only have one) Alias/Password
    7. Check/Confirm your Certificate fingerprints match - For example... SHA1 (I go by the last few letters/digits
     
  4. todro

    todro Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    151
    Likes Received:
    69
    You should choose SHA2 (e.g. key length SHA-256 or SHA-512) as SHA1 is deprecated and not longer to be used after Jan,1st,2016 because of it's weakness. This also effects code signing.

    https://technet.microsoft.com/library/security/2880823?f=255&MSPPError=-2147217396

    http://blog.chromium.org/2014/09/gradually-sunsetting-sha-1.html
    • CAs must stop issuing new SHA-1 SSL and Code Signing certificates by 1 January 2016.
     
    ruhm64 likes this.
  5. ruhm64

    ruhm64 Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    168
    Likes Received:
    47
    Doing websites and SSL certificates I knew about SHA-1 going out and when I first saw it on Eclipse it did cross my mind but did not think it would effect apps.

    Have the answer for making them SHA-2 by chance? That would greatly be appreciated.
     
  6. todro

    todro Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    151
    Likes Received:
    69
    I'm not really familiar with android but did a quick install on a MAC and the created APK was already using SHA256, so this might be the default on either latest JDK 7 (7u80) or on MAC (El Capitain), no clue so far who is responsible for selecting this as default when creating new keystore.

    You can check your app from within a terminal window:

    keytool -list -printcert -jarfile <app.apk>

    [Edit]

    This is what I found:

    "It turns out that with JDK 7, the default algorithm used by jarsigner changed to SHA256 from SHA1withDSA. Android 4.3 and below depend on APKs being signed with SHA1withDSA, and Android 4.4 and later seems to support either."
     
    Last edited: Dec 28, 2015
    ruhm64 likes this.
  7. ruhm64

    ruhm64 Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    168
    Likes Received:
    47
    Thanks for going that far to help. Greatly appreciate it! I was figuring it was going to be something from certificate origination. Looks like Shapeland Bounce 2 is going to be the new app. LOL
     
  8. HungaryBoy

    HungaryBoy Boxer

    Joined:
    Sep 30, 2015
    Messages:
    16
    Likes Received:
    4
    Hi @ruhm64
    For updating Android App most important step is that updating App must be build thought same KeyStore like original one.
    You can make new KeyStore for every game that you creating and save it in folder where the game is. Just save all info also for every KeyStore to be able to make update of your game.

    You will need to change in AndroidManifest.xml Version Code ( from 1.0 to 1.1 etc. ) and Version Name ( from 1 to 2 etc.), and Export .apk through same KeyStore that was build in first time you compile game.
     
    ruhm64 likes this.
  9. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    This is backwards, Version Code needs to be an integer, Version Name is just text for human readability and versioning (on Android). Also, both of these can be set inside BB without editing the manifest.
     
  10. ruhm64

    ruhm64 Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    168
    Likes Received:
    47
    So final resolve to SHA-1 to SHA-2 is a new Certificate for 25+ years? Am I getting that right?
     
  11. todro

    todro Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    151
    Likes Received:
    69
    From my point of view: yes.

    I'd suggest to check the local cert store and the APK for SHA2 first as changing the keystore means you will loose the connection to a previous upload, therefore it should be avoided if not necessary.

    As I have written, it seems to be the default for JRE7 and to be honest, I didn't understand where you selected the SHA1 you have written before. When I follow the BB Android guide, I will not be asked about the keystore key algorithm and length...

    For the APK I already posted the commands, for the cert store have a look at this info http://livingcode.co/index.php/2014...-to-get-debug-signing-certificate-on-windows/
     
    ruhm64 likes this.
  12. ruhm64

    ruhm64 Avid Boxer

    Joined:
    Oct 11, 2015
    Messages:
    168
    Likes Received:
    47
    Thank you for sharing!!
     

Share This Page