I tried a factory reset with my Samsung TV after a firmware update injected advertising into the UI. Unfortunately it remained on the current firmware version and just cleared the settings.
Did you buy it with a credit card? Check to see if your credit card has additional return/warranty periods.
Or, if you have the time and opportunity, sue the manufacturer in small claims court.
Better yet, tell your friends and family about how the ads start after the return period closed, and encourage everyone not buy that garbage in the first place.