apktools 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/read_manifest.rb +39 -0
  2. metadata +6 -3
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Copyright (C) 2012 Dave Smith
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of this
6
+ # software and associated documentation files (the "Software"), to deal in the Software
7
+ # without restriction, including without limitation the rights to use, copy, modify,
8
+ # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
9
+ # persons to whom the Software is furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all copies
12
+ # or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
17
+ # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18
+ # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19
+ # DEALINGS IN THE SOFTWARE.
20
+
21
+ require 'apktools/apkxml'
22
+
23
+ # Parse AndroidManifest.xml from given APK file and write XML data
24
+ # to the given destination
25
+
26
+ if ARGV.length != 1
27
+ puts "usage: read_manifest <APKFile> <OutFile>"
28
+ exit(1)
29
+ end
30
+
31
+ # Initialize with an APK file
32
+ xml = ApkXml.new(ARGV[0])
33
+ outfile = ARGV[1]
34
+
35
+ # You can also optionally enable indented (pretty) output,
36
+ # and resolving of resource values
37
+ manifest_xml = xml.parse_xml("AndroidManifest.xml", true, true)
38
+
39
+ File.open(outfile, 'w') { |file| file.write(manifest_xml) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apktools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-22 00:00:00.000000000 Z
12
+ date: 2013-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubyzip
@@ -28,9 +28,10 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  description: Library to assist reading resource data out of Android APKs
31
- email: dave@xcellentcreations.com
31
+ email: dsmith@doubleencore.com
32
32
  executables:
33
33
  - get_app_version.rb
34
+ - read_manifest.rb
34
35
  extensions: []
35
36
  extra_rdoc_files: []
36
37
  files:
@@ -39,6 +40,8 @@ files:
39
40
  - lib/apktools/resconfiguration.rb
40
41
  - !binary |-
41
42
  YmluL2dldF9hcHBfdmVyc2lvbi5yYg==
43
+ - !binary |-
44
+ YmluL3JlYWRfbWFuaWZlc3QucmI=
42
45
  homepage: http://github.com/devunwired/apktools
43
46
  licenses: []
44
47
  post_install_message: