RSS Feed app doesn't work - android

I'm working with android studio and when I launch the app it doesn't work and on android studio show this problem:
09-13 23:41:37.579 2228-2380/? A/SdkSpecific17﹕ null
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.google.android.location.os.real.SdkSpecific17.d(SourceFile:266)
at ees.run(SourceFile:797)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=2228, uid=10011 requires android.permission.INTERACT_ACROSS_USERS
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.app.ActivityManagerProxy.getCurrentUser(ActivityManagerNative.java:3871)
at android.app.ActivityManager.getCurrentUser(ActivityManager.java:1948)
... 5 more
09-13 23:41:37.719 2228-2380/? A/SdkSpecific17﹕ null
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.google.android.location.os.real.SdkSpecific17.d(SourceFile:266)
at efb.D(SourceFile:933)
at dno.c(SourceFile:126)
at dno.x_(SourceFile:149)
at dnk.b(SourceFile:952)
at dmr.b(SourceFile:331)
at ees.run(SourceFile:798)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=2228, uid=10011 requires android.permission.INTERACT_ACROSS_USERS
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.app.ActivityManagerProxy.getCurrentUser(ActivityManagerNative.java:3871)
at android.app.ActivityManager.getCurrentUser(ActivityManager.java:1948)
... 10 more
can you help me? Thanks

The clue is
Caused by: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=2228, uid=10011 requires android.permission.INTERACT_ACROSS_USERS
You need to add to your manifest.xml
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
That being said, I've not seen this permission before... I believe it's used when you require root access. So you also might need a phone that is rooted.

Related

Difference between "Bookmark History" permission tag

What is the difference between the two Android permission below related to browser Bookmark History?
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/> -->
<uses-permission android:name="android.permission.READ_HISTORY_BOOKMARKS" />
My app works fine with the first one only, and crash with the second.
SDK version:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
Error Log when I use the second permission tag:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.SecurityException: Permission Denial: reading com.android.browser.provider.BrowserProvider2 uri content://browser/bookmarks from pid=5063, uid=10050 requires com.android.browser.permission.READ_HISTORY_BOOKMARKS, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1431)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:385)
at android.content.ContentResolver.query(ContentResolver.java:414)
at android.content.ContentResolver.query(ContentResolver.java:357)
at course.labs.permissionslab.BookmarksActivity.loadBookmarks(BookmarksActivity.java:56)
at course.labs.permissionslab.BookmarksActivity.access$000(BookmarksActivity.java:14)
at course.labs.permissionslab.BookmarksActivity$1.onClick(BookmarksActivity.java:32)
at android.view.View.performClick(View.java:4240)
at android.view.View$PerformClick.run(View.java:17721)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Android version: 4.3.1
Thanks!
This release removes support for global bookmarks. The android.provider.Browser.getAllBookmarks() and android.provider.Browser.saveBookmark() methods are now removed. Likewise, the READ_HISTORY_BOOKMARKS and WRITE_HISTORY_BOOKMARKS permissions are removed. If your app targets Android 6.0 (API level 23) or higher, don't access bookmarks from the global provider or use the bookmark permissions. Instead, your app should store bookmarks data internally.
https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-bookmark-browser

How to fix ussd code error?

My Logcat:
08-23 01:32:12.806 1299-1299/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.haftasia.easycode, PID: 1299
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:xxxxxxxx cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{43f9a738 1299:com.haftasia.easycode/u0a181} (pid=1299, uid=10181) requires android.permission.CALL_PHONE
at android.os.Parcel.readException(Parcel.java:1472)
at android.os.Parcel.readException(Parcel.java:1426)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2109)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1419)
at android.app.Activity.startActivityForResult(Activity.java:3442)
at android.app.Activity.startActivityForResult(Activity.java:3403)
at android.app.Activity.startActivity(Activity.java:3645)
at android.app.Activity.startActivity(Activity.java:3613)
at com.haftasia.easycode.Day_3G_Mci$1$1.onClick(Day_3G_Mci.java:52)
at android.view.View.performClick(View.java:4448)
at android.view.View$PerformClick.run(View.java:18461)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5065)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
You must add this permission in your AppManifest.xml:
<uses-permission android:name="android.permission.CALL_PHONE" />
Your error occurred because you didn't add it.
Since the logcat is saying everything what you looking for why dont you try to add permission ?
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
You seem to have an intent which makes an call but however for any app to make a call it requires the permission.
To add it in the Manifest before the application tag add the following
<uses-permission android:name = "android.permission.CALL_PHONE"/>

Hide Installed app icon in android

