Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Cannot Update Apps in Google Play After Updating to Icenium 1.6

This troubleshooting tutorial is intended for experienced mobile developers who can no longer update an Android app in Google Play after updating to AppBuilder 1.6. You will learn:

  • How to change the application identifier in AndroidManifest.xml
  • How to export your cryptographic identity
  • How to decode the application package
  • How to modify the application package
  • How to recreate and code sign the application package

Problem

After updating to AppBuilder 1.6, you were required to modify the application identifiers of one or more existing apps. After changing the identifiers, you can no longer update your apps in Google Play.

Cause

AppBuilder 1.6 introduces a limitation that might require you to change the application identifiers for existing apps.

To update an app in Google Play, you need to build and code sign the application package with the same application identifier and cryptographic identity used for publishing it. After changing the identifier in AppBuilder, you can no longer build the app with the original application identifier and you cannot update it.

Solution

Modify the contents of the application package for your app and code sign it with the same cryptographic identity that you used when you built the app.

In this tutorial, the following placeholders are used. You need to replace each placeholder with the corresponding value from your production environment.

  • com.YourCompany.Old_Identifier: The application identifier you used when you published your app in Google Play first.
  • com.YourCompany.NewIdentifier: The modified application identifier.
  • YourApp.apk: The filename for your application package.
  • YourApp: The folder that contains the decoded application package.
  • certificate_alias: The alias for your cryptographic identity.
  • exported_certificate.p12: The filename for your exported cryptographic identity.
  • FilePath: The file path to a resource.

Prerequisites

Install JDK and Apktool

To complete this tutorial, you need to install and configure the Java Development Kit (JDK) and Android Apktool on your system.

With the latest version of the Java Development Kit (JDK), you will be able to run Android Apktool and code sign the application package after you modify it. For more information about installing and configuring JDK, see JDK 7 and JRE 7 Installation Guide.

With the latest version of Android Apktool, you can use a command prompt to decode and recreate the application package.

Export your cryptographic identity

You need to code sign the modified application package with the same cryptographic identity that you used for publishing in Google Play. Verify that you have exported your cryptographic identity from AppBuilder as a P12 file.

Step 1: Set the package identifier in AndroidManifest.xml

First, in the code editor, open AndroidManifest.xml for editing.

Next, configure the package identifier in the code. Locate the $AppIdentifier$ placeholder and replace it with com.YourCompany.Old_Identifier. Verify that the markup contains the following line.

package="com.YourCompany.Old_Identifier"

Save your changes.

Step 2: Build your app for Google Play

From the main menu, click Publish and select Google Play as the target platform. If you are running in-browser client, click Next.

Select your certificate and click Build.

Wait for the build process to complete and click Download to save the application package to disk.

Step 3: Decode YourApp.apk

Run a command prompt, navigate to the folder where you stored YourApp.apk and run the following command.

apktool d YourApp.apk

Apktool decompresses YourApp.apk in a new folder named YourApp.

Step 4: Modify the contents of the decoded app

In YourApp, the smali directory nests subfolders in a pattern that resembles the updated application identifier you set in the app properties (com.YourCompany.NewIdentifier).

FilePath\YourApp\smali\com\YourCompany\NewIdentifier\...

Based on com.YourCompany.Old_Identifier, rename one or more subfolders in the smali directory to make the file path pattern resemble the initial application identifier. After your changes, the smali folder should have the following structure.

FilePath\YourApp\smali\com\YourCompany\Old_Identifier\...

Next, from the smali directory, open all SMALI files for editing. Based on your initial and updated application identifiers, replace occurrences of com/YourCompany/NewIdentifier with com/YourCompany/Old_Identifier in the code.

Save all changes.

Step 5: Recreate YourApp.apk

In the command prompt run the following command:

apktool b FilePath\YourApp FilePath\YourApp.apk

Step 6: Code sign the APK package

In the command prompt, run the following command:

jarsigner -storetype pkcs12 -keystore FilePath\exported_certificate.p12 FilePath\YourApp.apk certificate_alias

When prompted, provide the password for the exported cryptographic identity.

Next Steps

Upload your app to Google Play.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.