如何在VirtualBox虚拟机中安装Android x86

Android x86最近出了一个5.1的新版本,其中包括了Intel新的houdini版本,以及其和ART虚拟机的集成。

最近想对其做一个研究。但是,直接找一台机器装实在太浪费。因此,决定将其安装在VirtualBox的虚拟机中。

首先,下载安装光盘镜像文件。最新版的Android-x86安装盘.iso文件,可以从这里下载到。笔者下载的是最新版,文件名是“android-x86-5.1-rc1.iso”。

然后,在VirtualBox中创建一个虚拟机,用来安装Android-x86。具体步骤如下:

1)点击左上角的“New”按键,在新对话框中,名字随便取一个,类型选择“Linux”,版本选择“Linux 2.6 /3.x /4.x (32-bit)”:

%image_alt%

2)选择“Next”,在新对话框中,设置虚拟机的内存大小。笔者设置为2GB:

%image_alt%

3)点击“Next”,在接下来的对话框中,选择“Create a virtual hard disk now”:

%image_alt%

4)点击“Create”,在新对话框中,选择磁盘镜像文件类型为VDI,即第一项:

%image_alt%

5)点击“Next”,选择动态分配:

%image_alt%

6)再点击“Next”,填入磁盘镜像文件的文件名和容量的上限,笔者选择10GB,应该够用了:

%image_alt%

7)点击“Create”后,虚拟机就创建成功了。

8)在虚拟机中创建一个光盘驱动器,并讲下载下来的Android-x86的光盘镜像文件关联上去。

在VirtualBox中,选择你刚才创建的那个虚拟机,然后点击上方的“Settings”按钮。
接着选择“Storage”选项卡,在右边的控制器旁边,点击那个带加号的光盘图标,在弹出的对话框中选择“Choose disk”:

%image_alt%

接下来找到你下载的那个.iso文件,并选择打开就可以了。

同时,请确保虚拟机允许光盘启动,还是在“Settings”对话框中,选择“System”,在右边的“Boot Order”中,“Optical”被选上了:

%image_alt%

9)更改一下网络配置,芯片组请选择Intel的ICH系列的,最好不要选择PIIX3,如上图。

在“Network”选项卡中,启动一个网卡适配器,选择网络类型为“NAT”或“Bridged Adapter”,名字是“eth0”,在高级选项中将适配器类型也改成Intel系列的:

%image_alt%

好了,虚拟机配置好了,下面直接启动虚拟机,进行安装。具体安装的步骤如下:

1)在光盘启动界面中,选择“Installation – Install Android-x86 to harddisk”:

%image_alt%

2)在接下来的对话框中,你应该可以看到“sda”,它就是你前面创建虚拟机时挂载上来的那个磁盘镜像。不过,这个磁盘镜像还没有格式化,还不能用于安装,所以我们先要选择“Create/Modify partitions”:

%image_alt%

3)下面让你选择是否用GPT,请确保千万选择No:

%image_alt%

4)再选择“New”,创建磁盘分区:

%image_alt%

5)选择“Primary”:

%image_alt%

6)下面的“Size”直接回车,选择默认值。然后,千万记得要将这个分区标记为可启动的:

%image_alt%

7)再选择“Write”,将改变写入磁盘,请耐心等待,这步可能要花一点时间。最后,选择“Quit”退出到前面的页面。这时,应该可以看到“sda1”了,证明分区成功:

%image_alt%

8)选择这个分区,并在下面的页面中,选择将磁盘格式化成ext3格式:

%image_alt%

9)请键入yes确认要格式化。在下面的页面中,请选择安装GRUB,但不用选择安装GRUB2:

%image_alt%

%image_alt%

10)再下面的配置,选什么都随便了,一路回车,安装就会正式进行了。

安装完成后,选择“Reboot”重启一下。别忘了,将虚拟机的光盘启动关掉,或者将启动的优先级调到硬盘之后,否则再次启动还是从光盘引导。

启动之后,画面如下:

%image_alt%

大功告成!:-)

前面的文章中介绍了如何在VirtualBox虚拟机中安装Android X86。不过,安装结束后,试了几个只有ARM版.so文件的apk程序,发现都打不开。难道是新版Android X86动态将ARM指令集转成X86指令集的houdini兼容性有问题?

经过一番研究,发现默认情况下,其实Android X86是不带houdini的,也就是不能运行只有ARM版.so文件的程序。

不过,可以通过几个步骤,将houdini安装上去,打开对动态转码的支持。而这只需要执行两步操作就可以了:

1)在“Settings”中选择“Apps compatibility”:

%image_alt%

打开“Enable native bridge”选项:

%image_alt%

但是,光打开了这个选项还没有用。打开这个选项的效果只是将系统属性“persist.sys.nativebridge”的值从false(0)改成了true(1):

%image_alt%

其它什么都没有做,其实仍然还不能运行ARM指令的程序,还需要下面的第二步。但是,即使运行了下一步,但是没有打开这个选项的话,也是不能运行ARM指令的程序的。

2)打开命令行,切换到root用户,敲入命令“enable_nativebridge”:

%image_alt%

之后,程序会自动上网下载一些东西,等到结束后,houdini的支持就算正式打开了。

那么enable_nativebridge命令到底做了什么呢?其实它只是一个shell脚本文件,位于/system/bin/目录下。

该脚本中的代码如下:

