This the log :
[Appium] Welcome to Appium v1.12.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“appActivity”:".ApiDemos",“appPackage”:“io.appium.android.apis”,“platformVersion”:“8.1.0”,“platformName”:“Android”,“udid”:“5200a8764f5ac445”,“deviceName”:“GAlaxy J7 NXT”},“capabilities”:{“firstMatch”:[{“appium:appActivity”:".ApiDemos",“appium:appPackage”:“io.appium.android.apis”,“appium:deviceName”:“GAlaxy J7 NXT”,“platformName”:“android”,“appium:platformVersion”:“8.1.0”,“appium:udid”:“5200a8764f5ac445”}]}}
[W3C] Calling AppiumDriver.createSession() with args: [{“appActivity”:".ApiDemos",“appPackage”:“io.appium.android.apis”,“platformVersion”:“8.1.0”,“platformName”:“Android”,“udid”:“5200a8764f5ac445”,“deviceName”:“GAlaxy J7 NXT”},null,{“firstMatch”:[{“appium:appActivity”:".ApiDemos",“appium:appPackage”:“io.appium.android.apis”,“appium:deviceName”:“GAlaxy J7 NXT”,“platformName”:“android”,“appium:platformVersion”:“8.1.0”,“appium:udid”:“5200a8764f5ac445”}]}]
[BaseDriver] Event ‘newSessionRequested’ logged at 1560760157403 (13:59:17 GMT+0530 (India Standard Time))
[Appium] DeprecationWarning: ‘automationName’ capability was not provided. Future versions of Appium will require ‘automationName’ capability to be set for Android sessions.
[Appium] Setting automation to ‘UiAutomator1’.
[Appium] Consider setting ‘automationName’ capability to ‘UiAutomator2’ on Android >= 6, since UIAutomator1 framework is not maintained anymore by the OS vendor.
[Appium] Appium v1.12.1 creating new AndroidDriver (v4.11.0) session
[Appium] Capabilities:
[Appium] platformName: android
[Appium] appActivity: .ApiDemos
[Appium] appPackage: io.appium.android.apis
[Appium] deviceName: GAlaxy J7 NXT
[Appium] platformVersion: 8.1.0
[Appium] udid: 5200a8764f5ac445
[BaseDriver] W3C capabilities {“alwaysMatch”:{“platformNa… and MJSONWP desired capabilities {“appActivity”:”.ApiDemos",… were provided
[BaseDriver] Creating session with W3C capabilities: {“alwaysMatch”:{"platformNa…
[BaseDriver] Session created with session id: 980e1fab-b953-4fd3-8a8a-54b5ef84c25c
[ADB] Checking whether adb is present
[ADB] Found 1 ‘build-tools’ folders under ‘C:\Users\Senthil\AppData\Local\Android\Sdk’ (newest first):
[ADB] C:/Users/Senthil/AppData/Local/Android/Sdk/build-tools/28.0.3
[ADB] Using adb.exe from C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices…
[ADB] 1 device(s) connected
[AndroidDriver] Using device: 5200a8764f5ac445
[ADB] Setting device id to 5200a8764f5ac445
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell getprop ro.build.version.sdk’
[ADB] Current device property ‘ro.build.version.sdk’: 27
[ADB] Device API level: 27
[AndroidDriver] Consider setting ‘automationName’ capability to ‘uiautomator2’ on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
[AndroidDriver] App file was not listed, instead we’re going to run io.appium.android.apis directly on the device
[AndroidDriver] Checking whether package is present on the device
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell pm list packages io.appium.android.apis’
[AndroidDriver] Starting Android session
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 wait-for-device’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell echo ping’
[AndroidDriver] Pushing settings apk to device…
[ADB] Getting install status for io.appium.settings
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell dumpsys package io.appium.settings’
[ADB] ‘io.appium.settings’ is installed
[ADB] Getting package info for ‘io.appium.settings’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell dumpsys package io.appium.settings’
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from C:\Users\Senthil\AppData\Local\Android\Sdk\build-tools\28.0.3\aapt.exe
[ADB] The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘2.14.0’ >= ‘2.14.0’)
[ADB] There is no need to install/upgrade ‘C:\Users\Senthil\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk’
[ADB] Getting IDs of all ‘io.appium.settings’ processes
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell ‘pgrep --help; echo $?’’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell pgrep -f ^io\.appium\.settings$’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell appops set io.appium.settings android:mock_location allow’
[Logcat] Starting logcat capture
[ADB] Getting device platform version
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell getprop ro.build.version.release’
[ADB] Current device property ‘ro.build.version.release’: 8.1.0
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell wm size’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell getprop ro.product.model’
[ADB] Current device property ‘ro.product.model’: SM-J701F
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell getprop ro.product.manufacturer’
[ADB] Current device property ‘ro.product.manufacturer’: samsung
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] No app capability. Assuming it is already on the device
[ADB] Getting install status for io.appium.android.apis
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell dumpsys package io.appium.android.apis’
[ADB] ‘io.appium.android.apis’ is installed
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell am force-stop io.appium.android.apis’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell pm clear io.appium.android.apis’
[AndroidDriver] Performed fast reset on the installed ‘io.appium.android.apis’ application (stop and clear)
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 forward tcp:4724 tcp:4724’
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state ‘starting’
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: ‘AppiumBootstrap.jar’
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 push C:\Users\Senthil\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-android-driver\bootstrap\bin\AppiumBootstrap.jar /data/local/tmp/’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting IDs of all ‘uiautomator’ processes
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell pgrep -f ^uiautomator$’
[ADB] No ‘uiautomator’ process has been found
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s",“5200a8764f5ac445”,“shell”,“uiautomator”,“runtest”,“AppiumBootstrap.jar”,"-c",“io.appium.android.bootstrap.Bootstrap”,"-e",“pkg”,“io.appium.android.apis”,"-e",“disableAndroidWatchers”,false,"-e",“acceptSslCerts”,false]
[UiAutomator] Moving to state ‘online’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell dumpsys window’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell am start -W -n io.appium.android.apis/.ApiDemos -S’
[Appium] New AndroidDriver session created successfully, session 980e1fab-b953-4fd3-8a8a-54b5ef84c25c added to master session list
[BaseDriver] Event ‘newSessionStarted’ logged at 1560760177936 (13:59:37 GMT+0530 (India Standard Time))
[W3C (980e1fab)] Cached the protocol value ‘W3C’ for the new session 980e1fab-b953-4fd3-8a8a-54b5ef84c25c
[W3C (980e1fab)] Responding to client with driver.createSession() result: {“capabilities”:{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:".ApiDemos",“appPackage”:“io.appium.android.apis”,“deviceName”:“GAlaxy J7 NXT”,“platformVersion”:“8.1.0”,“udid”:“5200a8764f5ac445”},“platformName”:“android”,“appActivity”:".ApiDemos",“appPackage”:“io.appium.android.apis”,“deviceName”:“5200a8764f5ac445”,“platformVersion”:“8.1.0”,“udid”:“5200a8764f5ac445”,“deviceUDID”:“5200a8764f5ac445”,“deviceScreenSize”:“720x1280”,“deviceModel”:“SM-J701F”,“deviceManufacturer”:“samsung”}}
[HTTP] <-- POST /wd/hub/session 200 20554 ms - 746
[HTTP]
[HTTP] --> GET /wd/hub/session/980e1fab-b953-4fd3-8a8a-54b5ef84c25c
[HTTP] {}
[W3C (980e1fab)] Calling AppiumDriver.getSession() with args: [“980e1fab-b953-4fd3-8a8a-54b5ef84c25c”]
[W3C (980e1fab)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:".ApiDemos",“appPackage”:“io.appium.android.apis”,“deviceName”:“GAlaxy J7 NXT”,“platformVersion”:“8.1.0”,“udid”:“5200a8764f5ac445”},“platformName”:“android”,“appActivity”:".ApiDemos",“appPackage”:“io.appium.android.apis”,“deviceName”:“5200a8764f5ac445”,“platformVersion”:“8.1.0”,“udid”:“5200a8764f5ac445”,“deviceUDID”:“5200a8764f5ac445”,“deviceScreenSize”:“720x1280”,“deviceModel”:“SM-J701F”,“deviceManufacturer”:“samsung”}
[HTTP] <-- GET /wd/hub/session/980e1fab-b953-4fd3-8a8a-54b5ef84c25c 200 127 ms - 678
[HTTP]
[AndroidBootstrap] Emitting alert message…
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Emitting system alert message
[BaseDriver] Shutting down because we waited 60 seconds for a command
[AndroidDriver] Shutting down Android driver
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell am force-stop io.appium.android.apis’
[Appium] Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’
[Appium] Removing session 980e1fab-b953-4fd3-8a8a-54b5ef84c25c from our master session list
[ADB] Pressing the HOME button
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell input keyevent 3’
[AndroidBootstrap] Sending command to android: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
[AndroidBootstrap] Received command result from bootstrap
[UiAutomator] Shutting down UiAutomator
[UiAutomator] Moving to state ‘stopping’
[UiAutomator] UiAutomator shut down normally
[UiAutomator] Moving to state ‘stopped’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting IDs of all ‘uiautomator’ processes
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell pgrep -f ^uiautomator$’
[ADB] No ‘uiautomator’ process has been found
[UiAutomator] Moving to state ‘stopped’
[Logcat] Stopping logcat capture
[ADB] Running ‘C:\Users\Senthil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5200a8764f5ac445 shell am force-stop io.appium.unlock’
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles
capability if wanted.