You can't achieve it without modifying the source code. And the proper approach in XMPP is to create extensions to the standard packets, not modify them.
You can refer to Cannot Read Custom Attributes From Message TAG when using asmack XMPP library for android?, which provides the details.