Involved in the biosynthesis of the maltose-1-phosphate (M1P) building block required for alpha-glucan production by the key enzyme GlgE. Catalyzes the formation of an alpha-1,4 linkage between glucose from ADP-glucose and glucose 1-phosphate (G1P) to yield maltose-1-phosphate (M1P). ADP-alpha-D-glucose + alpha-D-glucose 1-phosphate = ADP + alpha-maltose 1-phosphate + H(+) Glycan biosynthesis; glycogen biosynthesis. Cells lacking this gene do not show a discernible effect on alpha-glucan content and do not accumulate ADP-glucose. Combined inactivation of both glgM and glgB completely blocks alpha-glucan production. Combined inactivation of both glgM and ostA accumulates ADP-glucose. In the double mutant treS-glgE, inactivation of the glgM gene fully abolishes maltose 1-phosphate (M1P) production. Maltose-1-phosphate (M1P) is generated by two alternative routes: the TreS-Pep2 branch and the GlgC-GlgM branch, however it seems that the GlgC-GlgM branch provides most of M1P for the GlgE pathway in M.smegmatis. Belongs to the glycosyltransferase group 1 family.