A method for accessing a device identifier, comprising: receiving, by a terminal, request information for accessing a first device identifier by a target application, wherein the target application is installed on the terminal; determining, by the terminal, in response to the request information, a first access permission when accessing the first device identifier by the target application, wherein the first access permission includes one of the following: prohibiting access to the first device identifier, allowing access to a real value of the first device identifier, and allowing access to a dummy value of the first device identifier; returning, by the terminal, the dummy value of the first device identifier to the target application when the first access permission is allowing access to the dummy value of the first device identifier; wherein before the receiving, by the terminal, request information for accessing a first device identifier by a target application, the method further comprises: sending, by the terminal, permission query request information to a permission management server by using a wireless network, wherein the permission query request information includes an identifier of the target application; and receiving, by the terminal, query response information sent by the permission management server, wherein the query response information includes device identifier access permission information of the target application, and the device identifier access permission information includes the first access permission used when the target application accesses the first device identifier and second access permission used when the target application accesses a second device identifier. receiving, by a terminal, request information for accessing a first device identifier by a target application, wherein the target application is installed on the terminal; determining, by the terminal, in response to the request information, a first access permission when accessing the first device identifier by the target application, wherein the first access permission includes one of the following: prohibiting access to the first device identifier, allowing access to a real value of the first device identifier, and allowing access to a dummy value of the first device identifier; returning, by the terminal, the dummy value of the first device identifier to the target application when the first access permission is allowing access to the dummy value of the first device identifier; wherein before the receiving, by the terminal, request information for accessing a first device identifier by a target application, the method further comprises: sending, by the terminal, permission query request information to a permission management server by using a wireless network, wherein the permission query request information includes an identifier of the target application; and receiving, by the terminal, query response information sent by the permission management server, wherein the query response information includes device identifier access permission information of the target application, and the device identifier access permission information includes the first access permission used when the target application accesses the first device identifier and second access permission used when the target application accesses a second device identifier. sending, by the terminal, permission query request information to a permission management server by using a wireless network, wherein the permission query request information includes an identifier of the target application; and receiving, by the terminal, query response information sent by the permission management server, wherein the query response information includes device identifier access permission information of the target application, and the device identifier access permission information includes the first access permission used when the target application accesses the first device identifier and second access permission used when the target application accesses a second device identifier.