In #1795 I mentioned some special cases if the source name is package-info.java or module-info.java. In a package-info it's possible to write package private classes or to annotate the package. Jadx renames package-info and module-info to "packageinfo" and "moduleinfo" but doesn't generate code for these special classes. When I created the issue I thought package-info isn't android relevant, because usually package-infos are ignored when building a final apk. But now I found an apk containing package-infos: https://java-program.apk.gold/ (version 1.8) e.g. package "google.android.material.internal" or "google.android.material.internal"
In my opinion jadx should consider "package-info" and "module-info" as valid source/class names and not try to rename it and jadx should generate code for it.
It's possible to simulate this issue with plain java:
@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = "http://schemas.android.com/apk/res/android")
package jadx.packageinfo;
import jakarta.xml.bind.annotation.XmlSchema;
import jakarta.xml.bind.annotation.XmlNsForm;
or simpler without dependencies
@Deprecated
package jadx.packageinfo;
For both package-infos jadx doesn't produce any output and apps would not work as expected (first case).
In #1795 I mentioned some special cases if the source name is package-info.java or module-info.java. In a package-info it's possible to write package private classes or to annotate the package. Jadx renames package-info and module-info to "packageinfo" and "moduleinfo" but doesn't generate code for these special classes. When I created the issue I thought package-info isn't android relevant, because usually package-infos are ignored when building a final apk. But now I found an apk containing package-infos: https://java-program.apk.gold/ (version 1.8) e.g. package "google.android.material.internal" or "google.android.material.internal"
In my opinion jadx should consider "package-info" and "module-info" as valid source/class names and not try to rename it and jadx should generate code for it.
It's possible to simulate this issue with plain java:
or simpler without dependencies
For both package-infos jadx doesn't produce any output and apps would not work as expected (first case).