android 模拟器 和 adb 的一些tips
来源:互联网 发布:中科大软件学院招生 编辑:程序博客网 时间:2024/05/17 23:52
手动建立模拟器
./mksdcard 512M sd01
512M是SD卡大小,sd01是指卡的名称
./android create avd -n phone01 -t 2
参数 -n name -t targetId
运行后出现
Auto-selecting single ABI armeabi-v7a
Created AVD 'myphone01' based on Google APIs (Google Inc.), ARM (armeabi-v7a) processor,
with the following hardware config:
hw.lcd.density=240
vm.heapSize=48
hw.ramSize=512
运行模拟器
sudo ./emulator @phone01 -sdcard sd01 -scale 0.8
模拟器上网设置:
android 模拟器默认情况下是无法上网的,因为其默认的DNS是10.0.2.3,可将其设为本机IP
Ubuntu 下可用 ifconfig查看IP
adb shell进入模拟器shell
getprop 查看系统各项属性
其中[net.dns1]: [10.0.2.3]
setprop net.dns1 192.168........
adb指定设备安装apk:
sahwn@EP43:~/IdeaProjects/untitled$ adb --helpAndroid Debug Bridge version 1.0.31 -s <specific device> - directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment variable. devices [-l] - list all connected devices ('-l' will also list device qualifiers) device commands: adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file> - push this package file to the device and install it ('-l' means forward-lock the app) ('-r' means reinstall the app, keeping its data) ('-s' means install on SD card instead of internal storage) ('--algo', '--key', and '--iv' mean the file is encrypted already)
sahwn@EP43:~/IdeaProjects/untitled$ adb -s HC34XW903192 install -r untitled.apk3857 KB/s (979989 bytes in 0.248s)pkg: /data/local/tmp/untitled.apkSuccess
0 0
- android 模拟器 和 adb 的一些tips
- adb命令 软件安装在android模拟器的一些事
- adb的一些命令和进入模拟器data目录的一些坑
- Android开发的一些tips
- 使用adb进行Android模拟器的卸载
- android模拟器的一些问题
- 最全的android模拟器使用--ADB命令的介绍和解析
- 最全的android模拟器使用--ADB命令的介绍和解析
- Android adb的一些使用方法
- Android Fragment的一些小小小tips
- Android中一些实用的Tips
- android 模拟器的使用(Android模拟器的一些工具)
- git的一些使用和tips
- gvim的一些设置和tips
- Android一些Tips总结
- Android模拟器adb命令介绍
- Android模拟器adb命令介绍
- Android模拟器adb命令介绍
- 数据广播和subtitle、teletext、close caption之间的关系
- 【面试题目】加密的电话号码
- 环境搭建Cocos2d-x学习之创建Android工程和编译
- VC2010工程依赖不再自动链接
- 盗版XP成主要恶意攻击对象
- android 模拟器 和 adb 的一些tips
- 使用python 提取html文件中的特定数据
- ZOJ-2495
- 简明解释算法中的大O符号
- 五招防止QQ密码被盗
- 网络学习笔记(二)
- POJ 1703
- Leetcode: Add Binary
- 一份简单的代码演示缓冲区溢出的危害