Automatically install android app on the devices after build/commit - android

I am developing android app and to test it I need it to run on several devices. So it is really pain to reinstall it on every device when change is done. Is there any way to make app install automatically after I hit build in android studio or something similar?

it not proper but yes we can do it
connect all device to same wifi network
connect device to pc and type command
adb tcpip 5555
it can perform all device
after check ip address of mobile
goto setting>about>ip address
after type this command to connect wireless
adb connect ipaddress
after all device connect you can run app using shift+F10 or run button click
select all device and hit the run button
it can run in all device
more detail see this artical
1) http://codetheory.in/android-debug-bridge-adb-wireless-debugging-over-wi-fi/
2) adb error: more than one device - android

Related

Chrome remote devices only detects android phone with android studio open

I have already started developing an android app in the past and I found today that we can inspect a page on the browser of a remote device using the Remote devices tool on Chrome Dev Tools.
To my surprise, my Android device wasn't being recognized in the Remote devices tab on Chrome, despite having already been detected previously in Android Studio in the past.
I opened Android Studio to test if I could still deploy the app on the Android phone and... I could. And now I noticed that the phone was recognized in Chrome... WHAT?!
I closed Android Studio and it went away again. When reopening Android Studio the phone isn't detected by Remote devices imediatly, it is only detected after I click run and the Select Deployment Target window appears.
I suspect it has something to do with the initialization of the ADB, but I don't know what that is, it only says it is initializing when I click run on Android Studio. When Android Studio is closed I guess that is also closed and I need it to be running at all times. How can I keep it running outside of Android Studio and am I really supposed to be doing it or do I have something installed incorrectly?
Details:
Computer OS: Windows 10
Computer Chrome version: 70.0.3538.77
Android OS version: 7.0.0; SM-A520F Build/NRD90M
Android Chrome version: 70.0.3538.64
Android Studio Version: 3.2
EDIT: Ok, so I downloaded the android standalone platform-tools from here: https://developer.android.com/studio/releases/platform-tools
And ran a command line inside the downloaded folder and these were the results:
C:\Users\rmarques\Desktop\platform-tools>adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
521008c4650534ed device
So the problem is that the daemon is not running. After I close the command line it keeps running and my phone is still being recognized on remote devices.
I understand that having a daemon start on boot every time may not be the best practice but it should start when I connect my phone using USB right?
EDIT2: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3 doesn't even mention needing SDK tools or ADB or whatever, only the Drivers of the phone and minimum chrome versions/android OS.
On chrome uncheck "Discover USB devices" on Settings of Remote devices found after clicking escape and on the console on the bottom.
cd into the folder where adb.exe is on android platform tools folder.
Start adb server (adb start-server)
Unlock phone, connect USB port.
Wait some time after the prompt asking for authentication comes and then press ok, don't click "allow always" as phone's ip change in future will create issues, if you want to use tcp ip mode.
Check on chrome remote devices menu if phone is connected or not. If not connected and
green is not showing start over by killing adb server (adb kill-server)
Optional
To additionally not use USB cable all the time, use tcp ip mode. If device ip don't change then you'd be so lucky that even after restart of windows device your phone will be able to be debugged by chrome remote devices.
While connected to USB debugging, start at tcp ip mode (adb tcpip 5555)
Wait some time and accept ok on prompt, see if device is connected on chrome.
Disconnect USB.
Start command for connecting to phone using phone's ip and port of tcp ip mode(5555) (adb connect 192.168.123.456:5555)
Wait some time and accept ok on prompt, see if device is connected on chrome.
If failed to connect comes, then rerun the same connect ip:port command, phone auth prompt should come. wait some time then click ok.
If successful, starting same command to connect using phone's ip should say already connected.
If this method don't work then on Android phone, revoke USB debugging authorizations and start over after killing adb server.

Android - Install apk to mobile through wifi network

I am new in android and working an android application now.
Here i am asking an option to install apk on my mobile while building the application.
I need to install apk to mobile through wifi, Is it possible, if yes the how?
Please see my scenario,
1-I need to build the project from the android studio
2-apk automatically need to install on mobile
3-mobile and system should be connected to a single wifi network
step 1:- go to the folder of your sdk/platform-tools and open cmd at this path
step 2:- type adb tcpip 5555
step 3:- find the IP address of your android device with adb shell netcfg
step 4:- type adb connect DEVICE_IP_ADDRESS:5555
Note:- Keep your device connected with your pc using datacable while
this process. After this you can disconnect your device.
After this process you can debug or run your app wirelessly via wifi.

ADB WIFI Connect - how to?

I want to run an app on my device to do that I am using ADB Wifi Connect plugin. Both my phone and laptop are connected to same wifi network. I am still not able to run the app on my phone. Please give an appropriate solution.
Error while connecting my Android device using ADB WIFI Connect plugin.
If you are using android studio then follow the below procedures:
Connect your smart phone with your system via physical cable.
make sure your smartphone and computer is connected via same network.
1.Open terminal in your android studio.
2. type "adb devices", which will show you the list of devices attached.
3. type "adb tcpip 5555".
4. type "adb your phone ip address:5555".
Hope this will help you

USB Debugging over Wifi

I am unable to debug over wifi.
I have followed below steps.
Go to Android Sdk-> Platform-tools and type cmd
run adb tcpip 5555
adb connect and MY IP ADDRESS
Now i got the result show in below Image.
After my device is connected. I removed my USB cable then i got device list empty.
I have no idea why this is happening.
I have motorola X play Mobile Phone Android 6.0 and having Windows 10 operating System.
Need Help.
For simple one click connection of ADB over wifi - You can try using the Android ADB Plugin from JetBrains. The plugin will internally handle all the setup and you can click-away and connect to adb over wifi without worrying about anything else. Steps to install and use can be found on its GitHub repo page.
Provides an action which allow you quickly connect your Android device
over WiFi to install, run and debug your applications without a USB
connected by pressing one button. Connect your device using a USB
cable and press the Android WiFi ADB button. Once the device be
connected over WiFi you'll see an IntelliJ/Android Studio
notification. Now you can disconnect your USB cable and enjoy
deploying, running and debugging your applications over WiFi. The
version 2.0 enables a window to check which of your devices are
connected or not and connect/disconnect it manually if needed.
Screenshots from the plugin page:

eclipse how to access the Android Device from Remote machine

My scenario is this: I have a work computer with Windows 8 at my home and I use eclipse as my development environment for Android apps. I would like to be able to deploy apps from my work computer on android device my friend located in some other country and execute the Android emulator. Finally I want to remotely access and debug the app installed on friend device.
How can I do it remotely?
Can be done, but may require following, there is one limitation though, that you cant directly access the device to test the app, your friend will have to do that.
The Device and your Work Computer needs to be connected using VPN under same network or the device must have its port(explained in 2nd step) for adb port-forwarded through the router, if you want to connect to the device directly through the IP(but this can be risky).
In order to run Device debugger in TCPIP Mode execute the following command, where 5555 is the port number at which the android debugger of device can be accessed, this command need to executed after connecting the device to the your friend's computer.
adb tcpip 5555
Once the device and Work Computer are connected over the vpn, or the Device is port-forwarded on the port used in the above command, execute the command on your Work Computer. In the below Syntax the IP is the Device IP and the Port is the port number mentioned in the command in 2nd step.
Syntax: adb connect IP:port
Example: adb connect 10.2.10.251:5555
Now you can, install and debug the device over the internet, but there may be delays uploading the apk and get the debug result.
In order to disconnect the device, execute on your Work Computer.
adb disconnect

Categories

Resources