Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:24:48+00:00 2026-06-08T08:24:48+00:00

Whenever we start any Activity, we get information about the uid, gid, etc, something

  • 0

Whenever we start any Activity, we get information about the uid, gid, etc, something like this:

I/ActivityManager( 1986): Start proc app.processName for activity hostingNameStr: pid=3641 uid=10109 gids={3003, 1007}

Now using PackageManager, we can get the packageName, uid and pid something like this:

List<ApplicationInfo> packages = pm
                .getInstalledApplications(PackageManager.GET_META_DATA);

for (ApplicationInfo packageInfo : packages) {
    Log.d("ME", "packageInfo is  :" + packageInfo);
    Log.d("ME", "Installed package :" + packageInfo.packageName);
    Log.d("ME", "Package process for " + packageInfo.packageName+"-->" + packageInfo.processName);
    Log.d("ME", "Package uid for " + packageInfo.packageName+"-->"+packageInfo.uid);
}

But here, I’m not able to get the gid and so was wondering whether getting gid like this is even possible or not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:24:49+00:00Added an answer on June 8, 2026 at 8:24 am

    Try to have a look at the methods that are provided by Process class. For instance, in your case getGidForName(String name). It returns int values, GID, but I do not know how to select the list of all gids.

    EDIT:
    I was a bit confused with applicationInfo. You can use PackageManager’s method getPackageGids(String packageName) or you can get all PackageInfo and then read value of the gids field.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error whenever I have my main activity with a fragment loaded
I want to start an activity indicator whenever the user presses any link on
Whenever I try installing anything using gem, I get this error - murtaza@murtaza-dev:~$ sudo
Whenever I look at regular expressions of any complexity, my eyes start to water.
below error message pop-ups whenever i start any solutions .....of VS2010 what should i
Is there any way to start the/a Ruby debugger whenever the code throws an
To start with some context, I'm so annoyed whenever I get on a Windows
I am faced with this weird error. Whenever I start my application on my
Whenever I start my emulator from Eclipse it loads, but I CANNOT open the
Whenever I start a shell in vim using :sh, it doesn't source my ~/.bashrc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.