[Suggestion] Version name and code in log file

546 posts
Thanks Meter: 361
Post Reply Subscribe to Thread Email Thread
Dear @rovo89,

What if add version name and code in log file when modules are loading?

Loading Xposed v54 (for Zygote)...
Running ROM 'KOT49H release-keys' with fingerprint 'htc/htc_europe/m7cdug:4.4.2/KOT49H/342802.6:user/release-keys'
Loading modules from /data/app/kz.virtex.htc.tweaker-1.apk
Loading class kz.virtex.htc.tweaker.XMain
Name: 8.5.13, Code: 256
Loading modules from /data/app/com.sensetoolbox.six-1.apk
Loading class com.sensetoolbox.six.mods.XMain
Name: 1.0.7, Code: 15

Very useful when receiving logs from users and during development when module crashes system.
22nd June 2014, 05:13 PM |#2  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter: 38,533
Donate to Me
A good idea, but the problem is that the package manager service isn't running at that time. So this information would have to be parsed out of the AndroidManifest.xml manually. There is a PackageParser class, but it's quite complex. It could be considered, but it would have to be carefully tested to avoid unwanted side-effects. Keep in mind that this code runs before Android begins to start, and from past experiences I know that some classes on some ROMs should better not be used that early. Not sure if this would also be the case for PackageParser or its dependencies.
23rd June 2014, 03:07 PM |#3  
GermainZ's Avatar
Forum Moderator / Recognized Developer / XDA Portal Team
Thanks Meter: 8,373
Could it not be stored by the Xposed Installer? Basically, instead of saving the module's name on each line in modules.list (IIRC), it'd put the name, version name and code separated by e.g. commas.
23rd June 2014, 04:55 PM |#4  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter: 38,533
Donate to Me
That would be an option. Not 100% reliable, but unless something goes really wrong (e.g. someone replaces the APK directly), it should be fine.
This topic and your suggestion goes a bit into the direction of a suggestion @M66B made - storing the start class name in the manifest instead of assets/xposed_init.
The Following 3 Users Say Thank You to rovo89 For This Useful Post: [ View ]
3rd July 2014, 04:40 PM |#5  
hamzahrmalik's Avatar
Senior Member
Thanks Meter: 1,722
Donate to Me
This doesn't really solve the problem but I think I'll share
For one if my mods I provided a report error button
The button creates a log by getting the Xposed Log and appending version
Number etc and saving to SD card
So users can easily get logs AND I can easily sove problems
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes