Skip to content

Commit ef904a8

Browse files
committed
extract_utils: Consider path prefixes other than smali/
Currently we only decode source code if there are any changed files in the patch whose path starts with 'smali/', but in the case of multi dex APKs, apktool will instead give multiple smali directories in the form 'smali_<name of dex file>'. Knowing that, a better way to check if the source needs decoding is to see if any path starts with 'smali', which should deal with most edge cases. Signed-off-by: bengris32 <bengris32@protonmail.ch> Change-Id: I3927fe5bd4aae00dbbd3b1895fb15ca67e33afbe
1 parent b0a46c1 commit ef904a8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

extract_utils/fixups_blob.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
APKTOOL_NO_RES_ARG = '--no-res'
3636
APKTOOL_NO_SRC_ARG = '--no-src'
37-
APKTOOL_SRC_PATH = 'smali/'
37+
APKTOOL_SRC_PATH_PREFIX = 'smali'
3838
APKTOOL_RES_PATH = 'res/'
3939
APKTOOL_ANDROID_MANIFEST_NAME = 'AndroidManifest.xml'
4040

@@ -226,7 +226,7 @@ def __get_apktool_unpack_args(
226226
if affected_file.startswith(APKTOOL_RES_PATH):
227227
decode_res = True
228228

229-
if affected_file.startswith(APKTOOL_SRC_PATH):
229+
if affected_file.startswith(APKTOOL_SRC_PATH_PREFIX):
230230
decode_src = True
231231

232232
if affected_file == APKTOOL_ANDROID_MANIFEST_NAME:

0 commit comments

Comments
 (0)