diff --git a/lib/android_apk.rb b/lib/android_apk.rb index 95fb18e..0185565 100644 --- a/lib/android_apk.rb +++ b/lib/android_apk.rb @@ -340,8 +340,8 @@ def self.read_adaptive_icon(apk, filepath) return unless apk.icon.end_with?(".xml") && apk.icon.start_with?("res/mipmap-anydpi-v26/") # invalid xml file may throw an error - apk.adaptive_icon = File.open(apk.icon) do |f| - f.each_line.any? { |l| l.include?("adaptive-icon") } + apk.adaptive_icon = !!Zip::File.open(filepath) do |zip_file| + zip_file.find_entry(apk.icon)&.get_input_stream&.read&.include?("adaptive-icon") end rescue StandardError => _e apk.adaptive_icon = false # ensure diff --git a/res/mipmap-anydpi-v26/ic_launcher.xml b/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index c809c05..0000000 Binary files a/res/mipmap-anydpi-v26/ic_launcher.xml and /dev/null differ