reboot

Change GRUB's variable using a C language [closed]

喜夏-厌秋 提交于 2019-12-04 05:48:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I was wondering if there is any way for me to write a C program to change the value off GRUB's variables. I need to write a program that can reboot my computer on another OS, for example : I am on Suse disk1 program changes GRUB's variable and reboot automatically. I am on Suse disk2 I would like to access

How to recover from infinite reboot loops in NodeMCU?

徘徊边缘 提交于 2019-12-04 05:18:11
My NodeMCU program has gone in to infinite reboot loop. My code is functionally working but any action I try to do, e.g. file.remove("init.lua") or even just =node.heap() , it panics and reboots saying: PANIC: unprotected error in call to Lua API (not enough memory) . Because of this, I'm not able to change any code or delete init.lua to stop automatic code execution. How do I recover? I tried re-flashing another version of NodeMCU, but it started emitting garbage in serial port. Then, I recalled that NodeMCU had two extra files: blank.bin and esp_init_data_default.bin . I flashed them at

Initiating a Phonegap plugin after device restart

天大地大妈咪最大 提交于 2019-12-04 03:19:26
I am in the process of developing a hybrid Phonegap app for Android. The app uses just the one plugin which I am developing as well. The plugin does three things Watches for geo-location changes (both foreground and background) Sets up a half-hourly alarm to perform certain periodic tasks Listens for push messages. I use the pushy.me service and the code I use follows their documentation . I had implemented the code to get the application to tune in to device reboots with some trepidation but it turned out to be easy (thanks to information I found in other threads on SO) package com.example

Is it possible to prompt for restarting the machine after installation using WiX?

微笑、不失礼 提交于 2019-12-04 00:21:18
Is it possible to prompt for restarting the machine after installation using WiX? abmv <?xml version='1.0' encoding='windows-1252'?> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> <Product Name = 'Sample App' Id = 'PRODUCT-GUID-HERE' UpgradeCode = 'UPGRADE-GUID-HERE' Language = '1033' Version = 'YOUR-APP-VERSION-HERE' Manufacturer = 'YOU!'> <InstallExecuteSequence> <ScheduleReboot After="InstallFinalize"/> </InstallExecuteSequence> </Product> </Wix> I think I got it. Yes. See the documentation for the REBOOT property in Windows Installer. i.e.: <Property Id="REBOOT"><![CDATA[Force]]><

Detect whether a Windows reboot was due to Windows updates

淺唱寂寞╮ 提交于 2019-12-03 13:20:33
A few applications on my PC have been doing a detection wether a restart was done by Windows Update or not. This is observable due to them restarting after the automatic Windows Update reboot. This is very helpful since those applications reload changes, even unsaved changes or restore tabs (in case of a browser). Examples of applications that do this: Google Chrome Microsoft Visual Studio Microsoft Paint In all cases the applications save the state they were in before the reboot. (My PC actually woke up from a standby state automatically, and rebooted itself while instaling updates. Too bad

How to restart Linux from inside a C++ program?

我是研究僧i 提交于 2019-12-03 05:37:57
I have a Qt 4 GUI where I need to have a option in a drop-down menu that allows the user to choose to restart the computer. I realize this might seem redunant with the ability to restart the computer in other ways, but the choice needs to stay there. I've tried using system() to call the following: a suid-root shell script a non-suid shell script a suid-root binary program and all of them just cause reboot: must be superuser to be printed. Using system() to call reboot directly does the same thing. I'm not especially attached to using system() to do this, but it seemed like the most direct

Code to Restart , Shutdown and enter in to Download Mode for Android Phones?

旧时模样 提交于 2019-12-02 10:28:26
问题 Hi all I am just curious to find out some code that can pro-grammatically REBOOT , SHUTDOWN and enter in to DOWNLOAD MODE mobile phones with. I have been exhausted scouring the internet to find something to do with this but have failed. Does any one have any ideas/links/references ? 回答1: If your app is signed with the system key, you can use reboot(). On the other hand, if you have root you can still do it (this doesn't work on a few ROMs, mainly a few stock HTC ones. Shutdown: try { Process

iOS app with iBeacon must restart device

痞子三分冷 提交于 2019-12-02 08:08:49
问题 I built a simple ios app with IBeacon . I ran this app on an iPhone 4s whit ios7.1 while running an IBeacon base station.Everything is working right in background or foreground(exit region have 30 seconds delay in background).But over a period of time,about 3 hours,this app can not monitor any event though device setting were not change(blueTooth and locate is normal).This situation must restart the device. Please tell me what should i do aboult this situation? Thanks! 回答1: I wonder if iOS

Code to Restart , Shutdown and enter in to Download Mode for Android Phones?

梦想与她 提交于 2019-12-02 07:18:55
Hi all I am just curious to find out some code that can pro-grammatically REBOOT , SHUTDOWN and enter in to DOWNLOAD MODE mobile phones with. I have been exhausted scouring the internet to find something to do with this but have failed. Does any one have any ideas/links/references ? If your app is signed with the system key, you can use reboot() . On the other hand, if you have root you can still do it (this doesn't work on a few ROMs, mainly a few stock HTC ones. Shutdown: try { Process proc = Runtime.getRuntime() .exec(new String[]{ "su", "-c", "reboot -p" }); proc.waitFor(); } catch

Home Launcher issue with Fragments after reboot

不打扰是莪最后的温柔 提交于 2019-12-02 07:13:47
问题 I am developing an application that will be used in an industrial setting as a handheld interface, distributed and preconfigured by my workplace. I am working on making the application run as the Home Launcher so that there will be less temptation for the tablets to "go missing". BACKGROUND I have the following in my manifest to make the application a Launcher: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.HOME" />