Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apk_rebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __create_keystore_if_needed(self, filename):
sp = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
keytool = sp.communicate()[0].decode('utf-8').strip('\n')
shell = True
elif self.__utils.is_os_macos():
else:
keytool = 'keytool'
shell = False
subprocess.call([keytool, '-genkey', '-v', '-keystore', filename, '-keyalg', 'RSA', '-keysize', '2048', '-validity', '10000'], shell=shell)
Expand All @@ -262,6 +262,8 @@ def __get_zipalign_path(self):
command = 'where /r %LocalAppData%\Android zipalign.exe'
elif self.__utils.is_os_macos():
command = 'find ~/Library/Android/sdk/build-tools -name zipalign'
else:
command = 'find ~/Android/Sdk/build-tools -name zipalign'
sp = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
return sp.communicate()[0].decode('utf-8').split('\n')[0]

Expand All @@ -271,6 +273,8 @@ def __get_apksigner_path(self):
command = 'where /r "%LocalAppData%\Android" apksigner.bat'
elif self.__utils.is_os_macos():
command = 'find ~/Library/Android/sdk/build-tools -name apksigner'
else:
command = 'find ~/Android/Sdk/build-tools -name apksigner'
sp = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
return sp.communicate()[0].decode('utf-8').split('\n')[0]

Expand Down