reboot

Can't reboot device using runtime.exec

隐身守侯 提交于 2019-12-06 12:23:05
For some reason I cannot reboot Android devices using Runtime.getRuntime().exec("/system/bin/reboot");. I have tried the following code on 3 devices now without luck. One was built from rowboat-android source. The other two are the Motorola Droid Pro (Rooted, stock) and the HTC Ledgent (Rooted, Cynogen Mod). All devices are running Android 2.2 Froyo. Does anyone know why? su works as well as the Super User application is visible. I should note various other shell commands do work, like netcfg (chmod' to 777) and ls. public static boolean executeCommand(SHELL_CMD iShellCmd){ String cmd = null;

Android widget update called twice after device boot

拟墨画扇 提交于 2019-12-06 09:40:41
After device reboot I receive first APPWIDGET_ENABLED and then twice APPWIDGET_UPDATE. I spent quite some hours googling this without result. Is anybody experiencing the same? Have you found a way to avoid calling the update twice? Here's some code: <receiver android:name=".Widget" android:label="@string/app_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/button_widget_provider" /> </receiver> public void onReceive(final Context context, final Intent intent) {

wcf certificate Keyset does not exist problem after reboot

一曲冷凌霜 提交于 2019-12-06 05:48:00
There are two projects in one VS solution: client(wpf app) and а wcf service lib. I'm using Message security and a custom AspNetMembershipPrivider on th server side to validate username and pass. As i'm not using Windows security, I had to use certificate on server to establish secure chanell, and what i did: - opened my local IIS manager and added self-signed certificate named likemy dev machine. - checked that this certificate appeared in Certificates snap-in under Personal-Certificates - configured wcf .config to point to that certificate. - started my client app in VS (and VS also started

How to recover from infinite reboot loops in NodeMCU?

百般思念 提交于 2019-12-06 01:34:08
问题 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? 回答1: I tried re-flashing another version of NodeMCU, but it started emitting garbage in serial port. Then, I

Shortcut intent extras lost after restart?

[亡魂溺海] 提交于 2019-12-06 00:57:57
My application listens to the android.intent.action.CREATE_SHORTCUT broadcast, in my code I am creating a shortcut which includes a String extra like this: Intent shortcutIntent = new Intent(Intent.ACTION_VIEW); shortcutIntent.setClassName("com.some.name","com.some.name.Activity"); shortcutIntent.putExtra("stringid", "some string value"); ShortcutIconResource iconResource = Intent.ShortcutIconResource.fromContext(ShortcutActivity.this,iconIdentifier); Intent intent = new Intent(); intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); intent.putExtra(Intent.EXTRA_SHORTCUT_NAME,

Get date/time of last reboot programmatically

拈花ヽ惹草 提交于 2019-12-05 11:53:35
I would like to find the time of the last reboot programmatically in Linux. I am using C and C++ in my module. Is there an API? There's no direct api, but you can read /proc/uptime "file" to learn how many seconds the system have been running, subtract that from the current time - and assume that's when the machine was rebooted. /proc/uptime This file contains two numbers: the uptime of the system (seconds), and the amount of time spent in idle process (seconds). You could either invoke uptime or take a look at /proc/uptime . Given the current time, and knowing how long the system's been up

Android phone reboots on uninstall

泄露秘密 提交于 2019-12-05 11:15:34
I am developing an app and when I uninstall the phone kind of semi-reboots. This is my old post: I have a strange problem with my phone. I am using SAMSUNG GALAXY 5 (GT-I5500) with Android 2.2 on it (not rooted). I am an android developer and I have been doing pretty advanced apps. However, sometimes when I am testing and installing an application the phone reboots. I'm starting it trough Eclipse but I do not know what exactly what causes the phone to reboot. It is not heat for sure, as I keep my phone cool enough. It is not from the app source itself as the phone doesn't reboot while I am

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

社会主义新天地 提交于 2019-12-05 10:22:57
问题 Is it possible to prompt for restarting the machine after installation using WiX? 回答1: <?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. 回答2: Yes. See the

Silent Windows Installer installer without rebooting automatically

一曲冷凌霜 提交于 2019-12-05 05:26:17
Currently I have an MSI which performs a major upgrade, and it is launched as: msiexec.exe /i installer.msi /qn REBOOT=ReallySuppress My question is regarding that particular property REBOOT=ReallySuppress : does this mean it will not restart the system but will do proper changes (if applied) when user reboot her system manually? Or will it simply ignore those things that require to restart the system? Alexey Ivanov The installer performs all the operations. The value ReallySuppress of REBOOT property, or /norestart option , simply suppress system restart, if it's needed. And msiexec.exe exit

ansible reboot 2.1.1.0 fails

最后都变了- 提交于 2019-12-05 05:05:37
I've been trying to create a really simple Ansible playbook that will reboot a server and wait for it to come back. I've had one in the past on Ansible 1.9 that worked, but i've recently upgraded to 2.1.1.0 and it fails. The host i'm rebooting is called idm and has an IP of 192.168.200.23. the playbook is being run from my host 192.168.200.1 with the command $ ansible-playbook reboot.yml -vvvv This is the playbook i'm using --- - hosts: idm tasks: - name: Restart server become: yes shell: sleep 2 && /sbin/shutdown -r now "Ansible system package upgraded" - name: waiting 60 secs for server to