CN106991043B - External SD card writing program test processing method and system based on mobile terminal - Google Patents

External SD card writing program test processing method and system based on mobile terminal Download PDF

Info

Publication number
CN106991043B
CN106991043B CN201710169834.9A CN201710169834A CN106991043B CN 106991043 B CN106991043 B CN 106991043B CN 201710169834 A CN201710169834 A CN 201710169834A CN 106991043 B CN106991043 B CN 106991043B
Authority
CN
China
Prior art keywords
card
external
writing
data
test
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
CN201710169834.9A
Other languages
Chinese (zh)
Other versions
CN106991043A (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.)
Yuanyuan Shenzhen Technology Transfer Co ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201710169834.9A priority Critical patent/CN106991043B/en
Publication of CN106991043A publication Critical patent/CN106991043A/en
Application granted granted Critical
Publication of CN106991043B publication Critical patent/CN106991043B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a system for testing and processing an external SD card writing program based on a mobile terminal, wherein the method comprises the following steps: when a program writing test for an external SD card is started, detecting whether data written into the external SD card exists or not; when a program test of writing to the external SD card is started, the external SD card receives the written data and controls to discard the data needing to be written at the moment; when the test of the writing program of the external SD card is closed, the function of writing data into the SD card is recovered. The invention carries out write operation on the external SD card in a simulation mode, and only the write program of the external SD card is tested during the test, so that the interruption of the test process can be avoided, and the cost of the SD card damage is saved.

Description

External SD card writing program test processing method and system based on mobile terminal
Technical Field
The invention relates to the field of mobile terminals, in particular to a method and a system for testing and processing an external SD card writing program based on a mobile terminal.
Background
As mobile terminal systems become more complex and larger, applications on mobile terminals become more abundant; the storage capacity of the mobile terminal is required to be increased more and more, and currently, in order to expand the storage capacity of the mobile terminal, an external SD card interface is added in the mobile terminal, so that a user can expand the storage capacity of the mobile terminal by additionally adding an SD card.
When the mobile terminal has an external SD card expansion function, the mobile terminal needs to add an external SD card reading and writing program to read and write the external SD card installed by a user; in order to find out the problems in the read and write programs of the mobile terminal to the external SD card in time and test the states of the read and write programs of the external SD card at the same time, mobile terminal manufacturers need to test the read and write programs of the external SD card in the mobile terminal.
For the write program, in the prior art, it is necessary to continuously write the external SD card, and the number of times of write operation on the external SD card is very large, and since the number of times that the SD card can write is limited, the external SD card is easily damaged during the test, which may cause interruption of the test and also cause economic loss of damage to the SD card.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The present invention provides a method and a system for testing and processing an external SD card write program based on a mobile terminal, aiming at the above-mentioned defects in the prior art. The invention provides a method for testing an external SD (secure digital) card writing program of a mobile terminal, which aims to write an external SD card in a simulation mode, and only the external SD card writing program is tested during testing, so that the interruption of the testing process can be avoided, and the cost of SD card damage is saved.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a method for testing and processing an external SD card writing program based on a mobile terminal comprises the following steps:
A. when a program writing test for an external SD card is started, detecting whether data written into the external SD card exists or not;
B. when a program test of writing to the external SD card is started, the external SD card receives the written data and controls to discard the data needing to be written at the moment;
C. when the test of the writing program of the external SD card is closed, the function of writing data into the SD card is recovered.
The external SD card writing program test processing method based on the mobile terminal is characterized in that the step A comprises the following steps:
setting a command in the mobile terminal in advance to start a program writing test on an external SD card;
when the execution of the command is detected, data written to the external SD card is detected.
The external SD card writing program test processing method based on the mobile terminal, wherein the step B comprises the following steps:
when detecting that the external SD card receives the written data, ignoring the data;
and returns the success of data writing to the external SD card writing program.
The external SD card writing program test processing method based on the mobile terminal is characterized in that the step B specifically comprises the following steps:
when detecting that the external SD card receives the written data, ignoring the data; writing an external SD card in a simulation mode, wherein the simulation writing is that no real writing operation is actually carried out on the SD card, and when a test writing command of the SD card is received, real data cannot be written into the SD card by the writing;
and returns the success of data writing to the external SD card writing program.
The external SD card writing program test processing method based on the mobile terminal, wherein the step C comprises the following steps:
when the program test of the external SD card is closed;
and restoring the function of writing data into the SD card.
An external SD card write program test processing system based on a mobile terminal, comprising:
the starting and detecting module is used for detecting whether data written into the external SD card exists or not when a program writing test of the external SD card is started;
the write-in data processing module is used for receiving the written-in data by the external SD card and controlling to discard the data to be written in at the moment when the test of the write program of the external SD card is started;
and the writing recovery module is used for recovering the function of writing data into the SD card when the external SD card writing program test is closed.
The external SD card writing program test processing system based on the mobile terminal, wherein the starting and detecting module comprises:
the system comprises a presetting unit, a test unit and a control unit, wherein the presetting unit is used for presetting a command in the mobile terminal to start a program writing test on an external SD card;
a first detection unit for detecting data written to the external SD card when the execution of the command is detected.
The external SD card writing program test processing system based on the mobile terminal, wherein the writing data processing module comprises:
a second detection unit configured to ignore the written data when detecting that the external SD card receives the data;
and the first return unit is used for returning the success of data writing to the external SD card writing program.
The external SD card writing program test processing system based on the mobile terminal, wherein the writing data processing module further comprises:
a third detection unit, configured to ignore the written data when detecting that the external SD card receives the data; writing an external SD card in a simulation mode, wherein the simulation writing is that no real writing operation is actually carried out on the SD card, and when a test writing command of the SD card is received, real data cannot be written into the SD card by the writing;
and the second return unit is used for returning the success of data writing to the external SD card writing program.
The external SD card writing program test processing system based on the mobile terminal, wherein the writing recovery module comprises:
the closing control unit is used for closing the program writing test of the external SD card;
and the recovery unit is used for recovering the function of writing data into the SD card when the program writing test of the external SD card is closed.
According to the external SD card write program test processing method and system based on the mobile terminal, provided by the invention, when the external SD card write program test is started, data written into the external SD card are detected; when the external SD card receives the written data, discarding the data; when the test of the writing program of the external SD card is closed, the function of writing data into the SD card is recovered. The external SD card is written in a simulation mode, and only the external SD card writing program is tested during testing, so that the interruption of the testing process can be avoided, and the cost for damaging the SD card is saved.
Drawings
FIG. 1 is a flowchart of a method for testing and processing an external SD card write program according to a preferred embodiment of the present invention.
Fig. 2 is a functional block diagram of a preferred embodiment of the external SD card write program test processing system based on the mobile terminal according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for testing and processing an external SD card write program according to a preferred embodiment of the present invention.
S100, when the program test of writing to the external SD card is started, the data written to the external SD card is detected.
When the mobile terminal has an external SD card expansion function, the mobile terminal needs to add an external SD card reading and writing program to read and write the external SD card installed by a user; in order to find out the problems in the read and write programs of the mobile terminal to the external SD card in time and test the states of the read and write programs of the external SD card at the same time, mobile terminal manufacturers need to test the read and write programs of the external SD card in the mobile terminal.
In the embodiment of the present invention, in specific implementation, step S100 includes:
s01, setting a command in the mobile terminal in advance to start a program writing test on the external SD card;
for example, if the command start SD write test is set in the mobile terminal in advance for starting the program test for the external SD card, the command start SD write test may be regarded as being started when the command is detected to be executed by the mobile terminal, as long as the command start SD write test does not overlap with other commands already in the mobile terminal.
S02, when the execution of the command is detected, the data written to the external SD card is detected.
For example, when the mobile terminal detects that a command start SD write test for starting a program test for writing to the external SD card is executed, data written to the external SD card is detected.
S200, when the program test of the external SD card is started, the external SD card receives the written data and controls to discard the data needing to be written at the moment.
Specifically, when it is detected that the external SD card receives the written data, the data is ignored, that is, when the external SD card receives the written data, the data is directly discarded without being processed; however, in order to make the external SD card write program unaware of this situation, it is necessary to return a success of data write to the external SD card write program.
In the embodiment of the invention, when the external SD card is detected to receive the written data, the data is ignored, that is, when the external SD card receives the written data, the data is not processed, and the data is directly discarded.
Because: the invention aims to reduce the writing of the SD card to protect the SD card during testing so as to prolong the service life of the SD card (the writing times of the SD card are limited). In addition, in case the SD card itself is bad, the test process is interrupted due to write failure. Considering that the writing operation of the SD card is purely for testing during testing, the invention avoids directly writing data into the SD card to reduce the writing into the SD card to protect the SD card, so as to prolong the service life of the SD card. In addition, in case the SD card itself is bad, the test process is interrupted due to write failure.
For example, in testing an SD card, the present invention adopts the following manner: when the external SD card receives the written data, the written data is received, such as 10101000011111111111000 (binary), discarded, and then a write success is returned; the writing is considered to be successful for the external SD card writing program, but the actual data writing is not carried out for the SD card; the written data, such as 10101000011111111111000 (binary), is actually written into the SD card when the external SD card receives the data, which reduces the number of times the SD card writes (the number of times the SD card writes is limited) and thus reduces the life of the SD card. In addition, in case that the SD card used for the test is bad, the test process is interrupted due to the failure of writing data, so that the tester also analyzes the cause of the test failure and retests. The method of the invention has no possibility of causing test interruption when the SD card used for testing is bad. Thus, the interruption of the test process can be avoided, and the damage cost of the SD card can be saved.
And S300, when the program writing test of the external SD card is closed, recovering the function of writing data into the SD card.
Therefore, the method detects the data written into the external SD card when the program writing test of the external SD card is started; when the external SD card receives the written data, discarding the data; when the test of the writing program of the external SD card is closed, the function of writing data into the SD card is recovered. The external SD card is written in a simulation mode, and only the external SD card writing program is tested during testing, so that the interruption of the testing process can be avoided, and the cost for damaging the SD card is saved.
In the invention, the external SD card is written in a simulation mode, the simulation writing is that no real writing operation is actually carried out on the SD card, and when the SD card test writing command is received, real data cannot be written into the SD card by the writing.
For example, when a program test for writing to the external SD card is started, that is, when a "start SD write test" command is detected, data written to the external SD card, for example, data written this time is 10101000011111111111000 (binary); when the external SD card receives the written data, the written data 10101000011111111111000 (binary) is received, discarded, and then a write success is returned; here, the writing is considered successful for the writing program to the external SD card, but there is no actual data writing for the SD card. Thus, the interruption of the test process can be avoided, and the damage cost of the SD card can be saved.
Based on the above method embodiment, the present invention further provides a system for testing and processing an external SD card write program based on a mobile terminal, as shown in fig. 2, the system includes:
the starting and detecting module 210 is configured to detect whether there is data written into the external SD card when a program writing test for the external SD card is started; as described above.
The write-in data processing module 220 is configured to, when starting a program test for writing to an external SD card, receive data to be written in by the external SD card, and control to discard the data to be written in this time; as described above.
The write recovery module 230 is configured to recover a function of writing data in the SD card when the external SD card write program test is turned off; as described above.
Further, the external SD card write program test processing system based on the mobile terminal, wherein the starting and detecting module includes:
the system comprises a presetting unit, a test unit and a control unit, wherein the presetting unit is used for presetting a command in the mobile terminal to start a program writing test on an external SD card; as described above.
A first detection unit for detecting data written to the external SD card when the execution of the command is detected; as described above.
Preferably, the external SD card write program test processing system based on the mobile terminal, wherein the write data processing module includes:
a second detection unit configured to ignore the written data when detecting that the external SD card receives the data; as described above.
The first return unit is used for returning the success of data writing to the external SD card writing program; as described above.
Further, the external SD card write program test processing system based on the mobile terminal, wherein the write data processing module further includes:
a third detection unit, configured to ignore the written data when detecting that the external SD card receives the data; writing an external SD card in a simulation mode, wherein the simulation writing is that no real writing operation is actually carried out on the SD card, and when a test writing command of the SD card is received, real data cannot be written into the SD card by the writing; as described above.
The second return unit is used for returning the success of data writing to the external SD card writing program; as described above.
Further, the external SD card write program test processing system based on the mobile terminal, wherein the write recovery module includes:
the closing control unit is used for closing the program writing test of the external SD card; as described above.
The recovery unit is used for recovering the function of writing data into the SD card when the test of the program written into the external SD card is closed; as described above.
In summary, according to the external SD card write program test processing method and system based on the mobile terminal provided by the present invention, when the external SD card write program test is started, the method detects data written into the external SD card; when the external SD card receives the written data, discarding the data; when the test of the writing program of the external SD card is closed, the function of writing data into the SD card is recovered. The external SD card is written in a simulation mode, and only the external SD card writing program is tested during testing, so that the interruption of the testing process can be avoided, and the cost for damaging the SD card is saved.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (8)

