CN109144576A - Hot plug control method based on Android platform - Google Patents
Hot plug control method based on Android platform Download PDFInfo
- Publication number
- CN109144576A CN109144576A CN201710508488.2A CN201710508488A CN109144576A CN 109144576 A CN109144576 A CN 109144576A CN 201710508488 A CN201710508488 A CN 201710508488A CN 109144576 A CN109144576 A CN 109144576A
- Authority
- CN
- China
- Prior art keywords
- hot plug
- battery
- android platform
- user
- control method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
- G06F9/4413—Plug-and-play [PnP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/442—Shutdown
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
Abstract
A kind of hot plug control method based on Android platform, suitable for the battery hot plug of Android platform mobile phone or tablet computer, method includes the following steps: receiving a user instruction of user's input;Into offline mode, stop all services;Freeze all processes.All external equipments are enabled to enter suspend mode;Close all wake sources in addition to power key;Hardware instruction to mainboard switching main battery is sent to power to onboard reserve battery;CPU is closed, into sleep pattern.Compared to the prior art, the present invention is after user selects " hot plug battery " option, main board power supply switches to onboard reserve battery by main battery, system replaces main battery automatically into low energy consumption sleep pattern, with standby user, and after battery altering, user presses power key, electronic apparatus system returns to normal operating conditions from sleep pattern immediately, without turning back on, has saved the booting time used.
Description
[technical field]
The present invention relates to a kind of electronic device hot-plug method, in particular to a kind of hot plug control based on Android platform
Method.
[background technique]
In the use process of portable Android platform electronic device such as mobile phone or tablet computer, when electronic device electricity not
When sufficient, often charged by the way of line of connecting with the mains, but this mode charging when, more or less can be to the operation of user
It impacts, such as electronic device can not be moved arbitrarily again, pulling power supply line leads to electronic device landing etc..And for some use
It for family, needs to use always a certain electronic device at work, thus charges compared to power supply line, they are more willing to selection more
It changes and is pre-filled with the mode of reserve battery of electricity the electronic device is enabled to reach electricity saturation state again.However, electricity at this stage
Sub-device could must replace battery after shut down, also need restarting that could work normally after the completion of replacement, open and close machine process
It will take a significant amount of time.
[summary of the invention]
For above situation, the purpose of the present invention is to provide a kind of control methods based on Android platform, shorten electronics dress
It sets because replacing battery the time it takes.
In order to achieve the above objectives, the present invention provides a kind of hot plug control method based on Android platform, is suitable for
The battery hot plug of Android platform mobile phone or tablet computer, method includes the following steps:
(A) user instruction of user's input is received;
(B) enter offline mode, stop all services;
(C) freeze all processes.
(D) all external equipments is enabled to enter suspend mode;
(E) all wake sources in addition to power key are closed;
(F) hardware instruction to mainboard switching main battery is sent to power to onboard reserve battery;
(H) CPU is closed, into sleep pattern, memory on board enters self-refresh mode.
Preferably, further include step (B1) into after offline mode in step (B):
(B1) a hot plug system broadcasts are issued.
Preferably, further include step (B2) after issuing a hot plug system broadcasts in step (B):
(B2) operation read and write is completed;
Preferably, in step (B2), after the hot plug overall situation, which is broadcasted, to be issued, system starts timing, when timing time reaches
After one preset delay time, even if system does not complete all read-write operations, also stop all services immediately.
Preferably, further include step (G) between step (F) and step (H):
(G) switching of user's battery is prompted to complete by an indicator light.
Compared to the prior art, hot plug control method of the invention is main after user selects " hot plug battery " option
Plate power supply switches to onboard reserve battery by main battery, and system replaces main electricity automatically into low energy consumption sleep pattern, with standby user
Pond, and after battery altering, user presses power key, and electronic apparatus system returns to normal work shape from sleep pattern immediately
State has saved the booting time used without turning back on.
[Detailed description of the invention]
Fig. 1 is the Android layer flow chart of hot plug control method of the present invention;
Fig. 2 is the Kernel layer flow chart of hot plug control method of the present invention.
[specific embodiment]
Hot plug control method of the invention enters suitable for controlling the Android platform mobile phone to work or tablet computer
The sleep pattern of low energy consumption replaces battery, including Android laminar flow journey and Kernel laminar flow journey in a manner of hot plug.
Refering to Figure 1, Android laminar flow journey the following steps are included:
S01: user inputs a user instruction by input module.In some embodiments, the input module include power key and
Touch screen, therefore, this step are specific can include: user's long-pressing power key, system pop up a dialog box, window of the user in pop-up
Middle selection " hot plug battery " option.
S02: after receiving the user instruction, allowing equipment to enter offline mode, avoids changing wireless data in cell process
(similar phone, WIFI signal) enters, and causes reserve battery electricity to deplete, while power management module issues a hot plug
The global system of battery event is broadcasted.
S03: after receiving the system broadcasts, system will terminate the behaviour read and write in a preset delay time
Make, if being more than that those read-write operations of the delay time are not over yet, forces the S04 that gos to step.
S04: stop all services, such as active manager (Activity Manager) service, carry (mount) service
Deng to reduce power consumption.
S05: system suspending command is sent, into Kernel laminar flow journey.
Please refer to shown in Fig. 2, Kernel laminar flow journey the following steps are included:
S11: inspection parameter state, synchronization file system.
S12: freezing all processes, and specifically, kernel is both configured to state of a process all in process list
Stop, and save under all processes context.Therefore it can guarantee when these processes are defrosted, influence will not be made
At process, only simply continue to execute.
S13: enabling all external equipments enter dormant state, those external equipments include touch screen, loudspeaker etc., with into one
Step reduces power consumption.
S14: only retain power key as wake source, and close all wake sources in addition to power key, including homepage key
Press, the connection of I/O interface, low capacity prompt etc., avoid after system enters suspend mode, user when replacing battery, system quilt
Wake up and power consumption caused to increase sharply, reserve battery electricity shortage and abnormal shut down.
S15: system send hardware instruction the main battery power switching on mainboard to onboard reserve battery is powered, so as to
Family is extracted and replaced by main battery.
S16: issuing the user with prompt by the indicator light of a low energy consumption, prompts the power supply of user apparatus in main battery
Completion is switched between reserve battery, main battery can have been extracted.
S17: closing and interrupt, and closes CPU, and then enter sleep pattern, memory on board enters self-refresh mode.
In conclusion hot plug control method of the invention, after the instruction that user inputs about hot plug battery event,
System will close software service and the hardware capability of all high energy consumptions, guarantees that system is in low energy consumption state, is then turned off except electricity
All wake sources outside the key of source guarantee that system is not waken up when replacement battery, and then mainboard is from main battery power switching to onboard standby
It is powered with battery, main battery is disconnected from the circuit, in case replacement, finally enters sleep after the completion of notifying user's battery to switch
Mode.After the completion of above-mentioned steps, user can replace the main battery of electronic device, and after the completion of replacement, press
Power key can enable electronic device be waken up, and immediately enter normal operating conditions, and must first shut down again again in the prior art
Booting is compared, and a large amount of time has been saved, therefore can reach the purpose of the present invention really.
A specific embodiment of the invention and embodiment are elaborated above in conjunction with attached drawing, but cannot with restriction
The scope of the present invention, made equalization modification and transformation, all should belong to the invention patent in scope of the present invention patent
In range.
Claims (5)
1. a kind of hot plug control method based on Android platform, suitable for Android platform mobile phone or the electricity of tablet computer
Pond hot plug, which is characterized in that method includes the following steps:
(A) user instruction of user's input is received;
(B) enter offline mode, stop all services;
(C) freeze all processes.
(D) all external equipments is enabled to enter suspend mode;
(E) all wake sources in addition to power key are closed;
(F) hardware instruction to mainboard switching main battery is sent to power to onboard reserve battery;
(H) CPU is closed, into sleep pattern, memory on board enters self-refresh mode.
2. the hot plug control method according to claim 1 based on Android platform, which is characterized in that in step (B)
In, further include step (B1) into after offline mode:
(B1) a hot plug system broadcasts are issued.
3. the hot plug control method according to claim 2 based on Android platform, which is characterized in that in step (B)
In, further include step (B2) after issuing a hot plug system broadcasts:
(B2) operation read and write is completed.
4. the hot plug control method according to claim 3 based on Android platform, which is characterized in that in step
(B2) in, after the hot plug overall situation, which is broadcasted, to be issued, system starts timing, when timing time reaches a preset delay time
Afterwards, even if system does not complete all read-write operations, also stop all services immediately.
5. the hot plug control method according to claim 1 based on Android platform, which is characterized in that in step (F)
Further include step (G) between step (H):
(G) switching of user's battery is prompted to complete by an indicator light.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710508488.2A CN109144576A (en) | 2017-06-28 | 2017-06-28 | Hot plug control method based on Android platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710508488.2A CN109144576A (en) | 2017-06-28 | 2017-06-28 | Hot plug control method based on Android platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109144576A true CN109144576A (en) | 2019-01-04 |
Family
ID=64803158
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710508488.2A Pending CN109144576A (en) | 2017-06-28 | 2017-06-28 | Hot plug control method based on Android platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109144576A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110166620A (en) * | 2019-04-11 | 2019-08-23 | 宁波麦博韦尔移动电话有限公司 | A method of electric current at the bottom of when mobile device battery being maintained to switch |
CN112817421A (en) * | 2020-03-26 | 2021-05-18 | 环鸿电子(昆山)有限公司 | Battery hot-plug method of portable electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101098080A (en) * | 2006-06-30 | 2008-01-02 | 佛山市顺德区顺达电脑厂有限公司 | Method for managing electric quantity of electric power source and replacing battery in hot pluggable condition for portable electronic equipments |
US20110121654A1 (en) * | 2006-03-28 | 2011-05-26 | Recker Michael V | Remote switch sensing in lighting devices |
CN103369129A (en) * | 2012-03-30 | 2013-10-23 | 马维尔国际有限公司 | Method and device for supplying power to mobile terminal |
US20170126055A1 (en) * | 2015-10-28 | 2017-05-04 | Chiun Mai Communication Systems, Inc. | Battery switching method |
CN106655458A (en) * | 2015-10-28 | 2017-05-10 | 深圳富泰宏精密工业有限公司 | Battery switching method, electronic device with battery, and wearable device |
-
2017
- 2017-06-28 CN CN201710508488.2A patent/CN109144576A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110121654A1 (en) * | 2006-03-28 | 2011-05-26 | Recker Michael V | Remote switch sensing in lighting devices |
CN101098080A (en) * | 2006-06-30 | 2008-01-02 | 佛山市顺德区顺达电脑厂有限公司 | Method for managing electric quantity of electric power source and replacing battery in hot pluggable condition for portable electronic equipments |
CN103369129A (en) * | 2012-03-30 | 2013-10-23 | 马维尔国际有限公司 | Method and device for supplying power to mobile terminal |
US20170126055A1 (en) * | 2015-10-28 | 2017-05-04 | Chiun Mai Communication Systems, Inc. | Battery switching method |
CN106655458A (en) * | 2015-10-28 | 2017-05-10 | 深圳富泰宏精密工业有限公司 | Battery switching method, electronic device with battery, and wearable device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110166620A (en) * | 2019-04-11 | 2019-08-23 | 宁波麦博韦尔移动电话有限公司 | A method of electric current at the bottom of when mobile device battery being maintained to switch |
CN112817421A (en) * | 2020-03-26 | 2021-05-18 | 环鸿电子(昆山)有限公司 | Battery hot-plug method of portable electronic equipment |
CN112817421B (en) * | 2020-03-26 | 2023-08-11 | 环鸿电子(昆山)有限公司 | Battery hot plug method of portable electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103890694B (en) | System and method of the task based access control emergency to manage clock rate | |
CN102622079B (en) | Sleep method, wakening method and mobile terminal device | |
US7117377B2 (en) | Computer apparatus, power supply control method and program for reducing the standby power requirement in a computer supporting a wake-up function | |
US10317984B2 (en) | System on chip, method of managing power thereof, and electronic device | |
CN110716631B (en) | Power supply management method, device, equipment and readable storage medium | |
JP3974510B2 (en) | Computer apparatus, power management method, and program | |
US11467650B2 (en) | Selecting a low power state in an electronic device | |
US20140068297A1 (en) | State control method and apparatus and portable terminal | |
CN103207656B (en) | Computer with integrated and its method for managing power supply | |
US9519332B2 (en) | Information processing apparatus, information processing system, and power control method | |
US9830178B2 (en) | Dynamic reassignment for multi-operating system devices | |
CN102968174A (en) | Deep sleep awakening method of android device | |
CN101430592A (en) | Information processing apparatus | |
US8954800B1 (en) | Recovery button for automatically entering recovery mode | |
CN104169859A (en) | Screen control method, screen control device and touch terminal | |
CN103246335A (en) | State control method and electronic equipment | |
US20160320828A1 (en) | Power supplying method, power supplying system, and electronic device | |
US9134784B2 (en) | Predictive power state transitions for information handling devices | |
CN100399237C (en) | Portable electronic device capable of auto switching electric source modes and switching method thereof | |
CN107493595A (en) | A kind of low-power consumption safety certification device and control method | |
KR102125507B1 (en) | Method for charging battery and an electronic device thereof | |
CN109144576A (en) | Hot plug control method based on Android platform | |
CN114834254A (en) | Control method and device of power management system, storage medium and processor | |
CN106292989A (en) | A kind of information processing method and electronic equipment | |
CN104204988A (en) | Active display processor sleep state |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190104 |