Bug #3383

Attempting to lock from notification sometimes fails - and stays failed

Added by vanevery over 3 years ago. Updated over 3 years ago.

Status:NewStart date:05/17/2014
Priority:UrgentDue date:
Assignee:-% Done:

0%

Category:-
Target version:0.2
Component:

Description

W/ActivityManager(766): Permission Denial: Accessing service ComponentInfo{info.guardianproject.securereaderinterface/info.guardianproject.cacheword.CacheWordService} from pid=-1, uid=10160 that is not exported from uid 10161

From what I have found online, is that because we have set android:exported="false" for CacheWordService then we have trouble triggering from system components.

I think this has to do with how the pending intent for the notification is constructed.

/**
 * Create a blank intent to start the CachewordService Blank means only the
 * Component field is set
 *
 * @param applicationContext
*/
static public Intent getBlankServiceIntent(Context applicationContext) {
Intent i = new Intent();
i.setClassName(applicationContext, Constants.SERVICE_CLASS_NAME);
return i;
}

Could be fixed here:
private Notification buildNotification() {

History

#1 Updated by hans over 3 years ago

  • Target version set to 0.1

#2 Updated by hans over 3 years ago

This is strange that there would be separate uids involved. Since CacheWord is built into the app, and CacheWordService runs as part of the app, it should be under the same uid as the app. Instead that error message points to two separate app uids (uid=10160 and uid 10161). Neither of those are system's uid, anything above 10000 is an app uid.

Is Courier somehow running CacheWordService in a separate Service that is a "remote Service" that runs in a separate process?

#3 Updated by n8fr8 over 3 years ago

I had this issue with Orbot. I had to implement custom permissions.

#4 Updated by hans over 3 years ago

  • Target version changed from 0.1 to 0.2

vanevery, this works sometimes, and other times not? I think a @Service should either always run as part of the main process, or in its own process. Is there something that would make a regular Service start running in its own process?

#5 Updated by vanevery over 3 years ago

This is specifically an issue with notifications and pending intents (as I recall). If we are removing the notification from cacheword, there is nothing to worry about and this issue can be closed.

Also available in: Atom PDF