jamie-sherriff / android-platform-tools Goto Github PK
View Code? Open in Web Editor NEWSelf contained node module that wraps the Android SDK platform tools
License: MIT License
Self contained node module that wraps the Android SDK platform tools
License: MIT License
I can install the package using npm in my git bash window, but unfortunately, adb and adbn return "command not found"
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
android-platform-tools/index.js
Line 86 in 6ab63a6
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()
:
android-platform-tools/index.js
Line 90 in 6ab63a6
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!
s/fasbootPath/fastbootPath/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.