While using cyanogen's rom, Droid wall gives an error when you apply the settings. Here's what i did to get it to work the first time(only):
Connect phone via usb
Open command-prompt
Type adb devices - you should see your phone's serial number
Type adb remount - should say remount succeeded
Type adb shell
Type chmod 755 /system/bin/iptables
Type exit
Type adb reboot​After the reboot you can install Droid Wall and apply the settings successfully.
still figuring out.....
rodrigo.zr said:
What ROM are you using? It is possible that the iptables bundled with your ROM does not support the "owner" module which Droid Wall makes use.
You can try a few things:
Restart your phone and click on "Show rules" again to see if anything has changed.
If that doesn't work:
Start an "adb shell".
type:
iptables -A OUTPUT -o rmnet+ -m owner --uid-owner XXXXX -j ACCEPT
(replace XXXXX by the number displayed by Droid Wall right before the the browser - 10028 on mine)
Check the iptable output for any errors.
If your iptables don't support this module you can probably update it and check if that works.
Cheers!
Click to expand...
Click to collapse
Droid Wall author discussion here
Pending issue
Cyanogen's google code website has a listed issue regarding this for the N1. But it's been marked closed.
I am doing some testing and writing scripts in GScript and was wondering if there is a power off or shutdown command (as opposed to reboot). I want a command that will literally just turn the phone off but it needs to be a command line command, not an app.
Thanks
Code:
C:\>adb shell
* daemon not running. starting it now *
* daemon started successfully *
# which shutdown
which shutdown
/system/bin/shutdown
http://www.computerhope.com/unix/ushutdow.htm
lol i tried "shutdown -k" and it shutdown my phone!
Code:
# shutdown -k wait
shutdown -k wait
mount: mounting tmpfs on /dev failed: Device or resource busy
mount: mounting sysfs on /sys failed: Device or resource busy
mount: mounting none on /dev/cpuctl failed: Device or resource busy
C:\>
When I try shutdown from terminal it just locks the phone up completely
+1
I too am trying to achieve phone power down using a script. But like you when I issue the shutdown command the phone immediately powers off and won't switch on again without a battery pull.
Same for reboot command.
I am using gscript lite and have s-off with a stock Froyo sense ROM.
"poweroff" generally works in linux systems. I haven't tried this in Android though.
"reboot -p"
GldRush98 said:
"poweroff" generally works in linux systems. I haven't tried this in Android though.
Click to expand...
Click to collapse
Poweroff works if run using busybox, however, the command needs parameters to run.
#poweroff (doesn't work)
#busybox poweroff (also doesn't work)
#busybox poweroff -d 8 -f (works!!)
The -d 8 delays by 8 seconds to give system a chance to stop processes and unmount filesystems, whilst the -f forces poweroff.
Works a treat using Gscript. Not sure if it harms the system as the busybox poweroff command does not use init. That may be a bad thing. I just don't know enough about Android/Linux to know that. Maybe someone else does???
"reboot -p" works.
"busybox poweroff -d 8 -f" works too.
"busybox poweroff -f" works.
If I use the power button to shut down it takes a bit of time, goes through a process. If I shut down using terminal, by the command reboot -p, the shut down is instant. Is there any harm in that, or is that ok to shut down like that?
I like to find ways to reduce the use of the power button, as some have reported it fails after time, but if it's not good for the system then I'll just shut down normally using the power button...
YES! "reboot -p" works for me
duskymagus said:
"reboot -p" works.
"busybox poweroff -d 8 -f" works too.
"busybox poweroff -f" works.
Click to expand...
Click to collapse
YES! "reboot -p" works for me
"reboot -p" has a possibility of harming the phone.
What if none of these commands work for my device?
reboot does work.
reboot -p does not, just returns to command prompt.
shutdown does not work (no such file)
poweroff does not work (no such file)
busybox is installed, but these applets are not installed
Is there any other way?
"adb shell shutdown"
AngelOfGrief said:
What if none of these commands work for my device?
reboot does work.
reboot -p does not, just returns to command prompt.
shutdown does not work (no such file)
poweroff does not work (no such file)
busybox is installed, but these applets are not installed
Is there any other way?
Click to expand...
Click to collapse
If you use adb:
"adb shell shutdown" - performs immediate shutdown
poweroff under su always worked for me.
Nothing works but reboot -p for abrupt shutdown on my phone..
It may cause harm
Bryce2010 said:
If I use the power button to shut down it takes a bit of time, goes through a process. If I shut down using terminal, by the command reboot -p, the shut down is instant. Is there any harm in that, or is that ok to shut down like that?
I like to find ways to reduce the use of the power button, as some have reported it fails after time, but if it's not good for the system then I'll just shut down normally using the power button...
Click to expand...
Click to collapse
Sometimes there are problems when you use reboot -p too often, like failure in file systems because they are not unmounted safely. I do not use this command very often. I only use reboot recovery for flashing roms. Just try not to use this command very often to prevent harm okay?
Current Phone/ROM:
Samsung Galaxy Ace GT-S5830/Cyanogenmod 10.1 RC1 by bieltv3
Recovery:
CWM v5.0.2.6
ROMs used in the past: CM9 RC2 by Maclaw, SGS2 v9 ROM, AOSP ICS ROM by Maclaw, PAC ROM(very disappointed with this, no play store included.)
reboot -p actually does a reboot
Hi there,
on my device
Code:
reboot -p
does shut down the device, but after a few seconds (like 2 or 3 seconds) it boots again. So actually it behaves like doing a normal reboot. Any ideas how I can fix this issue?
Thank you and kind regards,
ToBe_HH
Hello gyus,
is there any Android application to perform power off?
Thank you
The followin shut down my CM13 using the Cerberus shell. Very slick.
su -c 'am broadcast android.intent.action.ACTION_SHUTDOWN && sleep 5 && reboot -p'
from:
android stackexchange com/questions/73001/how-to-shutdown-android-via-ssh-command
gorlox said:
The followin shut down my CM13 using the Cerberus shell. Very slick.
su -c 'am broadcast android.intent.action.ACTION_SHUTDOWN && sleep 5 && reboot -p'
from:
android stackexchange com/questions/73001/how-to-shutdown-android-via-ssh-command
Click to expand...
Click to collapse
works perfectly, also with 'reboot' and 'reboot recovery'
Can anyone tell me the differences btn using reboot -p command and classic way by pressing power button?
reboot -p turns off the phone very quickly, I'm afraid that it's not good for the system
My Galaxy Ace, won't get on after I am execute command reboot -p through adb.
Thats still my big question, how to safely shutdown android through adb shell.
Hey!
Just wanted to know if it is possible to deactivate charging LED without using lightflow because it has some bugging sometimes !
Thanks
Gesendet von meinem HTC One mit Tapatalk 2
nobody`?
so_ony said:
nobody`?
Click to expand...
Click to collapse
You could place a small sticker over the LED I guess, in all seriousness
MacHackz said:
You could place a small sticker over the LED I guess, in all seriousness
Click to expand...
Click to collapse
sorry but I dont wanna do that I would like to disable it like you can do it on the galaxy s4
*** Must be ROOTED ***
I have a "night mode" tasker profile set up that does this for the backlight buttons. I just tried it for the charging LED and I think it works. NOTE: this will disable the LED completely until you revert it.
Task Edit:
NIGHT MODE ON (when phone is plugged into charger AND time is between 11pm and 6am)
Wait 2 seconds
Run Shell -> Command: (disables RED LED)
Code:
chmod 0333 /sys/class/leds/amber/brightness; echo 0 > /sys/class/leds/amber/brightness
Run Shell -> Command: (disables GREEN LED)
Code:
chmod 0333 /sys/class/leds/green/brightness; echo 0 > /sys/class/leds/green/brightness
Run Shell -> Command: (disables backlight buttons)
Code:
chmod 0333 /sys/class/leds/button-backlight/brightness; echo 0 > /sys/class/leds/button-backlight/brightness
Silent Mode on
Media Volume 0
You're basically changing permissions so the system cannot modify the brightness property of the LEDs. You are then setting the brightness to 0. Until you change the permissions back to 644, your LEDs will be off. No charging light, no LED notification.
Task Edit:
NIGHT MODE OFF (exit task)
Run Shell -> Command: (enables RED LED)
Code:
chmod 0644 /sys/class/leds/amber/brightness
Run Shell -> Command: (enables GREEN LED)
Code:
chmod 0644 /sys/class/leds/green/brightness
Run Shell -> Command: (enables backlight buttons)
Code:
chmod 0644 /sys/class/leds/button-backlight/brightness
Silent Mode off
Media Volume 10
Also if you wanted you can make a single shell command and just separate all the commands by semicolons to streamline.
minuteZERO said:
*** Must be ROOTED ***
I have a "night mode" tasker profile set up that does this for the backlight buttons. I just tried it for the charging LED and I think it works. NOTE: this will disable the LED completely until you revert it.
Task Edit:
NIGHT MODE ON (when phone is plugged into charger AND time is between 11pm and 6am)
Wait 2 seconds
Run Shell -> Command: (disables RED LED)
Code:
chmod 0333 /sys/class/leds/amber/brightness; echo 0 > /sys/class/leds/amber/brightness
Run Shell -> Command: (disables GREEN LED)
Code:
chmod 0333 /sys/class/leds/green/brightness; echo 0 > /sys/class/leds/green/brightness
Run Shell -> Command: (disables backlight buttons)
Code:
chmod 0333 /sys/class/leds/button-backlight/brightness; echo 0 > /sys/class/leds/button-backlight/brightness
Silent Mode on
Media Volume 0
You're basically changing permissions so the system cannot modify the brightness property of the LEDs. You are then setting the brightness to 0. Until you change the permissions back to 644, your LEDs will be off. No charging light, no LED notification.
Task Edit:
NIGHT MODE OFF (exit task)
Run Shell -> Command: (enables RED LED)
Code:
chmod 0644 /sys/class/leds/amber/brightness
Run Shell -> Command: (enables GREEN LED)
Code:
chmod 0644 /sys/class/leds/green/brightness
Run Shell -> Command: (enables backlight buttons)
Code:
chmod 0644 /sys/class/leds/button-backlight/brightness
Silent Mode off
Media Volume 10
Also if you wanted you can make a single shell command and just separate all the commands by semicolons to streamline.
Click to expand...
Click to collapse
Thanks! It worked on my att desire eye
I'm running Dirty Unicorns ROM. It has an option for custom carrier label. When I run shell for "settings list system" the line custom_carrier_label=Verizon Wireless shows. I want to hide all notifications from the lock screen and have my carrier label show %SMS (variable for unread SMS) Message if %SMS>0. My code settings put system custom_carrier_label=%SMS Message in run shell doesn't work. If this is possible what am I doing wrong?
Sent from my Nexus 6P using Tapatalk
You probably need to restart systemui for the change to take effect.
To do that, run this shell command as root:
Code:
pkill -l TERM -f com.android.systemui
If your screen is on when this command runs, whatever you are doing well get interrupted by your lock screen.
To avoid being interrupted, add this action before the shell command:
Code:
Wait Until
%SCREEN ~ off
Also, your 'settings put ...' shell command needs to be run as root.
Depending on your ROM broadcasting
Code:
android.intent.action.CUSTOM_CARRIER_LABEL
might also work.