MCPcopy Create free account
hub / github.com/google/gapid / SetDebuggableFlag

Function SetDebuggableFlag

core/os/android/binaryxml/debuggable.go:58–70  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

56// modifies it to set android:debuggable="true" under the <application/> element
57// and writes it to the provided Writer.
58func 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}

Callers

nothing calls this directly

Calls 4

decodeXmlTreeFunction · 0.85
WriteMethod · 0.65
encodeMethod · 0.65

Tested by

no test coverage detected