Be cautious of "free code" lists found in .txt files online; these are frequently scams or already expired.

Enter the code displayed on your TV screen into the app to finish the connection. Managing Codes in Text (.txt) Files

If you want to save your own purchased codes, simply copy the text and paste it into a note-taking app like Google Keep or a file manager that supports .txt files. How to redeem gift cards, codes, and offers | Xbox Support

If you have received multiple codes in a .txt file (often from third-party retailers), you should copy and paste them one by one into the Microsoft Redeem Page.

While there is no single official "download code" file for Xbox on Android, users typically interact with Xbox codes in two ways: for games or subscriptions, and using setup codes to link the Xbox mobile app to a console. Redeeming Digital Codes on Android