SetDebuggableFlag takes a Reader that produces a manifest binary xml, modifies it to set android:debuggable="true" under the element and writes it to the provided Writer.
(r io.Reader, w io.Writer)
| 56 | // modifies it to set android:debuggable="true" under the <application/> element |
| 57 | // and writes it to the provided Writer. |
| 58 | func SetDebuggableFlag(r io.Reader, w io.Writer) error { |
| 59 | tree, err := decodeXmlTree(r) |
| 60 | if err != nil { |
| 61 | return err |
| 62 | |
| 63 | } |
| 64 | |
| 65 | if !setManifestApplicationDebuggableAttributeToTrue(tree) { |
| 66 | return fmt.Errorf("error modifying manifest") |
| 67 | } |
| 68 | _, err = w.Write(tree.encode()) |
| 69 | return err |
| 70 | } |
nothing calls this directly
no test coverage detected