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

  • SEARCH
  • Home
  • 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 9106569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:22:07+00:00 2026-06-17T02:22:07+00:00

A native application I wrote uses /proc/PID/status name variable. However, it appears that the

  • 0

A native application I wrote uses /proc/PID/status name variable. However, it appears that the name variable in the status file is incomplete. For example, when testing I opened the Android calculator and looked up the PID from PS and went to the corresponding /proc/PID folder. Then I cat the status file to see

Name: oid.calculator

The PS command shows com.android.calculator. packages.xml shows com.android.calculator. I tested on a few other phones (Razr Maxx running 4.0.4, Google Nexus running the same OS version) and noticed similar behavior.

  • 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-17T02:22:09+00:00Added an answer on June 17, 2026 at 2:22 am

    This is down to a Linux kernel feature: there are two different names for a process.

    • One of the names is the last component of the path to the executable, e.g. native_executable if your application is located at /data/apps/com.example.hello/native_executable. This is the name that appears in the Name field of /proc/PID/status. The kernel truncates it to 15 characters, so in this case it contains native_executab.
    • The other name is passed by the program that calls the application as its command line parameter #0 (argv[0] in C, args[0] in Java). This is the name that appears at the beginning of /proc/PID/cmdline and that ps shows.
    • The path to the executable is also the target of the symbolic link /proc/PID/exe.

    By convention, when a program starts another, it should use the name of the executable file as command line parameter 0, but it may choose to do otherwise. The Name field of /proc/PID/status is always set to the (truncated) name of the executable by the kernel.

    This is a general Linux feature — see also Can I use standard tools to get the full name of a process, when its name has embedded spaces? on Ask Ubuntu.

    The application itself can change both names afterwards (albeit there are length constraints). Dalvik uses this capability to distinguish between applications: all applications stem from the same native executable /sytem/bin/app_process; rather than let them all be called app_process, the VM changes both names to be the application package name. The name in /proc/PID/status is limited to 15 characters, which is why it’s truncated. You can get the longer name from /proc/PID/cmdline (read up to the first null byte).

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

Sidebar

Related Questions

I have an application that uses a third party native C dll. Everything works
I have a couple of Android and iOS native mobile application that I wrote
Environment I'm working on a C++ application that uses SQL Native Client 9.0 to
I support a legacy Java application that uses flat files (plain text) for persistence.
I'm writing an application that uses Dijkstra algorithm to find minimal paths in the
I have created one native application in android that is working fine. This application
I wrote a C# server application (windows service) that serves data through REST with
I wrote a flex application that get the host string from the browser using
I have problem with JDBC application that uses MONEY data type. When I insert
I am writing an native c++ application that needs to do a quick bit

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.