Catalysis of the transfer an alpha-D-glucosyl residue in a (1->4)-alpha-D-glucan to the primary hydroxy group of glucose, free or combined in a (1->4)-alpha-D-glucan.
1,4-alpha-D-glucan 6-alpha-D-glucosyltransferase activity