android 静默安装APK静默卸载报错, Bad call: specified package null under uid 10153 but it is really -1

eclipse - Android: Bad call: specified pacakge **** under uid 10121 but it is really -1 - Stack Overflow
to customize your list.
Announcing Stack Overflow Documentation
We started with Q&A. Technical documentation is next, and we need your help.
Whether you're a beginner or an experienced developer, you can contribute.
I'm receiving a strange warning in my catlog when I run my app on my Samsung Galaxy Nexus (Android 4.3, rooted). I'm reading the log using logcat on the phone itself.
Background: recently I changed the package name for my project, using Eclipse's refactoring tool. I also went through each file and manually searched for
in particular, I updated all the references in AndroidManifest.xml. I also used Windows to manually search for the package name, found a few extraneous references, and updated them. There is NOWHERE in my project that references the old package name. I also cleaned and rebuilt the project from scratch.
Here's the warning:
11-25 14:20:35.684
Bad call: specified package com.old.package.name.appname under uid 10121 but it is really -1.
And the heading for the error, in the left column of catlog, is:
This warning refreshes itself nearly instantly, sometimes multiple times per millisecond, and completely fills my log.
The odd thing is, when I install the app on my ASUS TF301 (4.2, rooted), I don't get this warning. When I run it on an emulator on my PC (launching from Eclipse), I don't get this warning.
After fooling around with it for a while, I noticed my logcat was showing the exact same thing even when the app was uninstalled, which led me to believe that the prior version (with the old package name) hadn't completely been uninstalled. So I restarted my phone and now the problem has disappeared. So, that's the solution: restart!
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabledjava.lang.SecurityException:under uid 10090 but it is really 10060
1915次浏览
E/DatabaseUtils( 1255): java.lang.SecurityException: Package com.flyaudio.skin does not belong to 10090
E/DatabaseUtils( 1255): && &at android.app.AppOpsManager.checkPackage(AppOpsManager.java:1133)
E/DatabaseUtils( 1255): && &at android.content.ContentProvider.getCallingPackage(ContentProvider.java:570)
E/DatabaseUtils( 1255): && &at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:635)
E/DatabaseUtils( 1255): && &at android.content.ContentProvider$Transport.call(ContentProvider.java:325)
E/DatabaseUtils( 1255): && &at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:275)
E/DatabaseUtils( 1255): && &at android.os.Binder.execTransact(Binder.java:404)
E/DatabaseUtils( 1255): && &at dalvik.system.NativeStart.run(Native Method)
W/AppOps& ( 1255): Bad call: specified package com.flyaudio.skin under uid 10090 but it is really 10060
android4.4.4高通平台出现这个问题。
跟踪代码知道是Settings.System.putInt(resolver, Settings.System.SCREEN_BRIGHTNESS, brightness);出错。
从网上找到解决办法:
修改/frameworks/base/core/java/android/app/ContextImpl.java
private ContextImpl(ContextImpl container, ActivityThread mainThread, LoadedApk packageInfo, IBinder activityToken, UserHandle user, boolean restricted, Display display, Configuration overrideConfiguration)改成如下:
private ContextImpl(ContextImpl container, ActivityThread mainThread,
LoadedApk packageInfo, IBinder activityToken, UserHandle user, boolean restricted,
Display display, Configuration overrideConfiguration) {
mOuterContext =
mMainThread = mainT
mActivityToken = activityT
mRestricted =
if (user == null) {
user = Process.myUserHandle();
mPackageInfo = packageI
mResourcesManager = ResourcesManager.getInstance();
mDisplay =
mOverrideConfiguration = overrideC
final int displayId = getDisplayId();
CompatibilityInfo compatInfo =
if (container != null) {
compatInfo = container.getDisplayAdjustments(displayId).getCompatibilityInfo();
if (compatInfo == null && displayId == Display.DEFAULT_DISPLAY) {
compatInfo = packageInfo.getCompatibilityInfo();
mDisplayAdjustments.setCompatibilityInfo(compatInfo);
mDisplayAdjustments.setActivityToken(activityToken);
Resources resources = packageInfo.getResources(mainThread);
if (resources != null) {
if (activityToken != null
|| displayId != Display.DEFAULT_DISPLAY
|| overrideConfiguration != null
|| (compatInfo != null && compatInfo.applicationScale
!= resources.getCompatibilityInfo().applicationScale)) {
resources = mResourcesManager.getTopLevelResources(
packageInfo.getResDir(), displayId,
overrideConfiguration, compatInfo, activityToken);
mResources =
if (container != null) {
mBasePackageName = container.mBasePackageN
mOpPackageName = container.mOpPackageN
mBasePackageName = packageInfo.mPackageN
ApplicationInfo ainfo = packageInfo.getApplicationInfo();
if (ainfo.uid == Process.SYSTEM_UID && ainfo.uid != Process.myUid()) {
// Special case: system components allow themselves to be loaded in to other
// processes.
For purposes of app ops, we must then consider the context as
// belonging to the package of this process, not the system itself, otherwise
// the package+uid verifications in app ops will fail.
mOpPackageName = ActivityThread.currentPackageName();
mOpPackageName = mBasePackageN
mContentResolver = new ApplicationContentResolver(this, mainThread, user);
重新编译framework
您可能也会对以下文章感兴趣
QQ : 341470
Friend Link
New MemberAndroid: Bad call: specified pacakge **** under uid 10121 but it is really -1 [安卓:坏的电话:指定的线路咨询*在uid 10121实际上是1] - 问题-字节技术
Android: Bad call: specified pacakge **** under uid 10121 but it is really -1
安卓:坏的电话:指定的线路咨询*在uid 10121实际上是1
问题 (Question)
I'm receiving a strange warning in my catlog when I run my app on my Samsung Galaxy Nexus (Android 4.3, rooted). I'm reading the log using logcat on the phone itself.
Background: recently I changed the package name for my project, using Eclipse's refactoring tool. I also went through each file and manually searched for
in particular, I updated all the references in AndroidManifest.xml. I also used Windows to manually search for the package name, found a few extraneous references, and updated them. There is NOWHERE in my project that references the old package name. I also cleaned and rebuilt the project from scratch.
Here's the warning:
11-25 14:20:35.684
Bad call: specified package com.old.package.name.appname under uid 10121 but it is really -1.
And the heading for the error, in the left column of catlog, is:
This warning refreshes itself nearly instantly, sometimes multiple times per millisecond, and completely fills my log.
The odd thing is, when I install the app on my ASUS TF301 (4.2, rooted), I don't get this warning. When I run it on an emulator on my PC (launching from Eclipse), I don't get this warning.
我收到了一个奇怪的警告在我的目录当我运行我的三星Galaxy Nexus我的应用程序(Android 4.3,根)。我阅读使用logcat对手机本身的日志。背景:最近我改变包的名称为我的项目,使用Eclipse的重构工具。我也经历了每个文件和手动搜索的老包名称;特别是,我更新在AndroidManifest.xml所有的参考文献。我还用Windows手动搜索包的名字,发现了一些额外的参考,并更新他们。有没有在我的项目中引用的老包名称。我也清理和重建项目从零开始。这里的警告:11-25 14:20:35.684
Bad call: specified package com.old.package.name.appname under uid 10121 but it is really -1.
和走向错误的目录,在左栏,是:374
这一警告刷新自己几乎瞬间,有时每毫秒多次,并完全填满我的日志。奇怪的是,当我安装程序在我tf301华硕(4.2,根),我不把这个警告。当我运行它在我的电脑模拟器(启动Eclipse),我不把这个警告。
最佳答案 (Best Answer)
After fooling around with it for a while, I noticed my logcat was showing the exact same thing even when the app was uninstalled, which led me to believe that the prior version (with the old package name) hadn't completely been uninstalled. So I restarted my phone and now the problem has disappeared. So, that's the solution: restart!
在玩弄它一会儿,我注意到我的logcat展示了同样的事情,甚至当应用程序被卸载,其中LED我相信以前的版本(与旧的包的名称)并没有完全被卸载。所以我开始了我的手机,现在问题已经消失。所以,这是解决方案:重新启动!
本文翻译自StackoverFlow,英语好的童鞋可直接参考原文:

我要回帖

更多关于 underspecified 的文章

 

随机推荐