| 193 | } |
| 194 | |
| 195 | func cp(dst, src string) error { |
| 196 | r, err := os.Open(src) |
| 197 | if err != nil { |
| 198 | return fmt.Errorf("failed to read source: %v", err) |
| 199 | } |
| 200 | defer r.Close() |
| 201 | w, err := os.Create(dst) |
| 202 | if err != nil { |
| 203 | return fmt.Errorf("failed to open destination: %v", err) |
| 204 | } |
| 205 | _, err = io.Copy(w, r) |
| 206 | cerr := w.Close() |
| 207 | if err != nil { |
| 208 | return err |
| 209 | } |
| 210 | return cerr |
| 211 | } |
| 212 | |
| 213 | const androidmanifest = `<?xml version="1.0" encoding="utf-8"?> |
| 214 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |