Android模拟器 SD卡的权限详解

来源:互联网 发布:软件开发合同收费模式 编辑:程序博客网 时间:2024/06/05 14:56
做为如今最盛行的挪动装备,顺序员们曾经力争上游参加到了Android开拓的行列中。关于每一个开拓者,顺序的少量数据要和SD卡交互,这样才不会占用手机内存而进步顺序的适用率。

  但是在开拓初期,老手关于Android模仿器上SD卡的操纵不熟习,被permission折磨的苦不堪言。在我后期开拓进程中,找不到一种公道的操纵SD权限的方式,招致模仿器无穷重启去探究,糜费了少量工夫。在这里列进去最无效的更改permission的办法供自己参考。

  翻开cmd,进入盘目录下(比方C盘),输出如下命令:mksdcard 1024M sdcard.img

  输出命令后会在以后目录下天生一个sdcard.img文件,该文件就是Android模仿器的SD卡镜像文件。

  1024M表示SD卡容量,也可以用K做单位,当然K,M必需大写。

  目前Android支撑8M-128G的SD卡。

  让你的模仿器找到你创立的镜像文件。

  在Eclipse中找到,Eclipse->Windows->Android AVD manager

  在sdcard选项后增加 C:/sdcard.img,创立镜像文件的目录。

  然后点击creat avd,finish完成关联镜像的模仿器创立。

  3.操纵SD卡,及SD卡的权限。

  当顺序施行时,我们发觉sdcard的施行权限是有题目的。

  当然我们需求在以后顺序的manifest.xml参加权限声明。

  好,到目前为止,一个顺序的SD卡权限曾经设置完成。点击run,发动模仿器。 


