Appium Beginner Tutorial 5 | How To Connect Real Android Mobile Device On Windows

Appium Beginner Tutorial 5 | How To Connect Real Android Mobile Device On Windows


FREE Courses - PREREQUISITES - Java installed on system - JAVA_HOME is set in environment variables command to check : java -version - An andro

Nhà Bán Gò Vấp. 6.3 x 18m Biệt thự bán Mới đẹp thiết kế 3.5 lầu tặng nội thất Quá chuẩn Phan Huy Ích
Hoá ra anh vẫn ở đây – Phim Thuyết Minh Cực Hay 2020 Tình Cảm Tuổi Học Trò
Kể truyện ngắn Âm Mưu Em Chồng ♥ TG Phạm Hương Lan

FREE Courses –
– Java installed on system
– JAVA_HOME is set in environment variables
command to check : java -version
– An android mobile device
– Connecting cable
– 200 MB to 1 GB of free space

Step 1 : Download SDK tools

Step 2 : Unzip folder & Extract platform tools
Step 3 : Set environment variables
ANDROID_HOME = location of sdk folder
Path : append path of platform_tools folder
Step 4 : Check command adb devices on command line
Step 5 : Make device ready
– enable developer mode
– make USB Debugging on
Step 6 : Connect device to computer system thorugh USB cable
– if asked enable USB Debbugging
Step 7 : Run command adb devices
adb = android debug bridge
Check your device id displayed


FREE Courses –
Udemy –
Training by Raghav at your venue –
Training schedule –
———— UI TESTING ————
Selenium Beginners –
Selenium Java Framework from Scratch –
Selenium Python –
Selenium Tips –
Selenium Builder –
Katalon Studio –
Robot Framework with RIDE-
Robot Framework with Eclipse –

———— API TESTING ————
Web Services (API) –
SoapUI –
Postman –
General –
Katalon Studio API Testing –

Appium –
Mobile Playlist –

———— CI | CD | DEVOPS ————
Jenkins Beginner –
Jenkins Tips & Trick –
Docker –

Git & GitHub –

JMeter Beginner –
JMeter Intermediate –
JMeter Advanced –
JMeter Tips & Tricks –
Performance Testing –

Java Beginners –
Java Tips & Tricks –

———— IDE ————
Visual Studio Code –

———— MAVEN ————
Maven –

———— OTHERS ————
Misc –
Tools & Tips –
QnA Friday-
Sunday Special –

Ask Raghav –
Interviews –
All Playlists –

Keep Learning,

Website –
LifeCharger –
Udemy Courses –
Facebook –
Twitter –
Youtube –
Instagram –

You can support my mission for education by sharing this knowledge and helping as many people as you can.


