Sometimes you need to change a tiny detail in an app you already own – perhaps a misleading app name, a low‑resolution launcher icon, or a hard‑coded URL that you want to replace. Doing this without rooting the device is possible, but it requires a careful workflow to avoid breaking the app or losing data. This tutorial walks you through every step: pulling the APK from the device, decompiling it with Apktool, making a safe edit, rebuilding, signing, and finally reinstalling the modified package.
Java JDK 8+ installed.adb (from Android SDK Platform‑Tools), zipalign and apksigner (both shipped with the Android SDK Build‑Tools).adb backup or the app’s own export feature).adb operations can corrupt the backup.adb over a USB cable. Wi‑Fi adb works as well, but a wired connection is more reliable for large APKs.adb devices
You should see a device ID followed by device. If not, reinstall the USB driver (Windows) or enable adb over TCP/IP (macOS/Linux).adb shell pm list packages | grep -i "part‑of‑name"
Replace part‑of‑name with a fragment you recognise (e.g., com.whatsapp).adb shell pm path com.example.app
The command returns something like package:/data/app/com.example.app-1/base.apk. Note the path after package:.adb pull /data/app/com.example.app-1/base.apk ./original.apk
The file original.apk now resides in the current folder.At this point you have a pristine copy of the app exactly as the device sees it. Keep this file untouched – you will need it later if you want to revert.
Android enforces that an update must be signed with the same certificate as the installed version. If you plan to replace the app without uninstalling, you must preserve the original signing key. Because you cannot extract the private key, the only practical way is to keep the original APK and use the same key when rebuilding.
apksigner verify --print-certs original.apk
The output shows the SHA‑256 fingerprint and the signer’s name. Write these down for later comparison.UNKNOWN or the command fails, the APK may be using Google Play App Signing. In that case you cannot sign a replacement with the same key; you must uninstall the app first (see the Uninstall & Re‑install section).apktool.jar and the accompanying wrapper script (apktool for Linux/macOS or apktool.bat for Windows) from the official GitHub releases.PATH (or keep them side‑by‑side with the APK you are working on).apktool d original.apk -o app_decompiled
The command creates a directory app_decompiled containing resources, manifest, and smali code.
Failed to collect resources, make sure you have Java 8 or newer and that the APK is not a split APK (multiple .apk files). For split APKs, repeat the adb pull step for each split_* file and place them together before decompiling.Decompilation does not recover the original Java source, but the smali files are enough for most resource‑level tweaks.
We will demonstrate two common edits: changing the displayed app name and swapping the launcher icon. Both are purely resource changes and do not require touching the code.
app_decompiled/res/values/strings.xml in a text editor.name="app_name". It will look like:
<string name="app_name">Original Name</string>
Original Name with your desired name, e.g., My Custom App. Save the file.app_decompiled/res/mipmap-*/ic_launcher.png (there are several density folders: mdpi, hdpi, etc.).ic_launcher.png).ic_launcher.png file with your new image. If you only replace the xxxhdpi version, Android will scale it for lower densities, which is acceptable for a quick test.ic_launcher_foreground.png and ic_launcher_background.png), replace those as well.These edits are reversible – you can always restore the original files from the backup created in Step 1.
apktool b app_decompiled -o modified_unsigned.apk
Apktool will compile resources and produce an unsigned APK named modified_unsigned.apk.AndroidManifest.xml).The resulting APK is structurally correct but cannot be installed until it is signed.
Android requires every APK to be signed. You have three practical options:
For a typical user the debug keystore is sufficient.
~/.android/debug.keystore on macOS/Linux or %USERPROFILE%\.android\debug.keystore on Windows).apksigner sign --ks ~/.android/debug.keystore \
--ks-key-alias androiddebugkey \
--ks-pass pass:android \
--key-pass pass:android \
--out modified_signed.apk modified_unsigned.apk
Adjust the paths if you are on Windows.
apksigner verify --verbose modified_signed.apk
The output should say Verified using v1 scheme (JAR signing) and/or v2 scheme.Alignment optimises the APK for faster loading on the device. The zipalign tool is part of the Android SDK Build‑Tools.
zipalign -v -p 4 modified_signed.apk modified_aligned.apk
modified_aligned.apk for installation.Whether you can install over the existing app depends on the signing key:
adb backup -f app_backup.ab -apk com.example.app
You will be prompted on the device to confirm the backup.
adb restore app_backup.ab
adb shell pm clear com.example.app to wipe data before reinstall, then use the app’s own export/import feature.adb uninstall com.example.app
Warning: Uninstalling removes all private data unless you performed the backup step above.adb install -r modified_aligned.apk
The -r flag tells adb to replace an existing app if the signatures match.Success.Launch the app on the device. You should see the new name in the app drawer and the new launcher icon on the home screen.
This error means the device already has an app signed with a different certificate. Solutions:
adb uninstall com.example.app) and reinstall.Causes:
aapt binary – ensure you have the Android SDK Build‑Tools installed and that aapt is on your PATH.Possible reasons:
apksigner version that does not support v2 signing – update the Android SDK Build‑Tools.When you modify resources, the app’s code may still reference the original resource IDs. If you renamed a string that is referenced in code (e.g., via R.string.app_name), the compiled code still expects the original ID, but the ID is unchanged – so this usually does not crash. However, if you removed an entire resource file or changed the package name, the app may throw Resources$NotFoundException. Re‑check that you only edited existing entries, not removed them.
Apps distributed through the Play Store often use Google’s signing service. The APK you pulled is signed with a Google‑managed certificate that you cannot replicate. In this case you must uninstall the Play‑installed version before installing the modified one, and you will lose automatic updates.
split_*.apk file with adb pull, place them in a single folder, and decompile the base APK. When rebuilding, you can re‑package splits using apktool b with the --use-aapt2 flag, but this quickly becomes complex. For simple visual tweaks, modifying only the base APK is usually sufficient.By following the steps above you can safely extract an installed Android app, decompile it with Apktool, make resource‑level customisations, rebuild, sign, align, and reinstall – all without rooting the device. The workflow respects Android’s security model: you never need elevated privileges, and you keep a clean backup path to revert if something goes wrong. With this knowledge you can personalise launcher icons, correct misleading strings, or replace embedded assets, giving you more control over the software you already own.









