sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.6k stars 859 forks source link

Support work profile/Android users #396

Closed rugk closed 4 months ago

rugk commented 4 years ago

Is your feature request related to a problem? Please describe. With Shelter or other apps, you can create a work profile. Objection currently cannot detect apps installed in that profile.

With adb shell pm list users you can list them.

Describe the solution you'd like A parameter like --user or so you can pass to inspect another user's app.

Describe alternatives you've considered AFAIK this is not yet possible with the parameters we have.

Additional context It's the same for multi-user Android systems or the work profile AFAIK, that is also "just" a user, basically.

Android 9

leonjza commented 4 years ago

Since Frida 12.11 I think this is totally possible yeah! frida-tools got this commit to pass on extra args, which also relates to the 12.11 release notes here mentioning the uid option for spawn(). I think we will need to use this to support this.

Flangvik commented 3 years ago

Facing this issue now , would be a solid feature to add!

lauritzh commented 3 years ago

I just stumbled over this use case, too. This would indeed be a great feature! :)

Edit: I can confirm that the following approach would work. By manually adjusting https://github.com/sensepost/objection/blob/248d56096001a030082270f816773a3aebc1f9a3/objection/utils/agent.py#L166 to the following I was able to launch an application with a given UID (13 in this case):

self.spawned_pid = self.device.spawn(state_connection.gadget_name, uid=13)
CDuPlooy commented 2 years ago

I added a uid option to the cli args, the changes can be seen in #526. I don't have an android for work profile setup, so if anyone could test I'd appreciate it :heart:

lauritzh commented 2 years ago

Hi @CDuPlooy, thank you very much for your effort! Unfortunately I do not have a test device at hand at the moment, either. 😢

Maybe someone else here in this thread.

Thanks again, Lauritz