Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADB functionality. #29

Closed
ReVanTis opened this issue Aug 9, 2016 · 7 comments
Closed

ADB functionality. #29

ReVanTis opened this issue Aug 9, 2016 · 7 comments

Comments

@ReVanTis
Copy link

ReVanTis commented Aug 9, 2016

You can actually operate adb on WSL.
Well, on some level.

By default, WSL will install adb of version 1.10.31.
If you pick the very same version on Windows and start adb server (adb start-server) on Windows, you can actually see and access android devices on WSL.

I assume adb server's inter-process communication is based on network model (on port 5037 as you often see).
So even the server is running on windows, it does not break the client running on WSL as long as they recognize each other with same version number.

Have fun hacking WSL :D

@emmatyping
Copy link
Owner

emmatyping commented Aug 9, 2016

So for example, if you adb devices it lists connected devices from bash? I would be very surprised if this is the case.

@ReVanTis
Copy link
Author

ReVanTis commented Aug 10, 2016

adb on bash

Hi @ethanhs,
Please kindly have a look :)

@emmatyping
Copy link
Owner

Wow, great! I am glad you found this. :) I will add this to the list and add something in the notes. Thank you!

@emmatyping
Copy link
Owner

Fixed in 810914c

@ThaJay
Copy link

ThaJay commented Dec 14, 2016

Awesome, this would enable me to develop React-Native on device. Will check it out

@IPWright83
Copy link

I don't believe this works on WSL2? I've got the same ADB version running on both windows and Ubuntu, ensuring I start the windows adb server first (via CMD) and the device list is always empty in the WSL.

@ThaJay
Copy link

ThaJay commented Feb 11, 2020

For me it's very simple: Run the production build via WSL and use ADB through Git Bash on CMD (and everything else works there as well).

I only have to remove the build folder and switch my ./android/local.properties to use the other location for the Android sdk.

# Windows (for running the dev server etc.)
# sdk.dir=/C\:\\Users\\name\\AppData\\Local\\Android\\Sdk
# WSL (for making production builds)
sdk.dir=/usr/lib/android-sdk/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants