Search code examples
androidadb

ADB commands in code


Is there a way to run adb commands like

adb get-state

in the code I write in eclipse

For e.g.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    testADB();
}

and in testADB() run some adb commands?


Solution

  • Adithya , I believe you are trying to drop adb commands programmatically.Check this link.