APKTool (PC) | Программа для "вскрытия" *.apk - файлов



Реп: (22)
APKTool
версия: 2.9.3

Последнее обновление программы в шапке: 20.01.2024

Прикрепленное изображение

Краткое описание:
Программа для "вскрытия" *.apk - файлов.

Описание:
Программа будет полезна разработчикам и переводчикам программ для платформы Android.
Может быть использована для локализации ПО, добавления функций и т.д.

На данный момент программа работает под управлением ОС Linux, Windows, MacOS. При помощи данной утилиты не может быть вскрыто приложение framework-res.apk, поскольку в нем используются некие собственные секретные разработки Google, но обещают, что в дальнейшем это будет исправлено.

Для использования программы требуются базовые знания по SDK, aapt, PATH, smali.

Changelog
1.4.3:
updated builtin framework to SDK API14
fixed some "Multiple substitutions (...)" errors ( Issue 254 )

1.4.2:
added support for API14 (Android 4.0) resources
updated smali to v1.3.0
added --quiet option
fixed decoding error when string ends with '%' ( Issue 169 )
fixed decoding error when <plurals> contains a reference ( Issue 234 )
fixed a broken res when decoding <array> with positional substitutions ( Issue 222 )

1.4.1:
1.4.1
fixed builtin framework. See changelog and migration instructions of v1.4.0 below.

1.4.0
Major changes:
added Honeycomb support (3.1, API 12). See migration instructions below.
support for mipmaps and xlarge, xhdpi resource qualifiers
updated builtin framework to 3.1 (API 12) broken
completely rewritten mechanism of enclosing/escaping strings in XML files:
fixed legendary Issue 100
fixed a lot of other bugs discovered when writting integration tests
string format is simpler and more compact now: '" "' instead of '\u0020 ', '\"' instead of '\"', etc.
fixed incompatibilities between newer aapt and apks built by older one. New aapt is more restrictive, some apps can't be built using it, even if you would have sources. Apktool tries to convert/fix these incompatibilities: it adds formatted="false" for <string /> tags and enumerates substitutions for plurals.
updated smali to v1.2.6
added automatic integration tests for resource decoding and building
first official release of apktool built using Maven from open source

Minor changes:
sort framework ids before storing them in apktool.yml. aapt command requires you to include frameworks in order.
zero-padding of MCC resource qualifier
prefer to use raw values when decoding XML attrs. This could make decoded XMLs a little more similar to original ones.
close apktool.yml file handler after generating it
added error message about missing input file when decoding
added more info messages during decoding.
do not decode res-references as <item />. Now they're decoded as e.g. <string name="test">@android:string/ok</string> instead of <item type="string" name="test">@android:string/ok</item>.
changed encoding of generated XML files from UTF-8 to utf-8 - it's more consistent with Android SDK.
add new line at the end of generated XML files.

