CN104714760B - A kind of method and device for reading and writing storage device - Google Patents

A kind of method and device for reading and writing storage device Download PDF

Info

Publication number
CN104714760B
CN104714760B CN201510097761.8A CN201510097761A CN104714760B CN 104714760 B CN104714760 B CN 104714760B CN 201510097761 A CN201510097761 A CN 201510097761A CN 104714760 B CN104714760 B CN 104714760B
Authority
CN
China
Prior art keywords
operational order
background service
service program
storage device
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510097761.8A
Other languages
Chinese (zh)
Other versions
CN104714760A (en
Inventor
周岩滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201810174675.6A priority Critical patent/CN108279855B/en
Priority to CN201510097761.8A priority patent/CN104714760B/en
Publication of CN104714760A publication Critical patent/CN104714760A/en
Application granted granted Critical
Publication of CN104714760B publication Critical patent/CN104714760B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

An embodiment of the present invention provides a kind of method and device for reading and writing storage device, it is related to electronic technology field, to solve in the prior art due to application program insufficient permission, the problem of can not being written and read to storage device.This method includes:The operational order by application triggers is obtained, operational order is used to indicate that background service program is read out storage device/write operation;Send operational order and give background service program, so that background service program is read out storage device/write operation according to operational order;Receive that background service program sends with the corresponding operating result of operational order;Operating result is sent to application program.The present invention can be used for reading and writing storage device.

Description

A kind of method and device for reading and writing storage device
Technical field
The present invention relates to electronic technology field, more particularly to a kind of method and device for reading and writing storage device.
Background technology
Android system is a kind of operating system based on linux kernel, is mainly used in mobile equipment, and such as mobile phone, put down Plate computer etc..Android system is a multiprocess system, application program in android system (Android Package, Abbreviation apk) all run in the process of oneself, and the security between android system and apk is the instrument by Linux Force what is realized in process-level.
The central idea of existing Android security architectures is:In default situations, its highest weight is limited to system to apk (system) authority, under the authority, apk cannot perform it is any other apk, android system or user are brought it is negative The operation that face is rung.For example the private data (contact data or email data) of the user in read-write storage device, read-write are another One apk, establishes network connection, and keeps equipment to be in non-sleep state etc..
But when apk cannot read the data in storage device, some unnecessary troubles can be brought.It is if for example, straight Live TV stream during broadcasting is encryption data, then apk during the data are played, it is necessary to be solved first to the data It is close, it then could complete normal play.But the data of decryption are stored in storage device (such as flash memory (flash)), apk is such as Fruit wants the normal play data, it is necessary to can read and write the ciphertext data on flash.And in the prior art, the highest weight of apk System authorities are limited to, under the authority, apk can not directly invoke the decryption number in the flash driving interfaces reading flash of bottom According to so that live flow data cannot be decrypted, causing live TV stream can not normal play.
The content of the invention
The embodiment of the present invention provide it is a kind of read and write storage device method and device, to solve in the prior art due to Application program insufficient permission, the problem of can not being written and read to storage device.
To reach above-mentioned purpose, the embodiment of the present invention adopts the following technical scheme that:
In a first aspect, an embodiment of the present invention provides a kind of method for reading and writing storage device, this method includes:
The operational order by application triggers is obtained, the operational order is used to indicate that background service program sets storage It is standby to be read out/write operation;
The operational order is sent to the background service program, so that the background service program is according to the operation Instruction is read out/write operation to the storage device;
Receive that the background service program sends with the corresponding operating result of the operational order;
The operating result is returned into the application program.
Second aspect, an embodiment of the present invention provides a kind of method for reading and writing storage device, this method includes:
The operational order by application triggers that client is sent is received, the operational order is used to indicate background service Program is read out storage device/write operation;
According to the operational order, digital independent/write operation is carried out to the storage device, obtains referring to the operation Make corresponding operating result;
The operating result is sent to the client.
The third aspect, an embodiment of the present invention provides a kind of client, the client includes:Acquisition module, send mould Block, receiving module;
The acquisition module, for obtaining the operational order by application triggers, the operational order is used for after indicating Platform service routine is read out storage device/write operation;
The sending module, for sending the operational order to the background service program, so that the backstage takes Business program is read out/write operation according to the operational order to the storage device;
The receiving module, for receiving that the background service program sends and the corresponding operation of the operational order As a result.
Fourth aspect, an embodiment of the present invention provides a kind of background server, the background server includes:Receive mould Block, processing module, sending module;
The receiving module, for receiving the operational order by application triggers of client transmission, the operation refers to Order is used to indicate that background service program is read out storage device/write operation;
The processing module, for according to the operational order, carrying out digital independent/write-in to the storage device and grasping Make, obtain and the corresponding operating result of the operational order;
The sending module, for sending the operating result to the client.
An embodiment of the present invention provides a kind of method for reading and writing storage device, this method includes:Acquisition is touched by application program The operational order of hair, the operational order are used to indicate that background service program is read out storage device/write operation;Send The operational order gives the background service program, so that the background service program is deposited according to the operational order to described Storage equipment is read out/write operation;Receive that the background service program sends with the corresponding operation of the operational order As a result;The operating result is sent to application program.Specifically, after client obtains the operational order of application triggers, The operational order is sent to background service program, after background service program receives operational order, according in operational order Instruction ,/write operation is read out to storage device, and operating result corresponding with the operational order is returned into client End, enables the client to obtain the operating result.By method provided in an embodiment of the present invention, application program can pass through client Operation is interacted between end and background service program, is accessed by background service program to storage device, and by access Data return to application program, realize access of the application program to storage device indirectly.Thus, it is possible to overcome in the prior art Due to application program insufficient permission, the problem of can not being written and read to storage device.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be in embodiment or description of the prior art Required attached drawing is briefly described, it should be apparent that, drawings in the following description are only some realities of the present invention Example is applied, for those of ordinary skill in the art, without creative efforts, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of method flow diagram for reading and writing storage device provided in an embodiment of the present invention;
Fig. 2 is another method flow diagram for reading and writing storage device provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of client provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of another client provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of background server provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment, belongs to the scope of protection of the invention.
An embodiment of the present invention provides a kind of method for reading and writing storage device, as shown in Figure 1, this method includes:
Step 101, obtain the operational order sent by application program.
Wherein, operational order is used to indicate that background service program is read out storage device/write operation.
Specifically, the executive agent of the method for the read-write storage device of the embodiment of the present invention is held for client (Client), visitor Family end is generally operated on subscriber terminal equipment.Client together form the system frame of software systems with background service program Structure.Client ends are corresponding with background service program, and the program of local service is provided for client.
Optionally, Client ends can be obtained by JAVA local interfaces (Java Native Interface, abbreviation JNI) Take the operational order by application triggers.
It should be noted that although application program cannot directly communicate with background service program, Client ends It can communicate with background service program, the embodiment of the present application is by the way that Client ends are integrated in apk, with regard to that can borrow apk Client modules are helped to communicate for the interface of its offer with background service program.
Step 102, send operational order give background service program so that background service program according to operational order to depositing Storage equipment is read out/write operation.
Wherein, what background service program had be read out storage device/and the authority of write operation can take on backstage It is configured during program initialization of being engaged in.
Exemplary, for Android system, which can be above the root authority of system authorities.
Specifically, the authority to access to storage device that background service program has, can obtain in the following manner Arrive:Linux initializtion scripts are performed, start init processes.
Wherein, init processes create the background service program defined in Linux initializtion scripts, make background service Program has after starting is read out storage device/the authority of write operation.
It is exemplary, background service program defined in Linux initializtion script files inti.rc, in this way, holding After the background service program created in the row initializtion script, which just possesses and has root authority, enables Realize the access to storage device.
And transmitting and receiving data can be connected by socket (socket), is super literary between backstage service routine and Client This transportation protocol (Hypertext transfer protocol, abbreviation HTTP) connects or transmission control protocol The modes such as (Transmission Control Protocol, abbreviation TCP) connection realize the present invention is for using which kind of connection Mode does not limit.Preferably, the embodiment of the present invention is connected using connection-oriented socket.
It should be noted that socket is to support transmission control protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, abbreviation ICP/IP protocol) network service basic operation unit.It is multiple TCP connections or multiple program process may be needed by same Transmission Control Protocol port transmission data.It is different in order to distinguish Program process and connection, many computer operating systems interacted for application program with ICP/IP protocol provide it is entitled The interface of socket, to realize the concurrent services of data transfer.And socket connections can be divided into it is connection-oriented and towards without even The socket connect, difference are that connection-oriented socket needs first to initiate connection foundation request, when background service program When listening to the socket connections foundation request of Client transmissions, the request of response Client initiations, creates a thread and returns Confirmation message is returned to Client ends to confirm that connection is established, and the data sent by newly-built thread process Client ends.
In the following, exemplified by being connection-oriented socket between Client ends and background service program, to therebetween The process of establishing of communication link is described in detail.
Specifically, after Client ends and background service program are respectively started and initialize, background service program is first called Socket functions create a socket, and complete the monitoring of communication with the socket.Client ends are by calling socket One socket of function creation, sets IP address and the port of background service program;Then, Client ends pass through calling Connect functions initiate connection to the setting port and establish request, and background service routine call accept functions receive Client Request is established in the connection that end is sent, and completes socket connection therebetween.After the completion of link establishment, Client ends can pass through Call read or write functions that data are read or write into socket;Equally, background service program can also pass through calling Read functions read the data that Client ends send over, by calling write functions to send data to Client ends.Communicating After the completion of, can be by calling close functions to close the socket connections.
Step 103, receive that background service program sends with the corresponding operating result of operational order.
Step 104, by operating result be sent to application program.
Specifically, after operational order is sent to background service program by Client ends, background service program can be according to operation Instruction in instruction operates storage device accordingly, and operating result is returned to Client ends, will by Client ends The operating result is sent to application program.Wherein, if operational order is used to indicate to be read storage device, operate Instruction includes reading the mark of mark and data to be read;If operational order is used to indicate to carry out write-in behaviour to storage device Make, then operational order includes write-in mark and data to be written.
It is exemplary, by taking application program is live broadcast service apk as an example, the reading/writing method of step 101- steps 103 is carried out in detail Describe in detail bright.
Specifically, if live broadcast service apk wants to obtain the ciphertext data of encrypted live TV stream, apk needs to pass through Client Hold and establish communication link with background service program for the interface of its offer.During actual realization, function tune can be passed through With completion.Assuming that live broadcast service apk have invoked the function GetPrivateData at client ends, then after the function is called, Client ends can establish the communication link between background service program, such as be connected by calling socket functions to establish socket Connect, after the completion of connection is established, GetPrivateData is sent to background service program by Client ends according to specific form. Exemplary, which can be:“Head:GetPrivateData;Tail:Fininsh ", wherein, Head and Tail are Identification strings, after background service program receives the data, first parse it, if the content of Tail is equal to " Fininsh ", then background service program think that the instruction meets specific format, then go to obtain the content in Head, and root again According to the content in Head, carry out correlation function in background service program and (mainly call the letter for reading the data in storage device Number) calling, and the data that institute's call function is returned return to live broadcast service apk by the interface established with Client ends.
An embodiment of the present invention provides a kind of method for reading and writing storage device, this method includes:Acquisition is touched by application program The operational order of hair, operational order are used to indicate that background service program is read out storage device/write operation;Send operation Instruct and give background service program, so that background service program is read out storage device/write operation according to operational order; Receive that background service program sends with the corresponding operating result of operational order;Operating result is sent to application program.Tool Body, after client obtains the operational order of application triggers, operational order is sent to background service program, background service After program receives operational order, the instruction in operational order is read out storage device/write operation, and will be with The corresponding operating result of operational order returns to client, enables the client to obtain the operating result.Implemented by the present invention The method that example provides, application program can be by interacting operation, by background service between client and background service program Program accesses storage device, and the data of access are returned to application program, realizes application program indirectly to storage The access of equipment.Thus, it is possible to overcome in the prior art due to application program insufficient permission, storage device can not be written and read The problem of.
An embodiment of the present invention provides the method for another read-write storage device, as shown in Fig. 2, this method includes:
Step 201, receive the operational order by application triggers that client is sent.
Wherein, operational order is used to indicate that background service program is read out storage device/write operation.
It should be noted that the executive agent of the method for the read-write storage device of the embodiment of the present invention is background service journey Sequence.And background service program has the authority for accessing storage device, in this way, just can guarantee that background service program in initialization After operational order is received, have permission and the operation such as be read out/write to storage device.
Specifically, the authority to access to storage device that background service program has, can obtain in the following manner Arrive:Linux initializtion scripts are performed, start init processes.
Wherein, init processes create the background service program defined in Linux initializtion scripts, make background service Program has after starting is read out storage device/the authority of write operation.
Step 202, according to operational order, digital independent/write operation is carried out to storage device, obtains operating result.
Specifically, in Android system, if background service program has root authority, storage device is flash memory (flash), Then instruction of the background service program in operational order, calls bottom flash driving interfaces, flash is read out/write Operation.
Step 203, send operating result to client.
It is exemplary, for step 201- steps 203, if live broadcast service apk wants to obtain the ciphertext data in flash, The operational order that background service program receives is:“Head:GetPrivateData;Tail:Fininsh ", background service journey Sequence is by calling bottom flash driving interfaces to read the ciphertext data in flash, and by operating result:“Head: GetPrivateData;Content:0123456789;Tail:Fininsh " is sent to Client ends.Client terminations receive After the operating result that background service program is sent, the operating result directly can be returned into live broadcast service apk, can also be first right The operating result is parsed, and such as parses identification strings Tail first, if the content of Tail is equal to " Fininsh ", then The content of parsing Head is gone, if the content of the Head in the operational order that the content of Head is sent with Client ends is identical, i.e., It is " GetPrivateData ", then the content " 0123456789 " in parsing Content, and Content are removed in Client ends again In content " 0123456789 " be live broadcast service apk call " GetPrivateData " function decryption number to be obtained According to.Comprising the ciphertext data needed for live broadcast service apk in the operating result that Client ends are got, Client ends are by the decryption number According to live broadcast service apk is sent to, in this way, live broadcast service apk can be encrypted live by the ciphertext data decryption got Stream, completes the normal play of encrypted live TV stream.
It is again exemplary, for step 201- steps 203, if live broadcast service apk gets server end and has new encryption number According to then needing to be updated original encryption data in flash.Live broadcast service apk passes through calling at this time UpdataPrivateData functions, make Client ends be established with background service program and connect, after connection is established, background service journey Sequence will receive operational order:“Head:UpdatePrivateData;Conent:888888888;Tail:Finish ", backstage Service routine parses identification strings first:Tail, if the content of Tail is equal to " Finish ", obtains the content in Head, Parse Head content be equal to " UpdatePrivateData " after, then parse the content in Content, and by calling bottom Data " 888888888 " in Content are written in flash by layer flash driving interfaces.
It should be noted that the implication of " GetPrivateData " is the ciphertext data in reading flash, The implication of " UpdatePrivateData " is is updated the ciphertext data in flash, the ciphertext data after will also updating Re-write in flash." GetPrivateData " and " UpdatePrivateData " is merely to exemplary explanation sheet The method of the described read-write storage device of inventive embodiments, concrete operations of the present invention to storage device do not limit.
In the following, be the ciphertext data " 0123456789 " in reading flash with the operation that apk carries out flash, with Exemplified by the connection that Client ends and background service program are established is connection-oriented socket connections, to the mistake of apk reading flash memories Journey is described in detail, and specifically includes following steps:
Step 1, apk call GetPrivateDate functions, call Client ends.
By calling socket functions, initiating socket establishment of connections to backstage service routine please for step 2, Client ends Ask.
Step 3, background service program are by calling listen functions to listen to the connection foundation request that Client ends are sent Afterwards, the connection is responded, and creates a thread to receive the data of Client ends transmission.
It is " Head that step 4, Client ends send form according to GetPrivateDate functions to backstage service routine: GetPrivateDate;Tail:The data of Fininsh ".
Step 5, background service program receive and parse through the data, if the content in Tail is equal to " Fininsh ", parse Content in Head.
Step 6, background service program call bottom flash drivings to connect according to data analysis result " GetPrivateDate " Mouthful, read the ciphertext data stored in flash.
Step 7, background service program send form to client and are:“Head:GetPrivateDate;Content: 0123456789;Tail:The data of Fininsh ".
After step 8, Client terminations receive the data of background service program transmission, successively to Tail, Head and Content In content parsed respectively, it is final to obtain the ciphertext data " 0123456789 " included in Content.
Ciphertext data " 0123456789 " in the Content parsed is returned to apk by step 9, Client ends.
Step 10, apk get the ciphertext data " 0123456789 " on flash.
It should be noted that background service program initialization when, it is necessary to be initialized with root authority, such ability Call bottom flash driving interfaces.By above-mentioned steps 1- steps 10, although live broadcast service apk insufficient permissions, Wu Fazhi Connect and read the ciphertext data that stores in flash, but by calling Client ends and background service program, realize indirectly from The purpose of ciphertext data is read in flash, and has been finally completed the normal play of live TV stream.
An embodiment of the present invention provides a kind of method for reading and writing storage device, this method includes:Acquisition is touched by application program The operational order of hair, wherein, operational order is used to indicate that background service program is read out storage device/write operation;Hair Operational order is sent to give background service program, so that background service program is read out/writes to storage device according to operational order Enter operation;Receive that background service program sends with the corresponding operating result of operational order;Operating result is sent to application Program.Specifically, after client obtains the operational order of application triggers, operational order is sent to background service program, After background service program receives operational order, the instruction in operational order, is read out/writes behaviour to storage device Make, and operating result corresponding with operational order is returned into client, enable the client to obtain the operating result.Pass through this Inventive embodiments provide method, application program can by interacting operation between client and background service program, by Background service program accesses storage device, and the data of access are returned to application program, realizes indirectly using journey The access of ordered pair storage device.Thus, it is possible to overcome in the prior art due to application program insufficient permission, can not be to storage device The problem of being written and read.
An embodiment of the present invention provides a kind of client 30, as shown in figure 3, client 30 includes:Acquisition module 301, hair Send module 302, receiving module 303.
Acquisition module 301, for obtaining the operational order by application triggers, wherein, operational order is used for after indicating Platform service routine is read out storage device/write operation.
Sending module 302, gives background service program, so that background service program is according to operation for sending operational order Instruction is read out storage device/write operation.
Receiving module 303, for receive background service program transmission with the corresponding operating result of operational order.
Sending module 302, is additionally operable to operating result being sent to application program.
Optionally, as shown in figure 4, client 30 further includes:Processing module 304.
Processing module 304, for performing Linux initializtion scripts, starts init processes;Wherein, init processes are to Linux Background service program defined in initializtion script is created, and background service program is had after starting and storage device is carried out The authority of read/write operations.
An embodiment of the present invention provides a kind of client, which includes:Acquisition module, sending module, receiving module. Specifically, after acquisition module gets the operational order of application triggers, operational order is sent to backstage by sending module Service routine, after background service program receives operational order, the instruction in operational order, reads storage device / write operation is taken, and operating result corresponding with operational order is returned into client, enables the client to obtain the operation knot Fruit.Client provided in an embodiment of the present invention, by the communication between background service program, indirectly realizes and storage is set Standby access.Thus, it is possible to overcome in the prior art due to application program insufficient permission, storage device can not be written and read Problem.
An embodiment of the present invention provides a kind of background server 40, as shown in figure 5, background server 40 includes:Receive mould Block 401, processing module 402, sending module 403.
Receiving module 401, for receiving the operational order by application triggers of client transmission, wherein, operation refers to Order is used to indicate that background service program is read out storage device/write operation.
Processing module 402, for according to operational order, carrying out digital independent/write operation to storage device, obtaining and grasp Make to instruct corresponding operating result.
Sending module 403, for sending operating result to client.
Optionally, as shown in figure 5, processing module 402, is additionally operable to perform Linux initializtion scripts, starts init processes; Wherein, init processes create the background service program defined in Linux initializtion scripts, start background service program Have afterwards and the/authority of write operation is read out to storage device.
An embodiment of the present invention provides a kind of background server, which includes:Receiving module, processing module, Sending module.Specifically, the operational order by application triggers that receiving module is sent by receiving client, instruction processing Module is read out storage device/write operation, background service program is obtained required data from storage device, Or some data are written in storage device, operating result is then sent to client by sending module again, makes application Program can indirectly realize the access to storage device.Thus, it is possible to overcome in the prior art due to application program authority not Foot, the problem of can not being written and read to storage device.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the unit Division, is only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit Close or communicate to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple In network unit.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That the independent physics of unit includes, can also two or more units integrate in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in one and computer-readable deposit In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server, or network equipment etc.) performs the portion of each embodiment the method for the present invention Step by step.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic disc or CD etc. are various to store The medium of program code.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that:It still may be used To modify to the technical solution described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical solution spirit and Scope.

