as either software and or hardware modules and may be stored in any type of non transitory computer readable medium or other storage devices some non limiting examples of non transitory computer readable medium include cds dvds blu ray flash memory and hard disk drives the present disclosure is in relation to a method for unlocking an electronic device fig1 illustrates a block diagram of an electronic device 1 the electronic device 1 includes an unlocking system 10 a storage 11 a processor 12 a display 13 an acceleration sensor 14 and a rotation sensor 15 in this embodiment the electronic device 1 can be a smart phone a mobile internet device mid or a tablet computer the electronic device 1 can include more or fewer components than those shown in the embodiment or have a different configuration of the components the unlocking system 10 can include a plurality of programs in the form of one or more computerized instructions stored in the storage 11 and executed by the processor 12 to perform operations of the electronic device 1 in the embodiment the unlocking system 10 can include an acceleration detection module 101 a rotation detection module 102 an unlocking module 103 and a setting module 104 the storage 11 can be an external or embedded non transitory storage medium of the electronic device 1 such as a secure digital memory sd card a trans flash tf card a compact flash cf card or a smart media sm card.