Module: DroidAdbs::Aapt

Defined in:
lib/droid_adbs/aapt.rb

Class Method Summary collapse

Class Method Details

.get_manifesto(package_path, out_path) ⇒ fixnum

Parameters:

  • package_path (String)
  • out_path (String)

Returns:

  • (fixnum)

Raises:

  • RuntimeError because get_manifesto can’t find aapt command



8
9
10
11
12
# File 'lib/droid_adbs/aapt.rb', line 8

def get_manifesto(package_path, out_path)
  raise RuntimeError, "should set path to aapt, android-sdks/build-tools/xxxx" if `which aapt`.empty?
  dumped_data = `aapt dump xmltree #{package_path} AndroidManifest.xml`
  File.write out_path, dumped_data
end