Despite the internal turmoil that saw its heir-apparent sentenced to five years in prison on corruption charges and the resignation of its vice-chairman, Samsung had a great 2017 and posted record profits for Q4.

Samsung’s revenue for the last quarter was $62 billion with an operating profit of $14 billion. The company recorded a 64 percent YoY increase, making this its most profitable quarter ever. Overall, the tech giant brought in a full-year profit of $50.7 billion on the back of $225 billion in revenue.

Once again, it was Samsung’s memory and display businesses that stood out. There was increased demand for OLED panels for premium smartphones like the iPhone X—Samsung provides the panels for Apple's high-end handset. Looking forward, the company expects “OLED to become a mainstream panel in the smartphone industry” this year.

2017 also saw Samsung’s chipset division gross a total revenue of $69 billion. This figure beat Intel’s $62.8 billion, meaning the US firm has now been replaced as the world’s largest chipmaker for the first time since 1992.

Despite the record profits in Q4, Samsung’s mobile division saw a decrease in smartphone shipments during this period “due to the lineup optimization of low-end models.” But sales of flagship models like the Galaxy Note 8 were up from the previous quarter. Operating profit for the division was down to $2.25 billion from $2.3 billion in Q4 2016 due to an increase in marketing costs over the holiday season.

Samsung believes its mobile division will recover in the first quarter of 2018 thanks to a "growing replacement demand for premium smartphones." It has high hopes for the Galaxy S9, which will launch on February 25th.