lib/acouchi/apk_modifier.rb in acouchi-0.0.4 vs lib/acouchi/apk_modifier.rb in acouchi-0.0.5
- old
+ new
@@ -30,20 +30,16 @@
private
def apktool
@apktool ||= Which.find_executable("apktool.bat", "apktool")
end
- def execute_apktool command
- ProcessLauncher.new(apktool, command)
- end
-
def decompile_apk
- ProcessLauncher.new(apktool, "d", @apk, @output_path).start_and_crash_if_process_fails
+ ProcessLauncher.new(apktool, "d", @apk, @output_path).with_inherited_io.start_and_crash_if_process_fails
end
def compile_apk
- ProcessLauncher.new(apktool, "b", @output_path).start_and_crash_if_process_fails
+ ProcessLauncher.new(apktool, "b", @output_path).with_inherited_io.start_and_crash_if_process_fails
end
def sign_apk_in_debug_mode
@new_apk = File.join(@output_path, "dist", File.basename(@apk))
jarsigner = Which.which?("jarsigner.exe") || Which.which?("jarsigner")
@@ -56,13 +52,13 @@
"android",
"-keypass",
"android",
@new_apk,
"androiddebugkey"
- ).start_and_crash_if_process_fails
+ ).with_inherited_io.start_and_crash_if_process_fails
end
def overwrite_original_apk
- FileUtils.mv(@new_apk, @apk)
+ FileUtils.mv(@new_apk, @apk)
end
end
end