Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

After closing Unity, adb.exe continues to run, locks my project folder...

Discussion in 'Editor & General Support' started by Strom_CL, May 6, 2013.

  1. Strom_CL

    Strom_CL

    Joined:
    Nov 17, 2012
    Posts:
    91
    Has anyone else noticed this? If I try to commit or zip up or copy my project folder after exiting Unity I get a file lock error in windows, if I open my task manager and kill the adb.exe process (android) I can then move/copy/zip/etc my folder. Funny thing is I'm not even building for android, its for windows.

    I saw that a few other people on the forums (searched) have some crash/hang problems with adb.exe, but mine seems different as its not closing the process once unity exits out. It does this on my laptop as well so I'm leaning towards it being a Unity thing.
     
  2. CazicThule

    CazicThule

    Joined:
    Nov 29, 2012
    Posts:
    95
    I also sometimes get this, I have to kill adb.exe from Task Manager before I'm able to run with networking again.
     
  3. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    I just got the latest version today 4.3.3f1, it has this as one of the fixes:

    "Editor: Quitting the editor should no longer be blocked by adb.exe on windows."

    This is still an issue for me. I'm running on Windows 7 64bit with the Android SDK Tools rev. 22.3 and Platform-tools 19.0.1
     
  4. twburger

    twburger

    Joined:
    Jan 18, 2014
    Posts:
    3
    As of 4.3.4f1 it still exists as a bug. Need to run taskkill /IM adb.exe /F

    Seems to be a questions of the "WRONG" version of ADB.EXE from what I have read, but which is the "RIGHT" one?

    This powershell script fixes it:


    # File unity.ps1
    #
    # While the Unity process runs check for adb.exe and if running
    # kill the task
    #

    # run the Unity IDE
    start-process "D:\Program Files (x86)\Unity\Editor\Unity.exe"

    # get the unity process
    $unity = get-process unity

    # set do while control value checking if Unity is running
    $adb = $NULL

    do
    {
    # get the ADB.EXE process
    $adb = get-process adb

    if($adb) ## if adb is running stop it ##
    {
    Stop-Process $adb.id​
    }

    # Sleep for 5 seconds
    Start-Sleep -m 5000

    # check if Unity is running
    $unity = get-process Unity

    # if Unity is not running then exit
    } while( $unity -ne $NULL ) ## or while($unity) ##



    HOW TO RUN IT: Create a shortcut with this in it

    powershell.exe -windowstyle hidden -File "D:\Program Files (x86)\Unity\unity.ps1"

    Files here: FILES
     
    Last edited: Mar 15, 2014
  5. PrisonerOfLies

    PrisonerOfLies

    Joined:
    Dec 6, 2013
    Posts:
    105
    i am surprised they still havent fix this issue since many months ago..
     
  6. henriquefaria

    henriquefaria

    Joined:
    Sep 17, 2013
    Posts:
    31
    Yeah, it still happens in Unity 4.3.4f1. The Unity becomes unresponsive after exiting. The only way is to kill adb in task manager.

    I'm using Windows 8.1 Pro.
     
  7. zbalai

    zbalai

    Joined:
    May 28, 2012
    Posts:
    21
    Have to kill ADB.EXE to continue.
    Each time I close or I change projects.
    :confused:
     
  8. ricardo_arango

    ricardo_arango

    Unity Technologies

    Joined:
    Jun 18, 2009
    Posts:
    64
  9. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    Nope, still happens 4.5.2p2
     
  10. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,281
    still happens for me too. 4.5.2
     
  11. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    Can you report this bug again with the current version of the editor.
     
  12. Paul_Bronowski

    Paul_Bronowski

    Joined:
    Sep 3, 2014
    Posts:
    55
    I'm seeing it on Unity 2017.3.0f3 and 2017.3.0p1. Regression?
     
  13. emerge-sjh

    emerge-sjh

    Joined:
    Oct 16, 2020
    Posts:
    14
    Started seeing this again in 2019.4 after running an automated build
     
    vrpchocholo likes this.