这样就可以对sdcard写数据了。

  总结,实在对SD卡权限操纵,不是针对某个模仿器,而是针对某个使用顺序。在这个使用顺序下sdcard可写,并不代笔这个模仿器下运转的顺序sdcard全可写。自己就是没搞清这个题目,形成了无穷重启模仿器。。。

  期望协助自己。

  最初附上manifest.xml中Android.permission列表。

  android.permission.ACCESS_CHECKIN_PROPERTIES答应读写拜访properties表在checkin数据库中,改值可以修正上传( Allows read/write access to the properties table in the checkin database, to change values that get uploaded)

  android.permission.ACCESS_COARSE_LOCATION答应一个顺序拜访CellID或WiFi热门来获取精确的地位(Allows an application to access coarse (e.g., Cell-ID, WiFi) location)

  android.permission.ACCESS_FINE_LOCATION答应一个顺序拜访优良地位(如GPS) (Allows an application to access fine (e.g., GPS) location)

  android.permission.ACCESS_LOCATION_EXTRA_COMMANDS答应使用顺序拜访额定的地位提供命令(Allows an application to access extra location provider commands)

  android.permission.ACCESS_MOCK_LOCATION答应顺序创立模仿地位提供用于测试(Allows an application to create mock location providers for testing)

  android.permission.ACCESS_NETWORK_STATE答应顺序拜访相关GSM网络音讯(Allows applications to access information about networks)

  android.permission.ACCESS_SURFACE_FLINGER答应顺序运用SurfaceFlinger底层特性(Allows an application to use SurfaceFlinger\'s low level features)

  android.permission.ACCESS_WIFI_STATE答应顺序拜访Wi-Fi网络形态音讯(Allows applications to access information about Wi-Fi networks)

  android.permission.ADD_SYSTEM_SERVICE答应顺序公布零碎级效劳(Allows an application to publish system-level services).

  android.permission.BATTERY_STATS答应顺序更老手机电池统计音讯(Allows an application to update the collected battery statistics)

  android.permission.BLUETOOTH答应顺序衔接到已配对的蓝牙装备(Allows applications to connect to paired bluetooth devices)

  android.permission.BLUETOOTH_ADMIN答应顺序发觉和配对蓝牙装备(Allows applications to discover and pair bluetooth devices)

  android.permission.BRICK恳求可以禁用装备(十分风险)(Required to be able to disable the device (very dangerous!).)

  android.permission.BROADCAST_PACKAGE_REMOVED答应顺序播送一个提示音讯在一个使用顺序包曾经移除后(Allows an application to broadcast a notification that an application package has been removed)

  android.permission.BROADCAST_STICKY.答应一个顺序播送常用intents(Allows an application to broadcast sticky intents)

  android.permission.CALL_PHONE答应一个顺序初始化一个电话拨号不需经过拨号用户界面需求用户确认(Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call being placed.)

  android.permission.CALL_PRIVILEGED答应一个顺序拨打任何号码,包括急迫号码无需经过拨号用户界面需求用户确认(Allows an application to call any phone number, including emergency numbers, without going through the Dialer user interface for the user to confirm the call being placed)

  android.permission.CAMERA恳求拜访运用照相装备(Required to be able to access the camera device. )

  android.permission.CHANGE_COMPONENT_ENABLED_STATE答应一个顺序能否改动一个组件或其他的启用或禁用(Allows an application to change whether an application component (other than its own) is enabled or not. )

  android.permission.CHANGE_CONFIGURATION答应一个顺序修正以后设置,如外地化(Allows an application to modify the current configuration, such as locale. )

  android.permission.CHANGE_NETWORK_STATE答应顺序改动网络衔接形态(Allows applications to change network connectivity state)

  android.permission.CHANGE_WIFI_STATE答应顺序改动Wi-Fi衔接形态(Allows applications to change Wi-Fi connectivity state)

  android.permission.CLEAR_APP_CACHE答应一个顺序分明缓存从一切装置的顺序在装备中(Allows an application to clear the caches of all installed applications on the device. )

  android.permission.CLEAR_APP_USER_DATA答应一个顺序肃清用户设置(Allows an application to clear user data)

  android.permission.CONTROL_LOCATION_UPDATES答应启用制止地位更新提示从无线模块(Allows enabling/disabling location update notifications from the radio. )

  android.permission.DELETE_CACHE_FILES答应顺序删除缓存文件(Allows an application to delete cache files)

  android.permission.DELETE_PACKAGES答应一个顺序删除包(Allows an application to delete packages)

  android.permission.DEVICE_POWER答应拜访底层电源治理(Allows low-level access to power management)

  android.permission.DIAGNOSTIC答应顺序RW诊断资源(Allows applications to RW to diagnostic resources. )

  android.permission.DISABLE_KEYGUARD答应顺序禁用键盘锁(Allows applications to disable the keyguard )

  android.permission.DUMP答应顺序前往形态抓取音讯从零碎效劳(Allows an application to retrieve state dump information from system services.)

  android.permission.EXPAND_STATUS_BAR答应一个顺序扩展膨胀在形态栏,Android开拓网提示该当是一个相似Windows Mobile中的托盘顺序(Allows an application to expand or collapse the status bar. )

  android.permission.FACTORY_TEST作为一个工厂测试顺序,运转在root用户(Run as a manufacturer test application, running as the root user. )

  android.permission.FLASHLIGHT拜访闪光灯,Android开拓网提示HTC Dream不包括闪光灯(Allows access to the flashlight )

  android.permission.FORCE_BACK答应顺序强行一个前进操纵能否在顶层activities(Allows an application to force a BACK operation on whatever is the top activity. )

  android.permission.FOTA_UPDATE临时不理解这是做什么运用的,Android开拓网剖析能够是一个预留权限.

  android.permission.GET_ACCOUNTS拜访一个帐户列表在Accounts Service中(Allows access to the list of accounts in the Accounts Service)

  android.permission.GET_PACKAGE_SIZE答应一个顺序获取任何package占用空间容量(Allows an application to find out the space used by any package. )

  android.permission.GET_TASKS答应一个顺序获取音讯相关以后或最近运转的义务,一个缩略的义务形态,能否活动等等(Allows an application to get information about the currently or recently running tasks: a thumbnail representation of the tasks, what activities are running in it, etc.)

  android.permission.HARDWARE_TEST答应拜访硬件(Allows access to hardware peripherals. )

  android.permission.INJECT_EVENTS答应一个顺序截获用户事情如按键、触摸、轨迹球等等到一个工夫流,Android开拓网提示算是hook技术吧(Allows an application to inject user events (keys, touch, trackball) into the event stream and deliver them to ANY window.)

  android.permission.INSTALL_PACKAGES答应一个顺序装置packages(Allows an application to install packages. )

  android.permission.INTERNAL_SYSTEM_WINDOW答应翻开窗口运用零碎用户界面(Allows an application to open windows that are for use by parts of the system user interface. )

  android.permission.INTERNET答应顺序翻开网络套接字(Allows applications to open network sockets)

  android.permission.MANAGE_APP_TOKENS答应顺序治理(创立、催后、z-order默许向z轴推移)顺序援用在窗口治理器中(Allows an application to manage (create, destroy, Z-order) application tokens in the window manager. )

  android.permission.MASTER_CLEAR目前还没有明白的注释,Android开拓网剖析能够是肃清一切数据,相似硬格机

  android.permission.MODIFY_AUDIO_SETTINGS答应顺序修正全局音频设置(Allows an application to modify global audio settings)

  android.permission.MODIFY_PHONE_STATE答应修正话机形态,如电源,人机接口等(Allows modification of the telephony state - power on, mmi, etc. )

  android.permission.MOUNT_UNMOUNT_FILESYSTEMS答应挂载和反挂载文件零碎可挪动存储(Allows mounting and unmounting file systems for removable storage. )

  android.permission.PERSISTENT_ACTIVITY答应一个顺序设置他的activities显现(Allow an application to make its activities persistent. )

  android.permission.PROCESS_OUTGOING_CALLS答应顺序监视、修正相关播出电话(Allows an application to monitor, modify, or abort outgoing calls)

  android.permission.READ_CALENDAR答应顺序读取用户日历数据(Allows an application to read the user\'s calendar data.)

  android.permission.READ_CONTACTS答应顺序读取用户联络人数据(Allows an application to read the user\'s contacts data.)

  android.permission.READ_FRAME_BUFFER答应顺序屏幕波或和更多惯例的拜访帧缓冲数据(Allows an application to take screen shots and more generally get access to the frame buffer data)

  android.permission.READ_INPUT_STATE答应顺序前往以后按键形态(Allows an application to retrieve the current state of keys and switches. )

  android.permission.READ_LOGS答应顺序读取底层零碎日志文件(Allows an application to read the low-level system log files. )

  android.permission.READ_OWNER_DATA答应顺序读取一切者数据(Allows an application to read the owner\'s data)

  android.permission.READ_SMS答应顺序读取短音讯(Allows an application to read SMS messages.)

  android.permission.READ_SYNC_SETTINGS答应顺序读取同步设置(Allows applications to read the sync settings)

  android.permission.READ_SYNC_STATS答应顺序读取同步形态(Allows applications to read the sync stats)

  android.permission.REBOOT恳求可以重新发动装备(Required to be able to reboot the device. ) android.permission.RECEIVE_BOOT_COMPLETED答应一个顺序接纳到ACTION_BOOT_COMPLETED播送在零碎完成发动(Allows an application to receive the ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. )

  android.permission.RECEIVE_MMS答应一个顺序监控将收到MMS彩信,记载或处置(Allows an application to monitor incoming MMS messages, to record or perform processing on them. )

  android.permission.RECEIVE_SMS答应顺序监控一个将收到短音讯,记载或处置(Allows an application to monitor incoming SMS messages, to record or perform processing on them.)

  android.permission.RECEIVE_WAP_PUSH答应顺序监控将收到WAP PUSH音讯(Allows an application to monitor incoming WAP push messages. )

  android.permission.RECORD_AUDIO答应顺序录制音频(Allows an application to record audio)

  android.permission.REORDER_TASKS答应顺序改动Z轴陈列义务(Allows an application to change the Z-order of tasks)

  android.permission.RESTART_PACKAGES答应顺序重新发动其他顺序(Allows an application to restart other applications)

  android.permission.SEND_SMS答应顺序发送SMS短信(Allows an application to send SMS messages)

  android.permission.SET_ACTIVITY_WATCHER答应顺序监控或掌握activities曾经发动全局零碎中Allows an application to watch and control how activities are started globally in the system.

  android.permission.SET_ALWAYS_FINISH答应顺序掌握能否活动直接完成在处于后台时Allows an application to control whether activities are immediately finished when put in the background.

  android.permission.SET_ANIMATION_SCALE修正全局音讯比例(Modify the global animation scaling factor.)

  android.permission.SET_DEBUG_APP配置一个顺序用于调试(Configure an application for debugging.)

  android.permission.SET_ORIENTATION答应底层拜访设置屏幕方向和实践旋转(Allows low-level access to setting the orientation (actually rotation) of the screen.)

  android.permission.SET_PREFERRED_APPLICATIONS答应一个顺序修正列表参数PackageManager.addPackageToPreferred() 和PackageManager.removePackageFromPreferred()办法(Allows an application to modify the list of preferred applications with the PackageManager.addPackageToPreferred() and PackageManager.removePackageFromPreferred() methods.)

  android.permission.SET_PROCESS_FOREGROUND答应顺序以后运转顺序强行到前台(Allows an application to force any currently running process to be in the foreground.)

  android.permission.SET_PROCESS_LIMIT答应设置最大的运转进程数目(Allows an application to set the maximum number of (not needed) application processes that can be running. )

  android.permission.SET_TIME_ZONE答应顺序设置工夫区域(Allows applications to set the system time zone)

  android.permission.SET_WALLPAPER答应顺序设置壁纸(Allows applications to set the wallpaper )

  android.permission.SET_WALLPAPER_HINTS答应顺序设置壁纸hits(Allows applications to set the wallpaper hints)

  android.permission.SIGNAL_PERSISTENT_PROCESSES答应顺序恳求发送信号到一切显现的进程中(Allow an application to request that a signal be sent to all persistent processes)

  android.permission.STATUS_BAR答应顺序翻开、封闭或禁用形态栏及图标Allows an application to open, close, or disable the status bar and its icons.

  android.permission.SUBSCRIBED_FEEDS_READ答应一个顺序拜访订阅RSS Feed形式提供(Allows an application to allow access the subscribed feeds ContentProvider. )

  android.permission.SUBSCRIBED_FEEDS_WRITE零碎临时保存改设置,Android开拓网以为将来版本会参加该功用。

  android.permission.SYSTEM_ALERT_WINDOW答应一个顺序翻开窗口运用TYPE_SYSTEM_ALERT,显如今其他一切顺序的顶层(Allows an application to open windows using the type TYPE_SYSTEM_ALERT, shown on top of all other applications. )

  android.permission.VIBRATE答应拜访振动装备(Allows access to the vibrator)

  android.permission.WAKE_LOCK答应运用PowerManager的WakeLocks坚持进程在休眠时从屏幕消逝( Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming)

  android.permission.WRITE_APN_SETTINGS答应顺序写入API设置(Allows applications to write the apn settings)

  android.permission.WRITE_CALENDAR答应一个顺序写入但不读取用户日历数据(Allows an application to write (but not read) the user\'s calendar data. )

  android.permission.WRITE_CONTACTS答应顺序写入但不读取用户联络人数据(Allows an application to write (but not read) the user\'s contacts data. )

  android.permission.WRITE_GSERVICES答应顺序修正Google效劳舆图(Allows an application to modify the Google service map. )

  android.permission.WRITE_OWNER_DATA答应一个顺序写入但不读取一切者数据(Allows an application to write (but not read) the owner\'s data.)

  android.permission.WRITE_SETTINGS答应顺序读取或写入零碎设置(Allows an application to read or write the system settings. )

  android.permission.WRITE_SMS答应顺序写短信(Allows an application to write SMS messages)

  android.permission.WRITE_SYNC_SETTINGS答应顺序写入同步设置(Allows applications to write the sync settings) Android

0 0