Git Product home page Git Product logo

android-platform-tools's People

Contributors

jamie-sherriff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

android-platform-tools's Issues

Doesn't work on git bash

I can install the package using npm in my git bash window, but unfortunately, adb and adbn return "command not found"

Custom paths not working

Hi,

downloadTools('custom-path') is not working because the toolDirName is never considered when downloading or extracting the zip file, so it ends up in the default directory.

For this reason, downloadAndReturnToolPaths('custom-path') fails at this line

return helper.checkSdkExists(platformTools.path);

because downloadTools does not return the actual target directory. From looking at the code, I assume that if this was fixed, the next check would still fail because you do not pass in the path to helper.getToolPaths():

return helper.getToolPaths();

__dirname resolving incorrectly in Electron packaged app

Hi, thanks for this wonderful package!

I currently use it in an Electron app, but some strange behavior occurred when I packaged my app for distribution using electron-builder.

Electron builder packages the app in a so-called asar archive, which is a like a tar archive. However, when running your downloadAndReturnToolPaths it gave an error, because it tried to download the Android Platform Tools zip into the app.asar archive (see here for more info on this issue).

It turned out that the __dirname you use in your code resolves to the app.asar path, which is not writable. You can see this when logging androidToolZipPath in index.js for example. This issue only occurs when the app is packaged. In development mode, before packaging, it works fine, since then there is no app.asar.

The workaround now was to set "asar": false in package.json, but this means that my source code is openly accessible. Would be great if you are able to look into a possible solution. Maybe us a different function to retrieve the current directory. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.