Skip to content

Commit 330c018

Browse files
committed
Handles spaces and dots in apk file name. Upgrades jadx version to 0.6.1
1 parent 3bbe49c commit 330c018

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

apkToJava.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ require_relative './lib/apk_to_java/version.rb'
66
Gem::Specification.new do |s|
77
s.name = 'apkToJava'
88
s.version = ApkToJava::VERSION
9-
s.date = '2016-01-28'
109
s.summary = 'View android apk as java code in GUI'
1110
s.description = s.summary
1211
s.authors = ['Ajit Singh']

bin/apkToJava

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,16 @@ def execute
4040
if ARGV[0] == 'setup'
4141
initialize_setup
4242
elsif valid_usage?
43-
initialize_setup if !env_setup?
44-
view_as_java_code ARGV[0]
43+
initialize_setup unless env_setup?
44+
45+
apk_file = ARGV[0]
46+
if apk_file.include?(' ') || apk_file.include?('.')
47+
new_name = apk_file.sub(' ', '_')
48+
new_name = new_name.sub('.', '_')
49+
`cp #{apk_file.sub(' ', '\ ')} #{new_name}`
50+
apk_file = new_name
51+
end
52+
view_as_java_code apk_file
4553
end
4654
end
4755

lib/apk_to_java/setup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module ApkToJava
44
class Setup
5-
JADX_URL = "'https://drive.google.com/uc?id=0BxXHKToe2BBtMGZMQXR5NFhGSUE&export=download'"
5+
JADX_URL = "'https://drive.google.com/uc?id=1GvmqyIcErQzYRnvV96FkgjRd-0nmf1Xg&export=download'"
66

77
def download_jadx
88
"wget --no-check-certificate #{JADX_URL} -O jadx.zip && sudo unzip jadx.zip -d jadx/ && rm jadx.zip"

lib/apk_to_java/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module ApkToJava
2-
VERSION = '1.3'
2+
VERSION = '1.3.1'
33
end

0 commit comments

Comments
 (0)