[plain] view plain copy

  1. #!/system/bin/sh
  2. PATH=/system/bin:/system/xbin
  3. houdini_bin=0
  4. dest_dir=/system/lib$1/arm$1
  5. binfmt_misc_dir=/proc/sys/fs/binfmt_misc
  6. cd $dest_dir
  7. if [ ! -s libhoudini.so ]; then
  8.     if touch .dl_houdini; then
  9.         rm -f .dl_houdini
  10.     else
  11.         cd .. && cp -a arm$1 /data/local/tmp
  12.         mount -t tmpfs tmpfs arm$1 && cd arm$1 &&
  13.                 cp -a /data/local/tmp/arm$1/* . && rm -rf /data/local/tmp/arm$1
  14.     fi
  15. fi
  16. cd /data/local/tmp
  17. while [ ! -s $dest_dir/libhoudini.so ]; do
  18.     while [ “$(getprop net.dns1)” = “” ]; do
  19.         sleep 10
  20.     done
  21.     if [ -z “$1” ]; then
  22.         [ “`uname -m`” = “x86_64” ] && url=http://goo.gl/Xl1str || url=http://goo.gl/PA2qZ7
  23.     else
  24.         url=http://goo.gl/L00S7l
  25.     fi
  26.     wget $url -cO houdini.tgz &&
  27.         bzcat houdini.tgz | tar xvf – -C $dest_dir && rm -f houdini.tgz && break
  28.     rm -f houdini.tgz
  29.     sleep 30
  30. done
  31. if [ ! -e $binfmt_misc_dir/register ]; then
  32.     mount -t binfmt_misc none $binfmt_misc_dir
  33. fi
  34. cd $binfmt_misc_dir
  35. if [ -e register ]; then
  36.     # register Houdini for arm binaries
  37.     if [ -z “$1” ]; then
  38.         echo ‘:arm_exe:M::\\x7f\\x45\\x4c\\x46\\x01\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x28::'”$dest_dir/houdini:P” > register
  39.         echo ‘:arm_dyn:M::\\x7f\\x45\\x4c\\x46\\x01\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x03\\x00\\x28::'”$dest_dir/houdini:P” > register
  40.     else
  41.         echo ‘:arm64_exe:M::\\x7f\\x45\\x4c\\x46\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\xb7::'”$dest_dir/houdini64:P” > register
  42.         echo ‘:arm64_dyn:M::\\x7f\\x45\\x4c\\x46\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x03\\x00\\xb7::'”$dest_dir/houdini64:P” > register
  43.     fi
  44.     if [ -e arm${1}_exe ]; then
  45.         houdini_bin=1
  46.     fi
  47. else
  48.     log -pe -thoudini “No binfmt_misc support”
  49. fi
  50. if [ $houdini_bin -eq 0 ]; then
  51.     log -pe -thoudini “houdini$1 enabling failed!”
  52. else
  53.     log -pi -thoudini “houdini$1 enabled”
  54. fi
  55. [ “$(getprop ro.zygote)” = “zygote64_32” -a -z “$1” ] && exec $0 64
  56. exit 0

其实主要就做了两件事情:

一是,根据命令是否带参数,以及支持的平台是32位的还是64位的等条件,从网上下载了一个压缩包,并解压缩到“/system/lib/arm”或者“/system/lib64/arm64”目录下。如果没有任何参数的直接运行“enable_nativebridge”命令的话,且在32位系统上的话,则下载链接为:http://goo.gl/PA2qZ7;如果没有任何参数的运行命令,且在64位系统上的花,则下载链接为:http://goo.gl/Xl1str;如果带参数运行“enable_nativebridge”命令的话(参数一般是“64”),则下载链接为:http://goo.gl/L00S7l

二是,往目录“/proc/sys/fs/binfmt_misc”下的名为“register”的文件中写入了两串字符串,从而告诉Linux内核,所有使用ARM指令集的可执行和动态库ELF文件都用houdini程序打开,而所有ARM64指令集的可执行和动态库ELF文件都用houdini64程序打开(关于binfmt_misc的详细解释,可以参考《Linux下如何指定某一类型程序用特定程序打开(通过binfmt_misc)》)。

 

 

 

shashlik-在Linux系统下直接运行android app

综合以下内容翻译:
http://www.shashlik.io/
https://www.howtoforge.com/tutorial/how-to-install-and-run-android-apk-on-linux-with-shashlik/
http://www.pcworld.com/article/3040093/android/shashlik-brings-android-apps-to-linux-and-you-can-try-it-today.html

本质上说,android是Linux,但是android的app需要一些其他的专用库才能运行。开放代码项目Shashlik就是要建立这个桥梁,让android app能直接在Linux上运行。现在Shashlik放出了开发者预览版本,目前许多android app都能直接在Linux上运行。

shashlik不是模拟器,他更像是一个容器。shashlik是在后台运行的,可以让android app运行时和本地程序获得几乎一样的效率(包括OpenGL图形性能)。

系统要求:
必要的开发包,kde库
下载:
http://www.shashlik.io/download/

安装:
sudo dpkg -i shashlik_0.9.3.deb或直接从源码编译安装

使用:
/opt/shashlik/bin/shashlik-run splash test.apk

BTW
运行的android app必须是支持x86平台,如果app仅支持arm平台,则该app无法运行。

图片
图片
图片

ARC Welder 谷歌官方安卓模拟器

ARC Welder 谷歌官方安卓模拟器

 

安装

https://chrome.google.com/webstore/detail/arc-welder/emfinbmielocnlhgmfkkmkngdoccbadn

很多人都想在电脑上运行安卓手机应用或游戏,我们曾介绍过 Genymotion、Andy、BlueStacks 等 Android 模拟器。不过,最近 Google 自己就推出了一个名为 App Runtime for Chrome (ARC) 的“黑科技”!

 

ARC 原本是谷歌 Chrome OS 系统里的一个官方 Android 模拟器,不过为了进一步扩大安卓平台的影响力以及实现跨桌面系统运行,谷歌决定将 ARC 变成一个通用的 Chrome 浏览器扩展 (命名为 ARC Welder),这意味着现在无论是 Win、Mac、Linux 系统都能通过谷歌浏览器来直接运行 Android APP软件和游戏了!

 

ARC Welder – 神奇的谷歌浏览器插件!通过 Chrome 直接在电脑上运行安卓软件

 

ARC 安卓模拟器(或者称为APP运行环境)是以 “浏览器插件扩展” 的方式开放给用户使用的,它完全免费,用户只要在 Windows、Mac OS X、Linux 等系统上安装 Chrome 谷歌浏览器并安装上「ARC Welder」扩展后,我们的电脑就可以通过 Chrome 来运行或测试各种 Android 应用软件/游戏了。

 

ARC Welder 安卓模拟器

 

不仅这样,ARC Welder 还可以帮助你将 APK 格式的安卓 APP 转换并打包成 Chrome 浏览器应用,这样你可以分享给其他电脑安装,或方便自己日后在浏览器中快速直接启动安卓 APP。当然,Android 开发者也可借助此工具快速将自己的安卓应用转换成 Chrome 应用并上架到 Chrome App Store 应用商店供用户下载。

 

ARC 安卓模拟器在电脑上运行安卓软件 (屏幕竖向/手机版)

 

ARC 模拟器是通过 Google 开发的 Native Client(NaCL) 运行在 Windows、Mac、Linux 和 Chrome OS 上的,NaCL 沙盒技术允许 Chrome 应用和插件以接近原生的速度运行,因此用 ARC 运行 Android APP 的速度还是很快很流畅的。

 

ARC Android 模拟器ARC 还能支持屏幕横向以及设置成「平板模式」运行

 

可惜的是,ARC 目前还处于开放测试阶段,并未完整支持所有的 Android API,也仅支持部分的 Google Play 服务API,因此一些严重依赖 Google 服务的应用或一些使用了相对偏门的 API 的软件可能会出现错误,而且也不支持应用内购买等特性。

 

在兼容性方面,根据实际测试,包括 Kindle 阅读器、印象笔记、三姑六婆计算器、AIDA64、布卡漫画 HD、网易云音乐、Twitter、城堡突袭 (Castle TD)、Instagram 等在内的一些 APP 都能正常使用。不过测试 QQ 轻聊版、微信、我的世界、很多游戏都会崩溃,成功率不算高,兼容性上 ARC 还有很大的提升空间。不过好的是,只要能正常运行的 APP,其速度都非常流畅,效果相当的不错。

 

ARC Welder 安卓模拟器安装使用教程:

 

1、因为众所周知的原因,在国内你需要先番·羽·土·啬后才能访问和下载各种谷歌相关的内容

 

2、下面教程的截图是在 Mac 系统下完成的 (Win 和 Linux 系统基本一样)

 

3、下载并安装好 Google Chrome 谷歌浏览器 (要求版本高于 40.0)

 

4、使用 Chrome 访问这里安装 ARC Welder 扩展

 

5、通过 Chrome 应用启动器或访问网址 chrome://apps 打开 ARC Welder 模拟器。

 

6、首次启动 ARC Welder,你需要点击「Choose」指定一个目录用于其储存资料

 

ARC Welder

 

7、然后点击 「Add your APK」 将你想要运行的 APK 格式的安卓应用程序添加进去

 

ARC Welder 设置

 

8、这时你可以看到右边的 Android APP 的设置界面,其中的选项的意思是:

 

Orientation 屏幕方向 Landscape 横向 / Portail 竖向

Form Factor 设备类型 Tablet 平板电脑 / Phone 手机 / Maximized 最大化

Clipboard Access 访问剪切板 Yes / No

9、最后,点击右下方的 「Launch App」 按钮即可开启运行该安卓 APP。

 

ARC Welder 怎样同时安装/运行多个安卓应用?

 

看完上面的教程你应该知道怎样使用 Chrome 浏览器的 ARC 插件来测试和运行安卓应用了。但你会发现,ARC Welder 一次只允许你启动一个 APP,想要运行另一个安卓应用,则必须删除之前运行的应用。不过,其实我们是可以实现同时让 ARC 运行多个 Android APP 的。

 

跟之前一样的方法在 ARC 里添加 APK 文件,点击「Launch App」测试一下能正常运行之后关闭窗口,回到ARC 的界面点击「Download ZIP」将 APK 转换成 Chrome 浏览器应用,这时你会得到一个转换好的 .zip 格式的压缩文件。(你可以共享这个 zip 文件给任何电脑安装使用)

 

将 zip 文件解压缩到任意目录,前往 chrome://extensions 打开「扩展工具」,勾上右上角「开发者模式」,然后点击「加载正在开发的扩展程序..」并选择该目录,将这个 Chrome 应用导入到浏览器去。

 

Chrome 浏览器设置

 

添加完成后,你就会在 Chrome 应用启动器和  chrome://apps 的应用列表里面看到该安卓 APP 应用的图标了,如下图。直接点击图标即可启动 Android 应用,非常方便快速。

 

Chrome ARC 安卓模拟器

 

而且制作成 Chrome 应用之后,你即可以同运行多个 Android 程序而不受限制了。这样,将自己最常用的一些安卓软件制作好,放置在谷歌浏览器中随时启动确实非常有意思。

 

ARC Welder 安卓模拟器演示视频

 

下面是一段老外在 Ubuntu Linux 系统下,通过 Chrome 浏览器和 ARC Welder 扩展运行 Android 游戏的演示视频,大家可以看看实际效果。(Windows / Mac 系统使用上基本一致)

 

 

总结:

 

相比 Android Studio 开发环境附带的 Android 模拟器,或利用虚拟机跑完整的安卓系统,ARC Welder 可谓是相当的轻量小巧,在启动和使用上也更方便,不需等待漫长的启动过程,而且 APP 运行起来非常快速流畅,使用体验相当不错。

 

作为官方的 Chrome 插件,ARC 跨平台的应用前景非常可观,实用性毋庸置疑,在未来也许会成为 Chrome 的自带功能。唯一可惜的是,ARC Welder 目前的兼容性还比较不足(还处于 Beta 测试阶段),Google 还有很长的路要走。一旦 ARC 将兼容性问题得到解决,Android 的整个生态环境借助这个跨平台的能力将会获得更加高速有益的发展。看来微软的 Windows 10 手机/桌面通用应用有点鸭梨了……

刷Android5.0或CM12出现流量和WIFI感叹号去掉方法

昨天把心爱的moto X刷了一个CM12,至今为止已经能够完美使用,我用的是电信4G,移动和联通的用户应该也是可以正常使用的。一开始刷进的时候各项功能都很正常,界面也很美观,就是发现CM12的ROM包WIFI和流量旁边有感叹号,后来经过各种谷歌,终于解决,现在将去掉CM12感叹号的方法分享给广大强迫症朋友。

去掉Android5.0和CM12网络图标上的感叹号的方法

Android5.0和CM12网络图标为什么会出现感叹号

这是因为安卓5.0引入了一种新的网络评估机制来评估网络状况,当你有网络请求时会自动选择网络连接条件最好的一个网络进行连接。中间有段函数isCaptivePortal()是用来判断当前网络是否需要登录的,而这个函数会到谷歌的服务器上进行请求,所以无法发送数据,出现感叹号。

CM12网络状态出现感叹号

如何去掉Android5.0和CM12网络图标上的感叹号

  • 使用CM12的终端去掉网络图标上的感叹号
  1. 这里以CM12为例,首先,刷入CM12,打开开发者模式(CM12打开开发者模式的方法:猛击设置-关于-版本号十下),然后在开发者模式中打开ROOT授权(选择应用和ADB),然后在下面打开本地终端。
    CM12中打开终端的方法
  2. 回到桌面,打开抽屉,发现是不是多了一个“终端”,OK,打开它。
    使用CM12的终端去掉网络图标的感叹号
  3. 输入“su”,然后回车;
  4. 然后再输入“settings put global captive_portal_detection_enabled 0”,再回车;
  5. 然后输入“reboot”,继续回车;
  6. 机器自动重启后,看看你的网络图标。
  7. 这个方法建议在刷过Google服务包之后进行,当然,如果你需要Google服务的话。
  • 使用ADB shell命令去掉网络图标上的感叹号

这里我只操作了一次,也成功了,不过后来被我*#*#4636#*#*玩了几次搞得又没网了,基本原理与上述方法一致。

我是用的moto X专用的fastboot工具打“ADB”,然后打adb shell “settings put global captive_portal_detection_enabled 0″(注意引号,不要打最外面这个大引号),出现一段killing什么什么的,然后重启试试。

使用ADB shell命令去掉感叹号不需ROOT。

你也可以使用ADB shell命令替换掉Google服务器:在ADB下打adb shell “settings put global captive_portal_server xn--yet824cpd.xn--fiqs8s”。

  • 使用非主流方法去掉网络图标上的感叹号

这个方法是我从一加论坛和小米论坛看的,自己并未进行尝试,请大家自行尝试。

  1. 开机后连接WiFi;
  2. 开启设置,进入用户菜单,创建新用户;
  3. 系统提示需要网络连接,一直点下一步,让手机连接网络;
  4. 当进行到正在联网时,强制关机;
  5. 重新开机后切换下网络,会发现感叹号很快消失了;
  6. 删除刚刚新添加的用户。
  7. OK。

之所以说非主流,因为看起来这个方法真的很无厘头,没代码,一点都不专业啊,不过据说还真的有效。

使用NoExclamation修改器去掉网络图标上的感叹号

感谢网友小狐狸,这里我将NoExclamation修改器的APK文件存放在我的微盘里,大家下载的时候可以顺手关注一下菊部哥。

需要注意的是NoExclamation修改器需要获取ROOT权限。

 

在安卓7.1.2里如何消除x号(在老一点点版本是感叹号)呢?

20170405更新:在安卓7.1.2里如何消除x号(在老一点点版本是感叹号)呢?
1.首先开启usb调试,然后用数据线连接电脑和手机。
2.然后解决好您的adb驱动问题,具体教程见:http://www.pixcn.cn/thread-1084-1-1.html
3.在电脑开始菜单-运行 输入cmd,打开命令提示符
依次输入下面语句
(以下办法支持安卓7.1.2/7.1.1)
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204
 
然后开启飞行模式,然后关闭飞行模式解决!亲自测试有效!
 
 
下面语句对安卓7.1/7.0有效
adb shell settings delete global captive_portal_server  
adb shell settings put global captive_portal_detection_enabled 0
 
20150223更新:
谷歌原生安卓系统当连接到移动数据网络或者WIFI网络的时候,其NetworkMonitor模块会向特定的服务器发起一个http的请求并利用收到的响应进行网络状态判断。由于谷歌的服务器被天朝屏蔽,所以导致没有返回值,这个时候谷歌安卓系统就会在信号或者wifi上打一个感叹号。
 
以下办法对安卓6.x/5.x有效果,对安卓7.0无效
解决的办法比较简单,修改接收请求的服务器地址:
首先搞定您pc的adb环境,然后连接您的手机和电脑,在命令提示符用下面命令来修改将服务器地址修改成http://www.g.cn
 
adb shell settings put global captive_portal_server www.g.cn
 
然后开启飞行模式,然后关闭飞行模式解决!
 
如果您想恢复的话,使用下面的语句:
 
adb shell settings delete global captive_portal_server  
adb shell settings put global captive_portal_detection_enabled 1  

android权限列表 Manifest.permission

Imy

http://developer.android.com/reference/android/Manifest.permission.html

Manifest.permission
extends Object
java.lang.Object

android.Manifest.permission
Summary

Constants
String
ACCESS_CHECKIN_PROPERTIES
Allows read/write access to the “properties” table in the checkin database, to change values that get uploaded.
String
ACCESS_COARSE_LOCATION
Allows an app to access approximate location.
String
ACCESS_FINE_LOCATION
Allows an app to access precise location.
String
ACCESS_LOCATION_EXTRA_COMMANDS
Allows an application to access extra location provider commands.
String
ACCESS_NETWORK_STATE
Allows applications to access information about networks.
String
ACCESS_NOTIFICATION_POLICY
Marker permission for applications that wish to access notification policy.
String
ACCESS_WIFI_STATE
Allows applications to access information about Wi-Fi networks.
String
ACCOUNT_MANAGER
Allows applications to call into AccountAuthenticators.
String
ADD_VOICEMAIL
Allows an application to add voicemails into the system.
String
BATTERY_STATS
Allows an application to collect battery statistics
String
BIND_ACCESSIBILITY_SERVICE
Must be required by an AccessibilityService, to ensure that only the system can bind to it.
String
BIND_APPWIDGET
Allows an application to tell the AppWidget service which application can access AppWidget’s data.
String
BIND_CARRIER_MESSAGING_SERVICE
This constant was deprecated in API level 23. Use BIND_CARRIER_SERVICES instead
String
BIND_CARRIER_SERVICES
The system process that is allowed to bind to services in carrier apps will have this permission.
String
BIND_CHOOSER_TARGET_SERVICE
Must be required by a ChooserTargetService, to ensure that only the system can bind to it.
String
BIND_DEVICE_ADMIN
Must be required by device administration receiver, to ensure that only the system can interact with it.
String
BIND_DREAM_SERVICE
Must be required by an DreamService, to ensure that only the system can bind to it.
String
BIND_INCALL_SERVICE
Must be required by a InCallService, to ensure that only the system can bind to it.
String
BIND_INPUT_METHOD
Must be required by an InputMethodService, to ensure that only the system can bind to it.
String
BIND_MIDI_DEVICE_SERVICE
Must be required by an MidiDeviceService, to ensure that only the system can bind to it.
String
BIND_NFC_SERVICE
Must be required by a HostApduService or OffHostApduService to ensure that only the system can bind to it.
String
BIND_NOTIFICATION_LISTENER_SERVICE
Must be required by an NotificationListenerService, to ensure that only the system can bind to it.
String
BIND_PRINT_SERVICE
Must be required by a PrintService, to ensure that only the system can bind to it.
String
BIND_REMOTEVIEWS
Must be required by a RemoteViewsService, to ensure that only the system can bind to it.
String
BIND_TELECOM_CONNECTION_SERVICE
Must be required by a ConnectionService, to ensure that only the system can bind to it.
String
BIND_TEXT_SERVICE
Must be required by a TextService (eg SpellCheckerService) to ensure that only the system can bind to it.
String
BIND_TV_INPUT
Must be required by a TvInputService to ensure that only the system can bind to it.
String
BIND_VOICE_INTERACTION
Must be required by a VoiceInteractionService, to ensure that only the system can bind to it.
String
BIND_VPN_SERVICE
Must be required by a VpnService, to ensure that only the system can bind to it.
String
BIND_WALLPAPER
Must be required by a WallpaperService, to ensure that only the system can bind to it.
String
BLUETOOTH
Allows applications to connect to paired bluetooth devices.
String
BLUETOOTH_ADMIN
Allows applications to discover and pair bluetooth devices.
String
BLUETOOTH_PRIVILEGED
Allows applications to pair bluetooth devices without user interaction, and to allow or disallow phonebook access or message access.
String
BODY_SENSORS
Allows an application to access data from sensors that the user uses to measure what is happening inside his/her body, such as heart rate.
String
BROADCAST_PACKAGE_REMOVED
Allows an application to broadcast a notification that an application package has been removed.
String
BROADCAST_SMS
Allows an application to broadcast an SMS receipt notification.
String
BROADCAST_STICKY
Allows an application to broadcast sticky intents.
String
BROADCAST_WAP_PUSH
Allows an application to broadcast a WAP PUSH receipt notification.
String
CALL_PHONE
Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call.
String
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.
String
CAMERA
Required to be able to access the camera device.
String
CAPTURE_AUDIO_OUTPUT
Allows an application to capture audio output.
String
CAPTURE_SECURE_VIDEO_OUTPUT
Allows an application to capture secure video output.
String
CAPTURE_VIDEO_OUTPUT
Allows an application to capture video output.
String
CHANGE_COMPONENT_ENABLED_STATE
Allows an application to change whether an application component (other than its own) is enabled or not.
String
CHANGE_CONFIGURATION
Allows an application to modify the current configuration, such as locale.
String
CHANGE_NETWORK_STATE
Allows applications to change network connectivity state.
String
CHANGE_WIFI_MULTICAST_STATE
Allows applications to enter Wi-Fi Multicast mode.
String
CHANGE_WIFI_STATE
Allows applications to change Wi-Fi connectivity state.
String
CLEAR_APP_CACHE
Allows an application to clear the caches of all installed applications on the device.
String
CONTROL_LOCATION_UPDATES
Allows enabling/disabling location update notifications from the radio.
String
DELETE_CACHE_FILES
Allows an application to delete cache files.
String
DELETE_PACKAGES
Allows an application to delete packages.
String
DIAGNOSTIC
Allows applications to RW to diagnostic resources.
String
DISABLE_KEYGUARD
Allows applications to disable the keyguard if it is not secure.
String
DUMP
Allows an application to retrieve state dump information from system services.
String
EXPAND_STATUS_BAR
Allows an application to expand or collapse the status bar.
String
FACTORY_TEST
Run as a manufacturer test application, running as the root user.
String
FLASHLIGHT
Allows access to the flashlight.
String
GET_ACCOUNTS
Allows access to the list of accounts in the Accounts Service.
String
GET_ACCOUNTS_PRIVILEGED
Allows access to the list of accounts in the Accounts Service.
String
GET_PACKAGE_SIZE
Allows an application to find out the space used by any package.
String
GET_TASKS
This constant was deprecated in API level 21. No longer enforced.
String
GLOBAL_SEARCH
This permission can be used on content providers to allow the global search system to access their data.
String
INSTALL_LOCATION_PROVIDER
Allows an application to install a location provider into the Location Manager.
String
INSTALL_PACKAGES
Allows an application to install packages.
String
INSTALL_SHORTCUT
Allows an application to install a shortcut in Launcher.
String
INTERNET
Allows applications to open network sockets.
String
KILL_BACKGROUND_PROCESSES
Allows an application to call killBackgroundProcesses(String).
String
LOCATION_HARDWARE
Allows an application to use location features in hardware, such as the geofencing api.
String
MANAGE_DOCUMENTS
Allows an application to manage access to documents, usually as part of a document picker.
String
MASTER_CLEAR
Not for use by third-party applications.
String
MEDIA_CONTENT_CONTROL
Allows an application to know what content is playing and control its playback.
String
MODIFY_AUDIO_SETTINGS
Allows an application to modify global audio settings.
String
MODIFY_PHONE_STATE
Allows modification of the telephony state – power on, mmi, etc.
String
MOUNT_FORMAT_FILESYSTEMS
Allows formatting file systems for removable storage.
String
MOUNT_UNMOUNT_FILESYSTEMS
Allows mounting and unmounting file systems for removable storage.
String
NFC
Allows applications to perform I/O operations over NFC.
String
PACKAGE_USAGE_STATS
Allows an application to collect component usage statisticsDeclaring the permission implies intention to use the API and the user of the device can grant permission through the Settings application.
String
PERSISTENT_ACTIVITY
This constant was deprecated in API level 9. This functionality will be removed in the future; please do not use. Allow an application to make its activities persistent.
String
PROCESS_OUTGOING_CALLS
Allows an application to see the number being dialed during an outgoing call with the option to redirect the call to a different number or abort the call altogether.
String
READ_CALENDAR
Allows an application to read the user’s calendar data.
String
READ_CALL_LOG
Allows an application to read the user’s call log.
String
READ_CONTACTS
Allows an application to read the user’s contacts data.
String
READ_EXTERNAL_STORAGE
Allows an application to read from external storage.
String
READ_FRAME_BUFFER
Allows an application to take screen shots and more generally get access to the frame buffer data.
String
READ_INPUT_STATE
This constant was deprecated in API level 16. The API that used this permission has been removed.
String
READ_LOGS
Allows an application to read the low-level system log files.
String
READ_PHONE_STATE
Allows read only access to phone state.
String
READ_SMS
Allows an application to read SMS messages.
String
READ_SYNC_SETTINGS
Allows applications to read the sync settings.
String
READ_SYNC_STATS
Allows applications to read the sync stats.
String
READ_VOICEMAIL
Allows an application to read voicemails in the system.
String
REBOOT
Required to be able to reboot the device.
String
RECEIVE_BOOT_COMPLETED
Allows an application to receive the ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting.
String
RECEIVE_MMS
Allows an application to monitor incoming MMS messages.
String
RECEIVE_SMS
Allows an application to receive SMS messages.
String
RECEIVE_WAP_PUSH
Allows an application to receive WAP push messages.
String
RECORD_AUDIO
Allows an application to record audio.
String
REORDER_TASKS
Allows an application to change the Z-order of tasks.
String
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
Permission an application must hold in order to use ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS.
String
REQUEST_INSTALL_PACKAGES
Allows an application to request installing packages.
String
RESTART_PACKAGES
This constant was deprecated in API level 8. The restartPackage(String) API is no longer supported.
String
SEND_RESPOND_VIA_MESSAGE
Allows an application (Phone) to send a request to other applications to handle the respond-via-message action during incoming calls.
String
SEND_SMS
Allows an application to send SMS messages.
String
SET_ALARM
Allows an application to broadcast an Intent to set an alarm for the user.
String
SET_ALWAYS_FINISH
Allows an application to control whether activities are immediately finished when put in the background.
String
SET_ANIMATION_SCALE
Modify the global animation scaling factor.
String
SET_DEBUG_APP
Configure an application for debugging.
String
SET_PREFERRED_APPLICATIONS
This constant was deprecated in API level 7. No longer useful, see addPackageToPreferred(String) for details.
String
SET_PROCESS_LIMIT
Allows an application to set the maximum number of (not needed) application processes that can be running.
String
SET_TIME
Allows applications to set the system time.
String
SET_TIME_ZONE
Allows applications to set the system time zone.
String
SET_WALLPAPER
Allows applications to set the wallpaper.
String
SET_WALLPAPER_HINTS
Allows applications to set the wallpaper hints.
String
SIGNAL_PERSISTENT_PROCESSES
Allow an application to request that a signal be sent to all persistent processes.
String
STATUS_BAR
Allows an application to open, close, or disable the status bar and its icons.
String
SYSTEM_ALERT_WINDOW
Allows an app to create windows using the type TYPE_SYSTEM_ALERT, shown on top of all other apps.
String
TRANSMIT_IR
Allows using the device’s IR transmitter, if available.
String
UNINSTALL_SHORTCUT
Allows an application to uninstall a shortcut in Launcher.
String
UPDATE_DEVICE_STATS
Allows an application to update device statistics.
String
USE_FINGERPRINT
Allows an app to use fingerprint hardware.
String
USE_SIP
Allows an application to use SIP service.
String
VIBRATE
Allows access to the vibrator.
String
WAKE_LOCK
Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming.
String
WRITE_APN_SETTINGS
Allows applications to write the apn settings.
String
WRITE_CALENDAR
Allows an application to write the user’s calendar data.
String
WRITE_CALL_LOG
Allows an application to write (but not read) the user’s contacts data.
String
WRITE_CONTACTS
Allows an application to write the user’s contacts data.
String
WRITE_EXTERNAL_STORAGE
Allows an application to write to external storage.
String
WRITE_GSERVICES
Allows an application to modify the Google service map.
String
WRITE_SECURE_SETTINGS
Allows an application to read or write the secure system settings.
String
WRITE_SETTINGS
Allows an application to read or write the system settings.
String
WRITE_SYNC_SETTINGS
Allows applications to write the sync settings.
String
WRITE_VOICEMAIL
Allows an application to modify and remove existing voicemails in the system.
Public Constructors

Manifest.permission()
[Collapse]

Inherited Methods
From class java.lang.Object

Object
clone()

Creates and returns a copy of this Object.
boolean
equals(Object o)

Compares this instance with the specified object and indicates if they are equal.
void
finalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.
final Class<?>
getClass()

Returns the unique instance of Class that represents this object’s class.
int
hashCode()

Returns an integer hash code for this object.
final void
notify()

Causes a thread which is waiting on this object’s monitor (by means of calling one of the wait() methods) to be woken up.
final void
notifyAll()

Causes all threads which are waiting on this object’s monitor (by means of calling one of the wait() methods) to be woken up.
String
toString()

Returns a string containing a concise, human-readable description of this object.
final void
wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
final void
wait(long millis, int nanos)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.
final void
wait(long millis)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.
Constants
public static final String ACCESS_CHECKIN_PROPERTIES
Added in API level 1
Allows read/write access to the “properties” table in the checkin database, to change values that get uploaded.

Not for use by third-party applications.
Constant Value: “android.permission.ACCESS_CHECKIN_PROPERTIES”
public static final String ACCESS_COARSE_LOCATION
Added in API level 1
Allows an app to access approximate location.

Protection level: dangerous
Constant Value: “android.permission.ACCESS_COARSE_LOCATION”
public static final String ACCESS_FINE_LOCATION
Added in API level 1
Allows an app to access precise location.

Protection level: dangerous
Constant Value: “android.permission.ACCESS_FINE_LOCATION”
public static final String ACCESS_LOCATION_EXTRA_COMMANDS
Added in API level 1
Allows an application to access extra location provider commands.

Protection level: normal
Constant Value: “android.permission.ACCESS_LOCATION_EXTRA_COMMANDS”
public static final String ACCESS_NETWORK_STATE
Added in API level 1
Allows applications to access information about networks.

Protection level: normal
Constant Value: “android.permission.ACCESS_NETWORK_STATE”
public static final String ACCESS_NOTIFICATION_POLICY
Added in API level 23
Marker permission for applications that wish to access notification policy.

Protection level: normal
Constant Value: “android.permission.ACCESS_NOTIFICATION_POLICY”
public static final String ACCESS_WIFI_STATE
Added in API level 1
Allows applications to access information about Wi-Fi networks.

Protection level: normal
Constant Value: “android.permission.ACCESS_WIFI_STATE”
public static final String ACCOUNT_MANAGER
Added in API level 5
Allows applications to call into AccountAuthenticators.

Not for use by third-party applications.
Constant Value: “android.permission.ACCOUNT_MANAGER”
public static final String ADD_VOICEMAIL
Added in API level 14
Allows an application to add voicemails into the system.

Protection level: dangerous
Constant Value: “com.android.voicemail.permission.ADD_VOICEMAIL”
public static final String BATTERY_STATS
Added in API level 1
Allows an application to collect battery statistics
Constant Value: “android.permission.BATTERY_STATS”
public static final String BIND_ACCESSIBILITY_SERVICE
Added in API level 16
Must be required by an AccessibilityService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_ACCESSIBILITY_SERVICE”
public static final String BIND_APPWIDGET
Added in API level 3
Allows an application to tell the AppWidget service which application can access AppWidget’s data. The normal user flow is that a user picks an AppWidget to go into a particular host, thereby giving that host application access to the private data from the AppWidget app. An application that has this permission should honor that contract.

Not for use by third-party applications.
Constant Value: “android.permission.BIND_APPWIDGET”
public static final String BIND_CARRIER_MESSAGING_SERVICE
Added in API level 22
This constant was deprecated in API level 23.
Use BIND_CARRIER_SERVICES instead

 

Constant Value: “android.permission.BIND_CARRIER_MESSAGING_SERVICE”
public static final String BIND_CARRIER_SERVICES
Added in API level 23
The system process that is allowed to bind to services in carrier apps will have this permission. Carrier apps should use this permission to protect their services that only the system is allowed to bind to.

Protection level: system|signature
Constant Value: “android.permission.BIND_CARRIER_SERVICES”
public static final String BIND_CHOOSER_TARGET_SERVICE
Added in API level 23
Must be required by a ChooserTargetService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_CHOOSER_TARGET_SERVICE”
public static final String BIND_DEVICE_ADMIN
Added in API level 8
Must be required by device administration receiver, to ensure that only the system can interact with it.

Protection level: signature
Constant Value: “android.permission.BIND_DEVICE_ADMIN”
public static final String BIND_DREAM_SERVICE
Added in API level 21
Must be required by an DreamService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_DREAM_SERVICE”
public static final String BIND_INCALL_SERVICE
Added in API level 23
Must be required by a InCallService, to ensure that only the system can bind to it.

Protection level: system|signature
Constant Value: “android.permission.BIND_INCALL_SERVICE”
public static final String BIND_INPUT_METHOD
Added in API level 3
Must be required by an InputMethodService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_INPUT_METHOD”
public static final String BIND_MIDI_DEVICE_SERVICE
Added in API level 23
Must be required by an MidiDeviceService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_MIDI_DEVICE_SERVICE”
public static final String BIND_NFC_SERVICE
Added in API level 19
Must be required by a HostApduService or OffHostApduService to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_NFC_SERVICE”
public static final String BIND_NOTIFICATION_LISTENER_SERVICE
Added in API level 18
Must be required by an NotificationListenerService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_NOTIFICATION_LISTENER_SERVICE”
public static final String BIND_PRINT_SERVICE
Added in API level 19
Must be required by a PrintService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_PRINT_SERVICE”
public static final String BIND_REMOTEVIEWS
Added in API level 11
Must be required by a RemoteViewsService, to ensure that only the system can bind to it.
Constant Value: “android.permission.BIND_REMOTEVIEWS”
public static final String BIND_TELECOM_CONNECTION_SERVICE
Added in API level 23
Must be required by a ConnectionService, to ensure that only the system can bind to it.

Protection level: system|signature
Constant Value: “android.permission.BIND_TELECOM_CONNECTION_SERVICE”
public static final String BIND_TEXT_SERVICE
Added in API level 14
Must be required by a TextService (eg SpellCheckerService) to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_TEXT_SERVICE”
public static final String BIND_TV_INPUT
Added in API level 21
Must be required by a TvInputService to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_TV_INPUT”
public static final String BIND_VOICE_INTERACTION
Added in API level 21
Must be required by a VoiceInteractionService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_VOICE_INTERACTION”
public static final String BIND_VPN_SERVICE
Added in API level 14
Must be required by a VpnService, to ensure that only the system can bind to it.

Protection level: signature
Constant Value: “android.permission.BIND_VPN_SERVICE”
public static final String BIND_WALLPAPER
Added in API level 8
Must be required by a WallpaperService, to ensure that only the system can bind to it.

Protection level: system|signature
Constant Value: “android.permission.BIND_WALLPAPER”
public static final String BLUETOOTH
Added in API level 1
Allows applications to connect to paired bluetooth devices.

Protection level: normal
Constant Value: “android.permission.BLUETOOTH”
public static final String BLUETOOTH_ADMIN
Added in API level 1
Allows applications to discover and pair bluetooth devices.

Protection level: normal
Constant Value: “android.permission.BLUETOOTH_ADMIN”
public static final String BLUETOOTH_PRIVILEGED
Added in API level 19
Allows applications to pair bluetooth devices without user interaction, and to allow or disallow phonebook access or message access. This is not available to third party applications.
Constant Value: “android.permission.BLUETOOTH_PRIVILEGED”
public static final String BODY_SENSORS
Added in API level 20
Allows an application to access data from sensors that the user uses to measure what is happening inside his/her body, such as heart rate.

Protection level: dangerous
Constant Value: “android.permission.BODY_SENSORS”
public static final String BROADCAST_PACKAGE_REMOVED
Added in API level 1
Allows an application to broadcast a notification that an application package has been removed.

Not for use by third-party applications.
Constant Value: “android.permission.BROADCAST_PACKAGE_REMOVED”
public static final String BROADCAST_SMS
Added in API level 2
Allows an application to broadcast an SMS receipt notification.

Not for use by third-party applications.
Constant Value: “android.permission.BROADCAST_SMS”
public static final String BROADCAST_STICKY
Added in API level 1
Allows an application to broadcast sticky intents. These are broadcasts whose data is held by the system after being finished, so that clients can quickly retrieve that data without having to wait for the next broadcast.

Protection level: normal
Constant Value: “android.permission.BROADCAST_STICKY”
public static final String BROADCAST_WAP_PUSH
Added in API level 2
Allows an application to broadcast a WAP PUSH receipt notification.

Not for use by third-party applications.
Constant Value: “android.permission.BROADCAST_WAP_PUSH”
public static final String CALL_PHONE
Added in API level 1
Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call.

Protection level: dangerous
Constant Value: “android.permission.CALL_PHONE”
public static final String CALL_PRIVILEGED
Added in API level 1
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.

Not for use by third-party applications.
Constant Value: “android.permission.CALL_PRIVILEGED”
public static final String CAMERA
Added in API level 1
Required to be able to access the camera device.

This will automatically enforce the <uses-feature> manifest element for all camera features. If you do not require all camera features or can properly operate if a camera is not available, then you must modify your manifest as appropriate in order to install on devices that don’t support all camera features.

Protection level: dangerous
Constant Value: “android.permission.CAMERA”
public static final String CAPTURE_AUDIO_OUTPUT
Added in API level 19
Allows an application to capture audio output.

Not for use by third-party applications.
Constant Value: “android.permission.CAPTURE_AUDIO_OUTPUT”
public static final String CAPTURE_SECURE_VIDEO_OUTPUT
Added in API level 19
Allows an application to capture secure video output.

Not for use by third-party applications.
Constant Value: “android.permission.CAPTURE_SECURE_VIDEO_OUTPUT”
public static final String CAPTURE_VIDEO_OUTPUT
Added in API level 19
Allows an application to capture video output.

Not for use by third-party applications.
Constant Value: “android.permission.CAPTURE_VIDEO_OUTPUT”
public static final String CHANGE_COMPONENT_ENABLED_STATE
Added in API level 1
Allows an application to change whether an application component (other than its own) is enabled or not.

Not for use by third-party applications.
Constant Value: “android.permission.CHANGE_COMPONENT_ENABLED_STATE”
public static final String CHANGE_CONFIGURATION
Added in API level 1
Allows an application to modify the current configuration, such as locale.
Constant Value: “android.permission.CHANGE_CONFIGURATION”
public static final String CHANGE_NETWORK_STATE
Added in API level 1
Allows applications to change network connectivity state.

Protection level: normal
Constant Value: “android.permission.CHANGE_NETWORK_STATE”
public static final String CHANGE_WIFI_MULTICAST_STATE
Added in API level 4
Allows applications to enter Wi-Fi Multicast mode.

Protection level: normal
Constant Value: “android.permission.CHANGE_WIFI_MULTICAST_STATE”
public static final String CHANGE_WIFI_STATE
Added in API level 1
Allows applications to change Wi-Fi connectivity state.

Protection level: normal
Constant Value: “android.permission.CHANGE_WIFI_STATE”
public static final String CLEAR_APP_CACHE
Added in API level 1
Allows an application to clear the caches of all installed applications on the device.

Protection level: system|signature
Constant Value: “android.permission.CLEAR_APP_CACHE”
public static final String CONTROL_LOCATION_UPDATES
Added in API level 1
Allows enabling/disabling location update notifications from the radio.

Not for use by third-party applications.
Constant Value: “android.permission.CONTROL_LOCATION_UPDATES”
public static final String DELETE_CACHE_FILES
Added in API level 1
Allows an application to delete cache files.

Not for use by third-party applications.
Constant Value: “android.permission.DELETE_CACHE_FILES”
public static final String DELETE_PACKAGES
Added in API level 1
Allows an application to delete packages.

Not for use by third-party applications.
Constant Value: “android.permission.DELETE_PACKAGES”
public static final String DIAGNOSTIC
Added in API level 1
Allows applications to RW to diagnostic resources.

Not for use by third-party applications.
Constant Value: “android.permission.DIAGNOSTIC”
public static final String DISABLE_KEYGUARD
Added in API level 1
Allows applications to disable the keyguard if it is not secure.

Protection level: normal
Constant Value: “android.permission.DISABLE_KEYGUARD”
public static final String DUMP
Added in API level 1
Allows an application to retrieve state dump information from system services.

Not for use by third-party applications.
Constant Value: “android.permission.DUMP”
public static final String EXPAND_STATUS_BAR
Added in API level 1
Allows an application to expand or collapse the status bar.

Protection level: normal
Constant Value: “android.permission.EXPAND_STATUS_BAR”
public static final String FACTORY_TEST
Added in API level 1
Run as a manufacturer test application, running as the root user. Only available when the device is running in manufacturer test mode.

Not for use by third-party applications.
Constant Value: “android.permission.FACTORY_TEST”
public static final String FLASHLIGHT
Added in API level 1
Allows access to the flashlight.

Protection level: normal
Constant Value: “android.permission.FLASHLIGHT”
public static final String GET_ACCOUNTS
Added in API level 1
Allows access to the list of accounts in the Accounts Service.

Note: Beginning with Android 6.0 (API level 23), if an app shares the signature of the authenticator that manages an account, it does not need “GET_ACCOUNTS” permission to read information about that account. On Android 5.1 and lower, all apps need “GET_ACCOUNTS” permission to read information about any account.

Protection level: dangerous
Constant Value: “android.permission.GET_ACCOUNTS”
public static final String GET_ACCOUNTS_PRIVILEGED
Added in API level 23
Allows access to the list of accounts in the Accounts Service.
Constant Value: “android.permission.GET_ACCOUNTS_PRIVILEGED”
public static final String GET_PACKAGE_SIZE
Added in API level 1
Allows an application to find out the space used by any package.

Protection level: normal
Constant Value: “android.permission.GET_PACKAGE_SIZE”
public static final String GET_TASKS
Added in API level 1
This constant was deprecated in API level 21.
No longer enforced.

 

Constant Value: “android.permission.GET_TASKS”
public static final String GLOBAL_SEARCH
Added in API level 4
This permission can be used on content providers to allow the global search system to access their data. Typically it used when the provider has some permissions protecting it (which global search would not be expected to hold), and added as a read-only permission to the path in the provider where global search queries are performed. This permission can not be held by regular applications; it is used by applications to protect themselves from everyone else besides global search.
Constant Value: “android.permission.GLOBAL_SEARCH”
public static final String INSTALL_LOCATION_PROVIDER
Added in API level 4
Allows an application to install a location provider into the Location Manager.

Not for use by third-party applications.
Constant Value: “android.permission.INSTALL_LOCATION_PROVIDER”
public static final String INSTALL_PACKAGES
Added in API level 1
Allows an application to install packages.

Not for use by third-party applications.
Constant Value: “android.permission.INSTALL_PACKAGES”
public static final String INSTALL_SHORTCUT
Added in API level 19
Allows an application to install a shortcut in Launcher.

Protection level: normal
Constant Value: “com.android.launcher.permission.INSTALL_SHORTCUT”
public static final String INTERNET
Added in API level 1
Allows applications to open network sockets.

Protection level: normal
Constant Value: “android.permission.INTERNET”
public static final String KILL_BACKGROUND_PROCESSES
Added in API level 8
Allows an application to call killBackgroundProcesses(String).

Protection level: normal
Constant Value: “android.permission.KILL_BACKGROUND_PROCESSES”
public static final String LOCATION_HARDWARE
Added in API level 18
Allows an application to use location features in hardware, such as the geofencing api.

Not for use by third-party applications.
Constant Value: “android.permission.LOCATION_HARDWARE”
public static final String MANAGE_DOCUMENTS
Added in API level 19
Allows an application to manage access to documents, usually as part of a document picker.

Protection level: signature
Constant Value: “android.permission.MANAGE_DOCUMENTS”
public static final String MASTER_CLEAR
Added in API level 1
Not for use by third-party applications.
Constant Value: “android.permission.MASTER_CLEAR”
public static final String MEDIA_CONTENT_CONTROL
Added in API level 19
Allows an application to know what content is playing and control its playback.

Not for use by third-party applications due to privacy of media consumption
Constant Value: “android.permission.MEDIA_CONTENT_CONTROL”
public static final String MODIFY_AUDIO_SETTINGS
Added in API level 1
Allows an application to modify global audio settings.

Protection level: normal
Constant Value: “android.permission.MODIFY_AUDIO_SETTINGS”
public static final String MODIFY_PHONE_STATE
Added in API level 1
Allows modification of the telephony state – power on, mmi, etc. Does not include placing calls.

Not for use by third-party applications.
Constant Value: “android.permission.MODIFY_PHONE_STATE”
public static final String MOUNT_FORMAT_FILESYSTEMS
Added in API level 3
Allows formatting file systems for removable storage.

Not for use by third-party applications.
Constant Value: “android.permission.MOUNT_FORMAT_FILESYSTEMS”
public static final String MOUNT_UNMOUNT_FILESYSTEMS
Added in API level 1
Allows mounting and unmounting file systems for removable storage.

Not for use by third-party applications.
Constant Value: “android.permission.MOUNT_UNMOUNT_FILESYSTEMS”
public static final String NFC
Added in API level 9
Allows applications to perform I/O operations over NFC.

Protection level: normal
Constant Value: “android.permission.NFC”
public static final String PACKAGE_USAGE_STATS
Added in API level 23
Allows an application to collect component usage statistics

Declaring the permission implies intention to use the API and the user of the device can grant permission through the Settings application.
Constant Value: “android.permission.PACKAGE_USAGE_STATS”
public static final String PERSISTENT_ACTIVITY
Added in API level 1
This constant was deprecated in API level 9.
This functionality will be removed in the future; please do not use. Allow an application to make its activities persistent.

 

Constant Value: “android.permission.PERSISTENT_ACTIVITY”
public static final String PROCESS_OUTGOING_CALLS
Added in API level 1
Allows an application to see the number being dialed during an outgoing call with the option to redirect the call to a different number or abort the call altogether.

Protection level: dangerous
Constant Value: “android.permission.PROCESS_OUTGOING_CALLS”
public static final String READ_CALENDAR
Added in API level 1
Allows an application to read the user’s calendar data.

Protection level: dangerous
Constant Value: “android.permission.READ_CALENDAR”
public static final String READ_CALL_LOG
Added in API level 16
Allows an application to read the user’s call log.

Note: If your app uses the READ_CONTACTS permission and both your minSdkVersion and targetSdkVersion values are set to 15 or lower, the system implicitly grants your app this permission. If you don’t need this permission, be sure your targetSdkVersion is 16 or higher.

Protection level: dangerous
Constant Value: “android.permission.READ_CALL_LOG”
public static final String READ_CONTACTS
Added in API level 1
Allows an application to read the user’s contacts data.

Protection level: dangerous
Constant Value: “android.permission.READ_CONTACTS”
public static final String READ_EXTERNAL_STORAGE
Added in API level 16
Allows an application to read from external storage.

Any app that declares the WRITE_EXTERNAL_STORAGE permission is implicitly granted this permission.

This permission is enforced starting in API level 19. Before API level 19, this permission is not enforced and all apps still have access to read from external storage. You can test your app with the permission enforced by enabling Protect USB storage under Developer options in the Settings app on a device running Android 4.1 or higher.

Also starting in API level 19, this permission is not required to read/write files in your application-specific directories returned by getExternalFilesDir(String) and getExternalCacheDir().

Note: If both your minSdkVersion and targetSdkVersion values are set to 3 or lower, the system implicitly grants your app this permission. If you don’t need this permission, be sure your targetSdkVersion is 4 or higher.

Protection level: dangerous
Constant Value: “android.permission.READ_EXTERNAL_STORAGE”
public static final String READ_FRAME_BUFFER
Added in API level 1
Allows an application to take screen shots and more generally get access to the frame buffer data.

Not for use by third-party applications.
Constant Value: “android.permission.READ_FRAME_BUFFER”
public static final String READ_INPUT_STATE
Added in API level 1
This constant was deprecated in API level 16.
The API that used this permission has been removed.

Allows an application to retrieve the current state of keys and switches.

Not for use by third-party applications.
Constant Value: “android.permission.READ_INPUT_STATE”
public static final String READ_LOGS
Added in API level 1
Allows an application to read the low-level system log files.

Not for use by third-party applications, because Log entries can contain the user’s private information.
Constant Value: “android.permission.READ_LOGS”
public static final String READ_PHONE_STATE
Added in API level 1
Allows read only access to phone state.

Note: If both your minSdkVersion and targetSdkVersion values are set to 3 or lower, the system implicitly grants your app this permission. If you don’t need this permission, be sure your targetSdkVersion is 4 or higher.

Protection level: dangerous
Constant Value: “android.permission.READ_PHONE_STATE”
public static final String READ_SMS
Added in API level 1
Allows an application to read SMS messages.

Protection level: dangerous
Constant Value: “android.permission.READ_SMS”
public static final String READ_SYNC_SETTINGS
Added in API level 1
Allows applications to read the sync settings.

Protection level: normal
Constant Value: “android.permission.READ_SYNC_SETTINGS”
public static final String READ_SYNC_STATS
Added in API level 1
Allows applications to read the sync stats.

Protection level: normal
Constant Value: “android.permission.READ_SYNC_STATS”
public static final String READ_VOICEMAIL
Added in API level 21
Allows an application to read voicemails in the system.

Protection level: system|signature
Constant Value: “com.android.voicemail.permission.READ_VOICEMAIL”
public static final String REBOOT
Added in API level 1
Required to be able to reboot the device.

Not for use by third-party applications.
Constant Value: “android.permission.REBOOT”
public static final String RECEIVE_BOOT_COMPLETED
Added in API level 1
Allows an application to receive the ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. If you don’t request this permission, you will not receive the broadcast at that time. Though holding this permission does not have any security implications, it can have a negative impact on the user experience by increasing the amount of time it takes the system to start and allowing applications to have themselves running without the user being aware of them. As such, you must explicitly declare your use of this facility to make that visible to the user.

Protection level: normal
Constant Value: “android.permission.RECEIVE_BOOT_COMPLETED”
public static final String RECEIVE_MMS
Added in API level 1
Allows an application to monitor incoming MMS messages.

Protection level: dangerous
Constant Value: “android.permission.RECEIVE_MMS”
public static final String RECEIVE_SMS
Added in API level 1
Allows an application to receive SMS messages.

Protection level: dangerous
Constant Value: “android.permission.RECEIVE_SMS”
public static final String RECEIVE_WAP_PUSH
Added in API level 1
Allows an application to receive WAP push messages.

Protection level: dangerous
Constant Value: “android.permission.RECEIVE_WAP_PUSH”
public static final String RECORD_AUDIO
Added in API level 1
Allows an application to record audio.

Protection level: dangerous
Constant Value: “android.permission.RECORD_AUDIO”
public static final String REORDER_TASKS
Added in API level 1
Allows an application to change the Z-order of tasks.

Protection level: normal
Constant Value: “android.permission.REORDER_TASKS”
public static final String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
Added in API level 23
Permission an application must hold in order to use ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS. This is a normal permission: an app requesting it will always be granted the permission, without the user needing to approve or see it.
Constant Value: “android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS”
public static final String REQUEST_INSTALL_PACKAGES
Added in API level 23
Allows an application to request installing packages. Apps targeting APIs greater than 22 must hold this permission in order to use ACTION_INSTALL_PACKAGE.

Protection level: normal
Constant Value: “android.permission.REQUEST_INSTALL_PACKAGES”
public static final String RESTART_PACKAGES
Added in API level 1
This constant was deprecated in API level 8.
The restartPackage(String) API is no longer supported.

 

Constant Value: “android.permission.RESTART_PACKAGES”
public static final String SEND_RESPOND_VIA_MESSAGE
Added in API level 18
Allows an application (Phone) to send a request to other applications to handle the respond-via-message action during incoming calls.

Not for use by third-party applications.
Constant Value: “android.permission.SEND_RESPOND_VIA_MESSAGE”
public static final String SEND_SMS
Added in API level 1
Allows an application to send SMS messages.

Protection level: dangerous
Constant Value: “android.permission.SEND_SMS”
public static final String SET_ALARM
Added in API level 9
Allows an application to broadcast an Intent to set an alarm for the user.

Protection level: normal
Constant Value: “com.android.alarm.permission.SET_ALARM”
public static final String SET_ALWAYS_FINISH
Added in API level 1
Allows an application to control whether activities are immediately finished when put in the background.

Not for use by third-party applications.
Constant Value: “android.permission.SET_ALWAYS_FINISH”
public static final String SET_ANIMATION_SCALE
Added in API level 1
Modify the global animation scaling factor.

Not for use by third-party applications.
Constant Value: “android.permission.SET_ANIMATION_SCALE”
public static final String SET_DEBUG_APP
Added in API level 1
Configure an application for debugging.

Not for use by third-party applications.
Constant Value: “android.permission.SET_DEBUG_APP”
public static final String SET_PREFERRED_APPLICATIONS
Added in API level 1
This constant was deprecated in API level 7.
No longer useful, see addPackageToPreferred(String) for details.

 

Constant Value: “android.permission.SET_PREFERRED_APPLICATIONS”
public static final String SET_PROCESS_LIMIT
Added in API level 1
Allows an application to set the maximum number of (not needed) application processes that can be running.

Not for use by third-party applications.
Constant Value: “android.permission.SET_PROCESS_LIMIT”
public static final String SET_TIME
Added in API level 8
Allows applications to set the system time.

Not for use by third-party applications.
Constant Value: “android.permission.SET_TIME”
public static final String SET_TIME_ZONE
Added in API level 1
Allows applications to set the system time zone.

Protection level: normal
Constant Value: “android.permission.SET_TIME_ZONE”
public static final String SET_WALLPAPER
Added in API level 1
Allows applications to set the wallpaper.

Protection level: normal
Constant Value: “android.permission.SET_WALLPAPER”
public static final String SET_WALLPAPER_HINTS
Added in API level 1
Allows applications to set the wallpaper hints.

Protection level: normal
Constant Value: “android.permission.SET_WALLPAPER_HINTS”
public static final String SIGNAL_PERSISTENT_PROCESSES
Added in API level 1
Allow an application to request that a signal be sent to all persistent processes.

Not for use by third-party applications.
Constant Value: “android.permission.SIGNAL_PERSISTENT_PROCESSES”
public static final String STATUS_BAR
Added in API level 1
Allows an application to open, close, or disable the status bar and its icons.

Not for use by third-party applications.
Constant Value: “android.permission.STATUS_BAR”
public static final String SYSTEM_ALERT_WINDOW
Added in API level 1
Allows an app to create windows using the type TYPE_SYSTEM_ALERT, shown on top of all other apps. Very few apps should use this permission; these windows are intended for system-level interaction with the user.

Note: If the app targets API level 23 or higher, the app user must explicitly grant this permission to the app through a permission management screen. The app requests the user’s approval by sending an intent with action ACTION_MANAGE_OVERLAY_PERMISSION. The app can check whether it has this authorization by calling Settings.canDrawOverlays().

Protection level: signature
Constant Value: “android.permission.SYSTEM_ALERT_WINDOW”
public static final String TRANSMIT_IR
Added in API level 19
Allows using the device’s IR transmitter, if available.

Protection level: normal
Constant Value: “android.permission.TRANSMIT_IR”
public static final String UNINSTALL_SHORTCUT
Added in API level 19
Allows an application to uninstall a shortcut in Launcher.

Protection level: normal
Constant Value: “com.android.launcher.permission.UNINSTALL_SHORTCUT”
public static final String UPDATE_DEVICE_STATS
Added in API level 3
Allows an application to update device statistics.

Not for use by third-party applications.
Constant Value: “android.permission.UPDATE_DEVICE_STATS”
public static final String USE_FINGERPRINT
Added in API level 23
Allows an app to use fingerprint hardware.

Protection level: normal
Constant Value: “android.permission.USE_FINGERPRINT”
public static final String USE_SIP
Added in API level 9
Allows an application to use SIP service.

Protection level: dangerous
Constant Value: “android.permission.USE_SIP”
public static final String VIBRATE
Added in API level 1
Allows access to the vibrator.

Protection level: normal
Constant Value: “android.permission.VIBRATE”
public static final String WAKE_LOCK
Added in API level 1
Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming.

Protection level: normal
Constant Value: “android.permission.WAKE_LOCK”
public static final String WRITE_APN_SETTINGS
Added in API level 1
Allows applications to write the apn settings.

Not for use by third-party applications.
Constant Value: “android.permission.WRITE_APN_SETTINGS”
public static final String WRITE_CALENDAR
Added in API level 1
Allows an application to write the user’s calendar data.

Protection level: dangerous
Constant Value: “android.permission.WRITE_CALENDAR”
public static final String WRITE_CALL_LOG
Added in API level 16
Allows an application to write (but not read) the user’s contacts data.

Note: If your app uses the WRITE_CONTACTS permission and both your minSdkVersion and targetSdkVersion values are set to 15 or lower, the system implicitly grants your app this permission. If you don’t need this permission, be sure your targetSdkVersion is 16 or higher.

Protection level: dangerous
Constant Value: “android.permission.WRITE_CALL_LOG”
public static final String WRITE_CONTACTS
Added in API level 1
Allows an application to write the user’s contacts data.

Protection level: dangerous
Constant Value: “android.permission.WRITE_CONTACTS”
public static final String WRITE_EXTERNAL_STORAGE
Added in API level 4
Allows an application to write to external storage.

Note: If both your minSdkVersion and targetSdkVersion values are set to 3 or lower, the system implicitly grants your app this permission. If you don’t need this permission, be sure your targetSdkVersion is 4 or higher.

Starting in API level 19, this permission is not required to read/write files in your application-specific directories returned by getExternalFilesDir(String) and getExternalCacheDir().

Protection level: dangerous
Constant Value: “android.permission.WRITE_EXTERNAL_STORAGE”
public static final String WRITE_GSERVICES
Added in API level 1
Allows an application to modify the Google service map.

Not for use by third-party applications.
Constant Value: “android.permission.WRITE_GSERVICES”
public static final String WRITE_SECURE_SETTINGS
Added in API level 3
Allows an application to read or write the secure system settings.

Not for use by third-party applications.
Constant Value: “android.permission.WRITE_SECURE_SETTINGS”
public static final String WRITE_SETTINGS
Added in API level 1
Allows an application to read or write the system settings.

Note: If the app targets API level 23 or higher, the app user must explicitly grant this permission to the app through a permission management screen. The app requests the user’s approval by sending an intent with action ACTION_MANAGE_WRITE_SETTINGS. The app can check whether it has this authorization by calling Settings.System.canWrite().

Protection level: signature
Constant Value: “android.permission.WRITE_SETTINGS”
public static final String WRITE_SYNC_SETTINGS
Added in API level 1
Allows applications to write the sync settings.

Protection level: normal
Constant Value: “android.permission.WRITE_SYNC_SETTINGS”
public static final String WRITE_VOICEMAIL
Added in API level 21
Allows an application to modify and remove existing voicemails in the system.

Protection level: system|signature
Constant Value: “com.android.voicemail.permission.WRITE_VOICEMAIL”
Public Constructors

apk签名

Android系统要求每一个Android应用程序必须要经过数字签名才能够安装到系统中,也就是说如果一个Android应用程序没有经过数字签名,是没有办法安装到系统中的!
Android通过数字签名来标识应用程序的作者和在应用程序之间建立信任关系,不是用来决定最终用户可以安装哪些应用程序。
这个数字签名由应用程序的作者完成,并不需要权威的数字证书签名机构认证,它只是用来让应用程序包自我认证的
假如修改了APK中的一个文件,或者在APK中新加入了一个文件,则需要对APK重新签名,在ubuntu下步骤如下:
需要keytool和jarsigner这2个命令,这2个命令在jdk中
1:我要在APK中添加一个新文件,打开APK是下面这样的
2:加入1个新文件log,删除META-INF(不删除有时签名完不能安装),如下图
3:使用命令获取密钥
命令:
keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000
解释:
keytool -genkey -v -keystore (生成的密钥名称) -alias (密钥别名) -keyalg RSA -validity (有效期)
Android Market强制要求所有应用程序数字证书的有效期要持续到2033年10月22日以后
需要设置密码,可以随便写,但是在签名时要用到,下面的内容都是我随便填的
4:开始签名
命令:
jarsigner -verbose -keystore android.keystore -signedjar ~/Desktop/PlayerProject.apk    PlayerProject.apk android
解释:
jarsigner -verbose -keystore (上面生成的密钥名称) -signedjar (签名后的APK路径)    (签名前的APK路径) (密钥android.keystore的别名)
这里就需要上面设置的密码
5:安装测试
一、安装apktool

1、访问http://code.google.com/p/android-apktool下载apktool-install-linux-*文件与apktool-*文件,将两文件夹内的文件(不带文件夹)解压至/usr/local/bin目录(需要管理员权限)。
2、cd到/usr/local/bin目录,在终端运行apktool命令,即可安装apktool。
apktool 命令
apktool d geek.apk test     反编译(解压) geek.apk到文件夹test
apktool b test geek_2.apk  从文件夹test重建apk

注:执行apktool b test geek_2.apk命令时可能会出现错误,授予/usr/bin/aapt可读写、可执行权限即可解决。




二、签名1、确认已安装Java。
2、在终端执行命令:keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000生成签名( android.keystore为签名名称)
3、使用命令:jarsigner -verbose -keystore android.keystore -signedjar geek_2_signed.apk geek_2.apk android为修改过的程序签名
注:生成的签名应与所需签名程序在同一目录(也可以不在同一目录,具体参考本步骤中2条命令的使用方法)。




三、另附1、keytool用法:
-certreq     [-v] [-protected]

[-alias <别名>] [-sigalg <sigalg>]
[-file <csr_file>] [-keypass <密钥库口令>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-changealias [-v] [-protected] -alias <别名> -destalias <目标别名>
[-keypass <密钥库口令>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-delete      [-v] [-protected] -alias <别名>
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-exportcert  [-v] [-rfc] [-protected]
[-alias <别名>] [-file <认证文件>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-genkeypair  [-v] [-protected]
[-alias <别名>]
[-keyalg <keyalg>] [-keysize <密钥大小>]
[-sigalg <sigalg>] [-dname <dname>]
[-validity <valDays>] [-keypass <密钥库口令>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-genseckey   [-v] [-protected]
[-alias <别名>] [-keypass <密钥库口令>]
[-keyalg <keyalg>] [-keysize <密钥大小>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-help
-importcert  [-v] [-noprompt] [-trustcacerts] [-protected]
[-alias <别名>]
[-file <认证文件>] [-keypass <密钥库口令>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-importkeystore [-v]
[-srckeystore <源密钥库>] [-destkeystore <目标密钥库>]
[-srcstoretype <源存储类型>] [-deststoretype <目标存储类型>]
[-srcstorepass <源存储库口令>] [-deststorepass <目标存储库口令>]
[-srcprotected] [-destprotected]
[-srcprovidername <源提供方名称>]
[-destprovidername <目标提供方名称>]
[-srcalias <源别名> [-destalias <目标别名>]
[-srckeypass <源密钥库口令>] [-destkeypass <目标密钥库口令>]]
[-noprompt]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-keypasswd   [-v] [-alias <别名>]
[-keypass <旧密钥库口令>] [-new <新密钥库口令>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-list        [-v | -rfc] [-protected]
[-alias <别名>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

-printcert   [-v] [-file <认证文件>]
-storepasswd [-v] [-new <新存储库口令>]
[-keystore <密钥库>] [-storepass <存储库口令>]
[-storetype <存储类型>] [-providername <名称>]
[-providerclass <提供方类名称> [-providerarg <参数>]] …
[-providerpath <路径列表>]

2、jarsigner用法: [选项] jar 文件别名
jarsigner -verify [选项] jar 文件

[-keystore <url>]           密钥库位置
[-storepass <口令>]         用于密钥库完整性的口令
[-storetype <类型>]         密钥库类型
[-keypass <口令>]           专用密钥的口令(如果不同)
[-sigfile <文件>]           .SF/.DSA 文件的名称
[-signedjar <文件>]         已签名的 JAR 文件的名称
[-digestalg <算法>]    摘要算法的名称
[-sigalg <算法>]       签名算法的名称
[-verify]                   验证已签名的 JAR 文件
[-verbose]                  签名/验证时输出详细信息
[-certs]                    输出详细信息和验证时显示证书
[-tsa <url>]                时间戳机构的位置
[-tsacert <别名>]           时间戳机构的公共密钥证书
[-altsigner <类>]           替代的签名机制的类名
[-altsignerpath <路径列表>] 替代的签名机制的位置
[-internalsf]               在签名块内包含 .SF 文件
[-sectionsonly]             不计算整个清单的散列
[-protected]                密钥库已保护验证路径
[-providerName <名称>]      提供者名称
[-providerClass <类>        加密服务提供者的名称
[-providerArg <参数>]] … 主类文件和构造函数参数