I finally managed to obfuscate my Android application, now I want to test it by installing the APK file and running it on the emulator.
我最终弄混了我的Android应用程序,现在我想通过安装APK文件并在模拟器上运行它来测试它。
How can I install an APK file on the Android Emulator?
如何在Android模拟器上安装APK文件?
30 个解决方案
#1
833
You can simply drag and drop the .apk file of your application to the emulator and it will automatically starts installing.
您可以简单地将应用程序的.apk文件拖放到仿真器中,它将自动开始安装。
Another options:
另一个选项:
Windows:
窗口:
- Execute the emulator (SDK Manager.exe->Tools->Manage AVDs...->New then Start)
- 执行仿真器(SDK管理器)。exe - >工具- >管理avd……- >新然后开始)
- Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
- 启动控制台(Windows XP),运行—>类型的cmd,并移动到SDK目录的platform-tools文件夹。
- Paste the APK file in the 'android-sdk\tools' or 'platform-tools' folder.
- 将APK文件粘贴到“android-sdk工具”或“平台工具”文件夹中。
-
Then type the following command.
然后输入以下命令。
adb install [.apk path]
亚洲开发银行(安装。apk路径)
Example:
例子:
adb install C:\Users\Name\MyProject\build\Jorgesys.apk
亚行安装C:\Users\Name\MyProject\build\ Jorgesys.apk
Linux:
Linux:
- Copy the apk file to
platform-tools
inandroid-sdk linux
folder. - 将apk文件复制到android-sdk linux文件夹中的平台工具。
- Open Terminal and navigate to platform-tools folder in android-sdk.
- 打开终端并导航到android-sdk中的平台工具文件夹。
- Then Execute this command -
./adb install FileName.apk
安装FileName.apk。/亚洲开发银行
- If the operation is successful (the result is displayed on the screen), then you will find your file in the launcher of your emulator.
- 如果操作成功(结果显示在屏幕上),那么您将在模拟器的启动程序中找到您的文件。
Mac:
麦克:
PATH=$PATH:~/Library/Android/sdk/platform-tools
Example : PATH=$PATH:/users/jorgesys/eclipse/android-sdk-mac_64/tools
例如:路径= $路径:/用户/ jorgesys / eclipse / android-sdk-mac_64 /工具
Then run adb.
然后运行亚行。
Mac:
麦克:
1.Run the emulator,
1。运行模拟器,
2.then copy your .apk file and paste into /Users/your_system_username/Library/Android/sdk/platform-tools
,
if you are not able to find sdk path in your mac system, do the following steps: Open finder->select
Go option on top menu -> select Go to Folder option -> it will popup a window with a textfield: /Users/your_system_username/Library/Android/sdk/
-> now open platform-tools folder and paste your copied .apk file,
2。. apk文件粘贴复制到/用户/ your_system_username /图书馆/ Android / sdk /平台工具,如果你不能够在你的mac系统,找到sdk路径做以下步骤:打开finder - >选择去选择顶部菜单- >选择去文件夹选项- >将弹出一个窗口有一个文本框:/用户/ your_system_username /图书馆/ Android / sdk / - >现在开放平台工具文件夹粘贴复制. apk文件,
-
Now open terminal and type the following:
cd Library/Android/sdk/platform-tools
现在打开终端,输入以下内容:cd库/Android/sdk/平台工具
-
execute the following in your terminal:
./adb install yourapkfilename.apk
if you get the following error message:error: no devices found - waiting for device
, follow the step 5.在您的终端执行以下操作:./adb安装您的apkfilename。如果您得到以下错误消息:错误:没有找到设备——等待设备,请遵循步骤5。
-
Run your emulator from Android Studio, once emulator active then repeat step 4, you will see the success message on your terminal.
在Android Studio中运行您的仿真程序,一旦仿真器激活,然后重复步骤4,您将在您的终端看到成功消息。
#2
109
If you've created more than one emulators or if you have an Android device plugged in, adb will complain with
如果您创建了多个仿真器,或者插入了一个Android设备,adb将会抱怨
error: more than one device and emulator
adb help
is not extremely clear on what to do:
亚洲开发银行的帮助并不十分清楚该做什么:
-d - directs command to the only connected USB device...
-e - directs command to the only running emulator...
-s <serial number> ...
-p <product name or path> ...
The flag you decide to use has to come before the actual adb command:
您决定使用的标志必须在实际的adb命令之前:
adb -e install path/to/app.apk
#3
54
Nowadays, you can simply drag and drop the Android apk to the emulator and it will automatically starts installing.
现在,只需将Android apk拖放到仿真器中,它就会自动开始安装。
#4
26
go to sdk folder, then go to tools.
copy your apk file inside the tool directory
./emulator -avd myEmulator
to run the emulator on mac
./adb install myApp.apk
to install app on the emulator
#5
23
go to the android-sdk/tools directory in command prompt and then type
进入命令提示符中的android-sdk/tools目录,然后输入
adb install fileName.apk (Windows)
./adb install fileName.apk (Linux or Mac)
#6
20
Copy .apk file in your SDK's platform-tools/ directory,then install the .apk on the emulator by using cmd(on windows):
在SDK的平台工具/目录中复制.apk文件,然后使用cmd(windows上)在模拟器上安装.apk:
adb install <path_to_your_bin>.apk
or
或
./adb install <path_to_your_bin>.apk
If there is more than one emulator running, you can find all running emulators by this command:
如果有多个模拟器运行,您可以通过以下命令找到所有运行的模拟器:
adb devices
or
或
./adb devices
then you must specify the emulator upon which to install the application, by its serial number, with the -s option. For example:
然后,您必须指定要在其上安装应用程序的仿真器,其序列号为-s选项。例如:
adb -s emulator-5554 install path/to/your/app.apk
or
或
./adb -s emulator-5554 install path/to/your/app.apk
#7
12
Download apk file from browser and then just click on it (notification area). Installation will start automatically.
从浏览器下载apk文件,然后点击它(通知区)。安装将自动启动。
#8
10
Goto Shell/Terminal/, reach at android-sdk/tools directory then
去Shell/Terminal/,然后到达android-sdk/tools目录
adb install fileName.apk // (u can run this command on windows)
or
./adb install fileName.apk //( u can run this command on linux)
#9
10
In Genymotion just drag and drop the *.apk file in to the emulator and it will automatically installs and runs.
在Genymotion中,拖拽*。apk文件进入模拟器,它将自动安装和运行。
http://www.genymotion.com/
#10
9
Let's suppose you have to install Facebook APK on your emulator.
假设您必须在模拟器上安装Facebook APK。
You can use adb to install the APK to the running emulator in OS X like this:
您可以使用adb将APK安装到OS X中的正在运行的仿真器中,如下所示:
./adb install ~/FBAndroid-2.1.apk
And on Windows, like this:
在Windows上,像这样:
adb install %HOMEPATH%\FBAndroid-2.1.apk
Once complete, check the apps screen of the emulator to check that the app has been installed correctly. If you need to force the upgrade of this app from a previous version, add the -r flag, like this on OS X:
完成后,检查模拟器的app界面,检查app是否安装正确。如果您需要从以前的版本中强制升级此应用程序,请添加-r标志,如OS X上所示:
./adb install -r ~/FBAndroid-2.1.apk
#11
7
Download the Apk file from net and copy it to platform-tools of your SDK folder, then in command prompt go to that directory an type:
从net下载Apk文件并将其复制到SDK文件夹的平台工具中,然后在命令提示符中进入该目录的类型为:
adb install filename.apk
press enter it will install in few seconds
按enter它将在几秒钟内安装
#12
7
From Windows 7 Onwards ,
从Windows 7开始,
Shift + Right click in your apk file folder.
Shift +右键单击您的apk文件文件夹。
Select Open Command Window Here
选择“打开命令窗口”。
Type & Hit "adb install AppName.apk"
键入&点击“adb安装AppName.apk”
#13
7
Drag n drop
n拖拽
Simply drag n drop the apk file to your emulator. You can also run your android emulator without Android Studio.
只需将apk文件拖到模拟器中。你也可以在没有android Studio的情况下运行你的android模拟器。
#14
6
(TESTED ON MACOS)
(MACOS测试)
The first step is to run the emulator
第一步是运行模拟器。
emulator -avd < avd_name>
模拟器avd < avd_name >
then use adb to install the .apk
然后使用adb安装.apk
adb install < path to .apk file>
adb安装 <路径到.apk文件>
If adb throws error like APK already exists or something alike. Run the adb shell while emulator is running
如果adb抛出错误,比如APK已经存在或类似的东西。运行仿真器时运行adb shell
adb shell
亚行壳
cd data/app
cd数据/应用
adb uninstall < apk file without using .apk>
未使用.apk>卸载< apk文件
If adb and emulator are commands not found do following
如果未找到adb和仿真器,请执行以下命令
export PATH=$PATH://android-sdk-macosx/platform-tools://android-sdk-macosx/android-sdk-macosx/tools:
导出路径= $路径:/ / android-sdk-macosx /平台工具:/ / android-sdk-macosx android-sdk-macosx /工具:
For future use put the above line at the end of .bash_profile
为了以后使用,请在.bash_profile末尾处放置上面的行
vi ~/.bash_profile
六世~ / . bash_profile
#15
6
I might be wrong, but on Windows I simply drag and drop the .apk
into Android Emulator. I mean, doing all mentioned above seems to be a lot of work.
我可能错了,但在Windows上,我只是简单地将.apk拖放到Android模拟器中。我的意思是,完成上面提到的一切似乎是一项艰巨的工作。
#16
6
keep your emulator up and running. In the command line, go inside the platform-tools folder, in your sdk folder which come with adt bundle and execute following command :
保持你的模拟器正常运行。在命令行中,进入平台工具文件夹,在adt bundle附带的sdk文件夹中,执行以下命令:
>adb install <yourFilename.apk>
This command detect your running emulator/emulators and show you the list of devices where you can install this app(show if any physical device/devices connected to your computer.). Then you can select any one, if only one emulator is running then app will directly installed on it by default.
此命令检测正在运行的仿真器/仿真器,并显示可以安装此应用程序的设备列表(显示连接到计算机的任何物理设备/设备)。然后你可以选择任何一个,如果只有一个模拟器在运行,那么app会默认直接安装在它上面。
Note: For above command your .apk file needs to be in same directory.
注意:对于上面的命令,您的.apk文件需要在同一个目录中。
for more detailed tutorial follo : This link
有关更详细的教程:这个链接
#17
5
if use more than one emulator at firs use this command
如果在firs中使用多个模拟器,请使用此命令
adb devices
and then chose amulatur and install application
然后选择amulatur并安装应用程序。
adb -s "EMULATOR NAME" install "FILE PATH"
adb -s emulator-5556 install C:\Users\criss\youwave\WhatsApp.apk
#18
4
go to ADT/Android-sdk/tools directory in command prompt 1. adb install fileName.apk (Windows)
转到命令提示符1中的ADT/Android-sdk/tools目录。亚行安装文件名。apk(Windows)
- ./adb install fileName.apk (Ubuntu/Linux or Mac)
- 亚行。/安装文件名。apk(Ubuntu Linux或Mac)
#19
3
First you need to install Android Studio on your machine. Then simply follow these steps.
首先,您需要在您的机器上安装Android Studio。然后遵循以下步骤。
- Go to you navigation bar and open Android Studio.
- 打开导航栏,打开Android Studio。
- From the toolbar open AVD Manager. (If you cannot see it create a new android project)
- 从工具栏打开AVD管理器。(如果你看不到它创建一个新的android项目)
- Create a Virtual Device.
- 创建一个虚拟设备。
- Select a hardware device that you want to install your app.
- 选择要安装应用程序的硬件设备。
- Select an android image that you want to install on your device. (If you cannot see any images you can download the require image from Recommended, x86 Images or Other images)
- 选择要安装在设备上的android映像。(如果您看不到任何图像,您可以从推荐的、x86图像或其他图像中下载需要的图像)
- Add a name to your AVD.
- 向AVD中添加一个名称。
- Now the virtual device has been created and you can simply run it by clicking the play button.
- 现在已经创建了虚拟设备,只需单击play按钮就可以运行它。
- Now you have setup the virtual device and now you need to install the APK file.
- 现在已经安装了虚拟设备,现在需要安装APK文件。
- Download the APK file that you want to install and Drag and Drop it to the emulator.
- 下载您想要安装的APK文件,并将其拖放到仿真器中。
- The APK file has been successfully installed and you can see it in your applications.
- APK文件已经成功安装,您可以在应用程序中看到它。
- Now you can simply run the installed app.
- 现在,您可以简单地运行已安装的应用程序。
#20
2
you write the command on terminal/cmd adb install FileName.apk.
在终端/cmd adb安装文件名.apk上编写命令。
#21
1
Best way is to create a app, which opens the apk file on the emulator. You have to copy the .apk file to the download folder of your emulator. Then replace yourAppName.apk with your .apk name.
最好的方法是创建一个应用程序,在模拟器上打开apk文件。您必须将.apk文件复制到仿真器的下载文件夹。然后替换yourAppName。apk和你的。apk的名字。
here is the code
这是代码
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "yourAppName.apk")), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
}
#22
1
In mac or windows . Just run the emulator and Drag and drop the apk on the home screen . It will install
在mac或windows中。只要运行模拟器,拖放apk在主屏幕上。它将安装
#23
1
Now you can just drag and drop the apk in emulator and it will install!
现在你可以在模拟器中拖放apk,它就会安装!
#24
1
On Linux I do this:
在Linux上,我这样做:
- first see which devices I currently have:
emulator -list-avds
- 首先查看我目前拥有的设备:模拟器-list-avds
- build the release
cd android && ./gradlew assembleRelease
- 构建发布cd android && & ./gradlew汇编
- install it at the emulated device "Nexus5" (you are inside the android directory, else use the full path to apk):
adb -s '8e138a9c' install app/build/outputs/apk/app-release.apk
- 在仿真设备“Nexus5”(您在android目录中,否则使用apk的完整路径):adb -s '8e138a9c' install app/build/output /apk/app-release.apk
Thats it. You can also use ./gradlew installRelease
这是它。您也可以使用./gradlew installRelease
#25
1
Follow the steps :
遵循的步骤:
- make sure you have allowed installation from unknown sources in settings.
- 请确保在设置中允许来自未知源的安装。
- Use the Android Device Monitor to copy the APK to the sdcard.
- 使用Android设备监视器将APK复制到sdcard。
- Use the builtin browser in Android to navigate to file:///sdcard/apk-name.apk
- 使用Android中的内置浏览器导航到文件:///sdcard/ap -name.apk
- When the notification "Download complete" appears, click it.
- 当“下载完成”通知出现时,单击它。
#26
0
1) paste the myapp.apk in platform-tools folder , in my case C:\Users\mazbizxam\AppData\Local\Android\android-sdk\platform-tools, this is the link in my case it may change to you people
1)粘贴myapp。apk平台工具文件夹中,在我的例子中C:\Users\mazbizxam\AppData\Local\Android\ android sdk \平台工具,这是链接在我的情况下,它可能会改变你的人
2)open the directory in CMD CD C:\Users\mazbizxam\AppData\Local\Android\android-sdk\platform-tools
2)打开目录CMD CD C:\Users\mazbizxam\AppData\Local\Android\ android sdk \平台工具
3)Now you are in platform-tools folder , just type adb install myapp.apk
现在,您已经进入了平台工具文件夹,只需输入adb install myapp.apk
please ensure that your emulator is turn on , if every thing is ok apk will install
请确保您的仿真器打开,如果一切正常,apk将安装。
#27
0
Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
启动控制台(Windows XP),运行—>类型的cmd,并移动到SDK目录的platform-tools文件夹。
In case anyone wondering how to run cmd
in platform-tools
folder of SDK directory, if you are running a new enough version of Windows, follow the steps:
如果有人想知道如何在SDK目录的平台工具文件夹中运行cmd,如果您正在运行一个新的足够版本的Windows,请按照以下步骤:
- Go to
platform-tools
through Windows Explorer. - 通过Windows资源管理器访问平台工具。
- While holding
shift
right click and you will find the option "Open Command window here". - 按住shift键右键,你会找到“打开命令窗口”选项。
- Click on it and cmd will start in that folder.
- 单击它,cmd将在该文件夹中启动。
Hope it helps
希望它能帮助
#28
0
Simple You can upload APK to file hosting or download APK and use browser to install from unknown source .
简单的你可以上传APK文件托管或下载APK和使用浏览器从未知的来源安装。
#29
0
Just drag and drop apk file in the emulator and done....
拖拽的apk文件在模拟器和做....
#30
0
Drag and drop (.apk into the emulator window)
拖放(。apk进入仿真器窗口)
#1
833
You can simply drag and drop the .apk file of your application to the emulator and it will automatically starts installing.
您可以简单地将应用程序的.apk文件拖放到仿真器中,它将自动开始安装。
Another options:
另一个选项:
Windows:
窗口:
- Execute the emulator (SDK Manager.exe->Tools->Manage AVDs...->New then Start)
- 执行仿真器(SDK管理器)。exe - >工具- >管理avd……- >新然后开始)
- Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
- 启动控制台(Windows XP),运行—>类型的cmd,并移动到SDK目录的platform-tools文件夹。
- Paste the APK file in the 'android-sdk\tools' or 'platform-tools' folder.
- 将APK文件粘贴到“android-sdk工具”或“平台工具”文件夹中。
-
Then type the following command.
然后输入以下命令。
adb install [.apk path]
亚洲开发银行(安装。apk路径)
Example:
例子:
adb install C:\Users\Name\MyProject\build\Jorgesys.apk
亚行安装C:\Users\Name\MyProject\build\ Jorgesys.apk
Linux:
Linux:
- Copy the apk file to
platform-tools
inandroid-sdk linux
folder. - 将apk文件复制到android-sdk linux文件夹中的平台工具。
- Open Terminal and navigate to platform-tools folder in android-sdk.
- 打开终端并导航到android-sdk中的平台工具文件夹。
- Then Execute this command -
./adb install FileName.apk
安装FileName.apk。/亚洲开发银行
- If the operation is successful (the result is displayed on the screen), then you will find your file in the launcher of your emulator.
- 如果操作成功(结果显示在屏幕上),那么您将在模拟器的启动程序中找到您的文件。
Mac:
麦克:
PATH=$PATH:~/Library/Android/sdk/platform-tools
Example : PATH=$PATH:/users/jorgesys/eclipse/android-sdk-mac_64/tools
例如:路径= $路径:/用户/ jorgesys / eclipse / android-sdk-mac_64 /工具
Then run adb.
然后运行亚行。
Mac:
麦克:
1.Run the emulator,
1。运行模拟器,
2.then copy your .apk file and paste into /Users/your_system_username/Library/Android/sdk/platform-tools
,
if you are not able to find sdk path in your mac system, do the following steps: Open finder->select
Go option on top menu -> select Go to Folder option -> it will popup a window with a textfield: /Users/your_system_username/Library/Android/sdk/
-> now open platform-tools folder and paste your copied .apk file,
2。. apk文件粘贴复制到/用户/ your_system_username /图书馆/ Android / sdk /平台工具,如果你不能够在你的mac系统,找到sdk路径做以下步骤:打开finder - >选择去选择顶部菜单- >选择去文件夹选项- >将弹出一个窗口有一个文本框:/用户/ your_system_username /图书馆/ Android / sdk / - >现在开放平台工具文件夹粘贴复制. apk文件,
-
Now open terminal and type the following:
cd Library/Android/sdk/platform-tools
现在打开终端,输入以下内容:cd库/Android/sdk/平台工具
-
execute the following in your terminal:
./adb install yourapkfilename.apk
if you get the following error message:error: no devices found - waiting for device
, follow the step 5.在您的终端执行以下操作:./adb安装您的apkfilename。如果您得到以下错误消息:错误:没有找到设备——等待设备,请遵循步骤5。
-
Run your emulator from Android Studio, once emulator active then repeat step 4, you will see the success message on your terminal.
在Android Studio中运行您的仿真程序,一旦仿真器激活,然后重复步骤4,您将在您的终端看到成功消息。
#2
109
If you've created more than one emulators or if you have an Android device plugged in, adb will complain with
如果您创建了多个仿真器,或者插入了一个Android设备,adb将会抱怨
error: more than one device and emulator
adb help
is not extremely clear on what to do:
亚洲开发银行的帮助并不十分清楚该做什么:
-d - directs command to the only connected USB device...
-e - directs command to the only running emulator...
-s <serial number> ...
-p <product name or path> ...
The flag you decide to use has to come before the actual adb command:
您决定使用的标志必须在实际的adb命令之前:
adb -e install path/to/app.apk
#3
54
Nowadays, you can simply drag and drop the Android apk to the emulator and it will automatically starts installing.
现在,只需将Android apk拖放到仿真器中,它就会自动开始安装。
#4
26
go to sdk folder, then go to tools.
copy your apk file inside the tool directory
./emulator -avd myEmulator
to run the emulator on mac
./adb install myApp.apk
to install app on the emulator
#5
23
go to the android-sdk/tools directory in command prompt and then type
进入命令提示符中的android-sdk/tools目录,然后输入
adb install fileName.apk (Windows)
./adb install fileName.apk (Linux or Mac)
#6
20
Copy .apk file in your SDK's platform-tools/ directory,then install the .apk on the emulator by using cmd(on windows):
在SDK的平台工具/目录中复制.apk文件,然后使用cmd(windows上)在模拟器上安装.apk:
adb install <path_to_your_bin>.apk
or
或
./adb install <path_to_your_bin>.apk
If there is more than one emulator running, you can find all running emulators by this command:
如果有多个模拟器运行,您可以通过以下命令找到所有运行的模拟器:
adb devices
or
或
./adb devices
then you must specify the emulator upon which to install the application, by its serial number, with the -s option. For example:
然后,您必须指定要在其上安装应用程序的仿真器,其序列号为-s选项。例如:
adb -s emulator-5554 install path/to/your/app.apk
or
或
./adb -s emulator-5554 install path/to/your/app.apk
#7
12
Download apk file from browser and then just click on it (notification area). Installation will start automatically.
从浏览器下载apk文件,然后点击它(通知区)。安装将自动启动。
#8
10
Goto Shell/Terminal/, reach at android-sdk/tools directory then
去Shell/Terminal/,然后到达android-sdk/tools目录
adb install fileName.apk // (u can run this command on windows)
or
./adb install fileName.apk //( u can run this command on linux)
#9
10
In Genymotion just drag and drop the *.apk file in to the emulator and it will automatically installs and runs.
在Genymotion中,拖拽*。apk文件进入模拟器,它将自动安装和运行。
http://www.genymotion.com/
#10
9
Let's suppose you have to install Facebook APK on your emulator.
假设您必须在模拟器上安装Facebook APK。
You can use adb to install the APK to the running emulator in OS X like this:
您可以使用adb将APK安装到OS X中的正在运行的仿真器中,如下所示:
./adb install ~/FBAndroid-2.1.apk
And on Windows, like this:
在Windows上,像这样:
adb install %HOMEPATH%\FBAndroid-2.1.apk
Once complete, check the apps screen of the emulator to check that the app has been installed correctly. If you need to force the upgrade of this app from a previous version, add the -r flag, like this on OS X:
完成后,检查模拟器的app界面,检查app是否安装正确。如果您需要从以前的版本中强制升级此应用程序,请添加-r标志,如OS X上所示:
./adb install -r ~/FBAndroid-2.1.apk
#11
7
Download the Apk file from net and copy it to platform-tools of your SDK folder, then in command prompt go to that directory an type:
从net下载Apk文件并将其复制到SDK文件夹的平台工具中,然后在命令提示符中进入该目录的类型为:
adb install filename.apk
press enter it will install in few seconds
按enter它将在几秒钟内安装
#12
7
From Windows 7 Onwards ,
从Windows 7开始,
Shift + Right click in your apk file folder.
Shift +右键单击您的apk文件文件夹。
Select Open Command Window Here
选择“打开命令窗口”。
Type & Hit "adb install AppName.apk"
键入&点击“adb安装AppName.apk”
#13
7
Drag n drop
n拖拽
Simply drag n drop the apk file to your emulator. You can also run your android emulator without Android Studio.
只需将apk文件拖到模拟器中。你也可以在没有android Studio的情况下运行你的android模拟器。
#14
6
(TESTED ON MACOS)
(MACOS测试)
The first step is to run the emulator
第一步是运行模拟器。
emulator -avd < avd_name>
模拟器avd < avd_name >
then use adb to install the .apk
然后使用adb安装.apk
adb install < path to .apk file>
adb安装 <路径到.apk文件>
If adb throws error like APK already exists or something alike. Run the adb shell while emulator is running
如果adb抛出错误,比如APK已经存在或类似的东西。运行仿真器时运行adb shell
adb shell
亚行壳
cd data/app
cd数据/应用
adb uninstall < apk file without using .apk>
未使用.apk>卸载< apk文件
If adb and emulator are commands not found do following
如果未找到adb和仿真器,请执行以下命令
export PATH=$PATH://android-sdk-macosx/platform-tools://android-sdk-macosx/android-sdk-macosx/tools:
导出路径= $路径:/ / android-sdk-macosx /平台工具:/ / android-sdk-macosx android-sdk-macosx /工具:
For future use put the above line at the end of .bash_profile
为了以后使用,请在.bash_profile末尾处放置上面的行
vi ~/.bash_profile
六世~ / . bash_profile
#15
6
I might be wrong, but on Windows I simply drag and drop the .apk
into Android Emulator. I mean, doing all mentioned above seems to be a lot of work.
我可能错了,但在Windows上,我只是简单地将.apk拖放到Android模拟器中。我的意思是,完成上面提到的一切似乎是一项艰巨的工作。
#16
6
keep your emulator up and running. In the command line, go inside the platform-tools folder, in your sdk folder which come with adt bundle and execute following command :
保持你的模拟器正常运行。在命令行中,进入平台工具文件夹,在adt bundle附带的sdk文件夹中,执行以下命令:
>adb install <yourFilename.apk>
This command detect your running emulator/emulators and show you the list of devices where you can install this app(show if any physical device/devices connected to your computer.). Then you can select any one, if only one emulator is running then app will directly installed on it by default.
此命令检测正在运行的仿真器/仿真器,并显示可以安装此应用程序的设备列表(显示连接到计算机的任何物理设备/设备)。然后你可以选择任何一个,如果只有一个模拟器在运行,那么app会默认直接安装在它上面。
Note: For above command your .apk file needs to be in same directory.
注意:对于上面的命令,您的.apk文件需要在同一个目录中。
for more detailed tutorial follo : This link
有关更详细的教程:这个链接
#17
5
if use more than one emulator at firs use this command
如果在firs中使用多个模拟器,请使用此命令
adb devices
and then chose amulatur and install application
然后选择amulatur并安装应用程序。
adb -s "EMULATOR NAME" install "FILE PATH"
adb -s emulator-5556 install C:\Users\criss\youwave\WhatsApp.apk
#18
4
go to ADT/Android-sdk/tools directory in command prompt 1. adb install fileName.apk (Windows)
转到命令提示符1中的ADT/Android-sdk/tools目录。亚行安装文件名。apk(Windows)
- ./adb install fileName.apk (Ubuntu/Linux or Mac)
- 亚行。/安装文件名。apk(Ubuntu Linux或Mac)
#19
3
First you need to install Android Studio on your machine. Then simply follow these steps.
首先,您需要在您的机器上安装Android Studio。然后遵循以下步骤。
- Go to you navigation bar and open Android Studio.
- 打开导航栏,打开Android Studio。
- From the toolbar open AVD Manager. (If you cannot see it create a new android project)
- 从工具栏打开AVD管理器。(如果你看不到它创建一个新的android项目)
- Create a Virtual Device.
- 创建一个虚拟设备。
- Select a hardware device that you want to install your app.
- 选择要安装应用程序的硬件设备。
- Select an android image that you want to install on your device. (If you cannot see any images you can download the require image from Recommended, x86 Images or Other images)
- 选择要安装在设备上的android映像。(如果您看不到任何图像,您可以从推荐的、x86图像或其他图像中下载需要的图像)
- Add a name to your AVD.
- 向AVD中添加一个名称。
- Now the virtual device has been created and you can simply run it by clicking the play button.
- 现在已经创建了虚拟设备,只需单击play按钮就可以运行它。
- Now you have setup the virtual device and now you need to install the APK file.
- 现在已经安装了虚拟设备,现在需要安装APK文件。
- Download the APK file that you want to install and Drag and Drop it to the emulator.
- 下载您想要安装的APK文件,并将其拖放到仿真器中。
- The APK file has been successfully installed and you can see it in your applications.
- APK文件已经成功安装,您可以在应用程序中看到它。
- Now you can simply run the installed app.
- 现在,您可以简单地运行已安装的应用程序。
#20
2
you write the command on terminal/cmd adb install FileName.apk.
在终端/cmd adb安装文件名.apk上编写命令。
#21
1
Best way is to create a app, which opens the apk file on the emulator. You have to copy the .apk file to the download folder of your emulator. Then replace yourAppName.apk with your .apk name.
最好的方法是创建一个应用程序,在模拟器上打开apk文件。您必须将.apk文件复制到仿真器的下载文件夹。然后替换yourAppName。apk和你的。apk的名字。
here is the code
这是代码
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "yourAppName.apk")), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
}
#22
1
In mac or windows . Just run the emulator and Drag and drop the apk on the home screen . It will install
在mac或windows中。只要运行模拟器,拖放apk在主屏幕上。它将安装
#23
1
Now you can just drag and drop the apk in emulator and it will install!
现在你可以在模拟器中拖放apk,它就会安装!
#24
1
On Linux I do this:
在Linux上,我这样做:
- first see which devices I currently have:
emulator -list-avds
- 首先查看我目前拥有的设备:模拟器-list-avds
- build the release
cd android && ./gradlew assembleRelease
- 构建发布cd android && & ./gradlew汇编
- install it at the emulated device "Nexus5" (you are inside the android directory, else use the full path to apk):
adb -s '8e138a9c' install app/build/outputs/apk/app-release.apk
- 在仿真设备“Nexus5”(您在android目录中,否则使用apk的完整路径):adb -s '8e138a9c' install app/build/output /apk/app-release.apk
Thats it. You can also use ./gradlew installRelease
这是它。您也可以使用./gradlew installRelease
#25
1
Follow the steps :
遵循的步骤:
- make sure you have allowed installation from unknown sources in settings.
- 请确保在设置中允许来自未知源的安装。
- Use the Android Device Monitor to copy the APK to the sdcard.
- 使用Android设备监视器将APK复制到sdcard。
- Use the builtin browser in Android to navigate to file:///sdcard/apk-name.apk
- 使用Android中的内置浏览器导航到文件:///sdcard/ap -name.apk
- When the notification "Download complete" appears, click it.
- 当“下载完成”通知出现时,单击它。
#26
0
1) paste the myapp.apk in platform-tools folder , in my case C:\Users\mazbizxam\AppData\Local\Android\android-sdk\platform-tools, this is the link in my case it may change to you people
1)粘贴myapp。apk平台工具文件夹中,在我的例子中C:\Users\mazbizxam\AppData\Local\Android\ android sdk \平台工具,这是链接在我的情况下,它可能会改变你的人
2)open the directory in CMD CD C:\Users\mazbizxam\AppData\Local\Android\android-sdk\platform-tools
2)打开目录CMD CD C:\Users\mazbizxam\AppData\Local\Android\ android sdk \平台工具
3)Now you are in platform-tools folder , just type adb install myapp.apk
现在,您已经进入了平台工具文件夹,只需输入adb install myapp.apk
please ensure that your emulator is turn on , if every thing is ok apk will install
请确保您的仿真器打开,如果一切正常,apk将安装。
#27
0
Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
启动控制台(Windows XP),运行—>类型的cmd,并移动到SDK目录的platform-tools文件夹。
In case anyone wondering how to run cmd
in platform-tools
folder of SDK directory, if you are running a new enough version of Windows, follow the steps:
如果有人想知道如何在SDK目录的平台工具文件夹中运行cmd,如果您正在运行一个新的足够版本的Windows,请按照以下步骤:
- Go to
platform-tools
through Windows Explorer. - 通过Windows资源管理器访问平台工具。
- While holding
shift
right click and you will find the option "Open Command window here". - 按住shift键右键,你会找到“打开命令窗口”选项。
- Click on it and cmd will start in that folder.
- 单击它,cmd将在该文件夹中启动。
Hope it helps
希望它能帮助
#28
0
Simple You can upload APK to file hosting or download APK and use browser to install from unknown source .
简单的你可以上传APK文件托管或下载APK和使用浏览器从未知的来源安装。
#29
0
Just drag and drop apk file in the emulator and done....
拖拽的apk文件在模拟器和做....
#30
0
Drag and drop (.apk into the emulator window)
拖放(。apk进入仿真器窗口)