Command for proper shutdown/poweroff? - Epic 4G Android Development

I rooted my Epic 4g. I would like to write a simply script to poweroff the phone and create a shortcut for it on my screen. What does command, options, and arguments would the phone need to do a proper shutdown and poweroff?

Neve rmind
ten char

Just download fastboot from the market. Does that and more, plus it has widgets for either recovery, shutdown, or reboot.
Sent from my SPH-D700 using XDA App

Wow...that Sounds great. I looked on the market and could not find though. I found fast reboot and quick reboot utils but nether of those offer a shutdown option. Am I just missing it
and its there?

dman777 said:
Wow...that Sounds great. I looked on the market and could not find though. I found fast reboot and quick reboot utils but nether of those offer a shutdown option. Am I just missing it
and its there?
Click to expand...
Click to collapse
I apologize, it is quickboot, and to make sure, I opened it up and it doesn't have a shut down option, its reboot, recovery, and bootloader.
Try Tasker if you are up to it. You sound like someone who would like to automate things. I have mine set up for numerous things, like opening music player and playing music when I plug in headphones, pausing if I unplug, start GPS when I open maps, stop GPS when I close, etc. Check it out.
Sent from my SPH-D700 using XDA App

I have a strange/dynamic work schedule so i can not really automate a shutdown. If I could find what proper command to gracefully shut it down I think I could right a script and just link it to a shortcut(I think anyways...correct me if I'm wrong since I'm new at the Android OS).

Try powerboot
Sent from my Epic 4G

Related

[Q] Is there a "restart" widget?

I find it strange that there's no "restart" feature in Android, and you have to completely turn the phone off and then turn it back on. I looked in the Market for a restart widget but couldn't find one. Does anyone know of one (for non-rooted phones)?
They exist. I think I used one called "Quick Boot". I stopped using it after I corrupted my sdcard once. I guess it was in use when I decided to reboot. I figure the time it takes to do a normal power off on sequence it worth it.
:edit: It does need root. Your phone cant do much without root
If you are the kind of user that wants to add features (reboot) you are going to need root access. If you just want to use your phone out of the box and not add any functionality, dont worry about root
reboot would be a better word to use while searching. There are several apps but all require root. Here is a free one if you decide to root for this feature.
BenKranged said:
They exist. I think I used one called "Quick Boot". I stopped using it after I corrupted my sdcard once. I guess it was in use when I decided to reboot. I figure the time it takes to do a normal power off on sequence it worth it.
:edit: It does need root. Your phone cant do much without root
Click to expand...
Click to collapse
I'm sure "quick" booting and "re" booting are two different things. A normal off/on would be a reboot. Quickbooting is some kind of condensed version developed to not take as much time. I also has negative results trying to quickboot my Captivate, so I haven't tried it again since.
rpimps said:
I find it strange that there's no "restart" feature in Android, and you have to completely turn the phone off and then turn it back on. I looked in the Market for a restart widget but couldn't find one. Does anyone know of one (for non-rooted phones)?
Click to expand...
Click to collapse
try widgetsoid.it has reboot and other things like temp
WiredPirate said:
I'm sure "quick" booting and "re" booting are two different things. A normal off/on would be a reboot. Quickbooting is some kind of condensed version developed to not take as much time. I also has negative results trying to quickboot my Captivate, so I haven't tried it again since.
Click to expand...
Click to collapse
The app "quick boot" I was using has several options including "reboot" and "hot boot". "Hot boot" never worked sucessfully on my captivate. The sd corruption I mentioned happened using the (full) "reboot" option. It worked fine lots of other times so Im not pointing my finger and saying this app will always do that. Just sharing my experience that it is a possibility.
rpimps said:
I find it strange that there's no "restart" feature in Android, and you have to completely turn the phone off and then turn it back on. I looked in the Market for a restart widget but couldn't find one. Does anyone know of one (for non-rooted phones)?
Click to expand...
Click to collapse
ps:all of restart appz need root

Tasker APP Question

