[Q] Help - Shell Commands - EVO 4G Q&A, Help & Troubleshooting

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.

Related

Regaws Root Method???

Is there something additional I need to do to actually gain "root"? I can't install the clear lock screen from smurf, can't wireless tether.... Don't know what's going on, all of this used to work fine on my Hero - what am I missing?
I don't think you have given enough info for people to even know what the problem is that you are having. Maybe you could be a bit more specific. Do you have superuser installed?
Sorry about that.... basically im on stock 2.2 with supposed "root" using regaws method - problem is, I can't use anything though; adb, wireless tether, I can't flash a lock screen (just sits at boot screen).
Download superuser app from the market place or google it if it is not on your phone already. Install it then launch an app that requires root. You will know real fast if you are rooted.
DomSim said:
Download superuser app from the market place or google it if it is not on your phone already. Install it then launch an app that requires root. You will know real fast if you are rooted.
Click to expand...
Click to collapse
I do have SU... that's the thing but when I try ADB Remount it says device not permitted or something like that, can't remember exactly
You could try full wipe / reflash.
Maybe try a diff ROM too.
You need to flash the engineering bootloader (0.76.2000). Go to Toast's method part 2 and follow the steps to unlock nand. You need the engineering bootloader in order to access /system.
Sent from my PC36100 using XDA App
sombdy said:
You need to flash the engineering bootloader (0.76.2000). Go to Toast's method part 2 and follow the steps to unlock nand. You need the engineering bootloader in order to access /system.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Nand root... I was looking for more info on this, I thought it was the culprit, thanks - ill post results, hopefully good
Edit: Won't work "Permission denied" .... this is really starting to piss me off grrr
DirtyShroomz said:
Nand root... I was looking for more info on this, I thought it was the culprit, thanks - ill post results, hopefully good
Edit: Won't work "Permission denied" .... this is really starting to piss me off grrr
Click to expand...
Click to collapse
Have you run Unrevoked Forever? This will turn off security permissions and should then allow you to flash anything.
Sent from my PC36100 using XDA App
Ok, the reason
Code:
adb remount
doesn't work is because the boot.img isn't patched to allow that, because I forgot to at the time of posting. You still have root (as long as you actually completed the guide successfully), that's just an all time access root through adb
To acheive the same results, type
Code:
adb shell
type
Code:
su
you will then see #. thats root.
Then remount your /system partition using
Code:
mount -o rw,remount / /system
there you go.
regaw_leinad said:
Ok, the reason
Code:
adb remount
doesn't work is because the boot.img isn't patched to allow that, because I forgot to at the time of posting. You still have root (as long as you actually completed the guide successfully), that's just an all time access root through adb
To acheive the same results, type
Code:
adb shell
type
Code:
su
you will then see #. thats root.
Then remount your /system partition using
Code:
mount -o rw,remount / /system
there you go.
Click to expand...
Click to collapse
When I try to type "su" it says "Permission denied"
DirtyShroomz said:
When I try to type "su" it says "Permission denied"
Click to expand...
Click to collapse
Do you have usb debugging on?
Try the new 1 click root in the dev forum. Unrevoked 3.2. See if that doesn't do the trick.
Sent from my PC36100 using XDA App
My guess is you didn't flash the 2.2-root.zip at the end then.. That's the best I can do w/ the info you've given.
one was already asked once but i had two questions
1. Is USB Debugging turned on or off? Settings > Applications > Development
2. you are using a stock rooted rom. are you trying to use sprint's wireless tether app? Sprint's app wont work you need to download wireless tether from the market.
joebags said:
one was already asked once but i had two questions
1. Is USB Debugging turned on or off? Settings > Applications > Development
2. you are using a stock rooted rom. are you trying to use sprint's wireless tether app? Sprint's app wont work you need to download wireless tether from the market.
Click to expand...
Click to collapse
Running stock 2.2. Regaw I did flash 2.2-root at the end and I am trying to use wireless tether not Sprints hotspot
I do have superuser in my apps list and I was able to install SNeoid, Swype, Setcpu, juicedefender and a few others that may require root but it wont let me do anything via adb or install any themes/mods that come in .zips
DirtyShroomz said:
Running stock 2.2. Regaw I did flash 2.2-root at the end and I am trying to use wireless tether not Sprints hotspot
I do have superuser in my apps list and I was able to install SNeoid, Swype, Setcpu, juicedefender and a few others that may require root but it wont let me do anything via adb or install any themes/mods that come in .zips
Click to expand...
Click to collapse
ok do this in command prompt and paste the results in code tags (to save space)
Code:
adb shell ls /system/bin/
regaw_leinad said:
ok do this in command prompt and paste the results in code tags (to save space)
Code:
adb shell ls /system/bin/
Click to expand...
Click to collapse
Code:
setconsole
dumplayer
svc
e2fsck_recvy
chownto
apph
ps
id
chownThp
notify
dhcpcd
pand
renice
bugreport
snd8k
hciattach
iqfd
top
lsmod
setprop
ionice
ifconfig
iptables
kthp_proxy
logwrapper
getevent
htcipcd
su
start
iqd
wipe
ip
smd
sleep
getWiMAXPropDaemond
newfs_msdos
vdc
sync
udhcpd
pppd
rmmod
fsck_msdos
netstat
route
sound8k
rm
radiooptions
pm
logcat
setWiMAXPropDaemond
resize2fs_recvy
htc_inittest
vmstat
dvz
mmcamera_test
keystore
dmesg
system_server
linker
fbtool
reboot
sdptool
busybox
hd
iftop
insmod
bootcomplete
rild
schedtop
debuggerd
wpa_supplicant
schedtest
bluetoothd
ping
btld
ime
omx_tests
tc
sendevent
racoon
toolbox
date
bma150_usr
bootanimation
wimaxDhcpRenew
log
installd
wimax_uart
applypatch
wimaxAddRoute
dexopt
monkey
ln
getprop
album_hdmiexe
stop
surfaceflinger
uevent
akmd
monitorMTD
wimax_mtd
mv
debug_tool
servicemanager
wimaxDumpKmsg
dumpstate
ipd
DmWrapperTest
nandread
kill
gzip
chmod
rmdir
lsc_camera
dbus-daemon
run-as
netcfg
cat
htclogkernel
sh
mount
printenv
mkdir
bmgr
wimaxDhcpRelease
umount
mke2fs_recvy
dnsmasq
input
df
ioctl
am
wimaxDumpLogcat
app_process
chown
htc_timezonetest
service
netd
ls
netsharing
cam_ins_spmo
mm-venc-omx-test
dalvikvm
ser2net
dmagent
shutdown
ndc
dumpsys
mediaserver
vold
sequansd
awb_camera
dd
keypress
cmp
mscompress
wimaxDumpLastKmsg
mtpd
watchprops
ok, so "su" is in there... you should be able to
Code:
adb shell
su
and it give you a #
try opening SuperUser.apk on your phone, THEN doing the above commands. a pop up should come up on your phone saying to allow root to su
regaw_leinad said:
ok, so "su" is in there... you should be able to
Code:
adb shell
su
and it give you a #
try opening SuperUser.apk on your phone, THEN doing the above commands. a pop up should come up on your phone saying to allow root to su
Click to expand...
Click to collapse
that worked, now to get remount do i have to always use that previous command you wrote?

