How to Change Package ID of an Android App

本文档提供了更改Android应用程序包ID的步骤,适用于使用MDM解决方案并链接到托管Google Play帐户的情况。你需要将GEDigitalAPK.apk的包ID更改为唯一的ID,然后按照步骤解码APK,修改AndroidManifest.xml和apktool.yml文件,替换所有出现的旧包ID,并进行签名和对齐过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

How to Change Package ID of an Android App

How to Change Package ID of an Android App ka20h00000013pMAAQ | GE Customer Center

How to Change Package ID of an Android App

  • Id:
  • 000033783
  • Average User Rating: (*)(*) (*) ( ) ( ) 
  • Your Rating: (*)(*) (*) (*) (*) 
  • Last Updated: 09/22/2020
  • Date Created: 05/22/2019
  • Products: APM Classic Health
  • Categories: How To

Objective
If you are using a Mobile Device Management (MDM) solution linked to a Managed Google Play account, then you will need to change the Package ID of GEDigitalAPM.apk to something unique before uploading it to your own managed Google Play Store. This Article provides the steps to change the Package ID.

Environment
Primary Product Module : Rounds Data Collection
Primary Product Version : v4.3.x
Primary Product OS : Other

Procedure

 Prerequisites:

  Steps:

  1. Open Command Prompt as Administrator, and navigate to directory that has the apk file.
  2. Run following command to decode the apk file:
    • apktool d GEDigitalAPM.apk
  3. Wait for Step 2 to finish executing. Once finished, this will create a GEDigitalAPM folder in the same directory.
  4. Open the whole GEDigitalAPM folder in a text editor (for ex: Sublime Text or VS Code).
  5. Open AndroidManifest.xml file, and change the "package" attribute to an Id in the following format: com.<your-organization-name>.apm. Save the file.
  6. Open apktool.yml file, and change "renameManifestPackage" attribute to the Id that was chosen in Step 5. Save the file.
  7. Search for text "com.ge.ent.apm" ( com.meridium.apmv4 in versions prior to 4.3.1) in the entire folder. Except for files inspection-view.js, rounds-user-overview.js and zebra-barcode-scanner.js, replace all other instances with the the Id chose in Step 5. Save the files that changed.
  8. Now search and replace "com/ge/ent/apm"  (com/meridium/apmv4 in versions prior to 4.3.1) with "com/<your-organization-name>/apm". Save the files that changed.
  9. Navigate to smali → com folder. Create a new folder named "<your-organization-name>". Navigate to the new folder and inside that folder, create a new folder "apm".
  10. Move all files from folder "com → ge → ent → apm" (com → meridium → apmv4 in versions prior to 4.3.1)  to "com → <your-organization-name> → apm".
  11. In the command prompt opened in Step 1, run following command:
    • apktool b GEDigitalAPM -o GEDigitalAPM-Unsigned.apk
  12. Wait for Step 11 to finish executing. Once finished, this will generate GEDigitalAPM-Unsigned.apk file.
  13. Next, we will start the signing process.
  14. We will generate a key store required to sign the app. Find keytool.exe located in the Java JDK installation path.
  15. In the same command prompt window, run the following command to generate key store: "<Java JDK path>\keytool.exe" -genkey -v -keystore mynewapp-key.keystore -alias mynewapp-key -keyalg RSA -keysize 2048 -validity 10000
  16. You will be asked to answer the prompts. After that, it generates a Keystore file named "mynewapp-key.keystore".
  17. We will now use the keystore to sign the apk file. Find jarsigner.exe located in the Java JDK installation directory.
  18. In the same command prompt window, run the following command to sign the apk file:
    • "<Java JDK path>\jarsigner.exe" -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mynewapp-key.keystore GEDigitalAPM-Unsigned.apk mynewapp-key
  19. Next, we will align the apk file to complete the signing of apk file. To do that, we need “Zipalign” tool, found in the Android SDK’s build tools location. Please use 26.x API level of Android SDK build tool to perform alignment for product versions 4.3.1 and earlier, and 28.x API level of Android SDK build tool to perform alignment for product versions 4.4 and later

          In the same command prompt window, run following command to align the apk file:

                 "<Android_SDK_location">\build-tools\<26.x (release prior to 4.4) or 28.x (release 4.4 and above)>\zipalign.exe" -v 4 GEDigitalAPM-Unsigned.apk GEDigitalAPM-Signed.apk

           Now GEDigitalAPM-Signed.apk is signed with new package id (that was specified in step 5).

    20. You may now upload GEDigitalAPM-Signed.apk to your managed Google Play store.

Please Note: The users should not update the version number in any of the files during the app ID change process. But instead appID has to be different than your existing app ID in InTunes, this is to compensate the issues that we have in 4.3.0.7.x versions, this is fixed in 4.3.1 and above.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值