Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Suggestion] Version name and code in log file

OP Falseclock

22nd June 2014, 02:30 PM   |  #1  
Falseclock's Avatar
OP Senior Member
Flag Almaty
Thanks Meter: 319
 
517 posts
Join Date:Joined: Jun 2012
Donate to Me
More
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, 06:13 PM   |  #2  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter: 15,323
 
2,386 posts
Join Date:Joined: Jan 2012
More
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, 04:07 PM   |  #3  
GermainZ's Avatar
Forum Moderator / Recognized Developer / XDA Portal Team
Thanks Meter: 7,332
 
5,910 posts
Join Date:Joined: Aug 2012
More
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, 05:55 PM   |  #4  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter: 15,323
 
2,386 posts
Join Date:Joined: Jan 2012
More
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, 05:40 PM   |  #5  
hamzahrmalik's Avatar
Senior Member
Thanks Meter: 1,433
 
1,187 posts
Join Date:Joined: May 2013
Donate to Me
More
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