Helps with broadcast receivers

Post your questions and help other users.

Moderator: Martin

Post Reply
LED
Posts: 45
Joined: 28 Jun 2014 00:51

Helps with broadcast receivers

Post by LED » 07 Aug 2014 20:15

Hi Martin,
I'm sorry for asking this question in this forum but i need someone who undestands about android and you definetelly do it far better than anyone I know.
I'd like to see If I could used automagic to solve a big problem for me in a permanent way.
Automagic is so powerful that It might be able to change some setting on my phone that I can't with other apps. My problem is described bellow:

I installed "autostarts" then played around with it disabling broadcast receivers on jellybean 4.1.2. Everything looked fine until i realised if a couple of receivers were disabled (checkin and loginservice in googleservicesframework) the phone wasn't going to deepsleep waiting for this login or checkin (not sure what the hell this is). well, re-enabled ALL the recivers back, then the phone finally goes to deepsleep….until I reboot it. When I open autostarts again the brodcast receivers are again turned off. This is my problem….so.

Since I finally found exactly the receivers I want to turn back on, I simple tried ALL apps to permanently reenable them ("disable service","Autorun manager", "autostart disabler", "system tuner"….all of them) no success.

Then after messing so much with the phone, and considering how clever I am, well this must be easy, nandroid restore of the whole phone (i backup my system everyweek).

unbelievably these receivers have been permanently turned off and this is their default state! how can a restore from the recovery not bring back the phone exactly how it was? I removed the SD, restored the system again in case something had been saved on the SD card and being read at boot. Factory reset, another restore….no success.

Any ideas? Can I use automagic to set the broadcast receivers of googleserviceframework back to "enabled"?
I suppose if you can't help me, noone else would be able to.

apologies again if this isn't the right place for these sort of questions.

Thanks in advance

LED

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Helps with broadcast receivers

Post by Martin » 08 Aug 2014 06:31

Hi,

Difficult to say if Automagic can be of help here since I'm not aware what the app Autostarts actually does. Did you already contact the developer of Autostarts? Maybe there's an easy way to revert all changes done by the app.

It's just a wild guess, but maybe Autostarts uses the command pm disable PACKAGE_OR_COMPONENT to disable the broadcast receivers, you could revert the changes with the corresponding pm enable PACKAGE_OR_COMPONENT. You can find the component names by using an app like Android System Info and by checking the AndroidManifest of an app. Broadcast receivers are listed in element <receiver>.

Regards,
Martin

LED
Posts: 45
Joined: 28 Jun 2014 00:51

Re: Helps with broadcast receivers

Post by LED » 08 Aug 2014 14:19

Hi Martin,

your answer was much appreciated.

I did a small flow, with an empty trigger and one action:
Execute Root Command

pm enable com.google.androidgsf.checkin.CheckinService

it runs, no errors, but when I have a look through the app "disable services" (where I got the full name of the receiver) the receiver is still turned off.

It seems I'll have to do even more research to see what is happening.
By the way, the developer of autostarts disappeared and never replies.

Thanks a lot.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Helps with broadcast receivers

Post by Martin » 08 Aug 2014 17:20

Hi,

You have to specify the complete name of the component including the package name and the class name separated b a slash, for example pm enable "com.google.android.gsf/com.google.android.gsf.checkin.CheckinService" or the shorthand version by removing the package name prefix from the class: pm enable "com.google.android.gsf/.checkin.CheckinService".

A service and a broadcast receiver are two different component types so if you really try to enable/disable a broadcast receiver, you will not see it in Disable Service since it only lists the services (at least that was my first impression when using the app). This page contains some useful information about the basic component types available on Android: http://developer.android.com/guide/comp ... ntals.html

Regards,
Martin

Post Reply