I'm running a homebrew for 7 young adult players, and I was worried about this at first too. After the first game, I wasn't sure the game would last. Players constantly check out mentally, socialize, or play with their phones. But they say they enjoy it, and they keep coming back. They're currently at 12th level, and when I said I had a rough outline taking them to 20th, everyone seemed excited to see where it goes.
I agree with a lot of the suggestions above on efficiency in combat and decision making. I accidentally allowed a really tough problem / combat take up an entire 4 hour session (for example) when I should have dropped clues (they didn't need to defeat the 4 mythic fire elementals, there were ways around them).
I keep combat moving as quickly as possible. I find it especially helps to declare the two people who are up, and who is up on deck. I don't mind if they roll their attack rolls in advance (they've been honest to a fault).