Source code index is not generated in certain cases
Razican opened this issue · 2 comments
Razican commented
It seems that non-valid UTF-8 files prevent the creation of the src/index.html
file (and probably other files as well). This is the error output for the LinkedIn apk:
WARN: Seems that the package in the AndroidManifest.xml is not the same as the application ID provided. Provided application id: com.linkedin.android-4.1.95@APK4Fun.com, manifest package: com.linkedin.android
Manifest analyzed.
WARN: could not analyze `dist/com.linkedin.android-4.1.95@APK4Fun.com/res/xml/home_tab_messaging.xml`. The analysis will continue, though. Error: stream did not contain valid UTF-8
WARN: could not analyze `dist/com.linkedin.android-4.1.95@APK4Fun.com/res/xml/home_tab_relationships.xml`. The analysis will continue, though. Error: stream did not contain valid UTF-8
WARN: could not analyze `dist/com.linkedin.android-4.1.95@APK4Fun.com/res/xml/home_tab_feed.xml`. The analysis will continue, though. Error: stream did not contain valid UTF-8
WARN: could not analyze `dist/com.linkedin.android-4.1.95@APK4Fun.com/res/xml/home_tab_jobs.xml`. The analysis will continue, though. Error: stream did not contain valid UTF-8
WARN: could not analyze `dist/com.linkedin.android-4.1.95@APK4Fun.com/res/xml/home_tab_notifications.xml`. The analysis will continue, though. Error: stream did not contain valid UTF-8
Source code analyzed.
WARN: There was en error generating HTML report: stream did not contain valid UTF-8
HTML report generated.
Razican commented
So, the issue is the following: In this applications, some XML files get decompressed with non-UTF-8 format. Maybe a bug of ABXML. We try to put that in an HTML file, and it fails, of course. So, I guess that the best thing is to just ignore those errors by printing some warnings until the error (if it exists) gets fixed.
Razican commented
Another option is to remove non-UTF-8 characters and replace them with the replacement character, using to_string_lossy()
. In any case we should show a warning.