Hi Guys just wanted to ask some settings regarding Background Data and Market.
What I wanted to happen is I want to Setup Background Data to permanently OFF, then when I use Market it will automatically Set to ON is this possible with Tasker? how should I set this up with Tasker.
ngek202 said:
Hi Guys just wanted to ask some settings regarding Background Data and Market.
What I wanted to happen is I want to Setup Background Data to permanently OFF, then when I use Market it will automatically Set to ON is this possible with Tasker? how should I set this up with Tasker.
Click to expand...
Click to collapse
Yes this is a basic one. Do you mean all data off, or merely auto-sync off?
Start a new profile, with the context being an app, and choose market from the list.
Then when asked, choose new task, and select 'net' then choose mobile data =on, or wifi =on, or autosync = on, or all 3 depending on what you are after. Then create the profile.
With the new profile now in your list, touch the right-hand side, and select "add exit task" then basically do the opposite of whatever you turned on in the first step.
Now when market is opened, your data will turn on, and when you exit the market, it'll turn off.
If you get stuck I can create that profile and export it and post here for you to download and import.
Sent from my HTC Desire S using xda premium
Wow ty for ur fast response and intetest Sir I will try this method and if I had trouble ill ask for ur help then. Thank you
---------
I cant seem to make it work can you check my created profile, Im sure I done it right.. but everytime i click market it still asks me to enable background data.
Sent from my HTC Desire S using XDA Premium App
Ok here it is opened up my pc, hope you can check it.
ngek202 said:
Wow ty for ur fast response and intetest Sir I will try this method and if I had trouble ill ask for ur help then. Thank you
---------
I cant seem to make it work can you check my created profile, Im sure I done it right.. but everytime i click market it still asks me to enable background data.
Sent from my HTC Desire S using XDA Premium App
Click to expand...
Click to collapse
Ah. Apologies it appears that Tasker is very very broken right now.
I've been beta testing ROMs like mad recently, and have not put Tasker back on for a while. I have just tried putting it back on, and none of the App related contexts are working. I have e-mailed Tasker support to see why. I'll let you know what the response is. In the mean time, I have tested a work-around which does work. We can use a Tasker widget. Those still work!
1. Open Tasker, and select the lightning icon to create a new Task (we are not creating a profile here). Name it "Market".
2. Create the following task:
Net> Mobile Data = On
Net> Wifi = On
Tasker> Wait = 2 seconds
App> Load App> Market
3. Before hitting the tick button to save it, select an icon for the widget. Do this by pressing the button that looks like a small multi-coloured chess board. Select 'App Icon' and scroll down to the Market and select it.
4. Now save the Task.
5. Back out of Tasker and back to your home page.
6. Long-press in an appropriate space to add a widget like you normally would. Scroll down the widget list and select 'Task'. It'll have the Tasker icon by it.
7. Select the 'Market' task you just created. It'll give you a quick preview of the settings of the Task. Hit the Tick button.
8. Now your widget is set, and it'll look very similar to the Market shortcut icon. Press this, and Tasker will turn your data on, wait 2 seconds (for a connection to be made) then open the Market.
9. If 2 seconds is not long enough, edit the Task to bump the wait up to 3 or 4 seconds. 2 seconds worked for me.
The only downside to this over a Profile, is that you'll have to manually turn the data back off afterwards. You could either use the HTC widgets, or create another widget using the above steps and just set it to turn off 3G and wifi in one go when pressed. Call it "Data Off" or something.
Hope this helps for now. I'm keen to see why Tasker seems to have gone wrong as I'm one of it's biggest advocates. I'll be sure to post back here when I've gotten to the bottom of it.
Done it. but I couldn't try it right now no Wifi Im outside the house lol will try this when i get home.
Hope tasker will get fixed soon I tried your first Instruction and I think I followed it correctly.
Thanks a lot
One more thing when I add the Widget an Error appears "Warning: couldn't save data, making backup on SD" is this Ok?
ngek202 said:
Done it. but I couldn't try it right now no Wifi Im outside the house lol will try this when i get home.
Hope tasker will get fixed soon I tried your first Instruction and I think I followed it correctly.
Thanks a lot
One more thing when I add the Widget an Error appears "Warning: couldn't save data, making backup on SD" is this Ok?
Click to expand...
Click to collapse
Yeah that's fine.
And I've had progress with Tasker not working on my phone. I changed the kernel I was using and it started working again! MDJ's Unity V4 Kernel works perfectly with Tasker.
What are you running? Are you s-off/rooted? I rooted my phone almost straight out of the box, so have never run Tasker on a stock kernel.
Thank you for your post as it has helped highlight something that I had missed in testing! Ironically I thought putting Tasker on a beta ROM would interfere with the bug finding process. We live and learn!
Thank you for your post as it has helped highlight something that I had missed in testing! Ironically I thought putting Tasker on a beta ROM would interfere with the bug finding process. We live and learn!
Click to expand...
Click to collapse
wow cool
Oh mine's S-OFF and Rooted too, I'm currently using Virtuous Unity 2.37 I'm not sure if this is the Kernel I just looked over the "About Phone" it's 2.6.35.13-UNITY-V4-g4796564
oh it says [email protected] #2.. so I think we have the same Kernel? I'm not well aware of this stuffs or maybe I just need a working Wifi Connection still outside Ill be home in 5hrs..
Ah. It was putting unity v4 back on that fixed it. Perhaps try reflashing it.
Sent from my HTC Desire S using xda premium
Is this the one http://forum.xda-developers.com/showthread.php?t=1100396
That's the kiddie.
Sent from my HTC Desire S using xda premium
Thanks again will try this when I get home and Post what happens next.
Sad
Still didn't work tried both methods and Reflashed the Kernel but to no avail , but thanks for the effort and interest in helping me though
must not be compatible with my current ROM
Thanks
(Pressed Thanks)
Tasker dev emailed me back. They have confirmed reports of app recognition failures on certain custom ROMs. Yours must be one of them. Have you asked the dev of your rom about it? Perhaps he could help.
Sent from my HTC Desire S using xda premium
yeah maybe that's the right Idea
I believe you've all misunderstood the OP. (or maybe I misunderstood him)
Tasker doesn't support turning OFF the Background Data setting under the Account & Sync option.
I am looking for an app that could turn this OFF and ON as well.. Don't know if AutomateIt supports it.
Skanob said:
I believe you've all misunderstood the OP. (or maybe I misunderstood him)
Tasker doesn't support turning OFF the Background Data setting under the Account & Sync option.
I am looking for an app that could turn this OFF and ON as well.. Don't know if AutomateIt supports it.
Click to expand...
Click to collapse
Yes unfortunately tasker can't yet turn this off, but with auto-sync turned off (which it can do) then battery drain and data usage are minimal. I don't think turning off both makes for a greater advantage.
Sent from my HTC Desire S using xda premium
wnp_79 said:
Yes unfortunately tasker can't yet turn this off, but with auto-sync turned off (which it can do) then battery drain and data usage are minimal. I don't think turning off both makes for a greater advantage.
Sent from my HTC Desire S using xda premium
Click to expand...
Click to collapse
Based on my experience, it might..
I posted this a while back.
http://forum.xda-developers.com/showpost.php?p=14647492&postcount=106

