def get_packages(adb_opts = {})
      packages = []
      run_adb_shell("pm list packages -f", adb_opts) do |pout|
        pout.each do |line|
          @log.debug("{stdout} #{line}") unless @log.nil?
          parts = line.split(":")
          if (parts.length > 1)
            info = parts[1].strip.split("=")
            package = AndroidAdb::Package.new(info[1], info[0]);
            packages << package;
          end
        end
      end
      return packages
    end
def get_packages(adb_opts = {})
      packages = []
      run_adb_shell("pm list packages -f", adb_opts) do |pout|
        pout.each do |line|
          @log.debug("{stdout} #{line}") unless @log.nil?
          parts = line.split(":")
          if (parts.length > 1)
            info = parts[1].strip.split("=")
            package = AndroidAdb::Package.new(info[1], info[0]);
            packages << package;
          end
        end
      end
      return packages
    end
Returns a list of all installed packages on the device.
 @param [Hash] adb_opts Options for the adb command (@see #run_adb)
 @return [Hash] THe list of installed packages. The hash returned contains the apk file name <tt>:apk</tt> and the name of the package <tt>:name</tt>.