Home » Android » Failed to rename directory tools to temp\ToolPackage.old01 in C:\android-sdk-windows

Failed to rename directory tools to temp\ToolPackage.old01 in C:\android-sdk-windows

Posted by: admin April 23, 2020 Leave a comment


When trying to upgrade Android SDK Tools to revision 16, I am getting the following error:

Failed to rename directory C:\android-sdk-windows\tools to

Done. Nothing was installed.

enter image description here

Nothing I try to do, including providing FULL permissions (in addition to the special permissions it already had) to Administrator, helps.

Also, I don’t know of anything that is accessing those directories.

How do I fix this problem?

How to&Answers:

This is how I fixed it in Windows 7:

Make a copy of the \tools folder, name it something like \copy. So you should have c:\android-sdk-windows\copy. Now run android.bat from the \copy folder with Admin privileges. This should prevent the issue with items currently being open in the \tools folder.


For me, it worked by simply deleting the contents of the temp directory in the SDK installation folder (C:\android-sdk-tools\temp in your case)


Had the same issue with that and even tried with the copied folder. I had to run adb kill-server in the command prompt in the platform-tools directory for it to continue.


For me this problem was solved by running SDK Manager with administrator privileges


For me who I tried all the previous solutions and didn’t work I solved my problem with the following sugestion (#16) on the link: https://code.google.com/p/android/issues/detail?id=4410
which is:

  1. Find the “temp” folder and you can find the “tools_r05-windows.zip” or other
    files which you will update.
  2. unzip it.
  3. here you will find the “tools_r05-windows” and copy all the files in the file.
    which should be updated file
  4. copy to the “tools” folder.
  5. OK.


I encounter this problem while adding compatibility package to project in eclipse.

I solved this issue by opening the eclipse with administrator privileges.

In Windows 7:
Right click on eclipse.exe Run as administrator.

To make eclipse.exe to run as administrator always

Right click on eclipse.exe --> Properties -->Compatibility tab
check the Run this program as an administrator check box under Privilege Level


I ran into the same problem.

Most probably, you have a project opened in Eclipse (or android studio), and this project uses files that the SDK manager is trying to access or update.

So, the project is reading from some SDK platform folders/files, and the SDK manager is trying to overwrite it at the same time (for updating).

This is why you do not have permissions, not because you are not administrator.

Try closing Eclipse, click ‘YES’ in the SDK manager warning message (or re-run SDK manager again while Eclipse is not running).


I close the eclipse and run my android.bat (Path-To-YOUR-Android-SDK/tools/android.bat) from the command line.

It works for me



For anyone who is having this issue on OS X, sudo chown -R $USER worked for me (on your android-sdk directory).


Press ctrl + shift + esc to launch the task manager. Click on the Processes tab and sort the processes according to the command line column. Now search in the command line column for the same folder that contains /tools, click on it and click on End Process button. This will force all processes that use the same folder to be closed. Now open the SDK Manager again as administrator and it will work.


You can run SDK Manager outside eclipse directly from the androidSDK directory.


In addition to the instructions given here by William, make sure you first delete the temp folder in the sdk folder. If it already exists, sometimes even creating a copy of the tools folder does not work. Therefore:

  1. Delete the sdk\temp folder.
  2. Create a copy of the sdk\tools folder as sdk\copy
  3. Run android.bat which is inside the copy folder, from a command prompt, with admin privileges. This will start the SDK manager
  4. Update the sdk as you normally do when the SDK manager starts.
  5. Delete the sdk\copy folder


i have another solution, that helped me.
1. When you got error message in SDK Manager, copy zip file (name contains version and ‘tools’ word) from sdk/temp folder;
2. Exit from SDK Manager;
3. Unzip archive from first item, you got new tools, and replace sdk/tools with new one;
4. Clean sdk/temp folder;


Right click on “android-sdk” folder > properties > security > set full control permission for “ALL APPLICATION PACKAGES” and press OK, it take some minutes for sett this permission in all sub directories.