Yesterday, @dproldan and I were editing my build.prop file for the 360. I figure that this might be a good thread to talk about what you have done with your build.prop and what it does.
ro.ambient.enable_when_plugged=false
and not sure if this is also needed,
ro.ambient.force_when_docked=false
This will turn your screen off when the device is docked.
@dproldan also suggests TRYING the CPU throttling property.
hw.cpu.throttle.state=1
If it doesn't work, just change it back to default.
ALWAYS remember to make a copy of the build.prop before you alter it.
XDA:DevDB Information
[ROOT] All 360 Mods, Device Specific App for the Moto 360
Contributors
abuttino, abuttino
Version Information
Status: Testing
Created 2014-10-17
Last Updated 2014-10-16
Yes! no more worries about the display getting the image persistence issue or the wife complaining about the room being illuminated by the watch.
About the throttle property. It is used in the /init.minnow.rc file, at the end you'll see that when it's not set (0), the max frequency is 1GHz, when it's set (1), the max frequency is 600MHz. It does so by writing a value to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
The valid frequencies, set in the kernel, are 300MHz, 600MHz, 800MHz and 1 GHz. so you can write directly to that and get a direct result:
Code:
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
This doesn't mean that It will use less battery, but it's something to try.
Awesome! Any chance of turning off automatic HRM? I'm really curious how much battery increases since it turns on every 5 min.
HRM?
abuttino said:
HRM?
Click to expand...
Click to collapse
Heart Rate Monitor
I found the name of the apk that needs to be modified for the HRM but I'm not at home to message dproldan
Any way to change the ambient mode to be always on and/or adjust the brightness?
PsychDrummer said:
Awesome! Any chance of turning off automatic HRM? I'm really curious how much battery increases since it turns on every 5 min.
Click to expand...
Click to collapse
We need to edit a Motorola package, but that will take some time.
For the moment, you could disable the constant monitoring with:
Code:
pm disable com.motorola.targetnotif
This will remove the automatic heart monitoring, but also the default watchfaces and the connection to the motorola app in the phone. The rest of the functions are not modified. You can still access the HRM with the google Fit app.
dproldan said:
We need to edit a Motorola package, but that will take some time.
For the moment, you could disable the constant monitoring with:
Code:
pm disable com.motorola.targetnotif
This will remove the automatic heart monitoring, but also the default watchfaces and the connection to the motorola app in the phone. The rest of the functions are not modified. You can still access the HRM with the google Fit app.
Click to expand...
Click to collapse
Thanks! Will running that command with "enable" instead of "disable" reverse it?
Tonight was a very productive night for the 360!
@dproldan and I were on a conversation on the freenode IRC chat #moto360 and he and I have tested some things out that seem to work extremely well.
The first and most requested thing was to disable the unattended heart rate monitor called "Heart Activity"
So, with your rooted watch in a root/su shell prompt type:
pm disable com.motorola.targetnotif/com.motorola.omni.HealthActivity
Now, until we figure out which EXACT activity is using the pedometer, he suggested we kill the fit app altogether by using this command:
pm disable com.google.android.apps.fitness
If you feel that you MUST disable the Heart Rate program that DOES NOT take your heart rate unattended, or use any battery unless you run it yourself:
pm disable com.motorola.targetnotif/com.motorola.omni.HeartRateActivity
I've seen this mentioned a few times and, figure I would at least put it out there for people to try if they need to.
If you need to root your watch, @dproldan is selling a cradle that he designed and, is a LOT more stable than a self built cat5e connector that can short at any time.
http://forum.xda-developers.com/moto-360/development/cradles-moto360-usb-conection-sale-t2901110
The 360 community needs more devs and people willing to test. If you have any requests, solutions please post in this thread. If you need help with rooting your watch; please don't be afraid to post in the Q&A section of the 360 forum.
PsychDrummer said:
Thanks! Will running that command with "enable" instead of "disable" reverse it?
Click to expand...
Click to collapse
Yes.
Just got Rooted and and been doing little mods here and there, some inverted apps and such. The thing I'm having an issue with is writing to system, the keep getting permission failed, is any one else successfully writing to system. I even edited the 360 superboot.Img to install busybox and still no success. If any one has a solution to this I can start adding some cool mods and possible features.
Did you rename it to boot.img?
I just Rooted using the utility, I have root, just if I try pushing something to system I get a permission denied error, samething with adb remount.
Get the boot image from the post here, rename it to boot.img and do this:
"fastboot boot boot.img"
Stick with the tried and true methods
ok ill try that right now. one question are you pushing to system with the adapter or over BT?
Fastboot is always over USB. ADB commands can be done over b/t
steal25 said:
ok ill try that right now. one question are you pushing to system with the adapter or over BT?
Click to expand...
Click to collapse
To push things to /system, you need to make the partition writable. With previous devices, you'de do that with "adb remount", but the moto360 over bluetooth doesn't allow that, AFAIK. We also don't have a root adb yet, so you need to put things in /storage/sdcard0 from the computer, then move them to the final folder from a root shell
What I've been doing is:
Code:
computer: adb -e shell
moto360: su
moto360: mount -o rw,remount /dev/block/mmcblk0p14 /system
moto360: exit
moto360: exit
computer: adb -e push whatever-you-want-to-push /storage/sdcard0/
computer: adb -e shell
moto360: cp /storage/sdcard0/whatever-you-want-to-push /where-you-want-to-place-it
I hope that makes sense. I have only moved simple things yet, but I hope we'll find better ways soon.
You can push the build.prop over Bluetooth and should be able to remount system too. I've done it every time I've edited my build.prop
dproldan said:
To push things to /system, you need to make the partition writable. With previous devices, you'de do that with "adb remount", but the moto360 over bluetooth doesn't allow that, AFAIK. We also don't have a root adb yet, so you need to put things in /storage/sdcard0 from the computer, then move them to the final folder from a root shell
What I've been doing is:
Code:
computer: adb -e shell
moto360: su
moto360: mount -o rw,remount /dev/block/mmcblk0p14 /system
moto360: exit
moto360: exit
computer: adb -e push whatever-you-want-to-push /storage/sdcard0/
computer: adb -e shell
moto360: cp /storage/sdcard0/whatever-you-want-to-push /where-you-want-to-place-it
I hope that makes sense. I have only moved simple things yet, but I hope we'll find better ways soon.
Click to expand...
Click to collapse
Yep makes sense, been driving me nuts, I even edited the Rooted boot . Img to install busybox and it works but when I ran busybox mount..... It returned couldn't find etc/Fstab. I'll do a little more digging when i get home
Related
READ BEFORE TRYING
I am cdma hero user and it works very well for me. This should work on gsm hero. I pulled this from HERE, it was for the Milestone Android phone which is a GSM phone.
Before enabling
*Change home laucher
*Delete htc lock screen
see below if you dont no how
Jit does not work with htc sense, it will give you many problems. I suggest using Helix launcher from market (free and its what i use daily with no issues). You can also try GDE and nexus launcher, or really anything other then sense.
To change launchers go to setting>applications>manage apps>htc sense And clear defaults. Press home and choose a different launcher.
OR download "Home Switcher" from market.. Its a free app that lets you change between launchers.
JIT does not like any HTC apps.. So delete your HtcLockScreen by doing this.
Code:
adb remount
adb shell rm /system/app/HtcLockScreen.apk
Here is the htc lock screen if you want it back
HtcLockScreen
JIT is in no way perfect on our htc hero's so MAKE A BACKUP before trying.
And you could very well run into TONS of problems, its just something to test out.
Though if used right, you wont have any problems. I use this daily.
THIS IS FOR JIT
Download: *View attachment vmlibs.zip*
Then follow these steps:
•Create 2 folders on your sdcard: “jit” & “dalbk”
•Extract the vmlibs.zip to the “jit” folder on your sdcard
•Using ADB pull your build.prop
Code:
adb remount
ADB pull /system/build.prop build.prop
-It will place the file in your c:/android/tools folder
-Edit this using notepad or similiar program.
•Add the following line to the end of the build.prop: dalvik.vm.execution-mode=int:jit
-Save the changes and move it to the directory c:/
•Push it back to your “jit” folder on the sdcard
Code:
ADB push C:\build.prop /sdcard/jit/build.prop
This will back up your current files. So you can disable jit.
Code:
ADB shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
cp /system/build.prop /sdcard/dalbk/
cp /system/bin/dalvikvm /sdcard/dalbk/
cp /system/lib/libdvm.so /sdcard/dalbk/
cp /system/lib/libnativehelper.so /sdcard/dalbk/
This will enable jit on your phone.
Code:
cd /sdcard/jit/bin
cp -f dalvikvm /system/bin/
busybox chmod 755 /system/bin/dalvikvm
cd /sdcard/jit
cp -f libdvm.so /system/lib/
cp -f libnativehelper.so /system/lib/
cat build.prop >/system/build.prop
chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libnativehelper.so
chmod 666 /system/build.prop
sync
reboot
WIPE DALVIK CACHE AFTER ENABLING JIT.. This will cause your phone from sometimes going into a boot loop.
You dont have to wipe your whole phone.. Only dalvik cache. Your phone will take awhile to reboot since its rebuilding dalvik. Be patient. If it eventually freezes then reboot and it should go through fine after that.
TO DISABLE:
This should disable JIT and return phone back to defualt
Code:
adb remount
adb shell
su
cd /sdcard/dalbk/
cat build.prop >/system/build.prop
cp -f dalvikvm /system/bin
busybox chmod 755 /system/bin/dalvikvm
cp -f libdvm.so /system/lib/
cp -f libnativehelper.so /system/lib/
chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libnativehelper.so
chmod 666 /system/build.prop
sync
reboot
Post For help if the disabling gives you any problems.. If it does you can always do back up of your rom that you should of made.
Original site http://sholes.id.au/how-to/
Awesome.. I really hope that some of the hero devs can optimize this for the hero.
madsborelli said:
Awesome.. I really hope that some of the hero devs can optimize this for the hero.
Click to expand...
Click to collapse
I am hoping this also. Most devs dont work on things like this, or know enough about it to fix it.
The only real problem I have had was using htc widgets, htc sense, and htc lockscreen. When I use other home screens, and delete the htc lockscreen, I can run error free with JIT enabled.
Jus10o said:
I am hoping this also. Most devs dont work on things like this, or know enough about it to fix it.
The only real problem I have had was using htc widgets, htc sense, and htc lockscreen. When I use other home screens, and delete the htc lockscreen, I can run error free with JIT enabled.
Click to expand...
Click to collapse
Can you feel the difference in speed?
madsborelli said:
Can you feel the difference in speed?
Click to expand...
Click to collapse
Everything is really instant. I clicked and then closed and clicked and closed multiple apps on my screen and it never hung up or lagged.
Before jit, it was pretty quick but every once in a while would slow up on opening or closing, or switching apps specialy when recieving a call or text at the same time.
One example is. Before jit I was using the yellowpages app with voice command and it would take forever loading voice and then entering what i said into the text box. I tested with jit and it was all pretty instant and never paused or lagged after multiple test.
I posted this on cdma hero and this hero, it gets alot of views but no one seems to actually been trying it and posting about it.
I would like to know what kind of improvements its makes from JIT disabled and JIT enabled for other people.
I understand you all have completely different roms so the numbers can't be directly compared. But the improvement between stock and JIT should show some resemblance from my rom and gsm roms.
Jus10o said:
I posted this on cdma hero and this hero, it gets alot of views but no one seems to actually been trying it and posting about it.
Click to expand...
Click to collapse
OK, I'm also one of the readers
The most important thing why I do not try it to use is, that I wanna held the "Sense UI".
Thats would be also the main reason for the other readers
regards
Dominic
derDominic said:
OK, I'm also one of the readers
The most important thing why I do not try it to use is, that I wanna held the "Sense UI".
Thats would be also the main reason for the other readers
regards
Dominic
Click to expand...
Click to collapse
Yeah I understand. I was one of those people. But I have come to like the helix launcher and beautiful widgets combination. I dont use any of the htc widgets other then the clock, which has a replacement for it.
Also over in cdma hero, many of the people use other launchers and dont use htc sense. Just for speed or personal favorites. I dont know how it is with here.
You can also disable jit very easily by changing the build.prop and having all htc widgets and sense usable agian.
when i do this "mount -o remount,ro /dev/mtd/mtdblock6 /system" it says
mount: device or resource busy
Also how does one get the $ sign whenever i type adb shell it automatically goes to the next line showing me #
Also after running these commands my hero boots but get stuck when i try to unlock the screen by dragging it down, is this not compatible with roise? im running Be hero 1.2.6 which is an ERIS port(2.1).
eldrid said:
when i do this "mount -o remount,ro /dev/mtd/mtdblock6 /system" it says
mount: device or resource busy
Click to expand...
Click to collapse
should be remounted when you reboot anyway.
eldrid said:
Also how does one get the $ sign whenever i type adb shell it automatically goes to the next line showing me #
Click to expand...
Click to collapse
then $ means you are logged in as an unprivileged user, the # indicates that you are root. so if you get # after opening adb shell that is fine, you can skip the 'su' command then.
eldrid said:
Also after running these commands my hero boots but get stuck when i try to unlock the screen by dragging it down, is this not compatible with roise? im running Be hero 1.2.6 which is an ERIS port(2.1).
Click to expand...
Click to collapse
second line of the first post should clarify that...
eldrid said:
when i do this "mount -o remount,ro /dev/mtd/mtdblock6 /system" it says
mount: device or resource busy
Also how does one get the $ sign whenever i type adb shell it automatically goes to the next line showing me #
Also after running these commands my hero boots but get stuck when i try to unlock the screen by dragging it down, is this not compatible with roise? im running Be hero 1.2.6 which is an ERIS port(2.1).
Click to expand...
Click to collapse
The error i received to, dont worry about it.
Yes mine goes to #, ill edit the instructions.
And after it reboots to the screen. Press menu to unlock your phone, DO NOT SLIDE.. It rarely works sliding.
And once you press menu, go to settings, applications, manage applications. Find htc sense, and CLEAR DEFAULT...
Then go to the market and download helix launcher.. You need to do all of this if you want NO force closes and no problems. Once its installed you can press home and select helix as default. Reverse the step to put htc sense back on.
If you really want to use sense ui, you must disable JIT.. Boot up your phone, let it load to the lockscreen. Dont touch anything. Do the steps to edit build.prop and do
TO DISABLE:
CHANGING THIS IN build.prop... This should disable JIT (I have not tested this yet, will post if this works later)
dalvik.vm.execution-mode=int:jit
To:
dalvik.vm.execution-mode=int:fast
push it back to your phone, and reboot
Thank you Kendong2 for replying, I was typing it out when you posted. I didnt know you had helped already.
If anyone does try this, feel free to post what home screen launcher and what errors you come across. Other then htc related things.
I just enabled JIT. Doing some tests now.
---
Alright, this are the results in a "real world" environment:
JIT DISABLED/JIT ENABLED:
NeoCore with sound: 24.4/24.4
NeoCore without sound: 28.8/28.8
Softweg GPU test: 117/116
Lag test: 41/40
Linpack: 2.312/3.663
The only noticeable result was with Linpack, let's say, RAW processing power. All the graphics benchmarks show same performance with JIT enabled. I guess it's a good thing then right?
Just enabled it as well... will test and report
now running alright and seems to be stable. can't tell too much of a difference at the moment but here is the result from linpack.
ahero v0.71 with 64MB swap
Configured with: debugger profiler hprof with_jit show_exception=1
BSK
Is an update.zip possible ? I'm at work, can't use adb right now
ok, im trying to disable it but cannot?
where do i have to change from jit to fast? in the build.prop from sd card right?
@Arkymedes
if you edit build.props in /sdcard/jit then whilst your in that directory do a :
cat build.prop >/system/build.prop
chmod 666 /system/build.prop
sync
reboot
once you have rebooted, it might be worthwhile going back into adb shell and typing this :
dalvikvm -h
i think you should not see "with_jit" in the last line.
BSK
bluescreenkid said:
@Arkymedes
if you edit build.props in /sdcard/jit then whilst your in that directory do a :
cat build.prop >/system/build.prop
chmod 666 /system/build.prop
sync
reboot
once you have rebooted, it might be worthwhile going back into adb shell and typing this :
dalvikvm -h
i think you should not see "with_jit" in the last line.
BSK
Click to expand...
Click to collapse
Followed every step that you mentioned...
After reboot that's what I get in the last line after "dalvikvm -h":
Configured with: debugger profiler hprof with_jit show_exception=1
PS: anyway, I think it's disabled since the scores in Linpack are the normal ones, around 2.250 or something.
Well well...
I just enabled this and after first reboot absolutely everything crashes and I can't get past the lockscreen. Rebooting again now.
EDIT: Same again next reboot. Am on Androbin 2.1 Vanilla ROM
@Arkymedes
if you followed the instructions you should have backups in the /sdcard/dalbk/ folder. just use the instructions again to put them all back.
but it looks like it's not now using the JIT you just copied across anyway.
BSK
Hi all, I am trying to use the Scripting Layer for Android to make a simple shell script to disable the stagefright player (the thing that causes the bad sound quality in Froyo) I made some progress, but it doesn't seem to work right. Can someone with knowledge of scripts help me? Here's what I have so far:
echo "Disable Stagefright"
su
setprop media.stagefright.enable-player false
exit
echo "Disabled"
The problem is that it never displays Disabled. It just returns to the terminal and gives # for the root prompt. Anyone know how I can get this to run properly or a better scripting language that I could use and help porting this to that language?
I'm just guessing here, but shouldn't "exit" go after "Disabled"? Otherwise the script terminates before the echo line.
Well you'd think so, but even if I do that, the script actually doesn't exit. That's the main problem, and it still won't echo that last line. Its like I can't exit su and the setprop command never goes through. Its a little annoying, because as far as I can tell, I wrote it the way it should go in the terminal app. Thanks for the input, but unfortunately, it doesn't do anything.
So it seems after typing exit in manually will terminate the script. Also, if I don't specify su, the script runs, but from what I can tell it doesn't actually do the setprop. And there's no echo's in the terminal. It runs and says would you like to exit? If I say no, there is absolutely no messages in the terminal.
su opens a new shell. so your script doesnt finish because it spawned a child process (the new shell) and is waiting for that command to finish before the next ones are run.
what you need to do is SUID that script, remove the su and exit, and run it.
SUID allows any program to be run with SuperUser permissions (read:root).
look up how to set a programs SUID bit, you'll need busybox, more specifically, chmod.
its along the lines of "chmod +s script.sh" but id double check to make sure.
Thanks! I don't understand all of that (really I'm pretty new to scripts), but I'll look into it. Hopefully I can get this figured out. I want to make two scripts to make it easy for people with rooted 2.2 to turn on and off the audio fix with one click. I'll post back if I make any progress.
edit: I just realized how easy what you said is. At least, I think its easy. The only thing I'm not sure of is where the scripts are saved to.
nenn said:
su opens a new shell. so your script doesnt finish because it spawned a child process (the new shell) and is waiting for that command to finish before the next ones are run.
Click to expand...
Click to collapse
Oh yeah, duh.
you can put the script anywhere as long as that directory is in your $PATH or, to make things simpler you can just put it in a directory already in the $PATH variable.
to check where you can put your scripts run this little line of code.
echo $PATH
Click to expand...
Click to collapse
you can add to the $PATH, but im not sure how to do that on the phone, only from a linux standpoint.
What you need to do is easy assuming that middle line "setprop media.stagefright.enable-player false" is the correct command. the script would look like this
setprop media.stagefright.enable-player false
echo "Disabled Stagefright"
Click to expand...
Click to collapse
However this does no sort of checking to see if its already disabled, if it is does it cause a problem to disable it again. doesnt let you enable it, you probably would want this. also doesnt check if the software is installed.
take the quoted text, throw it in a file and set the SUID bit and youre off.
nenn said:
you can put the script anywhere as long as that directory is in your $PATH or, to make things simpler you can just put it in a directory already in the $PATH variable.
to check where you can put your scripts run this little line of code.
you can add to the $PATH, but im not sure how to do that on the phone, only from a linux standpoint.
What you need to do is easy assuming that middle line "setprop media.stagefright.enable-player false" is the correct command. the script would look like this
However this does no sort of checking to see if its already disabled, if it is does it cause a problem to disable it again. doesnt let you enable it, you probably would want this. also doesnt check if the software is installed.
take the quoted text, throw it in a file and set the SUID bit and youre off.
Click to expand...
Click to collapse
Yeah, no idea how to work with the PATH on android. I found out the scripts are in sl4a/scripts on the sdcard. I tried to chmod directly there, but it gave me a "Bad mode" error. Looks like once I get the SUID bit done, I'm good to go.
I know it doesn't have any error handling at this point. I'm not too worried about that at this point. If it disables stagefright, then I can edit my enabling script to work and I'll have a pair of scripts to toggle the sound fix on and off. (since when I turn off stagefright it can have undesired effects on the camcorder and other media apps) Thanks a lot for the help. I'll keep trying to figure out the SUID problem. I'm running windows. I have my linux laptop running, but haven't gotten around to installing the Android sdk on it yet.
I just had an idea. Do you think I can copy the scripts to my linux computer, chmod them, and then copy them back? If that would work, that could be the easier way at this point.
Well, I tried doing the chmod +s on linux and then pushing the files back. Not sure if they kept the SUID though. They run without a problem, but it doesn't show up as changing the property. This is really dumb...
Actually setprop does not need superuser permissions. So you could simply issue the echo commands and the setprop line. Done.
Sent from my PC36100 using XDA App
I tried that first. Didn't work. I'm not sure why setprop isn't working in the shell script. So far I tried without su, with su, and changing the SUID (though I'm not sure if it sticks when its pushed back to Android. It seems like such an easy script. This is really annoying. Also, I'm pretty sure you have to have root to use setprop, at least for the use I'm using. I got the command from here: http://forum.xda-developers.com/showthread.php?t=737111
the suid wont stick when you push the file over. to see if the command is being run proper run the setprop and check its return value, i dont think this will work unless youre in a proper shell. i cant seem to find out the command to check the return value.
if the return value is anything other than 0 (zero) there was a problem.
im off for the day, work is over
Yeah, I didn't think it would stick, but oh well. I can't get the return value, but I've been doing a getprop through adb to see if the property was changed, but it never is. The shell runs, but again, no output, just runs and exits.
superlinkx said:
Yeah, I didn't think it would stick, but oh well. I can't get the return value, but I've been doing a getprop through adb to see if the property was changed, but it never is. The shell runs, but again, no output, just runs and exits.
Click to expand...
Click to collapse
Getprop shows you the value of build.prop. The setprop command does not actually change build.prop but rather changes current session settings. The settings will revert upon reboot. That is why setprop has always been touted as a temporary fix. Try this script:
Code:
echo "Disable Stagefright"
adb shell setprop media.stagefright.enable-player false
echo "Disabled"
Edit: If that does not work, insert "cd .." before you exit command in you original script. That's "cd(space).." without the quotes.
Sent from my PC36100 using XDA App
sombdy said:
Getprop shows you the value of build.prop. The setprop command does not actually change build.prop but rather changes current session settings. The settings will revert upon reboot. That is why setprop has always been touted as a temporary fix. Try this script:
Code:
echo "Disable Stagefright"
adb shell setprop media.stagefright.enable-player false
echo "Disabled"
Edit: If that does not work, insert "cd .." before you exit command in you original script. That's "cd(space).." without the quotes.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Ok, I tried the adb shell method, but that still didn't even temporarily change the build.prop. I know that using setprop is temporary, which is one of the reasons I'm using a script. I know that I can pull build.prop, edit the property and push it back, but then I'd have to put up with undesired effects.
I also tried the cd .. method, like so:
Code:
echo "enable stagefright"
su
setprop media.stagefright.enable-player true
cd ..
exit
echo "ENABLED"
(this is my second script that reenables stagefright. I have it turned off right now)
After doing that, I use adb shell from my computer and getprop still shows its false. If I run the command "setprop media.stagefright.enable-player true" from adb shell, it changes properly and shows when I say getprop. I'll probably work on it more tomorrow. Thanks everyone for the suggestions! I appreciate the help, even if it hasn't quite panned out yet.
Anyone else have any ideas? This is so dumb! I know the solution is simple, I just can't think of what it could be.
Some people have picked up an annoying bug - I'm not sure where it comes from, some believe it is the voodoo kernel, I think it is probably JPC firmware or similar.
The bug: When you have wifi on and you turn the screen off, wifi does not turn off like it should.
The reality: The wifi turn-off time has been reset to the android default 15 minutes. You can change this setting if you want. (I like 10 seconds myself.)
You will need:
1. ADB root shell access.
2. SQLite3 Explorer - http://www.singular.gr/sqlite/
or SQLiteBrowser - http://sqlitebrowser.sourceforge.net/
What to do:
1. shell command: busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
2. adb command: adb pull /sdcard/settings.db
3. Open settings.db in SQLExplorer
4. Right click on gservices or secure folders**, choose 'Show Data'
5. Click on the green plus icon "Insert Record"
6. Double click on name column, insert "wifi_idle_ms" - Double click on value column and insert "10000" for 10 seconds for wifi to turn off. 30000 for 30 seconds, etc.
7. Click on the green tick.
8. Right click on the folder again, choose show data, scroll to the bottom and ensure that your change has been made.
9. File -> Close Database
10. adb command: adb push settings.db /sdcard/settings.db
11. shell command: busybox mv /dbdata/databases/com.android.providers.settings/settings.db /dbdata/databases/com.android.providers.settings/settings.db.bak
12. shell command: busybox cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
13. shell command: chown system.system /dbdata/databases/com.android.providers.settings/settings.db
** I'm not sure if the correct folder is gservices, or secure. I believe secure is the correct one though. I just added it to both.
This is too hard:
If there are 10 or more people who have this bug but can't do the required fix, I'll make a small utility to do it for you. Let me know.
Guess I'm one of the few who really likes this feature/"bug."
kareeem said:
Guess I'm one of the few who really likes this feature/"bug."
Click to expand...
Click to collapse
If you like this bug, you might like this even more!
Settings->Wireless and network->Wi-Fi settings->menu button->Advanced->Wi-Fi sleep policy set to never
Code:
D/WifiService( 2333): setting ACTION_DEVICE_IDLE timer for 900000ms.
RyanZA said:
:
If there are 10 or more people who have this bug but can't do the required fix, I'll make a small utility to do it for you. Let me know.
Click to expand...
Click to collapse
Had a quick google but how do I get my adb shell into root? The rest makes sense.
Really i dont understand why people are so fuzzed about this "bug".Im really happy with it because at home i always use wiffi and usually i stay at home in the afternoons.So i set wiffi settings to never disconect even at night.Data connection over 3g is expensive here in portugal and i have 600mb month limit wich cost about 15 euro plus my normal bill.And its not by having wifi on during 15 minutes that will drain the battery so much.Anyways i want to thank you again for your work and dedication to help people like me that have some dificulties understanding how the android system works.
Treggs said:
Had a quick google but how do I get my adb shell into root? The rest makes sense.
Click to expand...
Click to collapse
adb shell
su
confirm in SuperUser.
done.
xan said:
adb shell
su
confirm in SuperUser.
done.
Click to expand...
Click to collapse
Ah, missed the prompt on the phone. Thanks.
fane1 said:
Really i dont understand why people are so fuzzed about this "bug".
Click to expand...
Click to collapse
Becuae WIFI, uses more battery, when not being used for data, than 3G does.
ANdpossibly, why peoples batteries, are draining so much
fane1 said:
Really i dont understand why people are so fuzzed about this "bug".Im really happy with it because at home i always use wiffi and usually i stay at home in the afternoons.So i set wiffi settings to never disconect even at night.Data connection over 3g is expensive here in portugal and i have 600mb month limit wich cost about 15 euro plus my normal bill.And its not by having wifi on during 15 minutes that will drain the battery so much.Anyways i want to thank you again for your work and dedication to help people like me that have some dificulties understanding how the android system works.
Click to expand...
Click to collapse
If you want, you can use the guide to increase it up to 30 minutes or more. Point is - choice is good.
I am having trouble getting this to work
I am typing
adb pull /sdcard/settings.db
and I am getting
abd: not found
?
This is what I have done,
Opened CMD, in the adb folder.
adb shell
su
accepted SU permissions
#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
#adb pull /sdcard/settings.db
Am I doing something wrong ?
JaGuR said:
This is what I have done,
Opened CMD, in the adb folder.
adb shell
su
accepted SU permissions
#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
#adb pull /sdcard/settings.db
Am I doing something wrong ?
Click to expand...
Click to collapse
Nope worked for me. I'm trying to figure out how to edit the file....
Do I need USB debugging on ?
JaGuR said:
Do I need USB debugging on ?
Click to expand...
Click to collapse
Yep
10 char
ryanza, thanks for finding this out. tried but cant get sq3liteexplorer to work on win7 64. i get access violation errors.
hope you'll do a simple script for this. [email protected]
sunwee said:
ryanza, thanks for finding this out. tried but cant get sq3liteexplorer to work on win7 64. i get access violation errors.
hope you'll do a simple script for this. [email protected]
Click to expand...
Click to collapse
I thought I was doing it wrong but that's exactly what I'm getting and I'm on win 7 64 too.
Maybe I should try a compatibility mode...
sunwee said:
ryanza, thanks for finding this out. tried but cant get sq3liteexplorer to work on win7 64. i get access violation errors.
hope you'll do a simple script for this. [email protected]
Click to expand...
Click to collapse
Same here to RyanZA, having trouble gettin ADB, to play corrcetly.
And I know few from whirlpool. that would also appreciate, and easier fix
Cheers
JaGuR said:
This is what I have done,
Opened CMD, in the adb folder.
adb shell
su
accepted SU permissions
#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
#adb pull /sdcard/settings.db
Am I doing something wrong ?
Click to expand...
Click to collapse
you need to exit before using adb pull
jdrake001 said:
you need to exit before using adb pull
Click to expand...
Click to collapse
Exit from what ?
I just copying what I see in the opening post, and outside of that have NO understaning
I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
Is it posible to make a CWM flash file?
Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details
H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.
H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!
You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module
craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.
Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.
Ok, added a script and instructions to the front page for simple on tablet mounting.
I've been looking for a way how to have navigation keys back light always on while screen on (I was distracted by blinking caused by short timeout value) and at the same time always off for ebook reading and video watching and the solution should be simple and future proof (working on Nougat and Oreo as well). It is partially possible with Xposed and Gravitybox, but I am preparing myself for Oreo update, so I want to replace as many of its functions as possible. Long story short, use Tasker with following:
1. Event, display on, task:
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 10 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
2. Event, display off, task:
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 0 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
3. Application, ebook reader, youtube,..
Enter task
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 0 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
Exit task
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
run shell command as root, "echo 10 > /sys/class/leds/button-backlight/brightness"
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
Hi.
Is this working?
I really hate buttons light and would like to shut them off for good.
I guess that running this script after booting should work (if yours is working)
echo 0 > /sys/class/leds/button-backlight/brightness
What do you think?
Thanks in advance.
pantezuma said:
Hi.
Is this working?
I really hate buttons light and would like to shut them off for good.
I guess that running this script after booting should work (if yours is working)
echo 0 > /sys/class/leds/button-backlight/brightness
What do you think?
Thanks in advance.
Click to expand...
Click to collapse
I am still using this method without any issues. I even enhanced it with lowering the keys back light intensity during night, quite handy in total darkness
To disable back light permanently after boot use this:
1. run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
2. run shell command as root, "echo 0 > /sys/class/leds/button-backlight/brightness"
3. run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
Explanation:
1. make sure that we have RW configuration rights (I would say that this is optional in your case, but it won't hurt anything)
2. disable brightness
3. remove RW configuration rights (otherwise system apps can and will enable the back light again when you turn screen off and on)
Thanks for you fast reply.
I'm still trying to understand how magisk works with scripting (and the permissions you mention that I didn't know were required).
I come from an old S2 running custom Jelly Bean and all this systemless stuff is new to me as previously I used to put scripts in init.d and that was all I needed, but now I don't want to modify system partition.
I am using Magisk for root and few build.prop tweaks, not sure how init.d works with it. In the past I had luck with Script manager - it was enough to create a script file, open it with Script manager and set it as "run as root and at boot time". Or you can still use an automation app which can run shell commands (Tasker has this feature for sure).
_mysiak_ said:
I am using Magisk for root and few build.prop tweaks, not sure how init.d works with it. In the past I had luck with Script manager - it was enough to create a script file, open it with Script manager and set it as "run as root and at boot time". Or you can still use an automation app which can run shell commands (Tasker has this feature for sure).
Click to expand...
Click to collapse
As far as I know, anything you put under /magisk/.core/post-fs-data.d would be ran as a script after boot.
But as I said before, just starting with this and may be talking nonsense.
I really wouldn't like to install tasker or anything else as I just want them off for the rest of my life!
Thanks!
PD: Sorry for my english.
_mysiak_ said:
I am using Magisk for root and few build.prop tweaks, not sure how init.d works with it. In the past I had luck with Script manager - it was enough to create a script file, open it with Script manager and set it as "run as root and at boot time". Or you can still use an automation app which can run shell commands (Tasker has this feature for sure).
Click to expand...
Click to collapse
Hey!
I was able to run your commands via ADB and everything is working perfect (I don't know why but they didn't work via terminal emulator)
Only issue is that whenever I reboot my phone everything is lost.
My problem is that I'm unable to make a script that runs at boot time (I'm pretty ignorant in scripting and where to put that script).
Any help or suggestions will be highly appreciated!
pantezuma said:
Hey!
I was able to run your commands via ADB and everything is working perfect (I don't know why but they didn't work via terminal emulator)
Only issue is that whenever I reboot my phone everything is lost.
My problem is that I'm unable to make a script that runs at boot time (I'm pretty ignorant in scripting and where to put that script).
Any help or suggestions will be highly appreciated!
Click to expand...
Click to collapse
Don't forget to add "su" as a first command if you are running it from terminal emulator. Try Script manager mentioned before, it can do what you want quite easily - just put all commands in a file, save it somewhere on the internal SD, open it from SM, set as run at boot and run as root and that's it. You can run your scripts on demand as well, so you can check quickly if it's working fine.
I remembered that had bought Tasker a few years ago (but never really used it) so I created a task to perform the above mentioned commands at boot.
Anyway, I'm still unable to make a script and run it via terminal emulator, and that's really annoying!
I'll keep investigating.
Thanks a lot!
pantezuma said:
Anyway, I'm still unable to make a script and run it via terminal emulator, and that's really annoying!
Click to expand...
Click to collapse
What is the exact content of the script file, what are the file permissions and how do you try to run it?
_mysiak_ said:
What is the exact content of the script file, what are the file permissions and how do you try to run it?
Click to expand...
Click to collapse
Hi!
This script is something like this:
#!/bin/sh
su
chmod 644 /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Named it "lights sh" and put in on my internal SD card,
Then, with terminal emulator browsed to its location and tried to run it via "./lights sh"
I got "Permission denied" and also some errors like "backlight not found".
Couldn't find the way to change permissions (Reading a little more found that internal SD card is mounted as non executable. Is that correct?
Later I moved the file to DATA and changed permissions to 755 obtaining the same results.
As you may notice I'm a complete noob regarding scripting and permissions and I apologize for that!
Thanks in advance!
pantezuma said:
Hi!
This script is something like this:
#!/bin/sh
su
chmod 644 /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Named it "lights sh" and put in on my internal SD card,
Then, with terminal emulator browsed to its location and tried to run it via "./lights sh"
I got "Permission denied" and also some errors like "backlight not found".
Couldn't find the way to change permissions (Reading a little more found that internal SD card is mounted as non executable. Is that correct?
Later I moved the file to DATA and changed permissions to 755 obtaining the same results.
As you may notice I'm a complete noob regarding scripting and permissions and I apologize for that!
Thanks in advance!
Click to expand...
Click to collapse
I've just made a very simple script:
1.
#!/bin/sh
echo hello world!
2. saved it to the internal sd card as "script.sh"
3. chmod 755 script.sh
4. running it as "./script.sh" gives the permission denied error, but "sh script.sh" works fine
In your case, remove "su" command from the script file itself, but run it in terminal before calling the script instead. Or just use script manager
Thanks, working great Tasker profiles...
how to lower the brightness of thw buttons? on night the light is so bright and on the white variant looks horrible xD
deewfrank said:
how to lower the brightness of thw buttons? on night the light is so bright and on the white variant looks horrible xD
Click to expand...
Click to collapse
If you have tasker:
Code:
run shell command as root, "chmod 644 /sys/class/leds/button-backlight/brightness"
if %LIGHT > 3
run shell command as root, "echo 10 > /sys/class/leds/button-backlight/brightness"
else
run shell command as root, "echo 1 > /sys/class/leds/button-backlight/brightness"
end if
run shell command as root, "chmod 444 /sys/class/leds/button-backlight/brightness"
It will set brightness based on the surrounding light level.