Alright, so the program I'm creating is like a desktop recovery for android. Now, in order to execute the commands, for example wiping cache, the command needs to be typed out and saved to a .sh file. When I open up a program like notepad++ and type out a command (i.e. wipe cache) and save it as a unix script file (.sh), and load it into my phone, it executes without any issue. However, when I try to do this in my program using the stream writer, and saving the file as .sh, the recovery on my phone can't read it. Even though the files look exactly the same.
Okay, I know this might be a little confusing, but picture this.
On Notepad++ I create a new document, type in, wipe cache, save as Unix script (.sh), and works perfectly.
In my program
FileInfo fi2 = new FileInfo("flash.sh");
StreamWriter writebat2 = fi2.AppendText();
string f = "wipe cache";
writebat2.WriteLine(f);
writebat2.Close();
Now they both produce a file (flash.sh) with the exact same content. However, the one created with my program is unable to be read by the recovery. Any ideas? Thanks.