@@ -64,7 +64,7 @@ def zip_align_apk(apk):
64
64
print ("Running zipalign..." )
65
65
tmp_apk = apk .replace (".apk" ,"_tmp.apk" )
66
66
shutil .move (apk , tmp_apk )
67
- subprocess .call ('zipalign -p -f 4 {0} {1}' .format (tmp_apk , apk ), stderr = subprocess .STDOUT , shell = False )
67
+ subprocess .call ('zipalign -p -f 4 {0} {1}' .format (tmp_apk , apk ), stderr = subprocess .STDOUT , shell = True )
68
68
os .remove (tmp_apk )
69
69
70
70
@@ -169,10 +169,8 @@ def patch_apk(apk):
169
169
apk_out = ZipFile (os .path .join (TEMP_FOLDER , "new_apk.apk" ), "w" )
170
170
files = apk_in .infolist ()
171
171
for file in files :
172
- if not os .path .exists (os .path .join (TEMP_FOLDER , file .filename )) and not file .filename .startswith ("META-INF\\ " ) and not file . filename . startswith ( "resources.arsc" ) :
172
+ if not os .path .exists (os .path .join (TEMP_FOLDER , file .filename )) and not file .filename .startswith ("META-INF\\ " ):
173
173
apk_out .writestr (file .filename , apk_in .read (file .filename ), compress_type = file .compress_type , compresslevel = 9 )
174
- if not os .path .exists (os .path .join (TEMP_FOLDER , file .filename )) and file .filename .startswith ("resources.arsc" ):
175
- apk_out .writestr (file .filename , apk_in .read (file .filename ), compress_type = zipfile .ZIP_STORED , compresslevel = 0 )
176
174
apk_in .close ()
177
175
libfolder = os .path .join (TEMP_FOLDER , "lib" )
178
176
for (root , _ , files ) in os .walk (libfolder , topdown = True ):
0 commit comments