[Q&A][Help] So you want to be a dev?

This is a thread that will allow you to ask specific questions and get some help with any dev work you may be attempting.
This will be a community effort between enewman17, loserskater, stratatak7, and myself. It would be great if other devs want to join in.
Acceptable questions
"I am trying to recompile X using APK Tool and I get this error. What am I doing wrong?".
"I am trying to flash the ROM I just built and I keep getting a status 0 error. Any thoughts?".
Unacceptable questions
"How do I compile/decompile apks?"
"How do I mod a kernel"
Theming questions go here.
Thread Rules
Do not post unless you have searched the thread.
Only post specific questions.
Only post long sections of code using the code or hide tags.
Your question may not be answered immediately. Be patient.
Use the thanks button (even if you don't get the answer you want).
Many thanks to kennyglass123 for the sticky!
Re: So you want to be a dev?
Just wanted to comment about questions.
The more info the better!
Bad comment: "I can't get X mod to work."
Better: "I'm trying to get X mod to work, and settings keeps FCing. Here's my modified files and a logcat."
Sent from my SAMSUNG-SGH-I747
Anyone feel free to PM me and I'll help you get the ball rolling if you feel your question does not meet thread criteria and you're looking to start development. I realize everyone has to start somewhere. Just be prepared for work.
mine
Now that we have thoroughly thanked each other, maybe someone will stop by with some questions. :silly:
upndwn4par said:
Now that we have thoroughly thanked each other, maybe someone will stop by with some questions. :silly:
Click to expand...
Click to collapse
LOL. I sure hope so.
For those of you reading this, feel free to ask any questions you have about Android development-related modification. I'm sure between the four of us and anyone else who wants to help out that knows what they are doing will know. I'm happy to help out with anything I can.
How do you double the hours in a day so you have enough time to actually do this stuff
Seriously though, this is a great thread and nice to see 4 of the top devs working together and willing to help.
If I ever do find the time I'm sure I'll be back.
Sent from my SGH-I747 using xda premium
jde984 said:
How do you double the hours in a day so you have enough time to actually do this stuff
Click to expand...
Click to collapse
A (somewhat) valid question: For me, it requires a very understanding wife and sleep deprivation.
______________
OK, now let's keep this thread clean and on topic. Thanks!
See in my sig a guide how to decompile apks, edit, and recompile apks! link: http://forum.xda-developers.com/showthread.php?t=2147425
My question: I'm attempting to edit smali for the first time. However, it's pretty foreign. Any guides or tutorials out there? I've searched, but nothing substantive (just some pages on the nomenclature for the dalvik bytecode). My issue is that the instructions for the mod have different registers than me and I can't figure out how to adjust the changes.
It's difficult to answer generic questions like that.
Post up what you are trying to do and maybe we can all work it our together.
headsest control for AOSP
Ok... Team LiquidSmooth is stumped as am I, and I've spent about 8-10 hours searching all in all, through Google, CM threads, Android General/q&a and githubs... I'm still looking but wondering if I could get some help before their team or I pull any more hair out. Basically just what my title says, need the code for controlling music and phone calls from headset controls. The capacitive keys light up when the buttons are pressed but no actions are performed. It's as if the rom is just missing the path for them or something. Any help on where to search or anything, I'm game. Thanks guys.
SOLVED, thanks anyways guys :good:
upndwn4par said:
It's difficult to answer generic questions like that.
Post up what you are trying to do and maybe we can all work it our together.
Click to expand...
Click to collapse
Got it. I'll write up my issues...but, I've been having some trouble with adb and think that might be a bigger issue, haha:
I'm trying to allow adb to run as root. I decompiled boot.img, changed ro.secure to 0, recompiled boot.img, and pushed. Default.prop now shows ro.secure=0. But, I tried running adb remount and I still get permission denied? Someone said there may be other edits required, but I can't seem to find any.
Here's what I changed it to:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here's what ADB is telling me:
Code:
[email protected]:/ $ getprop ro.secure
getprop ro.secure
0
[email protected]:/ $ exit
exit
adb remount
[B]remount failed: Operation not permitted[/B]
ikjadoon said:
Got it. I'll write up my issues...but, I've been having some trouble with adb and think that might be a bigger issue, haha:
I'm trying to allow adb to run as root. I decompiled boot.img, changed ro.secure to 0, recompiled boot.img, and pushed. Default.prop now shows ro.secure=0. But, I tried running adb remount and I still get permission denied? Someone said there may be other edits required, but I can't seem to find any.
Here's what I changed it to:
Here's what ADB is telling me:
Code:
[email protected]:/ $ getprop ro.secure
getprop ro.secure
0
[email protected]:/ $ exit
exit
adb remount
[B]remount failed: Operation not permitted[/B]
Click to expand...
Click to collapse
Try this in terminal...
adb root
Then
adb remount
That should do it for ya.
task650 said:
Try this in terminal...
adb root
Then
adb remount
That should do it for ya.
Click to expand...
Click to collapse
Thanks for the reply! Right: I should probably be root before I try that command. Unfortunately, I tried "adb root" and it said: "adbd cannot run as root in production builds." I did some Google'ing and a few threads said that I should have changed ro.debuggable to 1 as well in default.prop.
So, I changed ro.debuggable=1 and, right, ro.secure=0 still. Then the oddest thing happened: I typed "adb root" into terminal and it went to a new line, no message. And then it disconnected my phone from ADB (I heard the little "ding ding" noise of disconnection). Unfettered, I typed in "adb remount," but of course then it complained that no devices were attached! I thought it was a fluke, so I tried it a few more times. It happened again and again.
In an ostensibly unrelated problem, I couldn't get SecSettings.apk to push back (even though android.policy.jar pushed fine), so I tried a Nandroid. TWRP seemingly did not like my changes to default.prop, as it went crazy (froze a few times) saying "cannot unmount /system" every time I tried a restore and then "Restore failed." Hmm...I pushed back my backed up boot.img and it restored fine.
I'm messing up somehow. So, I'm using VTS to unpack and repack the image. I saw that the output boot.img's are about 6MB, while the default ones I pulled are 10.1MB. Dev said it was probably just compression? Also, I'm pulling the boot.img via adb dd if=/dev/mnt/mmcblk0p7 of=/sdcard/boot.img. Are either of these too weird/wrong?
ikjadoon said:
Thanks for the reply! Right: I should probably be root before I try that command. Unfortunately, I tried "adb root" and it said: "adbd cannot run as root in production builds." I did some Google'ing and a few threads said that I should have changed ro.debuggable to 1 as well in default.prop.
So, I changed ro.debuggable=1 and, right, ro.secure=0 still. Then the oddest thing happened: I typed "adb root" into terminal and it went to a new line, no message. And then it disconnected my phone from ADB (I heard the little "ding ding" noise of disconnection). Unfettered, I typed in "adb remount," but of course then it complained that no devices were attached! I thought it was a fluke, so I tried it a few more times. It happened again and again.
In an ostensibly unrelated problem, I couldn't get SecSettings.apk to push back (even though android.policy.jar pushed fine), so I tried a Nandroid. TWRP seemingly did not like my changes to default.prop, as it went crazy (froze a few times) saying "cannot unmount /system" every time I tried a restore and then "Restore failed." Hmm...I pushed back my backed up boot.img and it restored fine.
I'm messing up somehow. So, I'm using VTS to unpack and repack the image. I saw that the output boot.img's are about 6MB, while the default ones I pulled are 10.1MB. Dev said it was probably just compression? Also, I'm pulling the boot.img via adb dd if=/dev/mnt/mmcblk0p7 of=/sdcard/boot.img. Are either of these too weird/wrong?
Click to expand...
Click to collapse
Are you running adb shell as superuser?
Try:
adb shell
su
adb remount
After typing su you will need to grant superuser permission on your device.
Things to check when pushing with adb:
System, app, and framework folders are mounted r/w in root explorer.
USB debugging is enabled.
I am lazy so I use Eclipse for pushing and pulling files.
Repacked boot images are almost always smaller than the original (sometimes a lot smaller).
upndwn4par said:
Are you running adb shell as superuser?
Try:
adb shell
su
adb remount
After typing su you will need to grant superuser permission on your device.
Things to check when pushing with adb:
System, app, and framework folders are mounted r/w in root explorer.
USB debugging is enabled.
I am lazy so I use Eclipse for pushing and pulling files.
Repacked boot images are almost always smaller than the original (sometimes a lot smaller).
Click to expand...
Click to collapse
EDIT: I gave up, haha. Thank you guys, though. I just copied and pasted both files onto /sdcard and then used the good 'ole adb shell mount -o remount,rw /system and then busybox cp of the files over. Copy worked. And the mod worked. And, honestly, I don't flash enough to make adb root worth it. It's a few extra seconds of my life to type the extra commands instead of taking 2 days to figure out this boot.img....
----
I re-did the ro.secure=0 edit in the boot.img through dsixda's kitchen, just to be sure it wasn't VTS. I also "flashed" it via adb dd in recovery this time instead of in Android. I also left ro.debuggable=0 as that does not seem pertinent to allowing adb to run as root, but simply to debug system apps, etc. Does anyone know any actual information on whether ro.debuggable=0 is required to allow adbd to run as root?
1) ADB shell as superuser: um, I didn't think about that! I thought adb root and adb remount were ADB commands, not shell commands? But, I tried it anyways, but it simply said "error: device not found". See http://prntscr.com/wvjmq
2) Right, ADB shell has SU rights as "always grant" per the SuperSU app.
3) Pushing with ADB: oh, huh! So, adb remount or mount -o remount,rw /system are not recursive? Meaning they only apply to the top-level directory? I think that's what you're saying, but that has never been a problem in the past...I think. And, technically, that doesn't explain why when I didn't mount /system/framework specifically android.policy.jar pushed fine. Pushing SecSettings.apk to /system/app causes a "Permission denied" error. Can Android reject apks? I did a few minor edits to SecSettings.apk, from this mod: http://forum.xda-developers.com/showthread.php?t=2002620
4) Thanks for the boot.img size clarification; got a little worried after having "lost" 40% of the image, haha!
tl;dr:
1) Using either VTS or dsixda's kitchen to modify boot.img to ro.secure=0 and running "adb root" = "adbd cannot run as root in production builds." Pulled and flashed boot.img via adb dd.
2) Unrelated to issue 1 (I think): after mounting system via adb shell (mount -o remount,rw /system), I cannot push SecSettings.apk into /system/app ("Permission denied"), while android.policy.jar pushes just fine /system/framework.
I appreciate everyone's help here. I think it's something really little that I've missed and I just can't figure it out.
ikjadoon said:
EDIT: I gave up, haha. Thank you guys, though. I just copied and pasted both files onto /sdcard and then used the good 'ole adb shell mount -o remount,rw /system and then busybox cp of the files over. Copy worked. And the mod worked. And, honestly, I don't flash enough to make adb root worth it. It's a few extra seconds of my life to type the extra commands instead of taking 2 days to figure out this boot.img....
----
I re-did the ro.secure=0 edit in the boot.img through dsixda's kitchen, just to be sure it wasn't VTS. I also "flashed" it via adb dd in recovery this time instead of in Android. I also left ro.debuggable=0 as that does not seem pertinent to allowing adb to run as root, but simply to debug system apps, etc. Does anyone know any actual information on whether ro.debuggable=0 is required to allow adbd to run as root?
1) ADB shell as superuser: um, I didn't think about that! I thought adb root and adb remount were ADB commands, not shell commands? But, I tried it anyways, but it simply said "error: device not found". See http://prntscr.com/wvjmq
2) Right, ADB shell has SU rights as "always grant" per the SuperSU app.
3) Pushing with ADB: oh, huh! So, adb remount or mount -o remount,rw /system are not recursive? Meaning they only apply to the top-level directory? I think that's what you're saying, but that has never been a problem in the past...I think. And, technically, that doesn't explain why when I didn't mount /system/framework specifically android.policy.jar pushed fine. Pushing SecSettings.apk to /system/app causes a "Permission denied" error. Can Android reject apks? I did a few minor edits to SecSettings.apk, from this mod: http://forum.xda-developers.com/showthread.php?t=2002620
4) Thanks for the boot.img size clarification; got a little worried after having "lost" 40% of the image, haha!
tl;dr:
1) Using either VTS or dsixda's kitchen to modify boot.img to ro.secure=0 and running "adb root" = "adbd cannot run as root in production builds." Pulled and flashed boot.img via adb dd.
2) Unrelated to issue 1 (I think): after mounting system via adb shell (mount -o remount,rw /system), I cannot push SecSettings.apk into /system/app ("Permission denied"), while android.policy.jar pushes just fine /system/framework.
I appreciate everyone's help here. I think it's something really little that I've missed and I just can't figure it out.
Click to expand...
Click to collapse
If you post the kernel (untouched) for me. I will go through the process myself. That when when/if it works I can tell you my exact steps so that you can try it out for yourself. Let me know exactly what you are trying to accomplish also.
task650 said:
If you post the kernel (untouched) for me. I will go through the process myself. That when when/if it works I can tell you my exact steps so that you can try it out for yourself. Let me know exactly what you are trying to accomplish also.
Click to expand...
Click to collapse
You guys are too kind. I feel like you have more important things to do than help a sucker like me. If you're very bored, go ahead.
Attached is my stock, unadulterated boot.img inside a zip. What I am trying to accomplish: push system files from ADB (without going into the shell). I think you need adbd to run as root to do that, right? So, an "insecure" kernel. Thus, I should be able to type "adb root" and then "adb remount" to make /system rw instead of ro and then type "adb push SystemUI.apk /system/app/SystemUI.apk" and it work. I thought I just needed to make ro.secure=0 in the boot.img's default.prop, but it looks like that is not enough.
But, honestly, if it looks like it takes too much time (I'm serious; I honestly think Samsung sent me a borked phone), it's all good. ADB shell and Busybox cp will suffice. I'm just more curious of what I am doing wrong here.
~Ibrahim~
Interesting. I am getting the same error (yes, ro.secure=0 and ro.debuggable=1).
As soon as I am finished with the update I am working on I will look in to this - unless Task figures it out first. If for no other reason, just because I want to know.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Me>cd c:\android
c:\Android>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
041b9c2b device
c:\Android>adb shell
[email protected]:/ $ adb root
adb root
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $ su
su
[email protected]:/ # adb remount
adb remount
error: device not found
1|[email protected]:/ # adb root
adb root
error: device not found
1|[email protected]:/ #WTF?
upndwn4par said:
Interesting. I am getting the same error (yes, ro.secure=0 and ro.debuggable=1).
As soon as I am finished with the update I am working on I will look in to this - unless Task figures it out first. If for no other reason, just because I want to know.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Me>cd c:\android
c:\Android>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
041b9c2b device
c:\Android>adb shell
[email protected]:/ $ adb root
adb root
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $ su
su
[email protected]:/ # adb remount
adb remount
error: device not found
1|[email protected]:/ # adb root
adb root
error: device not found
1|[email protected]:/ #WTF?
Click to expand...
Click to collapse
You shouldn't be running adb root inside of a shell. You're running two instances of adb and only need the first connection. The reason you're getting device not found is because you're running an instance of adb on the device and it's looking for other devices. Try it again without running adb shell.
Sent from my SAMSUNG-SGH-I747

[Non-Gapps-Solution] To broken home, statusbar, QT, etc

EDIT: Skip to the bottom EDIT for the short version..
Preamble: I searched for a fix to this recently and over the past 10 months and haven't seen any real solutions to this. Most people have probably experienced this issue at some time flashing roms, especially those people running gapps-free Android :highfive: such as myself. A band-aid for fixing this is running gapps' SetupWizard and/or CM's CMAccounts, I started adding CMAccounts.apk to /system/app some months ago to fix this. I was never satisfied with this workaround though since it doesn't narrow down the actual problem, and I really like sticking to the AOSP experience, open-source, no Stasi-esque permissions, and without the need to taint my installation just to set it up (setupwizard does a lot more than you might think).
Using some additional skills I didn't have 6 months ago, I finally isolated the issue to the SQL database /data/data/com.android.providers.settings/databases/settings.db, table global, value name device_provisioned. It is set to "0" by default which leads to all these ridiculous problems, and setting it to "1" + a reboot fixes all of these problems for me. Setting it back to "0" + reboot breaks everything again, back to "1" fixes, provision.apk present or removed.. I searched for (sqlite3 dump | grep) lots of other provision and setup value differences... tested this a lot.
!!!BACKUP /data/data/com.android.providers.settings/databases/settings.db before attempting this. Use 'busybox cp -p /data/data/com.android.providers.settings/databases/settings.db Your_Backup_Location' to copy and keep correct permissions on it. I would do a nandroid backup maybe anyway. This should be harmless or very helpful, but it's a su'd command in depths of /data so ya never know.
A couple simple ways to get this set right since you can't reliably grep'n'sed here: Get a nice free sql-frontend app off fdroid or xda -very handy- and go to the settings.db file, 'global' table, and then find or add "device_provisioned" in the name column and "1" in the value column. Root Explorer has this built in I think. The better way though is to pull up the 'adb shell' terminal remotely or use a terminal emulator from the phone with free && adfree Jack Palevich's Terminal Emulator, Spartacus Rex' Terminal IDE (recommended ...for everything!), anything using a jni_exec java execute emulation command. Also Ghisler's Total commander file manager has a built-in command line for convenient executions (or cool shell-script shortcuts you can make --it was actually the first tasker).
# Enter each command line by line (after '>'):
Code:
>su
>$(which sqlite3) /data/data/com.android.providers.settings/databases/settings.db
>update global set value="1" where name="device_provisioned";
>.quit
>exit 0
# One-liner
Code:
su && $(which sqlite3) /data/data/com.android.providers.settings/databases/settings.db 'update global set value="1" where name="device_provisioned";'; exit 0
Then just reboot, enjoy that home softkey that takes you to your launcher home.. your notification bar that displays your notifications. lol such basic s***.
Hope this can help someone else out as much as it did me. You don't have to use gapps/setupwizard to fix it! I also want to make sure there isn't another rogue SQL.db value. (btw if you happen to read this and have a broken back softkey/button, your problem is likely the lib file /system/lib/jni_latinime.so. Thought I'd throw that out there.)
EDIT: Heres an update short version. I added another sqlite value that needs correcting in ROMs without gapps setup bla installed. Run these commands in terminal emulator or via adb. Just copy and paste, they need to be exact.
Check that the values on the right are "1" when you fire off:
Code:
su -c '"$(whence -p sqlite3)" /data/data/com.android.providers.settings/databases/settings.db '\''select * from global where name="device_provisioned"; select * from secure where name="user_setup_complete";'\'
Otherwise or just to be safe, fire off this wicked one liner(Warning: reboots when finished):
Code:
su -c '"$(whence -p sqlite3)" /data/data/com.android.providers.settings/databases/settings.db '\''update global set value="1" where name="device_provisioned"; update secure set value="1" where name="user_setup_complete";'\'' && sync && fsync /data; sleep 3; svc power reboot'
Done, 1-2 steps.
Great write up and worked perfectly. Any more tips tricks advice or links for non-gapps users?
namtombout said:
Great write up and worked perfectly. Any more tips tricks advice or links for non-gapps users?
Click to expand...
Click to collapse
Yeah man, glad it worked. Cheers to your cojones for trying it!
What I usually do for a no gapp solution is:
-grab the libjni_latinime lib from microgapps cause its needed for the aosp keyboard swipe usually
-use "gapps browser" for Google related stuff like gmaps.
-or use rmaps (this and gapps browser need the maps api, so you gotta pull the google maps framework jar or use the "no-gapps project" hack api /system/framework/*google*jar. Make sure to add the corresponding /etc/permissions/*google*xml files too)
-instead of gmail I use the standard email client of k9
-instead of play I use fdroid, aptoide sometimes, nextwap.net, or mobilism forums, or a lucky patcher cracked Google play. (careful with the non-fdroid ones)
Sorry bout this 6 month late reply, Jesus I gotta watch my posts more closely.

[ROOT] All 360 Mods

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

[ROOT] Navigation keys back light control

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.

Categories

Resources