Welcome! Log In Create A New Profile

Advanced

[WMXX] Installing Android.apk to multiple devices at once

Posted by apredl 
[WMXX] Installing Android.apk to multiple devices at once
April 21, 2019 09:38PM
I'd like to share with you a little batch file, which I developed to install my compiled .apk to several devices at once:

First go to Project -> Configurations

Open the "Android Application" with right click and select "Description".



In the window "Describing the configuration" click on the button "Action after generation".



In the window "Action after generation" select "Display the console" and "Leave the console opened", later you can deselect that one... Write into the command script edit the following:



"C:\My Projects\YourProject\Exe\Android application\copy2.bat"

Replace your path with your application path (does not need to be in that place, but this directory is ok with write/exeutable permissions and will be moved in future or backuped.

Then you can open this path "C:\My Projects\YourProject\Exe\Android application\" and create a batch file "copy2.bat" or whatever you want to name your batch file...

echo off
FOR /F "usebackq tokens=1" %%X in (`"C:\WINDEV Mobile 23\Personal\Android\AndroidSDK\platform-tools\adb.exe" devices`) do (
  IF NOT "%%X" == "List" (
    echo "Installing to device: %%X"
      "C:\WINDEV Mobile 23\Personal\Android\AndroidSDK\platform-tools\adb.exe" -s %%X install -r "C:\My Projects\YourProject\Exe\Android application\YourProject.apk"
      "C:\WINDEV Mobile 23\Personal\Android\AndroidSDK\platform-tools\adb.exe" -s %%X shell monkey -p com.yourcompany.yourproject -c android.intent.category.LAUNCHER 1
  )
)

Replace here your path to your APP, edit com.yourcompany.yourproject to your APP ID (else it won't start on the device), save the file, then generate your .apk, fix any errors, be sure to add "" to any DOS path with spaces!!!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: