Display device and data recovery method
By starting the timer when receiving the factory reset command, the long-term black screen problem caused by orderly broadcast queue blocking in the Android system is solved, and the normal restart and factory reset of the display device are achieved.
Patent Information
- Application Number
- CN202510309871.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-07-18
AI Technical Summary
In Android system, since the orderly broadcast queue length is not clearly limited, the queue may be blocked, resulting in the operation of restoring the factory settings blocking, and a long-term black screen occurs. The user mistakenly believes that the display device is damaged.
After receiving the factory reset command, the timer is started when creating the broadcast receiver. If the factory reset broadcast is not received within the timer timing time, a restart is performed and the recovery mode is entered to avoid queue blocking.
Avoid long-term black screen due to orderly broadcast queue blocking, ensure that the display device can be restarted normally and restored to factory settings, and reduce user complaints.
Smart Images

Figure CN120336084A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of display devices, and in particular, to a display device and a data recovery method. Background Art
[0002] When the system of a display device malfunctions, the user may resolve the anomaly by selecting to restore the device to its factory settings. However, there are many reasons for system anomalies, including: Since there is no clear length limit for the queue length of the ordered broadcasts in the Android system, there may be a situation where the queue length is relatively long, that is, there are multiple broadcast receivers waiting to receive the ordered broadcasts. If one of the receivers has timeouts and time-consuming operations, it will cause the receivers queued behind this receiver to be unable to receive the broadcast in a timely manner, that is, the ordered broadcast queue is blocked, and various anomalies will occur in the system. If the user selects to restore the factory settings in the above abnormal situation, the broadcast for restoring the factory settings, as a type of ordered broadcast, will also be blocked, and the operation of restoring the factory settings will not be executed in a timely manner. Instead, there will be a situation of a long black screen, resulting in the user mistakenly believing that the display device is damaged and causing user complaints. Summary of the Invention
[0003] Some embodiments of this application provide a display device and a data recovery method. After receiving an instruction to restore the factory settings, if the ordered broadcast queue is long, a timer can be started when creating a broadcast receiver, so that in the case where the broadcast for restoring the factory settings is not received within the timing time of the timer, the restart and entry into the recovery mode can also be executed, avoiding the phenomenon of a long black screen caused by the blocking of the ordered broadcast queue during the restoration of the factory settings.
[0004] In a first aspect, some embodiments of this application provide a display device, including:
[0005] A display configured to display a user interface;
[0006] A controller coupled to the display and configured to:
[0007] After receiving an instruction from the user to restore the factory settings, send a broadcast for restoring the factory settings and obtain the length of the ordered broadcast queue. The broadcast for restoring the factory settings is an ordered broadcast;
[0008] If the length of the ordered broadcast queue is greater than or equal to a preset length, create a broadcast receiver for restoring the factory settings and start a timer;
[0009] If the broadcast receiver does not receive the broadcast for restoring the factory settings within the timing time of the timer, perform an operation of restarting and entering the recovery mode after the timer times out. The recovery mode is used to restore the display device to its factory settings state.
[0010] The above technical solution has the following advantages or beneficial effects: After receiving the instruction to restore the factory settings, if the ordered broadcast queue is long, a timer can be started when creating a broadcast receiver, so that in the case where the factory reset broadcast is not received within the timing time of the timer, the restart and entry into the recovery mode can also be executed, avoiding the phenomenon of a long-time black screen caused by the blocking of the ordered broadcast queue during the factory reset.
[0011] In some embodiments, before receiving the instruction from the user to restore the factory settings, the controller is further configured to:
[0012] In response to the power-on instruction, control the bootloader module to detect whether the file system of the data partition is damaged;
[0013] If the file system is damaged, control the bootloader module to set the data in the data partition to a target character, where the target character is used to indicate formatting of the data in the data partition;
[0014] After the file system mounting based on the data in the data partition fails and it is detected that the data in the data partition is set to the target character, format the data in the data partition and obtain the backup data of the data partition from a preset storage area;
[0015] Remount the file system based on the backup data.
[0016] The above technical solution has the following advantages or beneficial effects: After the bootloader module starts and detects that the file system of the data partition is damaged, all bytes of this data partition can be automatically filled with the target character during the bootloader stage, thus avoiding system anomalies caused by the Android system mounting based on the damaged data partition, but automatically formatting during the Android system to ensure the normal operation of the system.
[0017] In some embodiments, when the controller executes to control the bootloader module to detect whether the file system of the data partition is damaged, it is further configured to:
[0018] Control the bootloader module to determine whether the target key identification field in the superblock of the data partition is the same as the preset field;
[0019] If the target key identification field is the same as the preset field, it is detected that the file system of the data partition is not damaged;
[0020] If the target key identification field is not the same as the preset field, it is detected that the file system of the data partition is damaged.
[0021] The above technical solution has the following advantages or beneficial effects: By comparing the target key identification field in the superblock of the data partition with the preset field, it can be quickly determined whether the data partition is damaged.
[0022] In some embodiments, after receiving an instruction from the user to restore the factory settings, the controller sends a factory reset broadcast and is further configured to:
[0023] After receiving an instruction from the user to open the factory reset page, control the display to show the factory reset page, which includes a secure erase control, a normal erase control, and a retention erase control;
[0024] In the case of receiving a confirmation operation from the user on the secure erase control, send a first factory reset broadcast, so that after receiving the first factory reset broadcast, the target application erases the data in the user data partition. The first factory reset broadcast includes a first erase flag bit, and the first erase flag bit is used to indicate erasing the data in the user data partition. The target application includes applications other than the pre-installed system applications.
[0025] The above technical solution has the following advantages or beneficial effects: It deeply customizes the factory reset function in the display device, adapts multiple options for the user to choose from, and can complete the operation of completely erasing the user data partition according to the user's choice.
[0026] In some embodiments, after the controller controls the display to show the factory reset page, it is further configured to:
[0027] In the case of receiving a confirmation operation from the user on the normal erase control, send a second factory reset broadcast, so that after receiving the second factory reset broadcast, the target application deletes the index of the user data partition. The second factory reset broadcast includes a second erase flag bit, and the second erase flag bit is used to indicate deleting the index of the user data partition.
[0028] The above technical solution has the following advantages or beneficial effects: It deeply customizes the factory reset function in the display device, adapts multiple options for the user to choose from, and can complete the operation of erasing the index of the user data partition according to the user's choice.
[0029] In some embodiments, after the controller controls the display to show the factory reset page, it is further configured to:
[0030] In the case of receiving a confirmation operation from the user on the retention erase control, send a third factory reset broadcast, so that after receiving the third factory reset broadcast, the target application erases the data in the user data partition except for the data corresponding to the retention flag bit. The third factory reset broadcast includes a third erase flag bit and a data retention flag bit. The third erase flag bit is used to indicate retaining the data corresponding to the data retention flag bit, and the data retention flag bit is used to represent the retained data selected by the user.
[0031] The above technical solution has the following advantages or beneficial effects: Deep customization is carried out for the factory reset function in the display device, adapting multiple options for users to choose from, and the erasure operation of data other than the data selected by the user to be retained can be completed according to the user's selection.
[0032] In some embodiments, the controller executes the instruction to receive the user input for factory reset and is further configured to:
[0033] Receive the instruction for factory reset input by the user in the manner of pressing a preset local key of the display device for more than a preset duration.
[0034] The above technical solution has the following advantages or beneficial effects: For scenarios where the device cannot be started or cannot enter the settings menu to select factory reset, a trigger method of forcibly performing factory reset by long-pressing the local key is added to ensure that the display device can run correctly again.
[0035] In some embodiments, after the controller executes to obtain the length of the ordered broadcast queue, it is further configured to:
[0036] If the length of the ordered broadcast queue is less than the preset length, create a broadcast receiver for factory reset, and perform the operation of restarting and entering the recovery mode after the broadcast receiver receives the factory reset broadcast.
[0037] The above technical solution has the following advantages or beneficial effects: In the case where the length of the ordered broadcast queue is less than the preset length, there is no need to start a timer, which can reduce the occupation of system resources.
[0038] In a second aspect, some embodiments of the present application provide a data recovery method, including:
[0039] After receiving the instruction for factory reset input by the user, send a factory reset broadcast, and obtain the length of the ordered broadcast queue. The factory reset broadcast is an ordered broadcast;
[0040] If the length of the ordered broadcast queue is greater than or equal to the preset length, create a broadcast receiver for factory reset, and start a timer;
[0041] If the broadcast receiver does not receive the factory reset broadcast within the timing time of the timer, perform the operation of restarting and entering the recovery mode after the timer times out. The recovery mode is used to restore the display device to the factory settings state.
[0042] The above technical solution has the following advantages or beneficial effects: After receiving the factory reset instruction, if the ordered broadcast queue is long, a timer can be started when creating a broadcast receiver, so that restart and entry into the recovery mode can also be performed in the case where the factory reset broadcast is not received within the timing time of the timer, avoiding the phenomenon of a long-time black screen caused by the blockage of the ordered broadcast queue during factory reset.
[0043] In some embodiments, before receiving the instruction for the user to perform a factory reset, the method further includes:
[0044] In response to the power-on instruction, controlling the bootloader module to detect whether the file system of the data partition is damaged;
[0045] If the file system is damaged, controlling the bootloader module to set the data of the data partition to a target character, where the target character is used to indicate formatting the data of the data partition;
[0046] After the file system mounting based on the data of the data partition fails and it is detected that the data of the data partition is set to the target character, formatting the data of the data partition and obtaining backup data of the data partition from a preset storage area;
[0047] Remounting the file system based on the backup data.
[0048] The above technical solution has the following advantages or beneficial effects: After the bootloader module starts and detects that the file system of the data partition is damaged, all bytes of this data partition can be automatically filled with the target character during the bootloader stage, thus avoiding system anomalies caused by the Android system mounting based on the damaged data partition, but automatically formatting during the Android system to ensure the normal operation of the system.
[0049] For the technical solution provided by the embodiments of the present application, after receiving the factory reset instruction, if the ordered broadcast queue is long, a timer can be started when creating a broadcast receiver, so that restart and entry into the recovery mode can also be performed in the case where the factory reset broadcast is not received within the timing time of the timer, avoiding the phenomenon of a long-time black screen caused by the blockage of the ordered broadcast queue during factory reset. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0051] Figure 1Schematic diagram of the operation scenario between the display device and the control device provided by some embodiments of the present application;
[0052] Figure 2 Schematic diagram of the hardware configuration of the display device provided by some embodiments of the present application;
[0053] Figure 3 Schematic diagram of the software configuration of the display device provided by some embodiments of the present application;
[0054] Figure 4 Timing diagram of a data recovery method provided by some embodiments of the present application;
[0055] Figure 5 Flowchart of a data recovery method provided by some embodiments of the present application;
[0056] Figure 6 Schematic diagram of a prompt page provided by some embodiments of the present application;
[0057] Figure 7 Schematic diagram of a setting page provided by some embodiments of the present application;
[0058] Figure 8 Schematic diagram of a factory reset page provided by some embodiments of the present application;
[0059] Figure 9 Schematic diagram of a data retention selection page provided by some embodiments of the present application;
[0060] Figure 10 Schematic diagram of another data retention selection page provided by some embodiments of the present application;
[0061] Figure 11 Timing diagram of another data recovery method provided by some embodiments of the present application. Detailed implementation manners
[0062] The embodiments will be described in detail below, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following embodiments do not represent all the implementation manners consistent with the present application. They are only examples of the systems and methods consistent with some aspects of the present application detailed in the claims.
[0063] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the following described implementation manners, rather than intending to limit the implementation manners of the present application. Unless otherwise specified, these terms should be understood in their ordinary and common meanings.
[0064] In this application, terms such as "first", "second", "third", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar or like objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that such terms can be interchanged under appropriate circumstances.
[0065] The terms "comprising" and "having" and any variations thereof are intended to cover but not exclusively include. For example, a product or device comprising a series of components does not necessarily have to be limited to all the components clearly listed, but may include other components not clearly listed or inherent to these products or devices.
[0066] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic or a combination of hardware or / and software code that can perform functions related to that element.
[0067] In the embodiments of this application, the display device 200 generally refers to a device with the ability to display images and process data. For example, the display device 200 includes but is not limited to smart TVs, mobile terminals, computers, monitors, advertising screens, wearable devices, virtual reality devices, augmented reality devices, etc.
[0068] Figure 1 This is a schematic diagram of the operation scenario between the display device and the control device provided for some embodiments of this application. As Figure 1 shown, the user can operate the display device 200 through touch operations, the mobile terminal 300 and the control device 100. Among them, the control device 100 is used to receive the operation instructions input by the user and convert the operation instructions into control instructions that the display device 200 can recognize and respond to. For example, the control device 100 can be a remote control, a stylus, a handle, etc.
[0069] The mobile terminal 300 can be used as a control device to perform the human-computer interaction between the user and the display device 200. The mobile terminal 300 can also be used as a communication device to establish a communication connection with the display device 200 for data interaction. In some embodiments, software applications can be installed on the mobile terminal 300 and the display device 200, and the connection communication can be realized through network communication protocols to achieve the purpose of one-to-one control operation and data communication. It is also possible to transmit the audio and video content displayed on the mobile terminal 300 to the display device 200 to achieve the synchronous display function.
[0070] In some embodiments, the mobile terminal 300 or other electronic devices can also simulate the functions of the control device 100 by running the application program for controlling the display device 200.
[0071] As Figure 1It is also shown that the display device 200 also communicates with the server 400 for data communication through various communication methods. The display device 200 is allowed to communicate and connect through a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0072] After receiving the user input information, the display device 200 can directly perform the operation of generating corresponding audio according to the input information, or send the input information to the server 400, and the server 400 performs the operation of generating corresponding audio according to the input information.
[0073] The display device 200 can provide a broadcast receiving television function, and can also additionally provide an intelligent network television function with computer support functions, including but not limited to, network television, smart television, Internet Protocol Television (IPTV), etc.
[0074] Figure 2 For some embodiments of the present application Figure 1 The hardware configuration block diagram of the display device 200 in the figure.
[0075] In some embodiments, the display device 200 may include at least one of a tuner demodulator 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.
[0076] In some embodiments, the detector 230 is used to collect signals from the external environment or interact with the outside. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environmental scenes, user attributes, or user interaction gestures. Or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0077] In some embodiments, the display 260 includes a display function component for presenting a picture and a driving component for driving image display. The display 260 is used to receive the image signal output from the controller 250 for display. For example, the display 260 can be used to display video content, image content, components of a menu manipulation interface, and a user manipulation UI interface, etc.
[0078] In some embodiments, the communication device 220 is a component for communicating with external devices or servers 400 according to various communication protocol types. The display device 200 may be provided with a plurality of communication devices 220 according to different supported communication methods. For example, when the display device 200 supports wireless network communication, the display device 200 may be provided with a communication device 220 including WiFi function. When the display device 200 supports Bluetooth connection communication, the display device 200 needs to be provided with a communication device 220 including Bluetooth function.
[0079] The communication device 220 can enable the display device 200 to communicate with external devices or servers 400 through wireless or wired connection. Among them, the wired connection can connect the display device 200 with external devices through components such as data lines and interfaces. The wireless connection can connect the display device 200 with external devices through wireless signals or wireless networks. The display device 200 can directly establish a connection relationship with external devices, or can indirectly establish a connection relationship through gateways, routers, connection devices, etc.
[0080] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and the first interface to the nth interface for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200.
[0081] In some embodiments, the controller 250 and the tuner demodulator 210 may be located in different split devices, that is, the tuner demodulator 210 may also be in an external device of the main device where the controller 250 is located, such as an external set-top box, etc.
[0082] In some embodiments, the user can input a user command on the graphical user interface (Graphical User Interface, GUI) displayed on the display 260, and then the user input interface receives the user input command through the graphical user interface (GUI).
[0083] In some embodiments, the audio output device 270 may be a built-in speaker of the display device 200, or may be an external audio output device connected to the display device 200. Among them, for the external audio output device connected to the display device 200, the display device 200 may also be provided with an external audio output terminal, and the audio output device can be connected to the display device 200 through the external audio output terminal to output the sound of the display device 200.
[0084] In some embodiments, the user input interface 280 can be used to receive instructions from user input.
[0085] In order to perform user interaction, in some embodiments, the display device 200 may run an operating system. The operating system is a computer program for managing and controlling hardware resources and software resources in the display device 200. The operating system can control the display device to provide a user interface. For example, the operating system can directly control the display device to provide a user interface, or provide a user interface by running an application program. The operating system also allows the user to interact with the display device 200.
[0086] It should be noted that the operating system can be a native operating system based on a specific operating platform, a third-party operating system deeply customized based on a specific operating platform, or an independent operating system specially developed for the display device.
[0087] The operating system can be divided into different modules or layers according to the functions implemented, such as Figure 3 As shown, in some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the system library layer and the kernel layer.
[0088] In some embodiments, the application layer is used to provide services and interfaces for applications so that the display device 200 can run applications and interact with users based on the applications. At least one application can be run in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. that come with the operating system; they can also be applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.
[0089] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.
[0090] like Figure 3As shown, in the embodiment of the present application, the application framework layer includes a view system, managers, content providers, etc. Among them, the view system can design and implement the interfaces and interactions of application programs. The view system includes lists, grids, text boxes, buttons, etc. The managers include at least one of the following modules: The Activity Manager is used to interact with all the activities running in the system; the Location Manager is used to provide access to the system location service for system services or applications; the Package Manager is used to retrieve various information related to the application program packages currently installed on the device; the Notification Manager is used to control the display and clearing of notification messages; the Window Manager is used to manage the icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0091] In some embodiments, the Activity Manager is used to manage the life cycles of various application programs and the general navigation back function, such as controlling the exit, opening, and backward movement of application programs. The Window Manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, taking screenshots, and controlling the changes of the display window. For example, shrinking the display window, jittering the display, and distorting the display, etc.
[0092] In some embodiments, the system runtime library layer can provide support for the framework layer. When the framework layer is used, the operating system will run the instruction libraries included in the system runtime library layer, such as C / C++ instruction libraries, to implement the functions that the framework layer is to achieve.
[0093] In some embodiments, the kernel layer is a functional level between the hardware and software of the display device 200. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management. For example, as Figure 3 shown, hardware drivers can be configured in the kernel layer. The drivers included in the kernel layer can be at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor drivers (such as fingerprint sensors, temperature sensors, pressure sensors, etc.), and power drivers, etc.
[0094] It should be noted that the above examples are only a simple division of the functions of the operating system, and do not limit the specific form of the operating system of the display device 200 in the embodiments of the present application. According to factors such as the functions of the display device and the type of the operating system, the number of levels and the specific level types included in the operating system may be presented in other forms.
[0095] When an abnormality occurs in the system of the display device, the user may solve the abnormality of the display device by selecting the method of restoring the device to its factory settings. However, there are many reasons for the system to have an abnormality, including: Since there is no clear length limit for the queue length of the ordered broadcasts in the Android system, there may be a situation where the queue length is relatively long, that is, there are multiple broadcast receivers waiting to receive the ordered broadcasts. If one of the receivers has a timeout and time-consuming operations, it will cause the receivers behind this receiver to be unable to receive the broadcast in time, that is, the ordered broadcast queue is blocked, and various abnormalities will occur in the system.
[0096] In the Android system, the ordered broadcast is a special type of broadcast mechanism that allows multiple receivers to receive broadcast messages in a specific order. The broadcast in the Android system is a message passing mechanism used to pass events between applications or within an application. The broadcast can be a system broadcast (an event sent by the system) or a custom broadcast (an event sent by an application). The ordered broadcast is a broadcast passed in the order of priority. The receivers can receive the broadcast one by one in the order of their priorities. After each receiver processes the broadcast, it can choose to continue passing it to the next receiver or abort the further transmission of the broadcast. In the Android system, there is no clear fixed limit for the queue length of the ordered broadcast. In theory, all applications that have registered the corresponding broadcast receivers will be added to the processing queue of the ordered broadcast and processed in the order of priority. Some functions with strong timeliness requirements rely on broadcasts to implement, and the broadcast in Android is a mechanism that does not make a commitment to timeliness. The broadcast depends on the queue, and there is an actual situation where the queue is blocked.
[0097] The broadcast (MASTER_CLEAR_NOTIFICATION) of the factory reset setting in the Android system is an ordered broadcast. As Figure 4As shown, in the case where there is no blocking of the ordered broadcast queue, after receiving the instruction from the user to restore the factory settings, the setting module sends a broadcast for restoring the factory settings and creates a broadcast receiver. After receiving the broadcast for restoring the factory settings, Application 1 performs a data erasure operation on its own data partition, and after completing the data erasure operation, sends a broadcast for restoring the factory settings to Application 2. After receiving the broadcast for restoring the factory settings, Application 2 performs a data erasure operation on its own data partition, and after completing the data erasure operation, sends a broadcast for restoring the factory settings to Application 3, and so on. After the last application (Application N) receives the broadcast for restoring the factory settings, it performs a data restoration operation on its own data partition, and after completing the data operation, sends a broadcast for restoring the factory settings to the broadcast receiver of the setting module. The broadcast receiver receives the broadcast for restoring the factory settings, restarts the display device 200 and enters the recovery mode after the display device 200 restarts, so that the display device 200 is restored to the factory settings.
[0098] Ordered broadcasts are executed sequentially. If the previous broadcast has not been completed, it will cause the ordered broadcasts in the subsequent queue to queue up and wait, resulting in system lag and non-responsiveness. In the case where the ordered broadcast queue is blocked, if the setting module of the display device 200 receives the instruction from the user to restore the factory settings through the settings / restore factory settings page, it sends a broadcast for restoring the factory settings. The broadcast for restoring the factory settings will be added to the ordered broadcast queue and will not be executed immediately, but needs to wait for the broadcasts before the broadcast for restoring the factory settings to be completed. Therefore, it will block and wait for all applications that receive the broadcast for restoring the factory settings to perform data restoration operations, and it also requires all applications that receive the broadcast for restoring the factory settings to receive the broadcast and process their own application data restoration before triggering the entry into the recovery mode for formatting the data partition. During the above waiting process, the screen of the display device 200 will go black for a long time, causing the user to mistakenly think that the display device is damaged and leading to user complaints.
[0099] To avoid the phenomenon of a long black screen caused by the blocking of the ordered broadcast queue during the restoration of the factory settings, an embodiment of the present application provides a display device 200. The structure and functions of each part of the display device 200 can refer to the above embodiments. In addition, on the basis of the display device 200 shown in the above embodiments, some functions of the display device 200 are further improved in this embodiment. As Figure 5 shown, the controller 250 is configured to perform the following steps:
[0100] Step S501: Receive the instruction from the user to restore the factory settings.
[0101] Before receiving the instruction from the user to restore the factory settings, it is necessary to start the display device 200.
[0102] In some embodiments, the step of starting the display device 200 includes:
[0103] In response to a power-on instruction, control the Bootloader to start and mount the file system based on the data in the data partition. The Bootloader is a bridge connecting the firmware and the operating system, responsible for hardware initialization, kernel loading, user interaction, and security verification to ensure that the operating system can start correctly. If the file system is successfully mounted, the display device 200 can be used normally. For example, an instruction to restore the factory settings can be received from the user and the relevant operations for restoring the factory settings can be executed.
[0104] If the file system mounting fails, it can be determined whether formatting is required by judging whether the data in the data partition is the target character. If the data in the data partition is the target character, the data in the data partition can be formatted, and then after the formatting is completed, the backup data of the data partition can be obtained from the preset storage area and the file system can be remounted based on the backup data. If the data in the data partition is not the target character, the file system needs to be remounted based on the data in the data partition, resulting in the file system still being unable to be successfully mounted and even causing system exceptions. Among them, the target character can be 0 or 0Xff.
[0105] The reason why the file system cannot be successfully mounted based on the data in the data partition may be that the data configuration partition is damaged. For example, the data in the partition header is a mess of characters, overwriting the data blocks of the original file system. The reasons for the damage of the data configuration partition include the following three aspects:
[0106] 1) Physical damage to the storage medium
[0107] Bad blocks in NAND flash memory: Long-term use or manufacturing defects cause irreparable bad blocks in the storage chip, damaging the partition data. Abnormal power supply: Writing data when suddenly powering off or when the voltage is unstable, resulting in damage to the file system metadata. The file system metadata can be the EXT4 (Fourth extended filesystem) superblock. Hardware compatibility issues. Driver defects: Bugs in the drivers of storage controllers such as eMMC (Embedded Multi Media Card) or UFS (Universal Flash Storage), resulting in read / write errors or data misalignment.
[0108] 2) File system corruption
[0109] Journal loss: The journal area of the EXT4 file system is damaged, resulting in inconsistent metadata (e.g., the s_state flag is marked as EXT2_ERROR_FS). Superblock corruption: The superblock at the partition header is overwritten or incorrect data is written, and it fails the magic number check (e.g., the 0xEF53 checksum fails). Illegal operation. Forced power-off causes incomplete file system operations (such as fsync) to be interrupted.
[0110] 3) Environment and external factors
[0111] Extreme temperature effects. For example, high temperature causes the storage chip to slow down: triggering I / O timeouts, and the file system is marked as the dirty state. NAND read and write errors at low temperatures: Bit flips occur when data is written, corrupting the file content. Physical shock or aging. The device drops, causing the eMMC to become unsoldered: I / O errors occur when accessing the partition (such as EMMC_READ_FAILED). Flash wear leveling failure: After long-term use, the FTL (Flash Translation Layer) algorithm of the storage chip fails, resulting in incorrect logical address mapping.
[0112] Typical problems with the data partition corruption of the Android system are as follows:
[0113] 1. System startup fails or is abnormal.
[0114] Symptoms: Stuck at the boot logo screen, infinite reboot, prompt "system damaged". Reasons: 1) The / data partition cannot be mounted, causing the system initialization process to be interrupted (e.g., the init process cannot read the configuration files under / data). 2) The runtime data on which key system services (such as zygote, system_server) depend is corrupted, triggering a fatal error (such as FATAL EXCEPTION).
[0115] 2. Application crashes or data loss.
[0116] Symptoms: The application crashes, user data (such as chat records, game progress) disappears, and the database reports an error (such as SQLiteDatabaseCorruptException). Reasons: 1) The private directory of the application ( / data / data / <package_name>) is damaged, causing the configuration files and databases to be unreadable. 2) Files in the application cache ( / data / cache) or media storage ( / data / media) are damaged, triggering an I / O exception.
[0117] 3. User settings and account information are abnormal.
[0118] Symptoms: System language / time zone reset, Wi-Fi password lost, Google account automatically logged out, fingerprint / face recognition fails. Reasons: 1) Configuration files under / data / system / (such as settings.db, accounts.db) are corrupted, causing the system to be unable to load user configurations. 2) Encryption keys (such as gatekeeper.password.key) are lost, triggering security subsystem failures.
[0119] 4. Internal storage cannot be accessed.
[0120] Symptoms: Prompt "Storage is corrupted and needs to be formatted", contents of the album / download directory disappear, and the file manager cannot browse files. Reasons: 1) F2FS / EXT4 file system metadata (such as superblock, inode table) is corrupted, causing the partition to be unable to be mounted or file indexing to be lost. 2) The journal is corrupted, causing the file system to enter "read-only" mode and reject write operations.
[0121] 5. Encryption and security functions fail.
[0122] Symptoms: When the device starts up, it prompts "Decryption failed", forced factory reset, and TEE (Trusted Execution Environment) reports an error. Reasons: 1) Encryption metadata (such as metadata partition or footer information) is corrupted, causing the user data to be unable to be decrypted. 2) The Keymaster key store ( / data / misc / keystore / ) is corrupted, affecting application signature verification and data encryption.
[0123] 6. OTA updates and system recovery fail.
[0124] 7. Performance degradation and abnormal behavior.
[0125] Symptoms: The device runs slowly, the storage read / write speed is extremely slow, and a large number of "ANR" (Application Not Responding) pop-ups appear. Reasons: 1) File system fragmentation or an increase in bad blocks triggers I / O retries and timeouts. 2) The logging system (such as logcat) cannot record due to storage failures, masking deeper errors.
[0126] 8. Hardware-level chain reaction.
[0127] Symptoms: eMMC / UFS chip reports an error (such as I / O error), the device gets hot, and freezes frequently. Reasons: 1) The storage chip enters the protection mode due to a corrupted partition table and refuses further read / write operations. 2) The FTL (Flash Translation Layer) algorithm fails due to metadata errors, causing logical address confusion.
[0128] In some embodiments, to avoid the above problems caused by the corruption of the data configuration partition, the steps of starting the display device 200 may include: in response to a power-on instruction, controlling the bootloader module to detect whether the file system of the data partition is damaged. If the file system is damaged, controlling the bootloader module to set the data in the data partition to a target character. The target character is used to indicate that the data in the data partition needs to be formatted. Mounting the file system based on the data (target character) in the current data partition will necessarily fail, but after the file system mounting fails, it can be determined that the data in the data partition needs to be formatted by detecting that the data in the data partition is the target character. After formatting the data in the data partition, obtain the backup data of the data partition from a preset storage area, and remount the file system based on the backup data.
[0129] The data partition includes a system data partition and a user data partition. The system data partition is mainly used to store core files of the operating system, bootloader / program modules, drivers, configuration files, and other data directly related to system operation. The user data partition is used to store personal files of the user, such as documents, pictures, videos, music, and data of application programs. In response to a power-on instruction, the bootloader module can be controlled to detect whether the file systems of the system data partition and / or the user data partition are damaged.
[0130] The steps of controlling the bootloader module to detect whether the file system of the data partition is damaged include: controlling the bootloader module to determine whether the target key identification field "Magic Number" in the superblock of the data partition is the same as a preset field. If the target key identification field is the same as the preset field, it is detected that the file system of the data partition is not damaged. If the target key identification field is not the same as the preset field, it is detected that the file system of the data partition is damaged. The preset field for each data partition is common.
[0131] In a file system, the superblock contains important metadata and status information of the file system. The magic number is a special identifier in the superblock. The magic number is used to uniquely identify the type of the file system. Different file systems have different magic numbers, and the operating system determines the type of the file system by reading the magic number. For example, in the EXT4 file system of Linux, the superblock will contain a specific magic number, which enables the operating system to distinguish EXT4 from other types of file systems. The magic number can be used as a simple verification mechanism to ensure the consistency of the file system. If a certain partition or volume on the disk does not start with the expected magic number, it is very likely that this partition or volume has not been correctly formatted or is damaged.
[0132] When the file system is damaged, it is possible to control the boot loading module to set the partition header data in the data partition to a target character, or control the boot loading module to set all the data in the data partition to the target character.
[0133] After detecting that the file system is damaged, control the display 260 to display a prompt page, which is used to prompt the user that the data partition is damaged and a message indicating that redeployment is in progress. This prompt message can timely remind the user of the current status of the display device 200 and avoid user dissatisfaction caused by a long boot time. Exemplarily, as Figure 6 shown, the prompt page includes a prompt message 61. The prompt message 61 is: The data partition is detected to be damaged, and the erase and redeployment actions are being performed. Please wait.
[0134] In the embodiment of the present application, after the boot loading module is started at the boot stage, by detecting a key identification field "magic number" in the superblock of the file system, it is used to verify whether the data partition is a legal file system or whether the file system is damaged. If this file system is damaged, all the bytes of this data partition are automatically filled with 0 during the boot loading stage, so as to ensure that automatic formatting will occur in the Android system, avoid many problems caused by running the system when the data partition is damaged, and thus ensure the normal operation of the system.
[0135] In some embodiments, the step of receiving a user instruction to restore the factory settings includes: receiving a user instruction to open the settings page, controlling the display 260 to display the settings page, and the settings page includes a factory reset control. Receiving the user's confirmation operation on the factory reset control.
[0136] Exemplarily, as Figure 7 shown, the settings page includes a factory reset control 71 and a focus 72. The current focus 72 indicates that the factory reset control 71 is selected. After receiving the user's instruction to press the confirmation key of the control device 100, the instruction to restore the factory settings can be input.
[0137] In some embodiments, the step of receiving a user instruction to restore the factory settings includes: receiving a user instruction to restore the factory settings by pressing a preset native key of the display device 200 for a preset duration. The preset native key can be a power on / off key, a volume key, etc. set on the display device 200 itself, or a key specifically set for the factory reset function. By setting the native key corresponding to the factory reset function, the user can still input the instruction to restore the factory settings when the user interface cannot be normally displayed or the user interface is stuck on a certain page, that is, when it is impossible to start or enter the settings page, thus solving the fault problem of the display device 200.
[0138] To prevent the user from accidentally touching the preset physical button of the device and triggering the factory reset function. When receiving the information that the user presses the preset physical button of the device, start a timer. If the duration recorded by the timer exceeds the preset duration and the information that the user lifts the preset physical button of the device is not received, generate a factory reset instruction and send the instruction to the settings module. If the information that the user lifts the preset physical button of the device is received before the duration recorded by the timer exceeds the preset duration, there is no need to generate a factory reset instruction. Exemplarily, the preset duration is 10 seconds.
[0139] In some embodiments, the step of receiving an instruction for the user to input a factory reset includes: receiving an instruction for the user to input a factory reset by pressing a preset combination button of the control device 100. Exemplarily, the preset combination button may be the channel up - channel up - volume down - volume down - confirmation button. Embodiments of the present application can also input an instruction for a factory reset when the device cannot be started or enter the settings page.
[0140] Step S502: Send a factory reset broadcast and obtain the length of the ordered broadcast queue.
[0141] In some embodiments, after receiving an instruction for the user to input a factory reset, a factory reset broadcast can be immediately sent, and the length of the ordered broadcast queue can be obtained. Among them, the factory reset broadcast is an ordered broadcast.
[0142] In some embodiments, after receiving an instruction for the user to input a factory reset, the display 260 can be controlled to display a factory reset page. The factory reset page includes a secure erase control, a normal erase control, and a retain erase control.
[0143] Exemplarily, as Figure 8 shown, the factory reset page includes a secure erase control 81, a normal erase control 82, a retain erase control 83, and a focus 72. The current focus 72 indicates that the secure erase control 81 is selected. Instructions for the user to press the up and down keys of the control device 100 can be received to move the position of the focus 72 to select different erase controls.
[0144] Secure erase refers to erasing all user data partitions by writing all zeros or random data. Normal erase refers to notifying the controller that certain data blocks are no longer in use and can be overwritten during subsequent writing, that is, deleting the index. Retain erase means retaining some user data according to the user's selection.
[0145] When receiving the user's confirmation operation on the secure erase control, send a first factory reset broadcast. The first factory reset broadcast includes a first erase flag bit, and the first erase flag bit is used to indicate erasing all data in the user data partition. The target application can erase all data in the user data partition after receiving the first factory reset broadcast.
[0146] The target application includes applications downloaded and installed by the user himself, that is, applications other than system pre-installed applications. System pre-installed applications refer to applications that have been installed when the display device 200 is first turned on or applications that are automatically installed after system upgrade.
[0147] Exemplarily, when the setting module receives the user's confirmation operation on Figure 8 the secure erase control 81 in it, send a factory reset broadcast carrying the first erase flag bit. After receiving the factory reset broadcast, the target application 1 parses out the first erase flag bit, performs a full erasure process on the user data partition according to the first erase flag bit, and then sends the factory reset broadcast carrying the first erase flag bit to the target application 2. The target application 2 performs the same operation as the target application 1. The value of the first erase flag bit can be set to 01.
[0148] When receiving the user's confirmation operation on the normal erase control, send a second factory reset broadcast. The second factory reset broadcast includes a second erase flag bit, and the second erase flag bit is used to indicate deleting the index of the user data partition. The target application can delete the index of the user data partition after receiving the second factory reset broadcast.
[0149] Exemplarily, when the setting module receives the user's confirmation operation on Figure 8 the normal erase control 82 in it, send a factory reset broadcast carrying the second erase flag bit. After receiving the factory reset broadcast, the target application 1 parses out the second erase flag bit, performs an erasure process on the index of the user data partition according to the second erase flag bit, and then sends the factory reset broadcast carrying the second erase flag bit to the target application 2. The target application 2 performs the same operation as the target application 1. The value of the second erase flag bit can be set to 02.
[0150] When receiving the user's confirmation operation on the retention erase control, control the display 260 to display a data retention selection page.
[0151] In some embodiments, the data retention selection page includes a first data control and a second data control. The first data control is used to represent retaining the downloaded applications and the data stored in the cloud. The second data control is used to represent retaining the media data uploaded to the inside of the display device 200, and the media data includes videos, audios, pictures, documents, etc. Among them, the retained data can be further divided. For example, the downloaded applications and the data stored in the cloud can be provided with separate controls for the user to select.
[0152] Exemplarily, when the setting module receives the confirmation operation of the user on the Figure 8 retain erase control 83 in, the data retention selection page is displayed. As Figure 9 shown, the data retention selection page includes a first data control 91, a second data control 92, a confirmation control 93, a return control 94, and a focus 72. The current focus 72 indicates that the first data control 91 is selected. After receiving the confirmation operation of the user on the confirmation control 93, a third factory reset broadcast can be sent. After receiving the confirmation operation of the user on the return control 94, the display can be controlled to display the factory reset page as Figure 8 shown. After receiving the instruction of the user pressing the up and down keys of the control device 100 to input and move the position of the focus 72, different data controls can be selected.
[0153] In the case of receiving the confirmation operation of the user on the first data control, a third factory reset broadcast is sent. The third factory reset broadcast includes a third erase flag bit and a first data retention flag bit. The third erase flag bit is used to indicate retaining the data corresponding to the data retention flag bit. The first data retention flag bit is used to indicate retaining the downloaded applications and the data stored in the cloud. The target application can erase the data in the user data partition except for the downloaded applications and the data stored in the cloud after receiving the third factory reset broadcast.
[0154] Exemplarily, when the setting module receives the confirmation operation of the user on the Figure 8 retain erase control 83 in and Figure 9 the selection operation of the first data control 91 in, a factory reset broadcast carrying the third erase flag bit and the first data retention flag bit is sent. After the target application 1 receives the factory reset broadcast and parses out the third erase flag bit and the first data retention flag bit, it erases the data in the user data partition except for the downloaded applications and the data stored in the cloud, and then sends the factory reset broadcast carrying the third erase flag bit and the first data retention flag bit to the target application 2, and the target application 2 performs the same operation as the target application 1. The value of the third erase flag bit can be set to 03, and the value of the first data retention flag bit can be set to 01.
[0155] Upon receiving the user's confirmation operation on the second data control, a third factory reset broadcast is sent, and the third factory reset broadcast includes a third erase flag bit and a second data retention flag bit. The second data retention flag bit is used to indicate the retention of media data uploaded to the internal display device 200. The target application can erase the data in the user data partition except for the media data uploaded to the display device 200 after receiving the third factory reset broadcast.
[0156] Exemplarily, upon receiving the user's confirmation operation on Figure 8 the retention erase control 83 in Figure 9 and the selection operation of the second data control 92 in
[0157] a factory reset broadcast carrying the third erase flag bit and the second data retention flag bit is sent. After receiving the factory reset broadcast and parsing out the third erase flag bit and the second data retention flag bit, the target application 1 erases the data in the user data partition except for the media data uploaded to the display device 200, and then sends the factory reset broadcast carrying the third erase flag bit and the second data retention flag bit to the target application 2, and the target application 2 performs the same operation as the target application 1. The value of the second data retention flag bit can be set to 02.
[0157] In some embodiments, upon receiving the user's confirmation operations on the first data control and the second data control in sequence, a factory reset broadcast carrying the third erase flag bit, the first data retention flag bit, and the second data retention flag bit is sent, so that the target application erases the data in the user data partition except for the downloaded applications, the data stored in the cloud, and the media data uploaded to the display device 200.
[0158] In some embodiments, in order to facilitate the user to more specifically retain the desired data during the factory reset, the data retention selection page may further include at least one target application control, and the target application is an application that the user has downloaded and installed. Upon receiving the user's confirmation operation on the target application control, the application data corresponding to the target application control can be retained during the factory reset.
[0159] Exemplarily, upon receiving the user's confirmation operation on Figure 8 the retention erase control 83 in Figure 10 the data retention selection page is displayed. As
[0160] shown, the data retention selection page includes a first target application control 101, a second target application control 102, a third target application control 103, a confirmation control 93, a return control 94, and a focus 72. The current focus 72 indicates that the first target application control 101 is selected. Instructions for the user to press the up and down keys of the control device 100 can be received to move the position of the focus 72 to select at least one target application control.
[0160] Upon receiving a user's selection operation on a target application control, send a fourth factory reset broadcast and lower the priority of the broadcast receiver of the target application, so that the broadcast receiver of the target application does not receive the fourth factory reset broadcast, that is, does not perform operations related to erasing the user data partition.
[0161] Exemplarily, after the setting module receives the user's Figure 8 confirmation operation of the erase control 83 and the Figure 10 selection operation of the second target application control 102 in, send a factory reset broadcast and lower the priority of the second target application broadcast receiver. The original order for the application broadcast receivers to receive is the first target application, the second target application, the third target application... Now the order for the application broadcast receivers to receive is the first target application, the third target application... After receiving the factory reset broadcast, the first target application performs a full erasure process on the user data partition, and then sends the factory reset broadcast to the third target application, and the third target application performs the same operation as the first target application.
[0162] In some embodiments, options for a secure erase control, a normal erase control, and a retention erase control can also be set for each target application, so that the user can set the corresponding data erasure method for each target application.
[0163] When inputting a factory reset instruction in the form of pressing a local key or a combination of keys on the control device 100, it is still necessary to display the factory reset page, and in the case where the page does not display or is stuck, the operation of quickly performing a factory reset cannot be carried out. To solve the above problems, after receiving the user's input of a factory reset instruction, the instruction source can be obtained. If the instruction source is a local key or a combination of keys on the control device 100, directly execute the steps of sending a factory reset broadcast and obtaining the length of the ordered broadcast queue. If the instruction source is the selection of a factory reset control, execute the step of controlling the display 260 to display the factory reset page.
[0164] Step S503: Determine whether the length of the ordered broadcast queue is greater than or equal to a preset length.
[0165] If the length of the ordered broadcast queue is greater than or equal to the preset length, then execute step S504: Create a broadcast receiver for factory reset and start a timer.
[0166] If the length of the ordered broadcast queue is less than the preset length, create a broadcast receiver for factory reset, and perform the operation of restarting and entering the recovery mode after the broadcast receiver receives the factory reset broadcast.
[0167] The recovery mode is used to restore the display device to the factory settings state. The steps to perform a restart and enter the recovery mode include: in response to a restart instruction, perform a restart operation, interrupt the current process, and reload the bootloader module. When the bootloader module detects a recovery flag bit, such as when recovery_mode = 1, it skips the normal startup process and loads the recovery mode kernel. Obtain the erase flag bit, perform the data erasure / formatting operation corresponding to the erase flag bit, obtain backup data from a preset storage area, write the backup data to the formatted partition, and remount the file system based on the backup data. Clear the recovery flag bit, restart the display device, and enter the normal system startup process.
[0168] Step S505: Determine whether the broadcast receiver receives a factory reset broadcast within the timer timing period.
[0169] If the broadcast receiver does not receive a factory reset broadcast within the timer timing period, perform Step S506: Perform a restart and enter the recovery mode operation after the timer timing ends.
[0170] In some embodiments, if the broadcast receiver does not receive a factory reset broadcast within the timer timing period, a prompt page can be displayed. The prompt page is used to prompt that in order to perform the factory reset operation as soon as possible, some application data has not been cleared in a timely manner. An option for the user to wait or not can also be provided on the prompt page. If an instruction to select waiting is received from the user, after the first timer timing ends, instead of performing a restart and entering the recovery mode operation, the timer is started again, and the step of determining whether the broadcast receiver receives a factory reset broadcast within the second timer timing period is performed. If an instruction to select not waiting is received from the user, the restart and enter the recovery mode operation is immediately performed.
[0171] If the broadcast receiver receives a factory reset broadcast within the timer timing period, perform Step S507: Perform a restart and enter the recovery mode operation.
[0172] That the length of the ordered broadcast queue is greater than or equal to the preset length indicates that the ordered broadcast queue may be blocked. The setting module can start a timer while creating the broadcast receiver for the factory reset. After the setting module sends the broadcast for the factory reset, it also creates its broadcast receiver. It can determine that all target applications have completed the data erasure operation after its broadcast receiver receives the factory reset broadcast, so that the restart and enter the recovery mode operation can be performed. If the broadcast receiver does not receive a factory reset broadcast within the timer timing period, it can restart and enter the recovery mode after the timer timing ends. If the broadcast receiver receives a factory reset broadcast within the timer timing period, it can directly restart and enter the recovery mode. The preset length can be set to 1, and the timer timing period can be set to 30 seconds.
[0173] The length of the ordered broadcast queue being less than the preset length indicates that the ordered broadcast queue may not be blocked. The setting module only needs to create a broadcast receiver for restoring the factory settings and does not need to start a timer.
[0174] In some embodiments, the data recovery method may be as Figure 11 shown. After receiving the instruction from the user to restore the factory settings, the setting module displays a page for restoring the factory settings. The page for restoring the factory settings includes a secure erase control, a normal erase control, and a retention erase control. After receiving the selection operation of one of the above erase controls by the user, the setting module sends a broadcast for restoring the factory settings, and the broadcast for restoring the factory settings carries an erase flag bit corresponding to the selected erase control by the user. The setting module obtains the length of the ordered broadcast queue and determines whether the length of the ordered broadcast queue is greater than or equal to 1. If the length of the ordered broadcast queue is greater than or equal to 1, a broadcast receiver for the broadcast of restoring the factory settings is created, and a timer is started. The setting module determines whether the broadcast receiver receives the broadcast of restoring the factory settings within the timing time of the timer. If the broadcast receiver receives the broadcast of restoring the factory settings within the timing time of the timer, it indicates that the ordered broadcast sequence is not blocked and the broadcast process is executed normally. After the broadcast receiver receives the broadcast of restoring the factory settings, a restart can be performed, and it is displayed that the device can enter the recovery mode after restarting. Broadcast process: Target application 1 first receives the broadcast of restoring the factory settings, performs the data erasure operation corresponding to the erase flag bit, and then sends the broadcast of restoring the factory settings to target application 2... After target application N performs the data erasure operation corresponding to the erase flag bit, it can send the broadcast of restoring the factory settings to the setting module. If the broadcast receiver does not receive the broadcast of restoring the factory settings within the timing time of the timer, it indicates that the ordered broadcast sequence is blocked, and there is a timeout or time-consuming operation in a certain step of the broadcast process. A restart can be performed after the timing of the timer ends, and it is displayed that the device can enter the recovery mode after restarting. If the length of the ordered broadcast queue is less than 1, only a broadcast receiver for the broadcast of restoring the factory settings is created, and the timer is not started. The process is the same as Figure 4 the steps of
[0175] The embodiment of the present application can automatically identify the damage of the data configuration partition and repair it by itself for the case of data configuration partition damage. An overtime mechanism is introduced for the broadcast of restoring the factory settings to ensure that it will not fail to execute due to the blocking of the ordered broadcast, reducing the user's machine return. The restoration of the factory settings for the Android system is deeply customized to adapt to multiple options for the user to choose. For the scenario where the device cannot be started or cannot enter the settings menu to select the restoration of the factory settings, a trigger method of forcibly restoring the factory settings by long pressing the local key is added to ensure that the display device can run correctly again.
[0176] Some embodiments of the present application also provide a computer-readable storage medium, which can store a program. When the computer-readable storage medium is configured in a display device or a server, the program can include the program steps involved in the data recovery method in the above embodiments when executed. Among them, the computer storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM for short), a random access memory (RAM for short), etc.
[0177] An embodiment of the present application provides an electronic device, which includes: a processor and a memory for storing executable instructions of the processor. Among them, the processor is used to read the executable instructions from the memory and execute the instructions to implement the data recovery method in the above embodiments.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0179] For the sake of convenience of explanation, the above description has been made in combination with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. According to the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are for better explaining the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that, Including: A display; Configured to display a user interface; A controller, coupled to the display and configured to: After receiving an instruction from the user to restore the factory settings, send a factory reset broadcast and obtain the length of the ordered broadcast queue, where the factory reset broadcast is an ordered broadcast; If the length of the ordered broadcast queue is greater than or equal to a preset length, create a broadcast receiver for the factory reset and start a timer; If the broadcast receiver does not receive the factory reset broadcast within the timing period of the timer, perform an operation of restarting and entering the recovery mode after the timer expires, where the recovery mode is used to restore the display device to the factory settings state.
2. The display device according to claim 1, wherein Before receiving the instruction from the user to restore the factory settings, the controller is further configured to: In response to a power-on instruction, control the bootloader module to detect whether the file system of the data partition is damaged; If the file system is damaged, control the bootloader module to set the data in the data partition to a target character, where the target character is used to indicate formatting of the data in the data partition; After failing to mount the file system based on the data in the data partition and detecting that the data in the data partition is set to the target character, format the data in the data partition and obtain backup data of the data partition from a preset storage area; Remount the file system based on the backup data.
3. The display device according to claim 2, characterized in that, When the controller controls the bootloader module to detect whether the file system of the data partition is damaged, it is further configured to: Control the bootloader module to determine whether a target key identification field in the superblock of the data partition is the same as a preset field; If the target key identification field is the same as the preset field, it is detected that the file system of the data partition is not damaged; If the target key identification field is different from the preset field, it is detected that the file system of the data partition is damaged.
4. The display device according to claim 1, characterized in that, When the controller sends a factory reset broadcast after receiving the instruction from the user to restore the factory settings, it is further configured to: After receiving an instruction from the user to open the factory reset page, control the display to display the factory reset page, where the factory reset page includes a secure erase control, a normal erase control, and a retention erase control; In the case of receiving a confirmation operation from the user on the secure erase control, send a first factory reset broadcast, so that the target application erases the data in the user data partition after receiving the first factory reset broadcast. The first factory reset broadcast includes a first erase flag bit, where the first erase flag bit is used to indicate erasing the data in the user data partition, and the target application includes applications other than system pre-installed applications.
5. The display device according to claim 4, wherein After the controller controls the display to display the factory reset page, it is further configured to: Upon receiving the user's confirmation operation on the normal erasure control, send a second factory reset broadcast, so that the target application deletes the index of the user data partition after receiving the second factory reset broadcast. The second factory reset broadcast includes a second erasure flag bit, and the second erasure flag bit is used to indicate the deletion of the index of the user data partition.
6. The display device according to claim 4, wherein After the controller executes to control the display to show the factory reset page, it is further configured as follows: Upon receiving the user's confirmation operation on the reserved erasure control, send a third factory reset broadcast, so that the target application erases the data in the user data partition except the data corresponding to the data retention flag bit after receiving the third factory reset broadcast. The third factory reset broadcast includes a third erasure flag bit and a data retention flag bit. The third erasure flag bit is used to indicate retaining the data corresponding to the data retention flag bit, and the data retention flag bit is used to represent the data selected by the user to be retained.
7. The display device according to claim 1, characterized in that, After the controller executes to receive the user's instruction to perform a factory reset, it is further configured as follows: Receive the user's instruction to perform a factory reset input by pressing a preset native button of the display device for more than a preset duration.
8. The display device according to claim 1, wherein After the controller executes to obtain the length of the ordered broadcast queue, it is further configured as follows: If the length of the ordered broadcast queue is less than the preset length, create a broadcast receiver for the factory reset, and perform the operation of restarting and entering the recovery mode after the broadcast receiver receives the factory reset broadcast.
9. A data recovery method, characterized in that, Including: After receiving the user's instruction to perform a factory reset, send a factory reset broadcast and obtain the length of the ordered broadcast queue. The factory reset broadcast is an ordered broadcast; If the length of the ordered broadcast queue is greater than or equal to the preset length, create a broadcast receiver for the factory reset and start a timer; If the broadcast receiver does not receive the factory reset broadcast within the timing time of the timer, perform the operation of restarting and entering the recovery mode after the timer times out. The recovery mode is used to restore the display device to the factory settings state.
10. The method according to claim 9, wherein Before receiving the user's instruction to perform a factory reset, the method further includes: In response to the power-on instruction, control the bootloader module to detect whether the file system of the data partition is damaged; If the file system is damaged, control the bootloader module to set the data in the data partition to a target character, and the target character is used to indicate formatting the data in the data partition; After the file system mounting fails based on the data in the data partition and it is detected that the data in the data partition is set to the target character, format the data in the data partition and obtain the backup data of the data partition from a preset storage area; Remount the file system based on the backup data.