Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML decoding is incorrect: Attr.value missing f. https: #88

Closed
naijun0403 opened this issue Feb 13, 2024 · 3 comments
Closed

XML decoding is incorrect: Attr.value missing f. https: #88

naijun0403 opened this issue Feb 13, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@naijun0403
Copy link

Describe the bug
When you receive the apk file as described later and try to recompile it after decompiling, the following error appears

To Reproduce
Steps to reproduce the behavior:

  1. Used version '1.3.5'
  2. Operating system 'macOS 14.3.1'
  3. Command java -jar APKEditor-1.3.5.jar b -i kakaotalk -o kv.apk

Log/Stacktrace

00.000 I: [BUILD] Building ...
   Input: kakaotalk
 Output: kv.apk
 ----------------------------
00.015 I: [BUILD] Scanning XML directory ...
00.031 I: [BUILD] Scanning: kakaotalk
00.407 I: [BUILD] Initializing android framework ...
00.407 I: [BUILD] Loading android framework for version: 34
00.483 I: [BUILD] Initialized framework: android-34 (14)
00.483 I: [BUILD] Encoding attrs ...
00.614 I: [BUILD] Encoding values ...
 00.699 [BUILD] Encoding: package_01/res/values/strings.xml
ERROR:
java.io.IOException: org.xmlpull.v1.XmlPullParserException: Attr.value missing f. https: (position:START_TAG <a href='' https:='utf-8'>@3772:62 in java.io.InputStreamReader@31a78026)
	at com.reandroid.apk.xmlencoder.XMLTableBlockEncoder.scanResourcesDirectory(XMLTableBlockEncoder.java:83)
	at com.reandroid.apk.xmlencoder.XMLTableBlockEncoder.scanMainDirectory(XMLTableBlockEncoder.java:77)
	at com.reandroid.apk.ApkModuleXmlEncoder.buildTableBlock(ApkModuleXmlEncoder.java:56)
	at com.reandroid.apk.ApkModuleXmlEncoder.buildResources(ApkModuleXmlEncoder.java:45)
	at com.reandroid.apk.ApkModuleEncoder.scanDirectory(ApkModuleEncoder.java:44)
	at com.reandroid.apkeditor.compile.Builder.buildXml(Builder.java:116)
	at com.reandroid.apkeditor.compile.Builder.run(Builder.java:47)
	at com.reandroid.apkeditor.compile.Builder.execute(Builder.java:176)
	at com.reandroid.apkeditor.Main.execute(Main.java:85)
	at com.reandroid.apkeditor.Main.execute(Main.java:64)
	at com.reandroid.apkeditor.Main.main(Main.java:36)
Caused by: org.xmlpull.v1.XmlPullParserException: Attr.value missing f. https: (position:START_TAG <a href='' https:='utf-8'>@3772:62 in java.io.InputStreamReader@31a78026)
	at com.reandroid.xml.kxml2.KXmlParser.checkRelaxed(KXmlParser.java:303)
	at com.reandroid.xml.kxml2.KXmlParser.parseStartTag(KXmlParser.java:1130)
	at com.reandroid.xml.kxml2.KXmlParser.next(KXmlParser.java:370)
	at com.reandroid.xml.kxml2.KXmlParser.next(KXmlParser.java:311)
	at com.reandroid.xml.CloseableParser.next(CloseableParser.java:37)
	at com.reandroid.xml.XMLElement.parse(XMLElement.java:516)
	at com.reandroid.xml.XMLElement.parseElement(XMLElement.java:659)
	at com.reandroid.arsc.coder.xml.XmlCoder$ValuesXml.encode(XmlCoder.java:234)
	at com.reandroid.arsc.coder.xml.XmlCoder$ValuesXml.encode(XmlCoder.java:214)
	at com.reandroid.apk.xmlencoder.XMLTableBlockEncoder.encodeValuesDir(XMLTableBlockEncoder.java:290)
	at com.reandroid.apk.xmlencoder.XMLTableBlockEncoder.encodeResDir(XMLTableBlockEncoder.java:277)
	at com.reandroid.apk.xmlencoder.XMLTableBlockEncoder.encodeValues(XMLTableBlockEncoder.java:172)
	at com.reandroid.apk.xmlencoder.XMLTableBlockEncoder.scanResourceFiles(XMLTableBlockEncoder.java:102)
	at com.reandroid.apk.xmlencoder.XMLTableBlockEncoder.scanResourcesDirectory(XMLTableBlockEncoder.java:81)
	... 10 more

Used apk file
You can find the apk file here

Additional context
Here's where the error comes from.

  <string name="mr_chooser_wifi_learn_more"><a href="" https://support.google.com/chromecast/?p="trouble-finding-devices">Learn more</a></string>
@REAndroid
Copy link
Owner

I confirm, it will be fixed soon.
Thank you for reporting!

@REAndroid REAndroid added the bug Something isn't working label Feb 15, 2024
REAndroid added a commit to REAndroid/ARSCLib that referenced this issue Feb 15, 2024
REAndroid added a commit that referenced this issue Feb 15, 2024
@REAndroid
Copy link
Owner

Check the new release 1.3.6

@naijun0403
Copy link
Author

Great! Now it works perfectly well 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants