Before beginning, ensure you have backed up all personal data, as this process will erase everything on the tablet.
Since the Samsung Galaxy Tab 2 10.1 (GT-P5100) is a legacy device that officially stopped at Android 4.2, installing Android 7.1.2 requires using a custom ROM. The best feature regarding this specific update is actually a centered around Project Treble and Modernization .
: You can also find versions of SlimRoms or /e/ OS based on Android 7.1.2.
Ensure you're comfortable with the risks, have a good understanding of the process, and are prepared to troubleshoot.