[Tweaks] some build.prop tweaks

been playing around with build.prop tweaks today. here's some that i have had good results with:
setting dalvik to 64
yes, that's high, but, switching screens on the homescreen has been a lot smother. you may have some issues with smaller apps, if so, try a lower setting. stock is 42, 48 may work good if you have a lot of smaller apps.
i also added these, so far so good, no problems. these are older tweaks, but they seem to be working here, but it's hard to tell
Code:
ro.HOME_APP_ADJ=1
locks home in memory
Code:
ro.media.enc.JPEG.quality=100
makes pics display at 100% quality
Code:
debug.sf.hw=1
enables hardware rendering of UI and home
take caution when editing build.prop. the file is located /system
do not delete or change anything else if you don't know what you're really doing.
debug.sf.nobootanimation=1
Disables the boot animations
svtfmook said:
ro.HOME_APP_ADJ=1
locks home in memory
Click to expand...
Click to collapse
Do you know if that works with 3rd party launchers (i.e. is HOME_APP whatever is linked to the home button, not hard coded to the moto home app)?
Wow, nice work guys. Quick question, does disabling the boot animation = faster boot time.
Sent from my MB865 using XDA App
916x10 said:
Wow, nice work guys. Quick question, does disabling the boot animation = faster boot time.
Sent from my MB865 using XDA App
Click to expand...
Click to collapse
Not sure. You will still have the android boot animation. You just won't have the AT&T boot animation
Sent from my MB865 using XDA App
I tried using the these settings and it bricked my phone. Just FYI for anyone thinking of trying them out.
I think it has to do with the hardware rendering setting, because when I boot the video is very distorted and slow. It then goes black and vibrates every few seconds and I can't get it back. Restore to factory default was no help at all.
Any thoughts on how I might get this thing running again?
here's the stock build.prop
if the device will power on, extract it from this zip and try to adb push it to /system
not sure how these settings would brick your phone though. are you sure you added them to build.prop and not default.prop? did you change anything else in build.prop?
Yeah, I only added the options listed in the forum post, and didn't change anything else.
The first thing I tried was shelling into the phone using adb, but it didn't work at all in the state the phone was in. After restoring to factory defaults I was able to boot and get the initial setup screen for the phone where it asks you to add your email accounts, etc., but when clicking "done" the app would crash and restart effectively locking me out of the phone.
I'm assuming the crash is because I de-bloated the phone previously, and maybe it's missing a system library? Who knows.
In any case it looks like I may be taking a trip to the AT&T store
mspaulding06 said:
Yeah, I only added the options listed in the forum post, and didn't change anything else.
The first thing I tried was shelling into the phone using adb, but it didn't work at all in the state the phone was in. After restoring to factory defaults I was able to boot and get the initial setup screen for the phone where it asks you to add your email accounts, etc., but when clicking "done" the app would crash and restart effectively locking me out of the phone.
I'm assuming the crash is because I de-bloated the phone previously, and maybe it's missing a system library? Who knows.
In any case it looks like I may be taking a trip to the AT&T store
Click to expand...
Click to collapse
Thats odd. A factory restore would have overwritten any changed files and added any missing apks from /system
Sent from my MB865 using XDA App
svtfmook said:
Thats odd. A factory restore would have overwritten any changed files and added any missing apks from /system
Sent from my MB865 using XDA App
Click to expand...
Click to collapse
Did you use a text editor on the phone or on a computer? If you use one that word wraps it will fubar the whole thing.
Here's a list of build.prop tweaks I found searching around, I haven't tried any myself yet, but hey, the more the merrier, right?
dasfiend said:
Did you use a text editor on the phone or on a computer? If you use one that word wraps it will fubar the whole thing.
Click to expand...
Click to collapse
i used an on the phone editor. windows editors will wreck it, linux editors are fine with build.prop though. not sure what the member who bricked his phone used.
I just tested the boot animation setting with a stopwatch and it's pretty much the same time one way or the other.
moofree said:
I just tested the boot animation setting with a stopwatch and it's pretty much the same time one way or the other.
Click to expand...
Click to collapse
Ya, but at least we don't have to look at the annoying super bright white at&t animation anymore.
moofree said:
I just tested the boot animation setting with a stopwatch and it's pretty much the same time one way or the other.
Click to expand...
Click to collapse
Thank you for checking and confirming that. I'll hit the button when I get to my pc.
Sent from my MB865 using XDA App
I did in fact use my phone to edit the build.props file (instead of using adb shell). I used the text editor feature of root explorer. I didn't notice the text wrap on the screen or anything like that when I was typing. I suppose that could've been the culprit.
mspaulding06 said:
I did in fact use my phone to edit the build.props file (instead of using adb shell). I used the text editor feature of root explorer. I didn't notice the text wrap on the screen or anything like that when I was typing. I suppose that could've been the culprit.
Click to expand...
Click to collapse
root explorer is fine, that wasn't your problem. i use root explorer as well. i think that either something else was changed, or something else is the problem.
svtfmook said:
Code:
ro.media.enc.JPEG.quality=100
makes pics display at 100% quality
Click to expand...
Click to collapse
With this setting does it change the display of your contact photos? Which show pretty crappy on the call screen.
jshinn1 said:
With this setting does it change the display of your contact photos? Which show pretty crappy on the call screen.
Click to expand...
Click to collapse
That's one thing I hope can be modded once the bootloader gets unlocked. My X10 showed the contact pics the top 1/3rd of the screen and the quality was very good, would be nice to see something similar on this phone.
moofree said:
I just tested the boot animation setting with a stopwatch and it's pretty much the same time one way or the other.
Click to expand...
Click to collapse
Same here, it just doesn't show the animation, but takes the same amount of boot time.
916x10 said:
That's one thing I hope can be modded once the bootloader gets unlocked. My X10 showed the contact pics the top 1/3rd of the screen and the quality was very good, would be nice to see something similar on this phone.
Click to expand...
Click to collapse
Exactly its annoying to have these great pics and when that person calls me it looks like crap not necessarily a huge deal but something I would like to see

