A jury in December found that Google broke US antitrust laws through deals and billing rules that gave an unfair boost to its Google Play app store. On Thursday, a judge began laying out how Google could be forced to change its business as a penalty. The remedies under consideration could drive the most consequential shakeup ever to Google’s dominance over the Android universe.

Fortnite video game developer Epic Games, which beat Google in the trial that saw a jury declare the Play store an illegal monopoly, is demanding that federal judge James Donato ban Google from contracts that deter competition. Epic also wants Google to be forced to help competing stores list more apps, giving them a competitive boost. The changes could enable Epic to realize its long-held plan to increase revenue by processing in-game purchases in Fortnite and other titles without using Google’s payment system, and marketing games via its own app store.

Google contends that Epic’s demands would threaten its users’ security and impair the businesses of partners, including Android device makers and app developers. The search company is appealing the jury’s verdict, which could delay the rollout of any penalties for many years—or void them altogether. But Google over the past few years already has had to make some costly changes in Europe and Asia due to court losses and new laws affecting the Play store, and a trial with Epic is currently underway in Australia.

“I want to be clear: Google as an illegal monopolist will have to pay some penalties,” Donato told Epic and Google at a hearing in San Francisco on Thursday. He explained that Google’s loss requires him to pry open the company’s grip on the Android ecosystem in a way that ends Google’s illegal monopoly and also removes its ill-gotten gains from years of unfair dominance.

That would mean major changes for the industry that has built up around Google’s Android operating system—and potentially more choices for consumers. It could require Google investing cash into new projects to make things right, Donato said.

Donato expressed frustration with Google’s claims that any changes would be bad for consumers and other businesses. “To jump up and down and say the new way is going to be a world no one wants to live in, it’s unfounded,” he said. But he also spent hours in the hearing quizzing two economists, one appearing on behalf of each company, about how to craft penalties for Google without being unreasonable.

Among Epic’s requests is that Google be barred from striking deals that prevent or discourage companies from working with alternatives to its app store. In the past the company has required hardware companies that want to offer Google Play on their devices to agree not to work with or promote alternative app stores. That prevented most consumers from ever seeing other app stores, since most device makers want to offer Google’s app store, because it is the largest.

Rival app stores such as those from Amazon and Samsung also have struggled to persuade developers to list their apps outside of Google Play, because maintaining apps in multiple stores takes extra work. To even the playing field, Epic proposes that Google be required for six years to provide rival stores a way to list apps that are hosted on Google Play. That would allow people to browse alternative stores without feeling they are missing out on popular apps, giving the store a better chance of success in the long term.

“Rival app stores [would] have incentives to sign up developers so that they can get revenue streams and so that they’re not dead in the water when this provision expires,” Douglas Bernheim, a Stanford University economist testifying on behalf of Epic, told Donato. “Google [would have] incentives to continue to sign up developers so that they’re not at a disadvantage.”

Matthew Gentzkow, a Stanford economist on Google’s side, responded that developers could suffer harm if their apps appeared in alternative stores that have more relaxed content policies than Google’s, because in that case their apps could appear next to, say, pornography apps that Google bars. “It could undermine their brand and reputation with users,” Gentzkow said.

Donato also raised questions about how to ease Google’s requirement that apps in the Play store use Google’s billing system to process payments, one of the rules that triggered Epic’s lawsuit. And he expressed a desire to find a way to “reduce the friction,” as he called it, that users face when trying to download an app from an app store other than Play on Android devices. Google’s operating system has been found to interrupt the process with a series of warnings that bypassing Play could trigger security issues, potentially deterring people from following through with a download.

Donato is expected to hear final arguments from Google and Epic in August. He told attorneys that he would then officially issue penalties by the Labor Day holiday in September, but then corrected himself, saying they would come “promptly.”