From 84aa11f7c0da80f2a29dd149654ec273cab00031 Mon Sep 17 00:00:00 2001 From: dm1sh Date: Mon, 3 Feb 2025 02:51:16 +0300 Subject: [PATCH] Added new article APK_modification --- .../APK_modification/APK_modification.md | 35 +++++++++++++++++++ static/articles/list.db | 5 +-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 static/articles/APK_modification/APK_modification.md diff --git a/static/articles/APK_modification/APK_modification.md b/static/articles/APK_modification/APK_modification.md new file mode 100644 index 0000000..72a1387 --- /dev/null +++ b/static/articles/APK_modification/APK_modification.md @@ -0,0 +1,35 @@ +First, decompile apk file with [apktool](https://apktool.org): + +``` +apktool d <file_name>.apk +``` + +Replace assets or edit *Manifesst.xml*. [smali2java](https://github.com/AlexeySoshin/smali2java) can be of use for code modifications. + +Recompile apk: + +``` +apktool b <file_name> +``` + +Alignment is necessary for modern android versions (I beleave, 30+ SDK): + +``` +zipalign -v -f -p 4 <file_name>/dist/<file_name>.apk aligned-<file_name>.apk +``` + +Create a signing key. Fields values do not matter. Especially for personal use. + +``` +keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 1000 +``` + +Actually sign apk with it: + +``` +apksigner.jar sign -ks my-release-key.keystore --ks-key-alias alias_name aligned-<file_name>.apk +``` + +It will overwrite the provided apk with a signed one. + +We're awesome! \ No newline at end of file diff --git a/static/articles/list.db b/static/articles/list.db index e8aa171..64e548f 100644 --- a/static/articles/list.db +++ b/static/articles/list.db @@ -1,7 +1,8 @@ -1594048366 My_first_article_on_this_site +1594048366000 My_first_article_on_this_site 1606819380000 Ugra_Hantaton 1619034957605 Stack_VM_V1.0 1627839955679 Publite_-_an_Ebook_reader 1646570601234 Mount_WSL_partition_on_Arch_Linux 1653350638050 Use_phone_as_camera_for_linux_desktop -1694581049776 Use_phone_camera_for_linux_desktop_(2023) \ No newline at end of file +1694581049776 Use_phone_camera_for_linux_desktop_(2023) +1738537323514 APK_modification \ No newline at end of file