[Q] Hateful GoogleNow won't stay turned off

Hi,
I'm running JB 4.2.
I hate Google Now with a passion, and have been trying to disable it - permanently. I simply want a search bar that returns results in Firefox.I never want to be pestered by GoogleNow's notices, or, especially, its attempts to upsell itself.
I've read dozens of posts here in the forums, and *think* I've tried most advice (uninstalling updates, toggling off, etc).
Atm, in my Google Search settings, Google Now *IS* toggled to off.
But, every time I click on the search/quicksearch widget bar to enter something, GoogleNow pops up forcing me to Click "Next" several times, then gives me only two options "Later" or "I'm in".
I want to effectively implement a "Never" option.
How do I make GoogleNow go away, and stay away?
Someone correct me if I'm wrong due to I have not rooted my s4 as of yet but rooting your phone is the only possible way that I can think of and this is not confirmed but know just about everything can be removed via a rooted phone. ....
Sent from my SPH-L720 using xda app-developers app
My phone *is* rooted.
I can make any changes that need to be made.
The problem is finding the right change that works AND sticks.
Try:
ZDbox
its a great tool. look for it at the play store.
its, as far as i know, create offical from xda (or here at xda forum)
I use it on my S3, and you can do alsmost anything with this tool.
just give it a try
RahXephon91 said:
ZDbox
Click to expand...
Click to collapse
And what, SPECIFICALLY, should be done with ZDbox to permanently disable GoogleNow?