Claims (10)

  1. A kind of 1. method for reading and writing storage device, it is characterised in that the described method includes:
    Obtain by application triggers operational order, the operational order be used for indicate background service program to storage device into Row read/write operations;Wherein, when platform service routine initializes in the rear, init processes are to fixed in Linux initializtion scripts The background service program of justice is created, so that there is the background service program root higher than system authorities to weigh Limit;
    The operational order is sent to the background service program, so that the background service program is according to the operational order / write operation is read out to the storage device;
    Receive that the background service program sends with the corresponding operating result of the operational order;
    The operating result is sent to the application program.
  2. 2. method according to claim 1, it is characterised in that
    If the operational order is used to indicate to be read the storage device, the operational order includes reading The mark of mark and data to be read;
    If the operational order is used to indicate to carry out the storage device write operation, the operational order includes write-in Mark and data to be written.
  3. 3. method according to claim 1, it is characterised in that the background service program, which has, carries out the storage device The authority of read/write operations is set when platform service routine initializes in the rear, is specifically included:
    Linux initializtion scripts are performed, start init processes;
    The init processes create the background service program defined in the Linux initializtion scripts, make described Background service program has after starting is read out the storage device/the authority of write operation.
  4. 4. method according to claim 1, it is characterised in that the acquisition is included by the operational order of application triggers:
    The operational order is obtained by JAVA local interfaces.
  5. A kind of 5. method for reading and writing storage device, it is characterised in that the described method includes:
    The operational order by application triggers that client is sent is received, the operational order is used to indicate background service program / write operation is read out to storage device;Wherein, when platform service routine initializes in the rear, init processes are at the beginning of Linux The background service program defined in beginningization script is created, and is weighed so that the background service program has higher than system The root authority of limit;
    According to the operational order, digital independent/write operation is carried out to the storage device, is obtained and the operational order phase Corresponding operating result;
    The operating result is sent to the client.
  6. 6. method according to claim 5, it is characterised in that the background service program, which has, carries out the storage device The authority of read/write operations is set when platform service routine initializes in the rear, is specifically included:
    Linux initializtion scripts are performed, start init processes;
    The init processes create the background service program defined in the Linux initializtion scripts, make described Background service program has after starting is read out the storage device/the authority of write operation.
  7. 7. a kind of client, it is characterised in that the client includes:Acquisition module, sending module, receiving module;
    The acquisition module, for obtaining the operational order by application triggers, the operational order is used to indicate that backstage takes Business program is read out storage device/write operation;Wherein, when platform service routine initializes in the rear, init processes pair The background service program defined in Linux initializtion scripts is created, and is higher than so that the background service program has The root authority of system authorities;
    The sending module, for sending the operational order to the background service program, so that the background service journey Sequence is read out/write operation according to the operational order to the storage device;
    The receiving module, for receiving being tied with the corresponding operation of the operational order for the background service program transmission Fruit;
    The sending module, is additionally operable to the operating result being sent to the application program.
  8. 8. client according to claim 7, it is characterised in that the client further includes:Processing module;
    The processing module, for performing Linux initializtion scripts, starts init processes;
    The init processes create the background service program defined in the Linux initializtion scripts, make described Background service program has after starting is read out the storage device/the authority of write operation.
  9. 9. a kind of background server, it is characterised in that the background server includes:Receiving module, processing module, send mould Block;
    The receiving module, for receiving the operational order by application triggers of client transmission, the operational order is used / write operation is read out to storage device in instruction background service program;Wherein, platform service routine initializes in the rear When, init processes create the background service program defined in Linux initializtion scripts, so that the background service Program has the root authority higher than system authorities;
    The processing module, for according to the operational order, carrying out digital independent/write operation to the storage device, obtaining To with the corresponding operating result of the operational order;
    The sending module, for sending the operating result to the client.
  10. 10. background server according to claim 9, it is characterised in that
    The processing module, is additionally operable to perform Linux initializtion scripts, starts init processes;
    The init processes create the background service program defined in the Linux initializtion scripts, make described Background service program has after starting is read out the storage device/the authority of write operation.
