{"action":"created","comment":{"url":"https://api.github.com/repos/vidstige/jadb/pulls/comments/72969498","id":72969498,"diff_hunk":"@@ -21,14 +21,23 @@ private String findAdbExecutable() {\n         if (android_home == null || android_home.equals(\"\")) {\n             return \"adb\";\n         }\n-\n         return android_home + \"/platform-tools/adb\";\n     }\n \n     public void launch() throws IOException, InterruptedException {\n-        Process p = runtime.exec(new String[]{findAdbExecutable(), \"start-server\"});\n+        executeAdb(\"start-server\");\n+    }\n+\n+    public void kill() throws IOException, InterruptedException {\n+        executeAdb(\"kill-server\");\n+    }\n+\n+    private void executeAdb(String command) throws IOException, InterruptedException {\n+        Process p = runtime.exec(new String[]{findAdbExecutable(), command});\n         p.waitFor();\n         int exitValue = p.exitValue();\n-        if (exitValue != 0) throw new IOException(\"adb exited with exit code: \" + exitValue);\n+        if (exitValue != 0) {\n+            throw new IOException(\"adb \" + command + \" failed with exit code\" + exitValue);\n+        }\n     }\n-}\n+}","path":"src/se/vidstige/jadb/AdbServerLauncher.java","position":27,"original_position":27,"commit_id":"c3f719eb093f3b7de2acb677b03e8973e179e8db","original_commit_id":"c3f719eb093f3b7de2acb677b03e8973e179e8db","user":{"login":"vidstige","id":655605,"avatar_url":"https://avatars.githubusercontent.com/u/655605?v=3","gravatar_id":"","url":"https://api.github.com/users/vidstige","html_url":"https://github.com/vidstige","followers_url":"https://api.github.com/users/vidstige/followers","following_url":"https://api.github.com/users/vidstige/following{/other_user}","gists_url":"https://api.github.com/users/vidstige/gists{/gist_id}","starred_url":"https://api.github.com/users/vidstige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vidstige/subscriptions","organizations_url":"https://api.github.com/users/vidstige/orgs","repos_url":"https://api.github.com/users/vidstige/repos","events_url":"https://api.github.com/users/vidstige/events{/privacy}","received_events_url":"https://api.github.com/users/vidstige/received_events","type":"User","site_admin":false},"body":"add newline at end of file.","created_at":"2016-08-01T12:28:58Z","updated_at":"2016-08-01T12:28:58Z","html_url":"https://github.com/vidstige/jadb/pull/30#discussion_r72969498","pull_request_url":"https://api.github.com/repos/vidstige/jadb/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/vidstige/jadb/pulls/comments/72969498"},"html":{"href":"https://github.com/vidstige/jadb/pull/30#discussion_r72969498"},"pull_request":{"href":"https://api.github.com/repos/vidstige/jadb/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/vidstige/jadb/pulls/30","id":79554235,"html_url":"https://github.com/vidstige/jadb/pull/30","diff_url":"https://github.com/vidstige/jadb/pull/30.diff","patch_url":"https://github.com/vidstige/jadb/pull/30.patch","issue_url":"https://api.github.com/repos/vidstige/jadb/issues/30","number":30,"state":"open","locked":false,"title":"Adding getState functions, connection, disconnection, Kill server","user":{"login":"AlexanderKol","id":20703125,"avatar_url":"https://avatars.githubusercontent.com/u/20703125?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderKol","html_url":"https://github.com/AlexanderKol","followers_url":"https://api.github.com/users/AlexanderKol/followers","following_url":"https://api.github.com/users/AlexanderKol/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKol/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKol/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKol/orgs","repos_url":"https://api.github.com/users/AlexanderKol/repos","events_url":"https://api.github.com/users/AlexanderKol/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKol/received_events","type":"User","site_admin":false},"body":"Good afternoon, I changed commit regarding your comments. Sorry, I think a little work with github true test, I have this first practice.","created_at":"2016-08-01T11:35:19Z","updated_at":"2016-08-01T12:28:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47f4efdd86a41aeebd9ce584115591e2da69041d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vidstige/jadb/pulls/30/commits","review_comments_url":"https://api.github.com/repos/vidstige/jadb/pulls/30/comments","review_comment_url":"https://api.github.com/repos/vidstige/jadb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vidstige/jadb/issues/30/comments","statuses_url":"https://api.github.com/repos/vidstige/jadb/statuses/c3f719eb093f3b7de2acb677b03e8973e179e8db","head":{"label":"AlexanderKol:master","ref":"master","sha":"c3f719eb093f3b7de2acb677b03e8973e179e8db","user":{"login":"AlexanderKol","id":20703125,"avatar_url":"https://avatars.githubusercontent.com/u/20703125?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderKol","html_url":"https://github.com/AlexanderKol","followers_url":"https://api.github.com/users/AlexanderKol/followers","following_url":"https://api.github.com/users/AlexanderKol/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKol/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKol/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKol/orgs","repos_url":"https://api.github.com/users/AlexanderKol/repos","events_url":"https://api.github.com/users/AlexanderKol/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKol/received_events","type":"User","site_admin":false},"repo":{"id":64394533,"name":"jadb","full_name":"AlexanderKol/jadb","owner":{"login":"AlexanderKol","id":20703125,"avatar_url":"https://avatars.githubusercontent.com/u/20703125?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderKol","html_url":"https://github.com/AlexanderKol","followers_url":"https://api.github.com/users/AlexanderKol/followers","following_url":"https://api.github.com/users/AlexanderKol/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKol/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKol/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKol/orgs","repos_url":"https://api.github.com/users/AlexanderKol/repos","events_url":"https://api.github.com/users/AlexanderKol/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexanderKol/jadb","description":"ADB Client in pure Java.","fork":true,"url":"https://api.github.com/repos/AlexanderKol/jadb","forks_url":"https://api.github.com/repos/AlexanderKol/jadb/forks","keys_url":"https://api.github.com/repos/AlexanderKol/jadb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexanderKol/jadb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexanderKol/jadb/teams","hooks_url":"https://api.github.com/repos/AlexanderKol/jadb/hooks","issue_events_url":"https://api.github.com/repos/AlexanderKol/jadb/issues/events{/number}","events_url":"https://api.github.com/repos/AlexanderKol/jadb/events","assignees_url":"https://api.github.com/repos/AlexanderKol/jadb/assignees{/user}","branches_url":"https://api.github.com/repos/AlexanderKol/jadb/branches{/branch}","tags_url":"https://api.github.com/repos/AlexanderKol/jadb/tags","blobs_url":"https://api.github.com/repos/AlexanderKol/jadb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexanderKol/jadb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexanderKol/jadb/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexanderKol/jadb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexanderKol/jadb/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexanderKol/jadb/languages","stargazers_url":"https://api.github.com/repos/AlexanderKol/jadb/stargazers","contributors_url":"https://api.github.com/repos/AlexanderKol/jadb/contributors","subscribers_url":"https://api.github.com/repos/AlexanderKol/jadb/subscribers","subscription_url":"https://api.github.com/repos/AlexanderKol/jadb/subscription","commits_url":"https://api.github.com/repos/AlexanderKol/jadb/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexanderKol/jadb/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexanderKol/jadb/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexanderKol/jadb/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexanderKol/jadb/contents/{+path}","compare_url":"https://api.github.com/repos/AlexanderKol/jadb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexanderKol/jadb/merges","archive_url":"https://api.github.com/repos/AlexanderKol/jadb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexanderKol/jadb/downloads","issues_url":"https://api.github.com/repos/AlexanderKol/jadb/issues{/number}","pulls_url":"https://api.github.com/repos/AlexanderKol/jadb/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexanderKol/jadb/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexanderKol/jadb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexanderKol/jadb/labels{/name}","releases_url":"https://api.github.com/repos/AlexanderKol/jadb/releases{/id}","deployments_url":"https://api.github.com/repos/AlexanderKol/jadb/deployments","created_at":"2016-07-28T12:41:03Z","updated_at":"2016-07-28T12:41:04Z","pushed_at":"2016-08-01T11:31:42Z","git_url":"git://github.com/AlexanderKol/jadb.git","ssh_url":"git@github.com:AlexanderKol/jadb.git","clone_url":"https://github.com/AlexanderKol/jadb.git","svn_url":"https://github.com/AlexanderKol/jadb","homepage":"","size":514,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vidstige:master","ref":"master","sha":"f362563e82226796ad67347da096a395542bcbcd","user":{"login":"vidstige","id":655605,"avatar_url":"https://avatars.githubusercontent.com/u/655605?v=3","gravatar_id":"","url":"https://api.github.com/users/vidstige","html_url":"https://github.com/vidstige","followers_url":"https://api.github.com/users/vidstige/followers","following_url":"https://api.github.com/users/vidstige/following{/other_user}","gists_url":"https://api.github.com/users/vidstige/gists{/gist_id}","starred_url":"https://api.github.com/users/vidstige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vidstige/subscriptions","organizations_url":"https://api.github.com/users/vidstige/orgs","repos_url":"https://api.github.com/users/vidstige/repos","events_url":"https://api.github.com/users/vidstige/events{/privacy}","received_events_url":"https://api.github.com/users/vidstige/received_events","type":"User","site_admin":false},"repo":{"id":11668234,"name":"jadb","full_name":"vidstige/jadb","owner":{"login":"vidstige","id":655605,"avatar_url":"https://avatars.githubusercontent.com/u/655605?v=3","gravatar_id":"","url":"https://api.github.com/users/vidstige","html_url":"https://github.com/vidstige","followers_url":"https://api.github.com/users/vidstige/followers","following_url":"https://api.github.com/users/vidstige/following{/other_user}","gists_url":"https://api.github.com/users/vidstige/gists{/gist_id}","starred_url":"https://api.github.com/users/vidstige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vidstige/subscriptions","organizations_url":"https://api.github.com/users/vidstige/orgs","repos_url":"https://api.github.com/users/vidstige/repos","events_url":"https://api.github.com/users/vidstige/events{/privacy}","received_events_url":"https://api.github.com/users/vidstige/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vidstige/jadb","description":"ADB Client in pure Java.","fork":false,"url":"https://api.github.com/repos/vidstige/jadb","forks_url":"https://api.github.com/repos/vidstige/jadb/forks","keys_url":"https://api.github.com/repos/vidstige/jadb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vidstige/jadb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vidstige/jadb/teams","hooks_url":"https://api.github.com/repos/vidstige/jadb/hooks","issue_events_url":"https://api.github.com/repos/vidstige/jadb/issues/events{/number}","events_url":"https://api.github.com/repos/vidstige/jadb/events","assignees_url":"https://api.github.com/repos/vidstige/jadb/assignees{/user}","branches_url":"https://api.github.com/repos/vidstige/jadb/branches{/branch}","tags_url":"https://api.github.com/repos/vidstige/jadb/tags","blobs_url":"https://api.github.com/repos/vidstige/jadb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vidstige/jadb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vidstige/jadb/git/refs{/sha}","trees_url":"https://api.github.com/repos/vidstige/jadb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vidstige/jadb/statuses/{sha}","languages_url":"https://api.github.com/repos/vidstige/jadb/languages","stargazers_url":"https://api.github.com/repos/vidstige/jadb/stargazers","contributors_url":"https://api.github.com/repos/vidstige/jadb/contributors","subscribers_url":"https://api.github.com/repos/vidstige/jadb/subscribers","subscription_url":"https://api.github.com/repos/vidstige/jadb/subscription","commits_url":"https://api.github.com/repos/vidstige/jadb/commits{/sha}","git_commits_url":"https://api.github.com/repos/vidstige/jadb/git/commits{/sha}","comments_url":"https://api.github.com/repos/vidstige/jadb/comments{/number}","issue_comment_url":"https://api.github.com/repos/vidstige/jadb/issues/comments{/number}","contents_url":"https://api.github.com/repos/vidstige/jadb/contents/{+path}","compare_url":"https://api.github.com/repos/vidstige/jadb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vidstige/jadb/merges","archive_url":"https://api.github.com/repos/vidstige/jadb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vidstige/jadb/downloads","issues_url":"https://api.github.com/repos/vidstige/jadb/issues{/number}","pulls_url":"https://api.github.com/repos/vidstige/jadb/pulls{/number}","milestones_url":"https://api.github.com/repos/vidstige/jadb/milestones{/number}","notifications_url":"https://api.github.com/repos/vidstige/jadb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vidstige/jadb/labels{/name}","releases_url":"https://api.github.com/repos/vidstige/jadb/releases{/id}","deployments_url":"https://api.github.com/repos/vidstige/jadb/deployments","created_at":"2013-07-25T18:45:02Z","updated_at":"2016-07-30T01:25:11Z","pushed_at":"2016-08-01T11:35:19Z","git_url":"git://github.com/vidstige/jadb.git","ssh_url":"git@github.com:vidstige/jadb.git","clone_url":"https://github.com/vidstige/jadb.git","svn_url":"https://github.com/vidstige/jadb","homepage":"","size":574,"stargazers_count":70,"watchers_count":70,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vidstige/jadb/pulls/30"},"html":{"href":"https://github.com/vidstige/jadb/pull/30"},"issue":{"href":"https://api.github.com/repos/vidstige/jadb/issues/30"},"comments":{"href":"https://api.github.com/repos/vidstige/jadb/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/vidstige/jadb/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/vidstige/jadb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vidstige/jadb/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/vidstige/jadb/statuses/c3f719eb093f3b7de2acb677b03e8973e179e8db"}}}}
{"actor":{"display_login":"vidstige"}}