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

Don't work properly if GMS is running on personal and work profile #10

Open
nnn1590 opened this issue Feb 11, 2021 · 0 comments
Open

Don't work properly if GMS is running on personal and work profile #10

nnn1590 opened this issue Feb 11, 2021 · 0 comments

Comments

@nnn1590
Copy link

nnn1590 commented Feb 11, 2021

My device(Pixel 4) had work profiles enabled and GMS enabled there.
So com.google.android.gms.persistent was running on multiple users.
In that state, frida.ProcessNotFoundError: ambiguous name; will occur.

I disabled Google Play Services for work profile from android system settings and it worked fine.

Before I disabled GMS for work profile:

$ adb shell pgrep -xf 'com.google.android.gms.persistent'
2578
28116

$ pipenv run python en.py list-allowed
Traceback (most recent call last):
  File "en.py", line 101, in <module>
    main()
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "en.py", line 42, in list_allowed
    gms = FridaWrapper.attach(device, "com.google.android.gms.persistent")
  File "en.py", line 18, in attach
    session: Session = device.attach(app_name)
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/frida/core.py", line 26, in wrapper
    return f(*args, **kwargs)
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/frida/core.py", line 156, in attach
    return Session(self._impl.attach(self._pid_of(target)))
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/frida/core.py", line 180, in _pid_of
    return self.get_process(target).pid
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/frida/core.py", line 26, in wrapper
    return f(*args, **kwargs)
  File "/home/nnn1590/.local/share/virtualenvs/en-i13n-ZpuKjHhv/lib/python3.8/site-packages/frida/core.py", line 110, in get_process
    raise _frida.ProcessNotFoundError("ambiguous name; it matches: %s" % ", ".join(["%s (pid: %d)" % (process.name, process.pid) for process in matching]))
frida.ProcessNotFoundError: ambiguous name; it matches: com.google.android.gms.persistent (pid: 2578), com.google.android.gms.persistent (pid: 28116)

After:

$ adb shell pgrep -xf 'com.google.android.gms.persistent'
2578

$ pipenv run python en.py list-allowed
[allow.js] injecting
[allow.js] payload not yet received
[allow.js] possible package name: ...

Android device: Google Pixel 4 (Android 10, StockROM, rooted with Magisk)
Host device: Ubuntu Desktop 20.04 LTS (amd64)

Work profile is used for Island.

I'm sorry if my english is wrong.

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

1 participant