CN201510097761.8A 2015-03-05 2015-03-05 A kind of method and device for reading and writing storage device Active CN104714760B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810174675.6A CN108279855B (en) 2015-03-05 2015-03-05 Method for reading and writing storage device
CN201510097761.8A CN104714760B (en) 2015-03-05 2015-03-05 A kind of method and device for reading and writing storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510097761.8A CN104714760B (en) 2015-03-05 2015-03-05 A kind of method and device for reading and writing storage device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201810174675.6A Division CN108279855B (en) 2015-03-05 2015-03-05 Method for reading and writing storage device

Publications (2)

Publication Number Publication Date
CN104714760A CN104714760A (en) 2015-06-17
CN104714760B true CN104714760B (en) 2018-05-15

Family

ID=53414145

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201810174675.6A Active CN108279855B (en) 2015-03-05 2015-03-05 Method for reading and writing storage device
CN201510097761.8A Active CN104714760B (en) 2015-03-05 2015-03-05 A kind of method and device for reading and writing storage device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201810174675.6A Active CN108279855B (en) 2015-03-05 2015-03-05 Method for reading and writing storage device

Country Status (1)

Country Link
CN (2) CN108279855B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027487B (en) * 2016-04-28 2019-07-23 广州广电运通金融电子股份有限公司 A kind of access management method and system of hardware device
CN110191465A (en) * 2019-06-03 2019-08-30 努比亚技术有限公司 Authority control method, mobile terminal and computer readable storage medium
CN113312324A (en) * 2021-07-29 2021-08-27 深圳市永达电子信息股份有限公司 File operation synchronization method and equipment based on redirection and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981835A (en) * 2012-11-02 2013-03-20 福州博远无线网络科技有限公司 Android application program permanent Root permission acquiring method
CN103970601A (en) * 2013-02-06 2014-08-06 北京壹人壹本信息科技有限公司 Operational order execution method and operational order execution device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6615293B1 (en) * 1998-07-01 2003-09-02 Sony Corporation Method and system for providing an exact image transfer and a root panel list within the panel subunit graphical user interface mechanism
US6981251B1 (en) * 1999-08-18 2005-12-27 Siemens Aktiengesellschaft Agent system for mobile agents, computer network and method for downloading an agent system from a host computer to a client computer of a computer network
US8244829B2 (en) * 2009-03-25 2012-08-14 Panasonic Corporation Data transmitting apparatus, data receiving apparatus, data transmitting method and data receiving method
CN102567720A (en) * 2011-12-26 2012-07-11 广州市千钧网络科技有限公司 Face identification method and face identification device for Flash online video
CN103365685A (en) * 2013-06-03 2013-10-23 深圳创维无线技术有限公司 Super authority method and super authority device based on android
CN103530534B (en) * 2013-09-23 2016-06-29 北京理工大学 A kind of Android program ROOT authorization method based on signature verification
CN103544096A (en) * 2013-10-21 2014-01-29 Tcl集团股份有限公司 Method and system for feeding back information in case of operational failure of Android terminal
CN104063303B (en) * 2014-06-30 2019-07-16 上海斐讯数据通信技术有限公司 A method of obtaining and discharge root authority
CN104199711B (en) * 2014-09-29 2018-02-13 北京奇虎科技有限公司 The method and apparatus for establishing root authority

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981835A (en) * 2012-11-02 2013-03-20 福州博远无线网络科技有限公司 Android application program permanent Root permission acquiring method
CN103970601A (en) * 2013-02-06 2014-08-06 北京壹人壹本信息科技有限公司 Operational order execution method and operational order execution device

