<application android:debuggable="false" 有什么用?

本文介绍了一种检查Android应用在发布前是否正确设置了调试属性的方法。通过遍历已安装的应用并检查其debuggable标志,可以确保应用的安全性。
部署运行你感兴趣的模型镜像

看到项目中有这个属性标识,不知道干啥的,查查:


http://blog.csdn.net/small_love/article/details/6534956


在apk文件进行发布的时候,需要确认 android:debuggable="false" 是否设置为了false。而打包的时候有时候会忘记设计为false。

测试过程中打印出所有的为 android:debuggable="false" 的所有应用,然后确认下是否有自己开发的那个应用就可以。 

 Set<String> debuggableApps = new HashSet<String>();

List<ApplicationInfo> allApps = getBaseContext().getPackageManager()

  • .getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
  • for (ApplicationInfo app : allApps) {
  • String appName = app.packageName;
  • if ((app.flags & ApplicationInfo.FLAG_DEBUGGABLE) == ApplicationInfo.FLAG_DEBUGGABLE) {
  • debuggableApps.add(appName);
  • Log.e("debug app",appName);
  • }
  • }  
  • 可以在junit里面 运行一个test方法,也可以单独建立一个应用运行。

您可能感兴趣的与本文相关的镜像

AutoGPT

AutoGPT

AI应用

AutoGPT于2023年3月30日由游戏公司Significant Gravitas Ltd.的创始人Toran Bruce Richards发布,AutoGPT是一个AI agent(智能体),也是开源的应用程序,结合了GPT-4和GPT-3.5技术,给定自然语言的目标,它将尝试通过将其分解成子任务,并在自动循环中使用互联网和其他工具来实现这一目标

<?xml version="1.0" encoding="utf-8" standalone="no"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dw.Dating.lua" android:versionName="22" android:versionCode="1" android:installLocation="preferExternal"> <!-- 添加必要的Unity兼容配置 --> <uses-feature android:glEsVersion="0x20000" /> <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <!-- 权限优化 --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- 移除Unity 5.3.8不支持的权限 --> <!-- 已移除:MOUNT_UNMOUNT_FILESYSTEMS, CHANGE_NETWORK_STATE, CHANGE_WIFI_STATE, INTERACT_ACROSS_USERS_FULL, android.webkit.permission.PLUGIN, com.android.launcher.permission.INSTALL_SHORTCUT --> <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true" android:isGame="true" android:banner="@drawable/app_banner" android:hardwareAccelerated="true" <!-- 启用硬件加速提升性能 --> android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> <!-- 添加全屏主题 --> <!-- 关键Unity兼容配置 --> <activity android:name="com.unity3d.player.UnityPlayerActivity" <!-- 使用Unity标准Activity --> android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> </intent-filter> <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> </activity> <!-- 支付相关Activity保留 --> <activity android:name="com.fanwei.jubaosdk.cashier.CashierActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:launchMode="singleTask" /> <activity android:name="com.fanwei.jubaosdk.wap.WapActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:launchMode="singleTop" android:screenOrientation="portrait" /> <activity android:name="com.pay.sdk.usage.PayActivity" android:screenOrientation="portrait" /> <activity android:name="sdk.pay.PayWebViewActivity" android:screenOrientation="portrait" /> <activity android:name="com.switfpass.pay.activity.QQWapPayWebView" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent.NoTitleBar" /> <activity android:name="com.dw.Dating.lua.wxapi.WXEntryActivity" android:exported="true" android:launchMode="singleTop" android:theme="@android:style/Theme.NoDisplay" /> <!-- 文件提供器配置修正 --> <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.dw.Dating.lua.fileProvider" <!-- 使用包名确保唯一性 --> android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" /> <!-- 添加实际资源引用 --> </provider> <!-- 元数据配置 --> <meta-data android:name="URL_VALUE" android:value="http://fishgame.xin" /> <meta-data android:name="CHANNEL" android:value="AgentID-0" /> <meta-data android:name="FW_VALUE" android:value="FW-30855784" /> <meta-data android:name="AppID" android:value="wx401c37330dd3e92e" /> <meta-data android:name="UMENG_APPKEY" android:value="111" /> <meta-data android:name="UMENG_CHANNEL" android:value="Test" /> <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" /> </application> <!-- SDK版本设置 --> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" /> <!-- 最低支持4.4 --> <!-- 屏幕兼容性 --> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true" /> </manifest>帮我把这个配置文件修改在Unity5.3.8下可以正常使用
07-19
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="32" android:compileSdkVersionCodename="12" android:installLocation="auto" package="com.GGELUA.mygame" platformBuildVersionCode="32" platformBuildVersionName="12"> <uses-feature android:glEsVersion="0x00020000"/> <uses-feature android:name="android.hardware.touchscreen" android:required="false"/> <uses-feature android:name="android.hardware.bluetooth" android:required="false"/> <uses-feature android:name="android.hardware.gamepad" android:required="false"/> <uses-feature android:name="android.hardware.usb.host" android:required="false"/> <uses-feature android:name="android.hardware.type.pc" android:required="false"/> <uses-feature android:name="android.hardware.microphone" android:required="false"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <application android:allowBackup="true" android:debuggable="true" android:extractNativeLibs="true" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:requestLegacyExternalStorage="true" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> <activity android:alwaysRetainTaskState="true" android:configChanges="locale|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:exported="true" android:label="@string/app_name" android:launchMode="singleInstance" android:name="com.GGELUA.mygame.GGEActivity" android:preferMinimalPostProcessing="true"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <intent-filter> <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"/> </intent-filter> </activity> </application>
最新发布
09-14
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值