Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Checkin does not work for Secondary Users #660

Open
lxp opened this issue Nov 15, 2018 · 5 comments
Open

Force Checkin does not work for Secondary Users #660

lxp opened this issue Nov 15, 2018 · 5 comments

Comments

@lxp
Copy link

lxp commented Nov 15, 2018

I am using a secondary user profile for my everyday business.
However, in a secondary user profile the force checkin via dialing *#*#CHECKIN#*#* does not work. It is just ignored, probably due to permission issues.
Can you add a button in the UI that does the same thing?

As a workaround I used the following ADB commands:

adb root
adb shell am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://2432546 --receiver-include-background
@rugk
Copy link

rugk commented Apr 21, 2019

I assume this is the same cause/issue as #764?

In your workaround, can you really run all that literally?

Can you add a button in the UI that does the same thing?

Agree, but even better: microG should possibly automatically register itself again when a new profile/user is added and miccroG installed there. (if that solves the problem.)

@lxp
Copy link
Author

lxp commented Apr 22, 2019

I assume this is the same cause/issue as #764?

Yeah, it seems to be the same problem.
I am not really sure what the logcat output said in my case, but it just never tried to register and, therefore, push notifications never worked.

In your workaround, can you really run all that literally?

This is exactly the workaround I used to get my secondary profile registered for push notifications.
I think my full procedure was something along that:

  1. Login as owner
  2. Enable Root via ADB setting in developer options
  3. Run adb shell on my computer to get an initial ADB connection and logout again
  4. Run adb root
  5. Login as secondary user
  6. Run adb shell am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://2432546 --receiver-include-background
    I think it was important to run this command while being logged into the secondary user profile. Otherwise, the registration would have been triggered for the owner profile.

After that push notifications were working for me as expected in the secondary user profile.

I think with the current Lineage OS they removed ADB root support somehow.
At least, I cannot find the setting anymore within the developer options.

Can you add a button in the UI that does the same thing?

Agree, but even better: microG should possibly automatically register itself again when a new profile/user is added and miccroG installed there. (if that solves the problem.)

Sure, that would solve the issue too. However, I think it was a design decision to not register automatically, but require user-interaction for it.

@ale5000-git
Copy link
Member

Please all of you try the new version released today to see if the problem still persist.

@zelleb
Copy link

zelleb commented Jul 7, 2019

Found this issue while looking for a way to run that *#*#CHECKIN#*#* command on a Tablet.
After running
am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://2432546 --receiver-include-background
as root GCM registered.

@Generator
Copy link

Tried with Android 11, but still unable to register

Using adb root Permission Denial

adb shell am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://2432546 
--receiver-include-background                                                                       
Broadcasting: Intent { act=android.provider.Telephony.SECRET_CODE dat=android_secret_code://2432546 
flg=0x1400000 }                                                                                     
                                                                                                    
Exception occurred while executing 'broadcast':                                                     
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.provider.Telep
hony.SECRET_CODE from pid=13944, uid=2000                                                           
        at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService
.java:16071)                                                                                        
        at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService
.java:15929)                                                                                        
        at com.android.server.am.ActivityManagerService.broadcastIntentWithFeature(ActivityManagerService.java:16743)
        at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:747)
        at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:199)
        at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
        at android.os.ShellCommand.exec(ShellCommand.java:44)
        at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:1
0520)
        at android.os.Binder.shellCommand(Binder.java:929)
        at android.os.Binder.onTransact(Binder.java:813)
        at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5093)
        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2877)
        at android.os.Binder.execTransactInternal(Binder.java:1159)
        at android.os.Binder.execTransact(Binder.java:1123)

Root inside shell:

adb shell
willow:/ $ su
willow:/ # am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://2432546>
Broadcasting: Intent { act=android.provider.Telephony.SECRET_CODE dat=android_secret_code://2432546 flg=0x1400000 }
Broadcast completed: result=0

What should be the result value?

Version:
Android: 11
microG: 0.2.16.204713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants