How to use code to implement iphone software logoff and phone restart

Source: Internet
Author: User
Tags fully qualified domain name

Both logout and restart are done by command

Software Logoff: System ("Killall Springboard");(personally tried, can actually write off the software, just as delete)

Phone Restart:

1: After getting root privileges:
Reboot: System ("reboot");
Similar to shutting down the machine.

Note: Under normal circumstances, if your program has root privileges the system will kill you. Therefore, it is generally necessary to have a non-root boot program to start your program with root privileges.
2: Private API, not done.

Close application: [[uiapplication Sharedapplication]performselector: @selector (terminatewithsuccess)]; or exit (0)

Common commands for iOS operating system Unix are as follows:

Account Number: Root

Initial Password: Alpine

Exit "End Interface"

passwd "Modify login Password"

passwd mobile "Modify phone password"

CTRL + C "End Process"

Halt "Shutdown"

Reboot "Restart"

Killall Springboard "Logout"

Dpkg-l "List all installed packages"

Apt-get Update "Refresh all the sources, equivalent to get the latest inventory, refresh speed than Cydia fast and stable, you experience"

Apt-get Dist-upgrade "Upgrading the system to a new version"
Apt-get Upgrade "Update all installed packages to the latest version"
Apt-get Install program name "Installation of the software, if you have a dependent package, download, you need to enter the Y confirmation before installation"
Apt-get Remove Program Name "Remove the package, do not delete the dependent package, do not delete the configuration file, may be more suitable for reloading software"
Apt-get Purge Program name "Delete the package, do not delete the dependent package, delete the configuration file, belongs to the relatively thorough removal"
Apt-get autoremove "After remove or purge off a package, the unwanted ghost of Ghosts (dependency package) completely away, this is more than Cydia to force it."
Apt-cache search Field "Searching for packages containing this field"
Apt-cache Show Program Name "Detailed information for this program"
Apt-get clean "Clear apt-get downloaded install package cache, save a little storage space"

Apt-get Install top "Installation top process manager, top equivalent to win Task Manager, in terminal input top start running, press the Q key to exit, you can see the running process, CPU utilization, memory consumption"

Sort: Enter O (lowercase) and the primary key will appear with a small line underline.
-rsize sort from large to small in memory
+rsize Small to large sort
-CPU Big to small sort
+CPU Small to large sort

Kill PID (per process front pid) "End Process"

Apt-get install netstat "installation netstat view network connection"
Netstat-an "Running netstat, want to know where your iphone is secretly connected to? 】

Apt-get Install ping "installation ping command"

Ping "test the network with a ping command"

Apt-get install hostname "Installation hostname command"

Hostname "show host name without parameters"

Hostname-i "show IP address with the-I parameter"

Hostname-f "Display the full domain name (fqdn,fully qualified domain name) with the-f parameter

Hostname Newhostname "When you modify the hostname, follow the new host name."

Ifconfig "for displaying or configuring network devices"
Uname-a "Displaying operating system Information"

Df-h "Show disk Information"

Apt-get Installation: Apt-get Install package name
Apt-get Update: Apt-get update package name
Apt-get Removal: Apt-get Remove package Name
(Aptitude similar to apt-get Directive)



Aptitude Update

Update the list of available packages

Aptitude Upgrade

Upgrade the available packages

Aptitude Dist-upgrade

Upgrade your system to a new release

Aptitude Install Pkgname

Install package

Aptitude Remove Pkgname

Delete Package

Aptitude Purge Pkgname

To delete a package and its configuration files

Aptitude search String

Search Packages

Aptitude Show Pkgname

Display Package Details

Aptitude Clean

To delete a downloaded package file

Aptitude AutoClean

Delete Expired package files only

Unix commands commonly used on the iphone

1, LS: column directory, like dos dir,-a parameter display implied document (prefix.), l parameter details,--color color display file category

2, CP: Copy files. The-r parameter is recursive replication, along with subdirectories. The-I parameter indicates a pre-overwrite query.

3. chmod: Adjust file properties, such as chmod 755 xyz, etc.

