Tr
Ideally you should start a new thread for a Q like this, but to try and help the problem is the location of the file, you need
to tell it where it is, it should be located under the directories that form part of your App, such as :
Code:
TextWriteLine.Initialize(File.OpenOutput(File.DirInternal, "yourfile.txt", False))
I think it would be best to use the DirInternal, then prepend the /data/ part to your file name..
HTH
I tried the suggestion, no luck.
I also tried a SU account --but instead of creating /data/local.prop it created /<packagename>/local.prop
Sub Activity_Create(FirstTime As Boolean)
Dim Command, Runner As String
Dim StdOut, StdErr As StringBuilder
Dim Result As Int
Dim Ph As Phone
StdOut.Initialize
StdErr.Initialize
Runner = File.Combine(File.DirInternal, "runner")
Command = File.Combine(File.DirInternal, "command")
File.WriteString(File.DirInternalCache, "runner", "su < " & Command)
File.WriteString(File.DirInternalCache, "command", "echo service.adb.tcp.port=5555 >> /data/local.prop" & CRLF & "exit") 'Any commands via crlf, and exit at end
Result = Ph.Shell("sh", Array As String(Runner), StdOut, StdErr)
Log("Result: " & Result)
Runner = File.Combine(File.DirInternal, "runner")
Command = File.Combine(File.DirInternal, "command")
File.WriteString(File.DirInternalCache, "runner", "su < " & Command)
File.WriteString(File.DirInternalCache, "command", "echo ro.kernel.android.bootanim=0 >> /data/local.prop" & CRLF & "exit") 'Any commands via crlf, and exit at end
Result = Ph.Shell("sh", Array As String(Runner), StdOut, StdErr)
Log("Result: " & Result)
Runner = File.Combine(File.DirInternal, "runner")
Command = File.Combine(File.DirInternal, "command")
File.WriteString(File.DirInternalCache, "runner", "su < " & Command)
File.WriteString(File.DirInternalCache, "command", "echo debug.sf.nobootanimation=1 >> /data/local.prop" & CRLF & "exit") 'Any commands via crlf, and exit at end
Result = Ph.Shell("sh", Array As String(Runner), StdOut, StdErr)
Log("Result: " & Result)
End Sub