I've finally found how a B4A Activity creates its options menu and am giving up at this point as there doesn't appear to be an accessible list of the actual MenuItem objects.
You might be interested to know of a program called
jadx which can look inside an apk and show you the Dalvik code decompiled back to Java.
Jadx is a recent discovery. I have used
JD-GUI for many years to poke around inside jar files.