Enhancement Request: Nicer Json output for `info` command
When I run:
java -jar apkeditor.jar info -i input.apk -t json
It outputs a JSON list of many Dicts. For example:
[
{
"package":"com.waze"
},
{
"VersionCode":1021577
},
{
"VersionName":"9999.46.0.2"
},
{
"AppName":"Waze"
},
{
"AppIcon":"res/drawable-ldpi-v4/launch_icon.png"
},
{
"application-class":"com.waze.WazeApplication"
},
{
"activity-main":"com.waze.FreeMapAppActivity"
}
]
This isn't the most optimized output for anything automated. Lookups are not easy. It would better to have this output:
[
{
"package":"com.waze",
"VersionCode":1021577,
"VersionName":"9999.46.0.2",
"AppName":"Waze",
"AppIcon":"res/drawable-ldpi-v4/launch_icon.png",
"application-class":"com.waze.WazeApplication",
"activity-main":"com.waze.FreeMapAppActivity",
}
]
With this output, it will be easy to lookup any key and get a value. Example: result.getString("activity-main");. The current implementation looking through each set of key, value to find the right one.
@REAndroid please let me know your thoughts, thank you for this amazing project!
@SZRabinowitz Sorry for late reply,
Your points makes much sense, my initial thought while designing info was to provide information specific as per user demand in any of offered formats, for example you might need only to print package and dex.
This info feature needs a lot modifications including using uniform and widely used names like the one defined under AndroidManifest.
I currently busy at massive rework on ARSCLib, I highly appreciate if you (or someone) do PR.
Thank you!