4. MV: Moving files

5, Top: View process, putty can execute

6, LN: links, Windows-like shortcuts, not exactly the same.

7. DF: View disk space

9, RM: Delete. -R Recursive Delete.

9, mkdir: Create directory.

10, ChDir: Change the directory, and CD function almost.

11, RmDir: Delete directory. -R to delete subdirectories together.

12. PWD: View the current path.

13, PS: Display process. -a-u-x-w

14. Kill: End the process.

To know the file storage directory:
1, "/applications" Common Software Installation directory
2. "/private/var/mobile/media/iphone video Recorder" iphone video Recorder video file storage directory
3, "/PRIVATE/VAR/MOBILE/MEDIA/DCIM" camera taken photos file storage directory
4, "/private/var/mobile/media/itunes_control/music" ITunes uploaded multimedia files (such as MP3, MP4, etc.) storage directory, the file has not been modified, but the file name has been modified, Download directly to your computer to read.
5, "/private/var/root/media/ebooks" Panda book Storage Directory
6, "/library/ringtones" system comes with the call ringtone storage directory (using itunes to convert files to ACC file, the suffix name to. m4r, with Iphone_pc_suite to/library/ringtones)
7, "/system/library/audio/uisounds" SMS and other system default effect ringtones (m4r ringtone file extension. caf) SMS ringtone file named sms-received beginning with CAF file
8, "/private/var/mobile/library/addressbook" System phone book storage Directory "/private/var/mobile/library/sms" SMS Storage Directory
9, "/private/var/mobile/media/iphone Recorder" iphone Recorder recording software file storage directory
10, "/applications/" software Chinese documents storage Directory
11, "/library/wallpaper" System Q1ang paper Storage Directory
12, "/system/library/audio/uisounds" System sound file storage directory
13, "/PRIVATE/VAR/ROOT/MEDIA/PXL" Ibrickr upload the installation program established a database, estimated and Windows uninstall record is similar.
14, "/bin" and the Linux system is similar, is the system execution instruction storage directory.
15, "/private/var/mobile/library/sms" System SMS Storage Directory
16, "/private/var/run" system process run temp directory? (see here to see all the processes started by the system)
17, "/private/var/logs/crashreporter" system error recorder part of the icon to beautify the storage path: Charging icon: system/library/coreservices/ batterybg_1.png  all the time to batterybg_17.png ,batteryfill.png 18 icons for the Charge icon phone signal icon: system/library/coreservices/ to Default_5_bars.png and fso_0_bars.png--fso_5_bars.png 10 icons for signal icon  wifi signal icon : System/librarycoreservices/ and fso_0_ Airport.png---fso_3_airport.png8 icon for WiFi signal icon  edge signal icon: System/library/coreservices/ _edge_on.png and fso_edge_on.png2 icons for EDGE signal icons date beautify icons: system/library/coreservices/   Standby player icon: system/library/coreservices/, Pause.png, Play.png, prevtrack.png 4 Icons for the standby player icon  ipod play signal icon:  system/library/coreservices/,default_ Play.png Alarm Clock signal icon:system/library/coreservices/,fso_alarmclock.png  Vibration icon: system/library/coreservices/, hud.png,ring.png  slider icon:system/library/privateframeworks/telephonyui.framework  Directory: bottombarknobgray.png (Standby unlock slider icon)  bottombarknobgreen.png (move slide in standby to answer the slider icon) Bottombarknobred.png (Power off slider icon) standby time font: /system/library/fonts/cache/lockclock.ttf  standby time background: system/library/ frameworks/uikit.framework/other.artwork  slider text into flash Word: system/library/private/frameworkstelephonyui.framework /bottombarlocktextmask.png unlock slider path: system/library/private/frameworkstelephonyui.framework/opbarbkgnd.png, bottombarbkgndlock.png  Slider text path:/SYSTEM/LIBRARY/CORESERVICES/SPRINGBOARD.APP/ZH_CN.LPR

How to use code for iphone software logoff and phone restart

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.