Catalysis of the transfer of a segment of a (1->4)-alpha-D-glucan chain to a primary hydroxyl group in a similar glucan chain.
1,4-alpha-D-glucan:1,4-alpha-D-glucan 6-alpha-D-(1,4-alpha-D-glucano)-transferase activity