For avoiding the hacking way, we could refer to https://github.com/mozilla-b2g/gaia/pull/12717#discussion_r8225953.