1.3.2 (2010.09.03):
updated smali to v1.2.4
added support for API Level 8 resource qualifiers: night, car, etc. ( Issue 65 )
added support for broken file-resources ( Issue 91 )
don't generate sdkVersion ("-v") resource qualifiers if they're "natural" ( Issue 85 )
always compress resources.arsc file (Issue 67)
throw warnings instead of exceptions on unknown files inside smali dir ( Issue 77 )
added support for resources using invalid/unknown config flags, e.g. from future APIs or added by manufacturer ( Issue 65 )
added an option to keep broken resources to fix them manually ( Issue 65 )
fixed case-sensitivity problems (Issue 86)
fixed an issue when *.9.png doesn't have 9patch chunk in it ( Issue 59 )
fixed NPE when there is a file without extension in drawable dir ( Issue 62 )
fixed escaping of chars in XML style tags ( Issue 64 )
fixed an error, when there are missing resources in a type, which does not have default config (http://forum.xda-developers.com/showthread.php?p=7949440#post7949440)
try to use original value of XML attribute - instead of parsed one. Fixes an issue when apktool was decoding e.g. "01" as "1" ( Issue 76 )
added more debugging info when omitting unknown config flags ("Config size > 32" message)

install-windows-2.2_r01-3 (2010.09.03):
fixed an issue when path to apktool.bat contains spaces ( Issue 81 )

1.3.1 (2010.06.14):
added decoding of XML tags in res strings (Issue 15)
fixed some issues (Issue 45), (Issue 46), (Issue 48), (Issue 56)

1.3.0 (2010.06.12):
added 9patch images (*.9.png) decoding (Issue 2)
fixed support for apks lacking res dir or resources.arsc file (Issue 44, Issue 50)
changed default name of built file from out.apk to <original_name.apk>
added possibility to choose location of output apk when building

(2010.06.04):
updated install packages to 2.2r01-1 version. Apktool 1.2.0 requires newer aapt tool, so you must update to use it.

1.2.0 (2010.06.03):
added feature for installing and using custom framework files - pulled from a device. See FrameworkFiles (Issue 27)
Froyo support (Issue 37)
updated Android framework to 2.2r1
removed HTC framework
no need to use -s/-r switch, when apk doesn't contain sources/resources
added protection against accidental remove of important files when decoding (Issue 36)
made outdir argument optional when decoding
fix: adding dummy resources if some of them are missing (Issue 40)
fix: better recognition of AXML files (Issue 41)

1.1.1 (2010.04.29):
much better recognition of register types when debugging (Issue 24)
fixed SIGSEGV error, which usually occured after several steps when debugging (Issue 26)

Домашняя страница: https://apktool.org/

Полезное
Инструкция для Windows: APKTool (PC) (Пост #4469313)
Инструкция для linux: APKTool (PC) (Пост ГИКОВЧАНИН #65687316)
При появлении ошибки Error: Unable to access jarfile C:\Windows\System32\\apktool.jar делаем так: APKTool (PC) (Пост Expot #39088588)
Если при компиляции ругается на TransparentDark


Скачать:
Версия: 2.9.3 от 20/01/2024 (iMiKED)
Версия: 2.9.2 от 05/01/2024 (iMiKED)
Версия: 2.9.1 от 06/12/2023 (iMiKED)
Версия: 2.9.0 от 09.10.2023 (a666)
Версия: 2.8.1 от 23.07.2023 (a666)

Прошлые версии:
Версия: 2.8.0 от 17/06/2023 (iMiKED)
Версия: 2.7.0 Apktool Final (betmen2)
Версия: 2.6.1 Apktool Final (betmen2)
Версия: 2.5.0 Apktool Final (betmen2)
Версия: 2.4.1 Актуальная версия сабжа (OsitKP)
Версия: 2.4.0 Сообщение №2118, автор OsitKP
Версия: 3.0.0 mod APKTool (PC) (Пост Alexey arsenev #54976559)
Версия: 2.1 mod Сообщение №1922, автор Cobra111111
Дополнительные пакеты:
Версия: r05-ibot APKTool (PC) (Пост Google 61 #49985992)

Версия: 2.3.4 Сообщение №2065, автор hussein209
Версия: 2.3.3 Сообщение №2015, автор siegheilx
Версия: 2.3.2 APKTool (PC) (Пост georgearn #72155798)
Версия: 2.3.1 APKTool (PC) (Пост OsitKP #68533937)
Версия: 2.3.0 APKTool (PC) (Пост Shamil_92 #65377659)
Версия: 2.2.4 APKTool (PC) (Пост OsitKP #63737776)
Версия: 2.2.2 APKTool (PC) (Пост OsitKP #57713692)
Версия: 2.2.1 APKTool (PC) (Пост GrAlNik #54271368)
Версия: 2.2.0 APKTool (PC) (Пост Kocmuq #52477482)
Версия: 2.1.1 APKTool (PC) (Пост xxxsadistxxx #49460498)
https://4pda.to/forum/dl/post/968583/apktool_install_linux_r04_brut1.zip - пакет зависимостей и скриптов для Linux
https://4pda.to/forum/dl/post/968585/apktool_install_macosx_r04_brut1.zip - пакет зависимостей и скриптов для MacOS X
https://4pda.to/forum/dl/post/968582/apktool_install_windows_r04_brut1.zip - пакет зависимостей и скриптов для Windows
Версия: 2.1.0 APKTool (PC) (Пост OsitKP #48439847)
версия: 2.0.3 fix APKTool (PC) (Пост Enyby #46807838)
версия: 2.0.3 APKTool (PC) (Пост OsitKP #45863914)
версия: 2.0.2 APKTool (PC) (Пост OsitKP #43651919)
версия: 2.0.1 https://4pda.to/forum/d…8654/apktool_2.0.1.jar
версия: 2.0.0 APKTool (PC) (Пост Dimon55584 #39621157)
версия: 2.0.0 RC4 https://4pda.to/forum/d…5/apktool_2.0.0rc4.jar
версия: 2.0.0 RC3 https://4pda.to/forum/dl/post/5426930/apktool.jar
версия: 2.0.0 RC2 https://4pda.to/forum/d…7/apktool_2.0.0rc2.jar
версия: 2.0.0 beta 9 Прикрепленный файлapktool_2.0.0b9.jar ( 7.85 МБ )
версия: v2 RC1 APKTool (PC) (Пост #34425590)
версия: 2.0.0 beta 8 APKTool (PC) (Пост #28248823)
версия: 2.0.0 beta 7 Прикрепленный файлapktool_2.0.0b7.jar ( 7.42 МБ )

версия: 1.5.2 apktool.jar
версия: 1.4.3 https://4pda.to/forum/dl/post/1317479/apktool_1.4.3.zip
версия: 1.4.2 https://4pda.to/forum/dl/post/1311452/apktool_1.4.2.zip
версия 1.4.1:
https://4pda.to/forum/dl/post/968581/apktool_1.4.1.zip - сам apktool
https://4pda.to/forum/dl/post/968583/apktool_install_linux_r04_brut1.zip - пакет зависимостей и скриптов для Linux
https://4pda.to/forum/dl/post/968585/apktool_install_macosx_r04_brut1.zip - пакет зависимостей и скриптов для MacOS X
https://4pda.to/forum/dl/post/968582/apktool_install_windows_r04_brut1.zip - пакет зависимостей и скриптов для Windows

версия 1.3.2:
http://android-apktool.googlecode.com/file...ol1.3.2.tar.bz2 - сам apktool
http://android-apktool.googlecode.com/file...1_r01-1.tar.bz2 - пакет зависимостей и скриптов для Linux
http://android-apktool.googlecode.com/file...1_r01-1.tar.bz2 - пакет зависимостей и скриптов для MacOS X
http://android-apktool.googlecode.com/file...2_r01-3.tar.bz2 - пакет зависимостей и скриптов для Windows


Модификации
Версия: 2.6.2-87223d-SNAPSHOT-mod Apktool (CaM/7oCe6e)


Сообщение отредактировал iMiKED - 20.01.24, 15:29
Причина редактирования: Обновление: новая версия 2.9.3 от 20/01/2024



Реп: (165)
Народ,почему возможна эта белиберда в процессе компиляции?
Прикрепленное изображение


Сообщение отредактировал -ГЕПАТИТ- - 05.10.19, 11:26



Реп: (2722)
* -ГЕПАТИТ-,
почистить от лишнего
apktool.yml > doNotCompress:

или наконец уже перейти на новые версии apktool.jar
Batch ApkTool (Пост 5asha #89064317)



Реп: (3062)
Кто сталкивался при компиляции с такой проблемой на MIUI (miui 10, android 9)? Приложение собирается, но при открытии ошибка, ругается на неизвестный параметр "transparentDark", который используется в стилях (res/values/styles.xml). Если его удалить (<item name="miui:windowTranslucentStatus">transparentDark</item>) и собрать приложение, ошибки нет, НО как я понял этот параметр отвечает за инвертирование цвета значков статусбара (сеть, батарея и т.д.) в зависимости от фона открытого окна (темное окно - значки светлые, и наооборот) и после его удаления цвет значков не меняется и сливаются с фоном... Перепробованы куча разных версий apktool, фреймворки все стоят (framework-ext-res.apk, framework-res.apk, miui.apk, miuisystem.apk), добавлял 17,18,27 ids в apktool.yml - результат один.
Ситуации идентичная для многих файлов, не только для MiRadio.apk. Проблема на форуме кое-где проскакивает, но решения так и не нашел.
Лог ошибки приложения MiRadio.apk
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.miui.fm/com.miui.fmradio.FmActivity}: java.lang.NumberFormatException: For input string: "transparentDark"
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Unknown Source:21)
at android.os.Looper.loop(Unknown Source:208)
at android.app.ActivityThread.main(ActivityThread.java:6810)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
at com.android.internal.os.ZygoteInit.main(Unknown Source:274)
Caused by: java.lang.NumberFormatException: For input string: "transparentDark"
at java.lang.Integer.parseInt(Unknown Source:94)
at com.android.internal.util.XmlUtils.convertValueToInt(Unknown Source:81)
at android.content.res.TypedArray.getInt(TypedArray.java:385)
at com.miui.internal.app.ActivityDelegate.installSubDecor(SourceFile:185)
at com.miui.internal.app.ActivityDelegate.onCreate(SourceFile:129)
at miui.app.Activity.onCreate(SourceFile:48)
at com.miui.fmradio.FmActivity.onCreate(SourceFile:124)
at android.app.Activity.performCreate(Activity.java:7224)
at android.app.Activity.performCreate(Activity.java:7213)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
... 11 more


Лог компиляции MiRadio.apk
-c/--copy-original has been deprecated. Removal planned for v2.5.0 (#2129)
I: Using Apktool 2.4.1-197d46-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: fakeLogOpen(/dev/log_stats) failed
W: fakeLogOpen(/dev/log_stats) failed
W: warning: string 'preset_replace' has no default translationW/ResourceType( 3256): DynamicRefTable(0x10): No mapping for build-time package ID 0x10.
W: W/ResourceType( 3256): e[0x01] -> 0x01
W: W/ResourceType( 3256): e[0x7f] -> 0x7f
W: E/ResourceType( 3256): Failed resolving ResTable_map name at 4200 with ident 0x100b0010
W: W/ResourceType( 3256): DynamicRefTable(0x10): No mapping for build-time package ID 0x10.
W: W/ResourceType( 3256): e[0x01] -> 0x01
W: W/ResourceType( 3256): e[0x7f] -> 0x7f
W: E/ResourceType( 3256): Failed resolving ResTable_map name at 3664 with ident 0x100b0010
W: W/ResourceType( 3256): Attempt to retrieve bag 0x1001004f which is invalid or in a cycle.
W: .
W: warning: Package not found for resource #10010060
W: warning: Package not found for resource #1001004f
W: warning: Package not found for resource #1001004f
I: Copy original files...
I: Copy AndroidManifest.xml...
I: Copy META-INF...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...


РЕШЕНИЕ
Меняем значение параметра transparentDark на 2 или 1, в зависимости от значения (transparentDark или transparentLight).
Теперь подробнее:

Меняем
<item name="miui:windowTranslucentStatus">transparentDark</item>
меняем на
<item name="miui:windowTranslucentStatus">2</item>

где 2, это значение из декомпилированного miui.apk\res\values\attrs.xml
А именно, открываем attrs.xml, и находим windowTranslucentStatus:

<attr name="windowTranslucentStatus">
<enum name="opaque" value="0" />
<enum name="transparentDark" value="2" />
<enum name="transparentLight" value="1" />
</attr>

Собираем обратно, ошибки нет, цвета инвертируются правильно.


Прикрепленные файлы

Прикрепленный файлMiRadio.apk ( 1.03 МБ )


Сообщение отредактировал greeshan - 12.10.19, 13:02
Причина редактирования: Добавлено решение



Реп: (2722)
* greeshan,
W: warning: Package not found for resource #10010060
W: warning: Package not found for resource #1001004f
W: warning: Package not found for resource #1001004f

эти как раз и ваши потеряшки
<public type="attr" name="windowTranslucentStatus" id="0x1001004f" />

оригинал (или не оригинал, тот который вы предоставили)
spec resource 0x7f0b0002 com.miui.fm:style/FmActivityTheme
() (style) parent=0x100d0047
(0x1001004a)=(boolean) true
(0x1001004f)=(integer) 2
(0x10010060)=(integer) 1

spec resource 0x7f0b0003 com.miui.fm:style/FmStationListTheme
() (style) parent=0x100d0017
(0x010102ce)=(reference) @com.miui.fm:style/Widget.ActionBar 0x7f0b0005
(0x0101030b)=(reference) @com.miui.fm:drawable/action_bar_back_dark 0x7f020000
(0x1001004f)=(integer) 2

после пересборки
spec resource 0x7f0b0002 com.miui.fm:style/FmActivityTheme PUBLIC
() (style) parent=0x100d0047
(0x1001004a)=(boolean) true
(0x1001004f)=(string) "transparentDark"
(0x10010060)=(string) "transparentLight"

spec resource 0x7f0b0003 com.miui.fm:style/FmStationListTheme PUBLIC
() (style) parent=0x100d0017
(0x010102ce)=(reference) @com.miui.fm:style/Widget.ActionBar 0x7f0b0005
(0x0101030b)=(reference) @com.miui.fm:drawable/action_bar_back_dark 0x7f020000
(0x1001004f)=(string) "transparentDark"

в фрейме оно значится как
spec resource 0x1001004f miui:attr/windowTranslucentStatus PUBLIC
() (attr) type=enum
opaque (0x100b000f) = 0
transparentDark (0x100b0010) = 2
transparentLight (0x100b0011) = 1


вот в этих стилях параметры замените на цифры, и получится после сборки те места ,как на вашем апк
<style name="FmActivityTheme" parent="@miui:style/Theme.Light.NoTitle">
<item name="miui:immersionMenuEnabled">true</item>
<item name="miui:windowTranslucentStatus">2</item>
<item name="miui:immersionStatusBarStyle">1</item>
</style>
<style name="FmStationListTheme" parent="@miui:style/Theme.Light">
<item name="android:actionBarStyle">@style/Widget.ActionBar</item>
<item name="android:homeAsUpIndicator">@drawable/action_bar_back_dark</item>
<item name="miui:windowTranslucentStatus">2</item>
</style>



Реп: (3062)
tilks @ 12.10.19, 12:38 *
вот в этих стилях параметры замените на цифры, и получится после сборки те места ,как на вашем апк

Да, только что сообразил сам, сделал и все работает как положено. Но все равно большое спасибо!
Добавил под спойлер Решение

Сообщение отредактировал greeshan - 12.10.19, 13:04



Реп: (2)
подскажите что делать) у меня только smali больше ничего нет( ни активити ни xml файлов(

Прикрепленные изображения
Прикрепленное изображение
Прикрепленное изображение
Прикрепленное изображение


Сообщение отредактировал DOCTORSTEEP1 - 26.11.19, 21:02



Реп: (2)
Спасибо, помогло)))) :sveta:

Прикрепленные изображения
Прикрепленное изображение
Прикрепленное изображение



Реп: (13)
Пытаюсь декомпелировать apk. Выдает вот такую хрень:
[28.11.2019 14:19:18] Java path: C:\Program Files (x86)\Java\jre1.8.0_221\bin\Java.exe
[28.11.2019 14:19:18] Java version: java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) Client VM (build 25.221-b11, mixed mode, sharing)

[28.11.2019 14:19:18] APKTool version: ShakaApktool v3.0.0-master-f1e0a9f-20160905
Apktool v2.1.2-SNAPSHOT-master-64644a1
smali v2.1.2-master-7079014
baksmali v2.1.2-master-7079014

[28.11.2019 14:19:59] Decoding Broken Dawn.apk
[28.11.2019 14:19:59] Using ShakaApktool 3.0.0-master-f1e0a9f-20160905
[28.11.2019 14:20:00] Loading resource table...
[28.11.2019 14:20:01] Decoding AndroidManifest.xml with resources...
[28.11.2019 14:20:01] Loading resource table from file: D:\111\framework\1.apk
[28.11.2019 14:22:37] Regular manifest package...
[28.11.2019 14:22:37] Decoding file-resources...
[28.11.2019 14:22:40] Decoding values */* XMLs...
[28.11.2019 14:22:40] java.lang.NullPointerException
[28.11.2019 14:22:40] at b.a.d.a.a.x.a(Unknown Source)
[28.11.2019 14:22:40] at b.a.d.a.a.x.a(Unknown Source)
[28.11.2019 14:22:40] at b.a.d.a.a(Unknown Source)
[28.11.2019 14:22:40] at b.a.d.a.c(Unknown Source)
[28.11.2019 14:22:40] at b.a.a.b(Unknown Source)
[28.11.2019 14:22:40] at b.a.B.a(Unknown Source)
[28.11.2019 14:22:40] at b.b.a.a(Unknown Source)
[28.11.2019 14:22:40] at b.b.a.a(Unknown Source)
[28.11.2019 14:22:40] at com.rover12421.shaka.cli.Main.main(Unknown Source)
[28.11.2019 14:22:40] Exception in thread "main" java.lang.IllegalArgumentException: expected element name 'style' and not 'resources'
[28.11.2019 14:22:40] at org.e.a.a.c(Unknown Source)
[28.11.2019 14:22:40] at b.a.d.a.a(Unknown Source)
[28.11.2019 14:22:40] at b.a.d.a.c(Unknown Source)
[28.11.2019 14:22:40] at b.a.a.b(Unknown Source)
[28.11.2019 14:22:40] at b.a.B.a(Unknown Source)
[28.11.2019 14:22:40] at b.b.a.a(Unknown Source)
[28.11.2019 14:22:40] at b.b.a.a(Unknown Source)
[28.11.2019 14:22:40] at com.rover12421.shaka.cli.Main.main(Unknown Source)

Скоприровал папку с фреймворками с телефона, указал проге папку. Все равно та же хрень.



Реп: (10637)
Тип: Новая версия
Версия: 2.4.1
Краткое описание: Актуальная версия сабжа
Что нового:
Changes since 2.4.0
Updated baksmali/smali to v2.3.4
Updated gradle to 5.6.2
[#2131] Added support for Android Q (Android 10)
[#2086] Fixed build issue with JDK9+ due to jmod change.
[#2058] Fixed security issue with unpacking assets via directory traversal.
[#2027] Fixed issue with api-level command not showing up.
[#2048] Fixed issue with directory warning when not automatically making framework directory.
[#2045] Fixed issue with mapping for codename "Q" release
[#2046] Fixed issue with raw qmg files not decoding properly.
[#2064] Fixed issue copying assets to a directory that does not exist.
[#2063] Fixed NPE with empty attributes during deserialization.
[#2084, #2018] Fixed removal of META-INF/services. (Thanks adibfara)
[#2117] Fixed support for "attr" bag type. (Thanks visigoth)
[#2093] Fixed license headers on AOSP/Android4Me files.
[#2120] Added enhanced wrapper for Windows. (Thanks Varstahl)
[#2051] Added advanced command for skipping non-root dex packages.
[#2028] Fixed issue with MIUI package names being renamed. (Thanks IgorEisberg)
[#1272] Fixed issue with too long command due to uncompressed file list. (Thanks IgorEisberg)
[#2071] Fixed issue with NPE on annotations.
[#1576] Fixed issue with garbled attributes. (Thanks brianairb)
[#2226] Fixed regression with --only-main-classes not usable. (Thanks realityJie)
[#2141] Fixed issue with bugged Window aapt builds. (Thanks Furniel)
[#2105] Fixed issue with JVM not knowing bitness on Windows.
[#1272] Fixed issue with long path commands due to recording compression. (Thanks peret)

Прикрепленный файлapktool_2.4.1.jar.zip ( 16.62 МБ )




Реп: (31)
Такая проблема с apktool, framework установил, но не декодится
Вот лог, осторожно он очень длинный
Прикрепленный файлlog.txt ( 357.89 КБ )



Реп: (2722)
* caFeeD,
для miui фрейми надо около 4 штук
Batch ApkTool (Пост tilks #82180307)

и так не добавляет фрейм
-p c:\apktool\framework-res.apk miuihome.apk

есть ключ ком строки чтобы добавить фрейми в нужную папку, а потом ключом указать эту папку, где лежат не просто файлы фреймом, а установленные самим apktool'ом -p c:\apktool\framework


смотрите help по командам apktool
"install-framework"
usage: apktool [-q|--quiet OR -v|--verbose] if|install-framework [options] <framework.apk>
-p,--frame-path <dir> Stores framework files into <dir>.
-t,--tag <tag> Tag frameworks using <tag>.

"decode"
usage: apktool [-q|--quiet OR -v|--verbose] d[ecode] [options] <file_apk>
-api,--api-level <API> The numeric api-level of the file to generate, e.g. 14 for ICS.
-b,--no-debug-info don't write out debug info (.local, .param, .line, etc.)
-f,--force Force delete destination directory.
--force-manifest Decode the APK's compiled manifest, even if decoding of resources is set to "false".
-k,--keep-broken-res Use if there was an error and some resources were dropped, e.g.
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.
-m,--match-original Keeps files to closest to original as possible. Prevents rebuild.
--no-assets Do not decode assets.
-o,--output <dir> The name of folder that gets written. Default is apk.out
-p,--frame-path <dir> Uses framework files located in <dir>.
-r,--no-res Do not decode resources.
-s,--no-src Do not decode sources.
-t,--frame-tag <tag> Uses framework files tagged by <tag>.

"build"
usage: apktool [-q|--quiet OR -v|--verbose] b[uild] [options] <app_path>
-a,--aapt <loc> Loads aapt from specified location.
-api,--api-level <API> The numeric api-level of the file to generate, e.g. 14 for ICS.
-c,--copy-original Copies original AndroidManifest.xml and META-INF. See project page for more info.
-d,--debug Sets android:debuggable to "true" in the APK's compiled manifest
-f,--force-all Skip changes detection and build all files.
-nc,--no-crunch Disable crunching of resource files during the build step.
-o,--output <dir> The name of apk that gets written. Default is dist/name.apk
-p,--frame-path <dir> Uses framework files located in <dir>.
--use-aapt2 Upgrades apktool to use experimental aapt2 binary.


если для вас это сложно, можно попробовать детскую программку Batch ApkTool
там надо прочитать инструкцию, раскидать фрейми по папкам и более менее должно всё работать.



Реп: (31)
Попытка разобрать miuigallery.apk прошла успешно, изменил по этой MIUI - Модификация и украшательства инструкции и теперь apktool выдает это
java -jar apktool.jar -c b MiuiGallery
-c/--copy-original has been deprecated. Removal planned for v2.5.0 (#2129)
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: W/ResourceType( 472): DynamicRefTable(0x10): No mapping for build-time package ID 0x10.
W: W/ResourceType( 472): e[0x01] -> 0x01
W: W/ResourceType( 472): e[0x7f] -> 0x7f
W: E/ResourceType( 472): Failed resolving ResTable_map name at 5456 with ident 0x100b0016
W: warning: Package not found for resource #10010082
W: C:\apktool\MiuiGallery\AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersion' in package 'android'
W:
W: C:\apktool\MiuiGallery\AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersionCodename' in package 'android'
W:
W: C:\apktool\MiuiGallery\AndroidManifest.xml:54: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Temp\brut_util_Jar_7725118978339026487.tmp, p, --forced-package-id, 127, --version-code, 266701, --version-name, 2.2.14.13-global, --no-version-vectors, -F, C:\Temp\APKTOOL917913974533446645.tmp, -e, C:\Temp\APKTOOL3662478450179968053.tmp, -0, arsc, -I, C:\Users\HomePC\AppData\Local\apktool\framework\1.apk, -I, C:\Users\HomePC\AppData\Local\apktool\framework\16.apk, -I, C:\Users\HomePC\AppData\Local\apktool\framework\18.apk, -S, C:\apktool\MiuiGallery\res, -M, C:\apktool\MiuiGallery\AndroidManifest.xml]

Оригинальный файл:

Прикрепленные файлы

Прикрепленный файлMiuiGallery.apk ( 31.69 МБ )



Реп: (298)
Как собрать apk-ку приложения из исходников, которая распространяется в виде жтих самых исходников. Без *.yml файла APKTool этим отказывается заниматься. Чем его можно сгенерировать ? Или чем ещё можно собрать приложение без задействования yml-файла ?



Реп: (298)
tilks @ 05.01.20, 17:39 *
под android (Android studio) чаще всего это Gradle — система автоматической сборки, построенная на принципах Apache Ant и Apache Maven, но предоставляющая DSL на языках Groovy и Kotlin вместо традиционной XML-образной формы представления конфигурации проекта
Т.е. простого и минималистичного решения типа apktool'a не существует ?
tilks @ 05.01.20, 17:39 *
apktool собирает из smali кода, но когда речь о исходниках, чаще они на языке Java (*.java) или Kotlin (*.kt)
Вы говорите о чём-то подобном (именно его я пытался собрать) ?



Реп: (2288)
* gorilloid, она обычно собрана есть, все ночкушки здесь
http://auroraoss.com/AuroraStore/Nightly/



Реп: (50)
Помогите,не могу установить framework-res.apk
Выдает такую ошибку на скрине
Java пробовал разные
Java Development Kit установлен

Прикрепленные изображения
Прикрепленное изображение



Реп: (4868)
* frost37rus, написано же что не может открыть zip архив, проверьте целестность apk, или переархивируйте содержимое apk



Реп: (50)
* vladrevers, непонимаю,я 5 раз копировал framework-res.apk из папки system/framework раньше все работало,а сейчас не как не устанавливается

Сообщение отредактировал frost37rus - 09.01.20, 07:33



Реп: (298)
tilks @ 06.01.20, 17:26 *
здесь же такое нельзя обсуждать, надо писать в соответствующие темы
ОК. Киньте ссылку в ЛС на более подходящий тред :)

* Mr Ikso, за линк спасибо, но исходники Авроры были чисто для примера ;)



Реп: (7)
Доброго всем!
Пытаюсь пересобрать файл Sofia-1-C9-Server-V1.0.apk но разбирать разбирает, а собирать не хочет. Причем ничего не меняю в исходнике - разбираю тут же пытаюсь собрать сыпет подобными ошибками:
C:\APK>apktool d Sofia-1-C9-Server-V1.0.apk
I: Using Apktool 2.4.1 on Sofia-1-C9-Server-V1.0.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\╨Ю╨╗╨╡╨│\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

C:\APK>apktool b Sofia-1-C9-Server-V1.0
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: W/ziparchive( 6192): Unable to open 'C:\Users\я┐╜я┐╜я┐╜я┐╜\AppData\Local\apktool\framework\1.apk': Illegal byte sequence
W: W/zipro ( 6192): Error opening archive C:\Users\я┐╜я┐╜я┐╜я┐╜\AppData\Local\apktool\framework\1.apk: I/O error
W: C:\APK\Sofia-1-C9-Server-V1.0\res\values\styles.xml:4: error: Error: No resource found that matches the given name: attr 'android:windowEnterAnimation'.
W:
W: C:\APK\Sofia-1-C9-Server-V1.0\res\values\styles.xml:5: error: Error: No resource found that matches the given name: attr 'android:windowExitAnimation'.
W:
W: C:\APK\Sofia-1-C9-Server-V1.0\res\values\styles.xml:8: error: Error: No resource found that matches the given name: attr 'android:windowEnterAnimation'.
W:
W: C:\APK\Sofia-1-C9-Server-V1.0\res\values\styles.xml:9: error: Error: No resource found that matches the given name: attr 'android:windowExitAnimation'.
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\08A4~1\AppData\Local\Temp\brut_util_Jar_8237021622423396468.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 16, --version-code, 1801251748, --version-name, 1.0, --no-version-vectors, -F, C:\Users\08A4~1\AppData\Local\Temp\APKTOOL9685790029425111560.tmp, -e, C:\Users\08A4~1\AppData\Local\Temp\APKTOOL4661545434476939315.tmp, -0, arsc, -I, C:\Users\Олег\AppData\Local\apktool\framework\1.apk, -S, C:\APK\Sofia-1-C9-Server-V1.0\res, -M, C:\APK\Sofia-1-C9-Server-V1.0\AndroidManifest.xml]
W: C:\APK\Sofia-1-C9-Server-V1.0\res\values\styles.xml:12: error: Error: No resource found that matches the given name: attr 'android:windowEnterAnimation'.
W:
W: C:\APK\Sofia-1-C9-Server-V1.0\res\values\styles.xml:13: error: Error: No resource found that matches the given name: attr 'android:windowExitAnimation'.

C:\APK>


Пробовал разные .apk - не собирает. Что не так делаю?
P.s. Пробовал BatchApkTool без проблем собирает-разбирает, но пересобранный в BatchApkTool файл в итоге не корректно прошивается даже если нечего в нем не изменяешь (это файл из прошивки ГУ)

Apktool v.2.4.1, Windows 10

Сообщение отредактировал korobeynikov.o.l - 14.01.20, 06:37


Полная версия   Текстовая версия

Помощь   Правила

Сейчас: 28.03.24, 21:27