I have a scenario in which i have to hide few installed apps icon i did try my best but didn't get the problem i think following code work for root devices only.
ComponentName componentToDisable =
new ComponentName("com.androidbird.lmkt",
"com.androidbird.lmkt.Splashscreen");
getPackageManager().setComponentEnabledSetting(
componentToDisable,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
Logcat:
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbird.lmkt/com.androidbird.lmkt.Splashscreen}: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=18338, uid=10165, package uid=10140
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2377)
at android.app.ActivityThread.access$600(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5341)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:929)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=18338, uid=10165, package uid=10140
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.content.pm.IPackageManager$Stub$Proxy.setComponentEnabledSetting(IPackageManager.java:2573)
at android.app.ApplicationPackageManager.setComponentEnabledSetting(ApplicationPackageManager.java:1250)
com.androidbird.dashboard.MainActivity.onCreate(MainActivity.java:64)
at android.app.Activity.performCreate(Activity.java:5125)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2289)
SecurityException: Permission Denial: attempt to change component state from pid=18338, uid=10165, package uid=10140
you cant hide other application ... for that you need root access... you can hide your app icon

AnalyticsService: java.lang.SecurityException: attempting to read gservices without permission

I've spent the entire day attempting to fix this, please find the stack trace below, coming from the Google Play Services lib. I changed nothing, i rebuilt the app today and ever since have been given this error. I've tried upgrading GPS to the latest version, rebuilding GPS, downgrading GPS to a previous version, removing various other libraries, explicitly adding the permission it requests and other such niceties... but NOTHING.
if ANYONE can please lend some advice i'd be forever grateful.
java.lang.RuntimeException: Unable to instantiate service
com.google.android.gms.analytics.service.AnalyticsService: java.lang.SecurityException: attempting to
read gservices without permission: Neither user 10064 nor current process has
com.google.android.providers.gsf.permission.READ_GSERVICES. at
android.app.ActivityThread.handleCreateService(ActivityThread.java:1929) at
android.app.ActivityThread.access$2500(ActivityThread.java:117) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:985) at
android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at
android.app.ActivityThread.main(ActivityThread.java:3683) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:507) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:895) at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:653) at dalvik.system.NativeStart.main(Native
Method) Caused by: java.lang.SecurityException: attempting to read gservices without permission:
Neither user 10064 nor current process has
com.google.android.providers.gsf.permission.READ_GSERVICES. at
android.app.ContextImpl.enforce(ContextImpl.java:1289) at
android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1318) at
android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:395) at
imq.c(SourceFile:107) at imq.a(SourceFile:121) at blw.a(SourceFile:276) at blu.b(SourceFile:203) at
blo.c(SourceFile:135) at com.google.android.gms.analytics.service.AnalyticsService.<init
(SourceFile:53) at java.lang.Class.newInstanceImpl(Native Method) at
java.lang.Class.newInstance(Class.java:1409) at
android.app.ActivityThread.handleCreateService(ActivityThread.java:1926) ... 10 more

SecurityException: Permission Denial. opening provider xxx from xxx that is not exported from uid 10027 [duplicate]

This question already has answers here:
Android - file provider - permission denial
(12 answers)
Closed 7 months ago.
I have a project A as library jar file, which contains a ContentProvider. Then I need to use it in project B. As declared in Manifest:
<provider
android:authorities="com.gezbox.android.onepiece"
android:exported="true"
android:name="com.gezbox.android.api.provider.GezboxProvider"/>
But problem comes then:
04-17 17:55:50.695: WARN/dalvikvm(5527): threadid=13: thread exiting with uncaught exception (group=0x40def300)
04-17 17:55:50.695: WARN/ActivityManager(258): Permission denied: checkComponentPermission() owningUid=10027
04-17 17:55:50.695: WARN/ActivityManager(258): Permission denied: checkComponentPermission() owningUid=10027
04-17 17:55:50.695: WARN/ActivityManager(258): Permission Denial: opening provider com.gezbox.android.api.provider.GezboxProvider from ProcessRecord{415d5e08 5527:com.gezbox.android.onepiece/u0a31} (pid=5527, uid=10031) that is not exported from uid 10027
04-17 17:55:50.711: ERROR/AndroidRuntime(5527): FATAL EXCEPTION: IntentService[GezboxService]
java.lang.SecurityException: Permission Denial: opening provider com.gezbox.android.api.provider.GezboxProvider from ProcessRecord{415d5e08 5527:com.gezbox.android.onepiece/u0a31} (pid=5527, uid=10031) that is not exported from uid 10027
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2354)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4219)
at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:1688)
at android.content.ContentResolver.acquireProvider(ContentResolver.java:1083)
at android.content.ContentResolver.acquireContentProviderClient(ContentResolver.java:1146)
at android.content.ContentResolver.applyBatch(ContentResolver.java:896)
at com.gezbox.android.api.processor.PostOrderProcessor.updateContentProvider(PostOrderProcessor.java:57)
at com.gezbox.android.api.processor.PostOrderProcessor.post_order(PostOrderProcessor.java:33)
at com.gezbox.android.api.GezboxService.onHandleIntent(GezboxService.java:196)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
Problem solved. I changed the provider's uri for Providers in project B.
Yes I was so dump...
The library projects were wrote by another guy, each time before I compile the project I need to change the uri manually so that it fits the right path.

Categories

Resources