Workaround for disabling native tether with 3rd party apps

I have Verizon non Dev on kit kat rooted and write protection off. Nothing I did with any apps like tasker, secure settings or macro droid could disable tether, had to use quick toggles to do it. Being I trigger tether everytime I am in my car I wanted to find a way to get disabling working when I left my car.
I figured a workaround, I don't like it but it works. Basically involves secure settings and tasker or macro droid. I have the task turn on airplane mode, wait two seconds, turn off air plane mode, turn on wifi. Only tested a couple times just now but did work. Just worry that multiple airplane mode triggering may cause radio issues over time. I turn on wifi at the end because almost always after I leave my car I am somewhere I use wifi.
Sent from my XT1060 using XDA Premium 4 mobile app
sfetaz said:
I have Verizon non Dev on kit kat rooted and write protection off. Nothing I did with any apps like tasker, secure settings or macro droid could disable tether, had to use quick toggles to do it. Being I trigger tether everytime I am in my car I wanted to find a way to get disabling working when I left my car.
I figured a workaround, I don't like it but it works. Basically involves secure settings and tasker or macro droid. I have the task turn on airplane mode, wait two seconds, turn off air plane mode, turn on wifi. Only tested a couple times just now but did work. Just worry that multiple airplane mode triggering may cause radio issues over time. I turn on wifi at the end because almost always after I leave my car I am somewhere I use wifi.
Sent from my XT1060 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Have you tried the wireless tether fix in my thread? Does that give you the same issues?
chaoslimits said:
Have you tried the wireless tether fix in my thread? Does that give you the same issues?
Click to expand...
Click to collapse
I did something wrong and can't boot right. I was in my phone and downloaded the tether zip. I backed up my original framework-res.apk to my phones download folder. I then copied and pasted into the system/framework folder your modified framework-res.apk. When I did this the phone appeared to soft reboot, then went black. Now every time I try to turn on my phone, it gets to the verizon logo and goes black. I press the power button for 10 seconds and get it to turn on, but same black screen on verizon logo. I can get into the bootloader menu, but ADB does not list any devices connected when in this mode. I am in fast boot mode it appears as fast boot commands work. Suggestions to get my phone booted?
Flash the system.img should get you going again
shane1 said:
Flash the system.img should get you going again
Click to expand...
Click to collapse
Downloading stock vzw 4.4 zip now. I assume I will need to reroot and redo write protection after doing this, correct?
And if I want to attempt to use the modified framework-res.apk again, I assume now using adb is the correct way to do so, but how do I prevent this boot problem from happening again, since I can't see how using ADB would be any different.
If you flash just the system you should mantain root and if you ran motowpnomo write protection is permanently off. If you loose root you won't be able to reroot until jcase pushes another release.
shane1 said:
If you flash just the system you should mantain root and if you ran motowpnomo write protection is permanently off. If you loose root you won't be able to reroot until jcase pushes another release.
Click to expand...
Click to collapse
Pushed System.img, lost root. Gonna at least attempt from scratch using RSD Lite and camera update to try to get root back.
Any update on this? I'm in the same boat as OP.
Update: Using the Xposed method, tasker CAN turn off the wifi hotspot. Thanks!
Update 2: Got it to work...most of the time. I doesn't want to turn wifi back on after turning tethering off, though. I'll keep working on it...

Categories

Resources