(Self answering here because I only found this answer after hours of dredging through 200 page threads of forum posts.)
There are two non-standard but semi-prevalent methods that may work depending on your make and model (and why recovery isn't working in the first place).
Some phones actually respond to fastboot reboot recovery. This is quite natural ...
I'm not sure about the configuration setting, but I believe this is not only limited to home screen managers since you can achieve this by using 3rd-party apps.
Some related keywords:
Startup manager: Google Play Store
Autostart: Google Play Store
Autorun: Google Play Store
Otherwise, you can use automation apps like Tasker:
Create a Profile: Event - ...
What is the device doing exactly when I'm pushing the (hardware) power button? I guess that's the most friendly way.
You get to see a dialog with an option to power off the device (stock Android doesn't offer reboot). It appears that ShutdownActivity is called upon when you long press Power button.
Anyhow, this is what you can try, remotely or locally, but ...
This will kill the root zygote process and cause a Android system refresh.
This does not restart your phone's hardware, only the Android processes.
By default (in Linux), the kill/killall commands do give the processes a graceful way to shut down, though it depends on the zygote implementation whether this in turn gracefully shuts down your ...
Based on the platform/system/core repository you linked above, I think the key is in libcutils/android_reboot.c. And important definitions are in include/cutils/android_reboot.h; namely:
/* Commands */
#define ANDROID_RB_RESTART 0xDEAD0001
#define ANDROID_RB_POWEROFF 0xDEAD0002
#define ANDROID_RB_RESTART2 0xDEAD0003
Usually in normal ...
I ended up looking at Cyanongenmod's source code and figured out how they did it.
Here is my working .sh script:
echo 'boot-recovery ' > /cache/recovery/command
echo '--update_package=/sdcard/update.zip' >> /cache/recovery/command
with android JellyBean [4.1] and later versions, the sdcard data is located now at /sdcard/0,...
Works on Android 2.1 - 4.2.1 No Root
4.2.2 and up needs root.
For a PC method you will be using Android Debug Bridge, commonly called ADB. Here is a link for a download. It's from the XDA Forums. Read the page while your there and get some good insight on ADB.
After installed to the computer, open a command prompt (L shift + R mouse click) in ...
As pointed out by my other answer, and confirmed by the OP for the given device with reference to a blog article on the Z1, most devices with non-removable batteries have other means to "disconnect from power", usually "reset buttons" or "reset holes" to be poked with a pen or similar object. This should remedy in situations where the device freezes in a way ...
It does look like a stuck power button. (as ridiculous as it may sound)
The behaviour in your phone is exactly as it is when I press and hold on my power button for an extended period.
By right, the device should not turn on by itself when the battery is inserted. It should remain turned off - only a hardware switch can turn it on. As your phone turns on ...
This might not be a direct solution to your problem, but I'm sharing my thoughts on it.
It's not very likely for RAM on embedded systems to get defective. And if it does, solutions might not be readily available, except if someone has already done that specifically for your device.
Modern flash storage devices manage bad blocks on their own, ...
If the device freezes, usually you can long press the power button. Depending on the configuration of the device, it will either turn the device off completely (e.g. Nexus 7, HTC Butterfly S) or make the device do a restart.
I can suggest to follow these steps:
Remove USB cable and battery.
Hold Volume Down and Home, then press Power.
If you can enter the recovery system, try to clear caches.
If that doesn't work, do a factory reset.
If that still doesn't, go back to download mode, and try to restore using Odin and a corresponding firmware.
You could start by not overclocking the device. That's a common cause of system instability even in ROMs that are usually stable. If it's still unstable because of that, it could just be instability caused by (bugs in) the ROM you're using. Try flashing back to the the stock HTC ROM.
If it's still unstable after flashing back to the stock ROM, it could be ...
I've never seen this option built-in, but there are several apps/widgets on the Playstore offering a "quick boot" as well. The term is a little misleading, as it's usually not a boot at all.
For some background information, let me first refer to my answer on Can somebody explain the boot process of an Android device?. Quick-reboot usually kills everything ...
Press and hold the power button for 10-20 secs and your phone will force reboot, in most cases anyway. If your phone still doesn't reboot, then you'll have to remove the battery and if its not removable you'll have to wait for the battery to run empty.
After more experimentation, I've made a breakthrough. Ultimately, this all happens cause Android's Media Scanner will scan the internal SD for media at startup. When it finds Playlist files it attempts to import them into the system database but because the SD card takes a while to mount at startup and is temporarily unreadable for a while at boottime, when ...
This is something in Android that is called the dalvik-cache. It's basically an optimized version of the android package you usually install/download on your phone. This is usually done while installation and doesn't need to happen at every boot. However, in your case, reboots apparently trigger a dalvik-cache dump(for lack of a better word). So, Android ...
The answer was not obvious. It's because of the corrupted telecom.service (dialer) app. BLOX 2016 always had issues with ringtones, but I guess they completely ruined it in some of their updates. The only way to get around is to install TWRP and flash a new ROM backup. You can find those on XDA forums BLU Life One X thread.
The other solution is to set the ...
I am suggesting two solutions. Both of them require root access, and both were tested on a OnePlus 6 running Android 10.
Have the following script (let's call it switch-user.sh) run during boot but after the user has entered device decryption credentials (PIN/password)
while true; do
I solved by myself so I'm sharing so it might be useful for others.
Deeper disable wifi/radio = recompile android Linux Kernel disabling wifi/radio drivers
First I tested the Lineage OS custom ROM for my device.
From that I got access to fully rebuild my Custom Lineage ROM. They have all source code for all supported devices including the source for the ...
Run the following shell script from init.d (or /data/adb/*.d/ in case of Magisk). Or run directly from init's .rc file. See How to run an executable on boot and keep it running?
# ignore signals
for i in $(seq 64); do trap '' "$i"; done
# seconds until today 3AM
SECS=$(( $(date -d '03:00' +%s) - $(date +%s) ))
# if today's ...
I only encountered device shown via ADB as offline in two cases:
Device not authorized (ADB security features)
No proper udev rules setup
As the first case is most likely not your problem as these security features were not implemented in android when you asked this question. Your problem is most likely that you dont have proper udev rules.
You can fix ...
Plug it into your computer and see if by some offshoot chance you have adb available. If so, run a adb -d reboot-bootloader to reboot into download mode.
If that's unavailable, you are SOL and will have to have Samsung repair it. Honestly, if it's hard bricked, you're better off buying a new phone...
I'm not 100% sure about the Nexus 7, but with my Nexus 4, you can hold the Power button for a very long time (Something like 20 seconds) and it will hard-shutdown. This should help facilitate a hard reset and let you get into Fastboot or Recovery mode if you need to.
The answer to your original question is no. Sometimes, if a device DOES have an easily removable battery, it will not have a hardware reset option.
You could build an Android device that had no other option to reset besides a battery pull. The manufacturer has to specifically build some form of external reset. If the software is completely locked up then ...
It's a bug in the app. Android has a thing called the media-scanner, which scans newly added files for metadata, so they can be included in media players, photo albums, etc. It relies on the app that creates the file signalling the media scanner process to scan the new file. If the app doesn't do this, the new file won't be added/visible.
If you look at ...