Xem thêm bài viết khác:


  • comment-avatar

    Hi raghav, while running sdk manager cmd, i get this error,,,
    C:selenium stuffstoolsbin>sdkmanager "platform-tools" "platforms;android-28"

    Error: Could not find or load main class stuffstoolsbin\..

  • comment-avatar

    Hi Raghav. Is it ok to have multiple sdk manager in platform folder?Because i need to do a testing in a few devices too.

  • comment-avatar

    Hi Raghav , i used sdkmanager command with two different java version 13 and 8 as well but always show me this error
    "Could not find or load main class SDKtoolsbin\.."

  • comment-avatar

    Hi Raghav, I have installed Java 8 .But getting this error can you please help me. Error: Could not find or load main class

  • comment-avatar

    Hi Raghav, Thanks for the tuto. I am blocked i have try two mobile (with androi 6 and android7) and it doesn't work after excuting the code in my mobile there are an icon (appium setting) and in the appium log : "[debug] [BaseDriver] Event 'newSessionStarted' logged at 1585150872520 (16:41:12 GMT+0100 (GMT+01:00))

    [debug] [W3C] Encountered internal error running command: Error: pkg: /data/local/tmp/appium_cache/337225c94683de622d6effd223b524dc8d16ef48.apk


    [debug] [W3C] at ADB.install (C:UsersLENOVOAppDataRoamingnpmnode_modulesappiumnode_modulesappium-adblibtoolsapk-utils.js:582:13)

    [debug] [W3C] at UiAutomator2Server.installServerApk (C:UsersLENOVOAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-driverlibuiautomator2.js:121:11)

    [debug] [W3C] at AndroidUiautomator2Driver.initUiAutomator2Server (C:UsersLENOVOAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-driverlibdriver.js:440:7)

    [debug] [W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (C:UsersLENOVOAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-driverlibdriver.js:338:5)

    [debug] [W3C] at AndroidUiautomator2Driver.createSession (C:UsersLENOVOAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-driverlibdriver.js:212:7)

    [debug] [W3C] at AppiumDriver.createSession (C:UsersLENOVOAppDataRoamingnpmnode_modulesappiumlibappium.js:358:35)

    [debug] [W3C] Destroying socket connection

    [HTTP] <– POST /wd/hub/session 500 39429 ms – 823" help please

  • comment-avatar

    Hello Raghav,

    This is Rahul, I have been following your video from a long period of time and those helped me a lot.

    While I installed the appium by the steps u mentioned after I attached my device with system and ran the appium application, I encountered the problem shown in the attachment in the mail that I had sent you. My ADB driver is working properly furthermore my desired capabilities are also correctly entered. I also tried to run the server through cmd and it was showing error too. Please find the email that I have sent you for the screen shots.

    Couldn't find any resolution on the internet hence tried to approach you. Your help will be greatly appreciated.

  • comment-avatar

    Hello Raghav Sir i am getting this message while installing platform tools – If the env var REPO_OS_OVERRIDE is set to "windows",

    "macosx", or "linux", packages will be downloaded for that OS.
    What can be done for this

  • comment-avatar

    sdkmanager "platform-tools" "platforms;android-28"

    Microsoft Windows [Version 10.0.17134.1246]

    (c) 2018 Microsoft Corporation. All rights reserved.

    Hi ragav iam getting following error could you please look into this…………..many thanks for your Excellent efforts
    C:Usersnm51098Desktopandroid-sdktoolsbin>sdkmanager "platform-tools" "platforms;android-28"

    Warning: Could not create settings








    sdkmanager [–uninstall] [<common args>] [–package_file=<file>] [<packages>…]

    sdkmanager –update [<common args>]

    sdkmanager –list [<common args>]

    sdkmanager –licenses [<common args>]

    sdkmanager –version

    With –install (optional), installs or updates packages.

    By default, the listed packages are installed or (if already installed)

    updated to the latest version.

    With –uninstall, uninstall the listed packages.

    <package> is a sdk-style path (e.g. "build-tools;23.0.0" or


    <package-file> is a text file where each line is a sdk-style path

    of a package to install or uninstall.

    Multiple –package_file arguments may be specified in combination

    with explicit paths.

    With –update, all installed packages are updated to the latest version.

    With –list, all installed and available packages are printed out.

    With –licenses, show and offer the option to accept licenses for all

    available packages that have not already been accepted.

    With –version, prints the current version of sdkmanager.

    Common Arguments:

    –sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK

    containing this tool

    –channel=<channelId>: Include packages in channels up to <channelId>.

    Common channels are:

    0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary).

    –include_obsolete: With –list, show obsolete packages in the

    package listing. With –update, update obsolete

    packages as well as non-obsolete.

    –no_https: Force all connections to use http rather than https.

    –proxy=<http | socks>: Connect via a proxy of the given type.

    –proxy_host=<IP or DNS address>: IP or DNS address of the proxy to use.

    –proxy_port=<port #>: Proxy port to connect to.

    –verbose: Enable verbose output.

    * If the env var REPO_OS_OVERRIDE is set to "windows",

    "macosx", or "linux", packages will be downloaded for that OS.


  • comment-avatar

    Hi Raghav, I am using Java 13.0.2 and as per your suggestion, downloaded commandlinetools-win-6200805_latest from However folder structure is different than the one you have shown in video. And platform tools which you have mentioned in your description is other zip file which we need to download and install. so are these two different tools which we need to download?Also when I try to run sdkmanager –list or any other command, it throws error.I have checked other comments mentioned below and the stackoverflow site which you have mentioned and tried that solution too but still its not working. I dont want to change my java to 8 as I have recently installed selenium, robot framework and afraid that changing java would impact other tools too. Please help

  • comment-avatar

    I got some errors in sdk installing process, but I don't change the java version (13.0.1) only the folder structures of unzip, if anybody have the same problem could review this link: Also make sure that environmental variable paths are correct.

  • comment-avatar

    Hi Raghav,
    I have used below command but getting some error:
    sdkmanager "platform-tools" "platform;android-28"

    C:Program FilesAndroidandroid-sdktoolsbin>sdkmanager.bat "platform-tools" "platforms;android-28"

    Error: Could not find or load main class FilesAndroidandroid-sdktoolsbin\..

    I have install set path for java:
    C:UsersBIBHU>java –version

    java 13.0.2 2020-01-14

    Java(TM) SE Runtime Environment (build 13.0.2+8)

    Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

    C:UsersBIBHU>javac –version

    javac 13.0.2

  • comment-avatar

    Hi Raghav , thank you for the reply, but i am facing the same issue my java version is–> java version "1.8.0_144" .

    Kindly help to understand how to resolve.

    C:UsersnatikarsDownloadsandroid-sdktoolsbin>sdkmanager "platform-tools" "platforms;android-25"

    Error: Could not find or load main class

    one more thing i want add in asking here is when i have downloaded zip file it was of 77 MB and in your tutorial its 144 MB .

  • comment-avatar

    I'm at 10:35 but I get this error:

    Error: unable to find or load main class UsernameDesktopandroid-sdktoolsbin\..

  • comment-avatar

    while executing the command for setting up the platforms tool : am getting the error "Error: Could not find or load main class" I have set my JAVA_HOME & path is set but still getting the issue . please let me know what to do.

  • comment-avatar

    Hi Raghav, Thanks for your wonderful guidance. I was going good uptill this. But, after getting issue in java version 11, I reinstalled version 8. Still it showing me error "could not find or load main class" . Is this same issue related to java version?

  • comment-avatar

    Hi Raghav, i got stuck at 10:34 after executing command sdkmanager "platform-tools" "platforms;android-28" i am ending up with error Error: Could not find or load main class pls share the exrtracted folder link so that i can continue.. thank you

  • comment-avatar

    Hi Raghav ,
    when i run command sdkmanager "platform-tools" "platforms;android-28"
    i am getting the following error in command line :how to resolve please help.

  • comment-avatar

    Hi Raghav, can you please help me. I'm getting an error with UIAutomatorViewer "Unable to connect to adb, checked if adb is installed" but my android home is setup correctly, as I can type adb devices in the console and devices are shown, I'm on windows can you please help me

  • comment-avatar

    Nice video, But when i try to download the new SDK Manager, it does not give the same option and when try to install getting an error for the same. Above step not working.

  • comment-avatar

    Thanks Raghav, The best explanation so far on Appium. When I try to extract tools and platform tool from SDK Manager I get the Error " Could not find or load main class" no idea why??

  • comment-avatar

    Hi Raghav, I was not able to find link to download on Android studio website. So I installed latest version of android Studio. But I now I'm facing issues in it. * I'm not able to find – tools and toolsbin folder under this path "C:Users%user%AppDataLocalAndroidSdk" due to which I was not able to set env variable for it. Can you please help me in setting up this? Is there any chance Android studio made any changes in their latest update 3.6.1?

  • comment-avatar

    My device is not connecting to the laptop. I have followed your procedure.
    The terminal showing nothing after the line : list of attached devices

  • comment-avatar

    Hello can you tell me how to download java jdk in new website

  • comment-avatar

    java 8 is not working

  • comment-avatar

    Currently, I am on your video #7 but I got some errors on APKSIGNER.BAT and ZIPALIGN.EXE files which would be on ANDROID-SDKTOOLSBIN folder…
    I checked the Command Line Tools ZIP FILE for Android Studio and they aren't there…
    Do you what is happening?

  • comment-avatar
  • comment-avatar

    Another GREAT video class! Thank A LOT !!!

  • comment-avatar

    After enable the debug mode from developer options then run the adb devices command, am getting list of devices attached but not showing device name.

  • comment-avatar

    After installing sdk manager the platform tools not insatlled inside the tools folder so what is the issue please reply.

  • comment-avatar

    Hi, installed java 8 but i could not download sdkmanager "platform-tools" "platforms;android-28" so please tell what is the use after run this command i am getting this error again and again 'sdkmanager' is not recognized as an internal or external command,

    operable program or batch file

  • comment-avatar

    Hi Raghav, could you please let me know whether you have created steps to connect to Virtual Android Device (Android Studio)? Thanks much in advance.

  • comment-avatar

    Hi Raghav, how to connect real iPhone to Windows for testing with Appium ? I could not find any of your video. Please help! Thanks.

  • comment-avatar

    Hi Raghav, i want to know whether i can use iphone to windows desktop and do the same test?

  • comment-avatar

    An error occurred while preparing SDK package Android SDK Platform 28: C:UsersSHIVAAppDataLocalTempPackageOperation03unzipandroid-9dataresdrawable-mdpipointer_wait_22.png: The process cannot access the file because it is being used by another process.

    following error is coming please give me solution

  • comment-avatar


    I have download android sdk zip file,but inside that sdk manager is not peresent….
    So what to do…