ByteDance finalized a deal creating a majority U.S.-owned TikTok joint venture to secure American user data and avoid a potential U.S. ban.