how can I make a file that has information to be built when installing the apk? and how to read/write from it?

I’m making a game for android, and I want to store some information in a file, and when the game is running on an android device, I want to read the information from this file.
I know how to work with files in C#, but I have no idea how to do this with a game I’m going to build for android.
I want a way to create a file and read/write from it. Also, I want this file to be built with the APK file.
In other words, I want to make a file that already has information. I want to be able to read from it when the game is running on android. Also, I need a way on how to read it? I mean, how can I access it on android?

What information are you trying to read/write. Do you actually need this to be in a file?

Not that there is anything stopping you from having a file that you read/write to, but often the easier solution would be to store data in an asset, scripts can be more than just MonoBehaviours, you could write a ScriptableObject that just works as a storage of whatever data you want, this also allows you to leverage the inspector for setting the initial data in the build.

If you’re set on it being a file, to ensure it gets included in the apk and is not a separate file, you would need to include the file in either the resources or the streaming assets folders, that will build it into the apk, then at runtime you would need to read the contents from this on the first install, and immediately write it out to the Application.persistantDataPath (by doing this you will then be able to write changes to the file, which you can’t do to the file in resources or streaming assets locations). On future boots, you can detect the file already exists and read from there instead of reading the one that was initially baked into the app.