Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux support #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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