I had a previous application in google play at https://play.google.com/store/apps/details?id=com.wAgriConnect which need to be updated, I faced following issues after developing new application, 1) The new app should have same package name as old app, so I had to change code to use package name as com.wAgriConnect in new application source. 2) You can’t download the previous application apk from google play. 3) You should have old certificate keystore file with you to update as same application, otherwise it shows an error as, You uploaded an APK that is signed with a different certificate to your previous APKs.

Command line execution

Terminalbash
apt dump badging out/target/product/lynx/system/priv-app/AgriConnect.apk package: name=’com.wAgriConnect’  versionCode=’1402150572′  versionName=’1.0′ sdkVersion:’1′ targetSdkVersion:’19’ uses-permission:’android.permission.INTERNET’ uses-permission:’android.permission.READ_PHONE_STATE’ uses-permission:’android.permission.CALL_PHONE’ application-label:’Green Ecosystem’ application-icon-160:’res/drawable-xhdpi/ic_launcher.png’ application-icon-320:’res/drawable-xhdpi/ic_launcher.png’ application-icon-480:’res/drawable-xxhdpi/ic_launcher.png’ application: label=’Green Ecosystem’ icon=’res/drawable-xhdpi/ic_launcher.png’ launchable-activity: name=’com.wAgriConnect.MainActivity’  label=’Green Ecosystem’ icon=” uses-feature:’android.hardware.telephony’ uses-implied-feature:’android.hardware.telephony’,’requested a telephony-related permission or feature’ uses-feature:’android.hardware.touchscreen’ uses-implied-feature:’android.hardware.touchscreen’,’assumed you require a touch screen unless explicitly made optional’ main other-activities supports-screens: ‘small’ ‘normal’ ‘large’ ‘xlarge’ supports-any-density: ‘true’ locales: ‘–_–‘ densities: ‘160’ ‘320’ ‘480’ Check the  versionCode  as reported above and edit file AndroidManifest.xml from your application source to make it as, android:versionCode=”1402150572″ 5) We can’t use com.android as a package name for android application, as it looks like its reserved for system applications.

Implementation details

You must use the same certificate 4) The application APK’s version code needs to be higher than 1402150570, To check and fix this error, 1) check the version using command, $ ./out/host/linux-x86/bin/aapt dump badging out/target/product/lynx/system/priv-app/AgriConnect.apk package: name=’com.wAgriConnect’ versionCode=’1402150572′ versionName=’1.0′ sdkVersion:’1′ targetSdkVersion:’19’ uses-permission:’android.permission.INTERNET’ uses-permission:’android.permission.READ_PHONE_STATE’ uses-permission:’android.permission.CALL_PHONE’ application-label:’Green Ecosystem’ application-icon-160:’res/drawable-xhdpi/ic_launcher.png’ application-icon-320:’res/drawable-xhdpi/ic_launcher.png’ application-icon-480:’res/drawable-xxhdpi/ic_launcher.png’ application: label=’Green Ecosystem’ icon=’res/drawable-xhdpi/ic_launcher.png’ launchable-activity: name=’com.wAgriConnect.MainActivity’  label=’Green Ecosystem’ icon=” uses-feature:’android.hardware.telephony’ uses-implied-feature:’android.hardware.telephony’,’requested a telephony-related permission or feature’ uses-feature:’android.hardware.touchscreen’ uses-implied-feature:’android.hardware.touchscreen’,’assumed you require a touch screen unless explicitly made optional’ main other-activities supports-screens: ‘small’ ‘normal’ ‘large’ ‘xlarge’ supports-any-density: ‘true’ locales: ‘–_–‘ densities: ‘160’ ‘320’ ‘480’ Check the versionCode as reported above and edit file AndroidManifest.xml from your application source to make it as, android:versionCode=”1402150572″ 5) We can’t use com.android as a package name for android application, as it looks like its reserved for system applications.

Gotchas and common issues

  • Permission checks - verify user access rights and sudo privileges before executing system-level operations.

  • Environment configuration - double-check path variables and dependency versions to prevent runtime failures.

  • Backup safeguards - maintain configuration backups before applying system or database modifications.

Following these steps ensures clean configuration and reliable execution for replacing old android application in google play [ possible errors ].