Sub btnCopy_Click
Dim Command, Runner As String
Dim StdOut, StdErr As StringBuilder
Dim Result As Int
Dim file1 As String = "/mnt/sdcardEx/com.android.vending apk.apk"
Dim file2 As String = "/system/app/com.android.vending apk.apk"
Dim p As Phone
Dim sb,se As StringBuilder
sb.Initialize
se.Initialize
p.Shell("ls /mnt/sdcardEx",Null,sb,se)
Msgbox(sb,"Files on external sdcard...")
StdOut.Initialize
StdErr.Initialize
Runner = File.Combine(File.DirInternalCache, "runner")
Command = File.Combine(File.DirInternalCache, "command")
File.WriteString(File.DirInternalCache, "runner", "su < " & Command)
File.WriteString(File.DirInternalCache, "command", "chmod 777 /system/app" & CRLF & "mount -o remount" & "cp " & file1 &" > " &file2 & CRLF & "exit") 'Any commands via crlf, and exit at end
Result = Ph.Shell("sh", Array As String(Runner), StdOut, StdErr)
'Msgbox(StdOut.tostring, "")
sb.Initialize
se.Initialize
p.Shell("ls /system/app",Null,sb,se)
Msgbox(sb,"Files in /system/app")
End Sub