apktool 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in apktool.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Kazuhiro Yamada
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # Apktool
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'apktool'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install apktool
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'apktool/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "apktool"
8
+ gem.version = Apktool::VERSION
9
+ gem.authors = ["Kazuhiro Yamada"]
10
+ gem.email = ["yamadakazu45@gmail.com"]
11
+ gem.description = %q{It is a tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step. Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc.}
12
+ gem.summary = %q{A tool for reverse engineering Android apk files}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency 'rspec'
21
+ end
@@ -0,0 +1,13 @@
1
+ require "apktool/version"
2
+
3
+ module Apktool
4
+
5
+ APKTOOL_PATH = File.dirname(__FILE__) + "/apktool/apktool"
6
+
7
+ class << self
8
+ def exec(cmd)
9
+ `#{APKTOOL_PATH} #{cmd}`
10
+ end
11
+ end
12
+
13
+ end
@@ -0,0 +1,77 @@
1
+ #!/bin/bash
2
+ #
3
+ # Copyright (C) 2007 The Android Open Source Project
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # This script is a wrapper for smali.jar, so you can simply call "smali",
18
+ # instead of java -jar smali.jar. It is heavily based on the "dx" script
19
+ # from the Android SDK
20
+
21
+ # Set up prog to be the path of this script, including following symlinks,
22
+ # and set up progdir to be the fully-qualified pathname of its directory.
23
+ prog="$0"
24
+ while [ -h "${prog}" ]; do
25
+ newProg=`/bin/ls -ld "${prog}"`
26
+ echo ${newProg}
27
+
28
+
29
+ newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
30
+ if expr "x${newProg}" : 'x/' >/dev/null; then
31
+ prog="${newProg}"
32
+ else
33
+ progdir=`dirname "${prog}"`
34
+ prog="${progdir}/${newProg}"
35
+ fi
36
+ done
37
+ oldwd=`pwd`
38
+ progdir=`dirname "${prog}"`
39
+ cd "${progdir}"
40
+ progdir=`pwd`
41
+ prog="${progdir}"/`basename "${prog}"`
42
+ cd "${oldwd}"
43
+
44
+
45
+ jarfile=apktool.jar
46
+ libdir="$progdir"
47
+ if [ ! -r "$libdir/$jarfile" ]
48
+ then
49
+ echo `basename "$prog"`": can't find $jarfile"
50
+ exit 1
51
+ fi
52
+
53
+ javaOpts=""
54
+
55
+ # If you want DX to have more memory when executing, uncomment the following
56
+ # line and adjust the value accordingly. Use "java -X" for a list of options
57
+ # you can pass here.
58
+ #
59
+ javaOpts="-Xmx256M"
60
+
61
+ # Alternatively, this will extract any parameter "-Jxxx" from the command line
62
+ # and pass them to Java (instead of to dx). This makes it possible for you to
63
+ # add a command-line parameter such as "-JXmx256M" in your ant scripts, for
64
+ # example.
65
+ while expr "x$1" : 'x-J' >/dev/null; do
66
+ opt=`expr "$1" : '-J\(.*\)'`
67
+ javaOpts="${javaOpts} -${opt}"
68
+ shift
69
+ done
70
+
71
+ if [ "$OSTYPE" = "cygwin" ] ; then
72
+ jarpath=`cygpath -w "$libdir/$jarfile"`
73
+ else
74
+ jarpath="$libdir/$jarfile"
75
+ fi
76
+
77
+ exec java $javaOpts -jar "$jarpath" "$@"
Binary file
@@ -0,0 +1,3 @@
1
+ module Apktool
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+ require 'tempfile'
3
+
4
+ describe Apktool do
5
+
6
+ describe ".exec" do
7
+ it "get command list" do
8
+ result = Apktool.exec ""
9
+ result.should =~ /COMMANDs are/
10
+ end
11
+ end
12
+
13
+ end
14
+
@@ -0,0 +1,8 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'apktool' # and any other gems you need
5
+
6
+ RSpec.configure do |config|
7
+ # some (optional) config here
8
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: apktool
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kazuhiro Yamada
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: It is a tool for reverse engineering 3rd party, closed, binary Android
31
+ apps. It can decode resources to nearly original form and rebuild them after making
32
+ some modifications; it makes possible to debug smali code step by step. Also it
33
+ makes working with app easier because of project-like files structure and automation
34
+ of some repetitive tasks like building apk, etc.
35
+ email:
36
+ - yamadakazu45@gmail.com
37
+ executables: []
38
+ extensions: []
39
+ extra_rdoc_files: []
40
+ files:
41
+ - .gitignore
42
+ - Gemfile
43
+ - LICENSE.txt
44
+ - README.md
45
+ - Rakefile
46
+ - apktool.gemspec
47
+ - lib/apktool.rb
48
+ - lib/apktool/apktool
49
+ - lib/apktool/apktool.jar
50
+ - lib/apktool/debug.keystore
51
+ - lib/apktool/version.rb
52
+ - spec/apktool_spec.rb
53
+ - spec/spec_helper.rb
54
+ homepage: ''
55
+ licenses: []
56
+ post_install_message:
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 1.8.23
75
+ signing_key:
76
+ specification_version: 3
77
+ summary: A tool for reverse engineering Android apk files
78
+ test_files:
79
+ - spec/apktool_spec.rb
80
+ - spec/spec_helper.rb
81
+ has_rdoc: