Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly
Chu, it is fully described by, it is clear that described embodiment is a part of embodiment of the present invention rather than all
Embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative labor
The every other embodiment obtained under dynamic premise, broadly falls into the scope of protection of the invention.
The invention provides restoration methods and the terminal of a kind of WLAN account, the premise of the present invention be to
System adds the service of WLAN Backup and Restore, and this WLAN Backup and Restore service has Root authority, can visit
Ask system file.It is described in detail individually below.
The embodiment of the present invention achieves backup and recovers the scheme of WLAN account, and Fig. 1 is that the present invention is real
Execute the flow chart of a kind of WLAN account reset mode in example.
The described method of the embodiment of the present invention at least includes as shown in the figure:
Step S101, it is judged that whether terminal meets WLAN account is recovered condition.
WLAN Backup and Restore service may determine that whether terminal meets WLAN account and recover condition, its
Middle WLAN account recovers condition can include detecting that terminal is to start or recover for the first time after brush machine
Factory starts after arranging for the first time.If terminal meets WLAN account recovers condition, then implement step S102;
If terminal is unsatisfactory for WLAN account recovers condition, then continue to judge whether terminal meets WLAN
Account recovers condition.
Step S102, obtains at least one WLAN account of storage in safe digital card or the webserver
Number information.
In implementing, WLAN Backup and Restore service judges that terminal meets WLAN account and recovers condition
Time, obtain WLAN account restoration path information;Road is recovered according to the WLAN account got
Footpath information, obtains SD card (Secure Digital Memory Card, safe digital card) or the webserver
At least one WLAN account information of middle storage.
Wherein WLAN account information can include WLAN account and described WLAN account
Corresponding checking information, checking information can include password corresponding to described WLAN account, encryption side
The information such as formula and priority.
As the optional embodiment of one, WLAN Backup and Restore service judges whether terminal meets wireless office
Before the net account recovery condition of territory, it is also possible to judge that WLAN connects the most successful.If wireless local
Network connects unsuccessful, then the service of WLAN Backup and Restore continues to judge that WLAN connection is the most successful;
If WLAN successful connection, then the service of WLAN Backup and Restore is according to setting up described WLAN
The WLAN account of input during connection, reads from the WLAN account memory block of described system file
Take WLAN account information, and the WLAN account information read is stored SD card or network
In server.
As the optional embodiment of one, the WLAN account that WLAN Backup and Restore service will read
Before number information stores in described safe digital card or the described webserver, it may be determined that SD card or network
Server does not exist and sets up the nothing that when described WLAN connects, the WLAN account of input is corresponding
Line LAN account information.Exist in determining SD card or the webserver and set up described WLAN even
The WLAN account information that when connecing, the WLAN account of input is corresponding, and this WLAN account
Number corresponding WLAN account information reads with from the WLAN account memory block of system file
WLAN account information inconsistent time, delete the described WLAN in SD card or the webserver
The WLAN account information that account is corresponding.Exist in determining SD card or the webserver and set up described nothing
The WLAN account information that when line LAN connects, the WLAN account of input is corresponding, and should
WLAN account information corresponding to WLAN account is deposited with the WLAN account from system file
When the WLAN account information that reads in storage area is consistent, WLAN Backup and Restore service will abandon from
The WLAN account information read in the WLAN account memory block of system file.
Step S103, deposits the WLAN account of described WLAN account information writing system file
Storage area.
WLAN Backup and Restore service acquisition is at least one wireless office of storage in SD card or the webserver
After the net account information of territory, by the WLAN account of described WLAN account information writing system file
Number memory block, it is achieved the recovery of WLAN account.
In the restoration methods of the WLAN account described by Fig. 1, by judging that terminal meets wireless office
When territory net account recovers condition, obtain at least one WLAN account of storage in SD card or the webserver
Number information, by the WLAN account of the described WLAN account information writing system file got
Memory block;Before judging whether mobile terminal meets WLAN account recovery condition, it is also possible in nothing
During line LAN successful connection, read WLAN from the WLAN account memory block of system file
Account information, and backup in SD card or the webserver, in order to automated back-up and automatic recovery system
WLAN account information in the WLAN account memory block of file, in order to user reconnects
The simple operation of the WLAN account previously connected, promotes Consumer's Experience.
Fig. 2 is the flow chart of another kind of WLAN account reset mode, wherein Fig. 2 in the embodiment of the present invention
In the restoration methods of shown WLAN account, WLAN account information backups in SD card.
As in figure 2 it is shown, the restoration methods of this WLAN account may comprise steps of:
Step S201, it is judged that WLAN connects the most successful.
Before implementing the embodiment of the present invention, add the service of WLAN Backup and Restore to the startup script of system.Eventually
The WLAN account information that end can be set up user when WLAN connects is saved in system file
In WLAN account memory block, when user is by terminal brush machine or factory reset, it is saved in system literary composition
WLAN account information in the WLAN account memory block of part will be cleared, and further uses
Family can not operating system file when not obtaining Root authority.And according to the rights management of operating system,
During start, int process can read system start-up information from starting script file and start respective service, the clothes of startup
Business acquiescence has Root authority, as long as Root authority is the most actively abandoned in this service, it is possible to access system file.
Therefore WLAN Backup and Restore service operation information, int process meeting during start are added to the startup script of system
Starting the service of WLAN Backup and Restore, this service the most just has Root authority, can be with read-write system file
WLAN account information in WLAN account memory block.
After the startup script of system adds the service of WLAN Backup and Restore, WLAN Backup and Restore service can
The most successful to judge that WLAN connects.If WLAN successful connection, then implement step S202;
If WLAN connects unsuccessful, then continue to judge that WLAN connects the most successful.
Step S202, according to setting up the WLAN account of input when WLAN connects, from system
The WLAN account memory block of file is read WLAN account information.
After WLAN successful connection, WLAN Backup and Restore service is according to setting up WLAN even
When connecing, the WLAN account of input, reads wireless from the WLAN account memory block of system file
LAN account information.WLAN Backup and Restore service now has Root authority, can read system
WLAN account information in the WLAN account memory block of file.
Wherein WLAN account information can include WLAN account and described WLAN account
Corresponding checking information, checking information can include password corresponding to described WLAN account, encryption side
The information such as formula and priority.
Step S203, determine safe digital card does not exist set up WLAN connect time input wireless
The WLAN account information that LAN account is corresponding.
WLAN Backup and Restore service reads wireless office from the WLAN account memory block of system file
After the net account information of territory, it may be determined that SD card does not exist set up WLAN connect time input wireless
The WLAN account information that LAN account is corresponding.
As the optional embodiment of one, WLAN Backup and Restore service determines to exist in SD card sets up nothing
During the WLAN account information that when line LAN connects, the WLAN account of input is corresponding, permissible
Further determine that wireless with from system file of WLAN account information corresponding to this WLAN account
The WLAN account information read in LAN account memory block is inconsistent, and deletes the institute in SD card
State the WLAN account information that WLAN account is corresponding.
As the optional embodiment of one, WLAN Backup and Restore service determines this WLAN account pair
The WLAN account information answered and the nothing read from the WLAN account memory block of system file
When line LAN account information is consistent, can abandon and read from the WLAN account memory block of system file
The WLAN account information got, implements step S205 further.
Step S204, stores the WLAN account information read in safe digital card.
WLAN Backup and Restore service determines not exist in SD card sets up input when WLAN connects
During WLAN account information corresponding to WLAN account, by from the WLAN account of system file
The WLAN account information read in number memory block stores in SD card, it is achieved WLAN account
Backup.
Step S205, obtains at least one WLAN account information of storage in safe digital card.
In implementing, WLAN Backup and Restore service starts or extensive after terminal is brush machine for the first time detecting
When starting for the first time after multiple Default Value, obtain WLAN account restoration path information;According to getting
WLAN account restoration path information, local obtain at least one WLAN stored in SD card
Account information.
Step S206, the WLAN account of WLAN account information writing system file that will get
Number memory block.
WLAN Backup and Restore service acquisition is at least one WLAN account information of storage in SD card
Afterwards, by the WLAN account memory block of described WLAN account information writing system file, real
The recovery of existing WLAN account.
In the restoration methods of the WLAN account described by Fig. 2, in WLAN successful connection
Time, WLAN is read in the service of WLAN Backup and Restore from the WLAN account memory block of system file
Account information, and backup in SD card;Open for the first time after terminal is brush machine or factory reset detecting
Time dynamic, obtain at least one the WLAN account information in SD card, the WLAN account that will get
The WLAN account memory block of number information writing system file, in order to automated back-up and automatically recovering
WLAN account information in the WLAN account memory block of system file, in order to user is again
Connect the simple operation of the WLAN account previously connected, promote Consumer's Experience.
Fig. 3 is the flow chart of another WLAN account reset mode, wherein Fig. 3 in the embodiment of the present invention
In the restoration methods of shown WLAN account, WLAN account information is to backup to the webserver
In.As it is shown on figure 3, the restoration methods of this WLAN account may comprise steps of:
Step S301, it is judged that WLAN connects the most successful.
Before implementing the embodiment of the present invention, add the service of WLAN Backup and Restore to the startup script of system.Eventually
The WLAN account information that end can be set up user when WLAN connects is saved in system file
In WLAN account memory block, when user is by terminal brush machine or factory reset, it is saved in system literary composition
WLAN account information in the WLAN account memory block of part will be cleared, and further uses
Family can not operating system file when not obtaining Root authority.And according to the rights management of operating system,
During start, int process can read system start-up information from starting script file and start respective service, the clothes of startup
Business acquiescence has Root authority, as long as Root authority is the most actively abandoned in this service, it is possible to access system file.
Therefore WLAN Backup and Restore service operation information, int process meeting during start are added to the startup script of system
Starting the service of WLAN Backup and Restore, this service the most just has Root authority, can be with read-write system file
WLAN account information in WLAN account memory block.
After the startup script of system adds the service of WLAN Backup and Restore, WLAN Backup and Restore service can
The most successful to judge that WLAN connects.If WLAN successful connection, then implement step S302;
If WLAN connects unsuccessful, then continue to judge that WLAN connects the most successful.
Step S302, according to setting up the WLAN account of input when WLAN connects, from system
The WLAN account memory block of file is read WLAN account information.
After WLAN successful connection, WLAN Backup and Restore service is according to setting up WLAN even
When connecing, the WLAN account of input, reads wireless from the WLAN account memory block of system file
LAN account information.WLAN Backup and Restore service now has Root authority, can read system
WLAN account information in the WLAN account memory block of file.
Wherein WLAN account information can include WLAN account and described WLAN account
Corresponding checking information, checking information can include password corresponding to described WLAN account, encryption side
The information such as formula and priority.
Step S303, determine the webserver does not exist set up WLAN connect time input wireless
The WLAN account information that LAN account is corresponding.
WLAN Backup and Restore service reads wireless office from the WLAN account memory block of system file
After the net account information of territory, it may be determined that the webserver does not exist and sets up input when WLAN connects
WLAN account information corresponding to WLAN account.
As the optional embodiment of one, WLAN Backup and Restore service determines to exist in the webserver builds
During the WLAN account information that when vertical WLAN connects, the WLAN account of input is corresponding,
May further determine that WLAN account information corresponding to this WLAN account with from system file
The WLAN account information read in WLAN account memory block is inconsistent, and deletes network clothes
WLAN account information corresponding to described WLAN account in business device.
As the optional embodiment of one, WLAN Backup and Restore service determines this WLAN account pair
The WLAN account information answered and the nothing read from the WLAN account memory block of system file
When line LAN account information is consistent, can abandon and read from the WLAN account memory block of system file
The WLAN account information got, implements step S305 further.
Step S304, stores the WLAN account information read in the webserver.
WLAN Backup and Restore service determine the webserver does not exist set up WLAN connect time defeated
During WLAN account information corresponding to the WLAN account that enters, by from the wireless local of system file
The WLAN account information read in net account memory block stores in the webserver, it is achieved wireless
The backup of LAN account.
Step S305, local by Internet connection network server.
In implementing, WLAN Backup and Restore service starts or extensive after terminal is brush machine for the first time detecting
When starting for the first time after multiple Default Value, local by Internet connection network server.
Step S306, obtains at least one WLAN account information of storage in the webserver.
After Internet connection network server is passed through in this locality, WLAN Backup and Restore service acquisition WLAN
Account restoration path information;According to the WLAN account restoration path information got, obtain network clothes
At least one WLAN account information of storage in business device.
Step S307, the WLAN account of WLAN account information writing system file that will get
Number memory block.
WLAN Backup and Restore service acquisition is at least one WLAN account of storage in the webserver
After information, by the WLAN account memory block of described WLAN account information writing system file,
Realize the recovery of WLAN account.
In the restoration methods of the WLAN account described by Fig. 3, in WLAN successful connection
Time, WLAN is read in the service of WLAN Backup and Restore from the WLAN account memory block of system file
Account information, and backup in the webserver;Detecting after terminal is brush machine or factory reset
During one-shot, obtain at least one the WLAN account information in the webserver, by get
The WLAN account memory block of WLAN account information writing system file, in order to automated back-up
And the WLAN account information in the WLAN account memory block of automatic recovery system file, with
It is easy to user and reconnects the simple operation of the WLAN account previously connected, promote Consumer's Experience.
Fig. 4 is the structure chart of a kind of terminal in the embodiment of the present invention, and this terminal can include smart mobile phone, the palm
The equipment such as computer, the terminal in the embodiment of the present invention at least can include recovering conditional judgment mould as shown in the figure
Block 401, account information acquisition module 402 and account information recover module 403, wherein:
Recover conditional judgment module 401, be used for judging whether terminal meets WLAN account and recover condition.
Recover conditional judgment module 401 and may determine that whether terminal meets WLAN account and recover condition,
Wherein WLAN account recovery condition can include detecting that terminal is startup for the first time or recovery after brush machine
Start for the first time after Default Value.
Account information acquisition module 402, is used for recovering conditional judgment module 401 and judges that terminal meets wireless local
When net account recovers condition, obtain at least one WLAN account of storage in SD card or the webserver
Information.
As the optional embodiment of one, the account information acquisition module 402 in the embodiment of the present invention is permissible
As it is shown in figure 5, farther include:
Route information acquisition unit 501, is used for obtaining WLAN account restoration path information.
Account information acquiring unit 502, for the wireless local got according to route information acquisition unit 501
Net account restoration path information, obtains at least one WLAN account of storage in SD card or the webserver
Number information.
Wherein WLAN account information can include WLAN account and described WLAN account
Corresponding checking information, checking information can include password corresponding to described WLAN account, encryption side
The information such as formula and priority.
Account information recovers module 403, for the WLAN got by account information acquisition module 402
The WLAN account memory block of account information writing system file, it is achieved the recovery of WLAN account.
As the optional embodiment of one, the terminal in the embodiment of the present invention can also include:
Network connection judgment module 404, is used for judging that WLAN connects the most successful.
When network connection judgment module 404 detects terminal input WLAN account and attempts a connection to, sentence
This WLAN disconnected connects the most successful.
For network connection judgment module 404, account information read module 405, judges that WLAN connects
During success, then according to setting up the WLAN account of input when described WLAN connects, from described
The WLAN account memory block of system file is read WLAN account information.
Account information backup module 406, for the WLAN read by account information read module 405
Account information stores in SD card or the webserver.
As the optional embodiment of one, the terminal in the embodiment of the present invention can also include:
Account information determines module 407, for account information read module 405 from the wireless local of system file
After net account memory block reads WLAN account information, determine in SD card or the webserver and do not deposit
The WLAN account that the WLAN account of input is corresponding when setting up described WLAN and connecting
Information, and trigger account information backup module 406 described WLAN account information is stored SD card or
In the webserver.
Wherein, account information determine module 407 be additionally operable to determine in SD card or the webserver existence described in build
The WLAN account information that when vertical described WLAN connects, the WLAN account of input is corresponding,
And determine WLAN account information corresponding to described WLAN account and the described nothing from system file
The WLAN account information read in line LAN account memory block is inconsistent.
For account information, account information removing module 408, determines that module 407 determines described WLAN account
Number corresponding WLAN account information is read from the WLAN account memory block of system file with described
When the WLAN account information got is inconsistent, delete the described wireless office in SD card or the webserver
The WLAN account information that territory net account is corresponding, and trigger account information backup module 406 by account letter
The WLAN account information that breath read module 405 reads stores in SD card or the webserver.
In the terminal described by Fig. 4 and Fig. 5, it is wireless that recovery conditional judgment module 401 judges that terminal meets
When LAN account recovers condition, account information acquisition module 402 obtains in SD card or the webserver and stores
At least one WLAN account information, account information recovers the wireless local that will get of module 403
The WLAN account memory block of net account information writing system file;Recover conditional judgment module 401 to exist
Before judging whether terminal meets WLAN account recovery condition, account information read module 405 also may be used
With when WLAN successful connection, read wireless from the WLAN account memory block of system file
LAN account information, account information backup module 406 backups in SD card or the webserver, in order to
WLAN account in the WLAN account memory block of automated back-up and automatic recovery system file
Information, in order to user reconnects the simple operation of the WLAN account previously connected, promotes and uses
Family is experienced.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method,
Can be by computer program and complete to instruct relevant hardware, described program can be stored in computer
In read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.
Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory,
Or random store-memory body (Random Access Memory, RAM) etc. ROM).
It should be noted that in the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, certain
The part being not described in embodiment, may refer to the associated description of other embodiments.Secondly, ability
Field technique personnel also should know, embodiment described in this description belongs to preferred embodiment, involved
Action and the module not necessarily present invention necessary to.
Step in embodiment of the present invention method can carry out order according to actual needs and adjust, merges and delete.
Module or unit in embodiment of the present invention device can merge according to actual needs, divide and delete
Subtract.
Module described in the embodiment of the present invention or unit, can pass through universal integrated circuit, such as CPU
(Central Processing Unit, central processing unit), or by ASIC(Application Specific
Integrated Circuit, special IC) realize.
Restoration methods and the terminal of the WLAN account provided the embodiment of the present invention above have been carried out in detail
Thin introducing, principle and the embodiment of the present invention are set forth by specific case used herein, above
The explanation of embodiment is only intended to help to understand method and the core concept thereof of the present invention;Simultaneously for ability
The those skilled in the art in territory, according to the thought of the present invention, the most all have
In place of change, in sum, this specification content should not be construed as limitation of the present invention.