1. A method for testing and processing an external SD card writing program based on a mobile terminal is characterized by comprising the following steps:
A. when a program writing test for an external SD card is started, detecting whether data written into the external SD card exists or not;
B. when a program test of writing to the external SD card is started, the external SD card receives the written data and controls to discard the data needing to be written at the moment;
C. when the test of the writing program of the external SD card is closed, the function of writing data into the SD card is recovered;
the step B specifically comprises the following steps:
when detecting that the external SD card receives the written data, ignoring the data; writing an external SD card in a simulation mode, wherein the simulation writing is that no real writing operation is actually carried out on the SD card, and when a test writing command of the SD card is received, real data cannot be written into the SD card by the writing; the external SD card is written in a simulation mode, so that the terminal in the test process is avoided, and the cost of the SD card damage is saved;
and returns the success of data writing to the external SD card writing program.
2. The external SD card write program test processing method based on mobile terminal according to claim 1, wherein the step a comprises:
setting a command in the mobile terminal in advance to start a program writing test on an external SD card;
when the execution of the command is detected, data written to the external SD card is detected.
3. The external SD card write program test processing method based on mobile terminal according to claim 1, wherein the step B includes:
when detecting that the external SD card receives the written data, ignoring the data;
and returns the success of data writing to the external SD card writing program.
4. The external SD card write program test processing method based on mobile terminal according to claim 1, wherein the step C includes:
when the program test of the external SD card is closed;
and restoring the function of writing data into the SD card.
5. An external SD card write program test processing system based on a mobile terminal is characterized by comprising:
the starting and detecting module is used for detecting whether data written into the external SD card exists or not when a program writing test of the external SD card is started;
the write-in data processing module is used for receiving the written-in data by the external SD card and controlling to discard the data to be written in at the moment when the test of the write program of the external SD card is started;
the write recovery module is used for recovering the function of writing data into the SD card when the write program test of the external SD card is closed;
the write data processing module further comprises:
a third detection unit, configured to ignore the written data when detecting that the external SD card receives the data; writing an external SD card in a simulation mode, wherein the simulation writing is that no real writing operation is actually carried out on the SD card, and when a test writing command of the SD card is received, real data cannot be written into the SD card by the writing; the external SD card is written in a simulation mode, so that the terminal in the test process is avoided, and the cost of the SD card damage is saved;
and the second return unit is used for returning the success of data writing to the external SD card writing program.
6. The external SD card write program test processing system based on mobile terminal according to claim 5, wherein said start and detection module comprises:
the system comprises a presetting unit, a test unit and a control unit, wherein the presetting unit is used for presetting a command in the mobile terminal to start a program writing test on an external SD card;
a first detection unit for detecting data written to the external SD card when the execution of the command is detected.
7. The external SD card write program test processing system according to claim 5, wherein the write data processing module comprises:
a second detection unit configured to ignore the written data when detecting that the external SD card receives the data;
and the first return unit is used for returning the success of data writing to the external SD card writing program.
8. The external SD card write program test processing system according to claim 5, wherein said write recovery module comprises:
the closing control unit is used for closing the program writing test of the external SD card;
and the recovery unit is used for recovering the function of writing data into the SD card when the program writing test of the external SD card is closed.
CN201710169834.9A 2017-03-21 2017-03-21 External SD card writing program test processing method and system based on mobile terminal Active CN106991043B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710169834.9A CN106991043B (en) 2017-03-21 2017-03-21 External SD card writing program test processing method and system based on mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710169834.9A CN106991043B (en) 2017-03-21 2017-03-21 External SD card writing program test processing method and system based on mobile terminal

Publications (2)

Publication Number Publication Date
CN106991043A CN106991043A (en) 2017-07-28
CN106991043B true CN106991043B (en) 2021-04-20

Family

ID=59412064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710169834.9A Active CN106991043B (en) 2017-03-21 2017-03-21 External SD card writing program test processing method and system based on mobile terminal

Country Status (1)

Country Link
CN (1) CN106991043B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901227A (en) * 2009-05-31 2010-12-01 深圳市江波龙电子有限公司 Intelligent storage and expansion equipment and access control system and method thereof
CN103324560A (en) * 2013-06-28 2013-09-25 深圳市江波龙电子有限公司 Testing method and device of flash memory
CN106295432A (en) * 2016-08-09 2017-01-04 上海盈方微电子有限公司 The data detection method of a kind of SD card and system and the draw-in groove of external SD card

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8789024B2 (en) * 2009-11-04 2014-07-22 Red Hat, Inc. Integration of visualization with source code in the Eclipse development environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901227A (en) * 2009-05-31 2010-12-01 深圳市江波龙电子有限公司 Intelligent storage and expansion equipment and access control system and method thereof
CN103324560A (en) * 2013-06-28 2013-09-25 深圳市江波龙电子有限公司 Testing method and device of flash memory
CN106295432A (en) * 2016-08-09 2017-01-04 上海盈方微电子有限公司 The data detection method of a kind of SD card and system and the draw-in groove of external SD card

Also Published As

Publication number Publication date
CN106991043A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
US9417967B2 (en) Computing device and method for automatically recovering bios of computing device
US8555012B2 (en) Data storage apparatus
US10191670B2 (en) Method and device of data protection, storage equipment
CN111562934B (en) Software system upgrading method based on hot patch, terminal and storage medium
CN113409881B (en) Flash memory erasure interrupt recovery test method and device, electronic equipment and storage medium
KR100703164B1 (en) Data processing device and control method of the same
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN111143898B (en) Data protection method for pluggable memory device
CN106991043B (en) External SD card writing program test processing method and system based on mobile terminal
CN107153569B (en) Processing method and device for read-write failure of virtual machine
CN113626262A (en) BMC recovery method, system, equipment and medium
CN102184115B (en) Method for updating system software and terminal device
US8667321B2 (en) Controlling method and controller for memory
CN107515730B (en) Data storage device and operation method
KR20110039416A (en) Data storage method, apparatus and system for interrupted write recovery
CN114496053A (en) Data anomaly detection method, device and equipment and computer readable storage medium
CN108037942B (en) Adaptive data recovery and update method and device for embedded equipment
CN114138557B (en) Consistency test method and device for rollback data of stored snapshot
CN114978891B (en) Processing method, device and storage medium for BIOS configuration of network device
CN112506714B (en) Hot backup method for Windows system and corresponding hot recovery method
CN113590388B (en) UBOOT-based SPL rollback method and device, storage medium and terminal
CN100410901C (en) Firmware upgrade method and system for executing said method
CN114625430A (en) System starting method, terminal device and computer readable storage medium
KR101911182B1 (en) Semiconductor test device capable of managing the life of the gender and method thereof
CN106502453B (en) Method and system for preventing touch screen from malfunctioning based on mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240102

Address after: 518000, 109-111, Building 17, Maker Town, No. 4109 Liuxian Avenue, Pingshan Community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong Province

Patentee after: Yuanyuan (Shenzhen) Technology Transfer Co.,Ltd.

Address before: 516006 Zhongkai hi tech Zone, Huizhou, Guangdong, 86 Chang seven Road West

Patentee before: HUIZHOU TCL MOBILE COMMUNICATION Co.,Ltd.