Also Published As

Publication number Publication date
CN108279855B (en) 2021-07-06
CN104714760A (en) 2015-06-17
CN108279855A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN102394872B (en) Data communication protocol
US7003663B2 (en) Distribution of deployment information for remote applications
CN104715183B (en) A kind of trust authentication method and apparatus during virtual machine operation
CN111163130B (en) Network service system and data transmission method thereof
CN103297424A (en) Multiplexed data stream protocol
CN102904959A (en) Network accelerating method and gateway
CN114124929A (en) Cross-network data processing method and device
CN109814943A (en) Service construction method, loading method and device, electronic equipment, storage medium
CN104714760B (en) A kind of method and device for reading and writing storage device
CN107733882A (en) SSL certificate automatically dispose method and apparatus
CN107526595A (en) A kind of method for supporting multiple operating system remote loading
CN111367685B (en) Interface calling method and device, computer equipment and storage medium
CN112150030A (en) Account management method based on multiple units and multiple identities, terminal equipment and storage medium
CN113965628A (en) Message scheduling method, server and storage medium
CN108182119A (en) Read and write abruption control method and device, storage medium and electronic device
CN110278092A (en) Router long-range control method and system based on MQTT agreement
CN109889468A (en) Transmission method, system, device, equipment and the storage medium of network data
CN104570967B (en) Long-range control method and system based on android system
CN109451483A (en) ESIM data processing method, equipment and readable storage medium storing program for executing
US9288116B2 (en) System and method for NAS server test load generation
CN115022252B (en) Method and equipment for configuring maximum length of transmission data packet
CN110022332B (en) Hypertext transfer security protocol proxy method, device, equipment and medium
CN113726838B (en) File transmission method, device, equipment and storage medium
CN112422566B (en) Remote call processing method and device, storage medium and electronic device
CN114049193B (en) Invoice authentication deduction method and system based on tax control cabinet

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant