Using tasker to simulate power button - Tasker Tips & Tricks

I want to use tasker to turn the screen off. Secure Settings > Lock Device forces me to use pin, which is not what I want, as I use a finger print scanner to wake my device. Shell > Input keyevent 26 does not work either, as I am not rooted (Huawei Mate 9 pro, doesn't seem to have a reliable root yet).
I have tried doing it with System > Send intent, but that seems to have no effect. I dont know if I am doing it wrong. I have also tried
Code:
terminal task
, with a code like this (and some variants of it), without success:
Code:
am start --user 0 -a android.intent.extra.KEY_EVENT --es KEYCODE_POWER ACTION_DOWN
I have also tinkered with
Code:
android.intent.action.SCREEN_OFF
...but with even less success.
Any ideas as how how I can get this to work? Either with terminal emulator or tasker send intent task?

I think you can't do that cause you're using your Fingerprint. That is a security future and Tasker can't bypass it. Don't nail me on it cause I am not sure. Maybe someone else can prove me wrong.
Sent from my ONEPLUS A3003 using Tapatalk

Maybe you could setup a workaround for this. For example, you could lower the display timeout value to one second so your device locks itself.
(Don't forget to change the timeout back to your preferred value after another second!)

digitalpig82 said:
Maybe you could setup a workaround for this. For example, you could lower the display timeout value to one second so your device locks itself.
(Don't forget to change the timeout back to your preferred value after another second!)
Click to expand...
Click to collapse
Good idea. But the minimum is 7 seconds, which is too long to wait, for the solution to be worthwhile.

I found a way to do it:
1: Create a task:
display > display timeout: 8 seconds
scene: Show scene: popup - display as overlay, blocking, full screen​2: create a profile for screen on, create task:
hide scene: popup
display > display timeout: 30 seconds​

So you're hiding the ui with a black screen until the screen is really switched off after 8 seconds, right? But what happens when you press the back or home button within the 8 seconds? Does the scene disappear?

This is what I do. Just make a task with Run shell, no need for security settings app. In the command line type input keyevent 26. You then can add a short cut when you double tap the homescreen to turn off the screen.

@snorrski you might want to have a look at this:
https://forum.xda-developers.com/u/...-adb-shell-t3562013/post72212441#post72212441
It seems to be exactly what you wanted. It works without root and on my (unrooted) S7 Edge, I can still use the fingerprint sensor to unlock my device after locking it this way (input keyevent POWER).

digitalpig82 said:
So you're hiding the ui with a black screen until the screen is really switched off after 8 seconds, right? But what happens when you press the back or home button within the 8 seconds? Does the scene disappear?
Click to expand...
Click to collapse
Yes, exactly​. That's the way it is program.med for now.

digitalpig82 said:
@snorrski you might want to have a look at this:
https://forum.xda-developers.com/u/...-adb-shell-t3562013/post72212441#post72212441
It seems to be exactly what you wanted. It works without root and on my (unrooted) S7 Edge, I can still use the fingerprint sensor to unlock my device after locking it this way (input keyevent POWER).
Click to expand...
Click to collapse
Thank you! That does indeed look like what I need!

digitalpig82 said:
@snorrski you might want to have a look at this:
https://forum.xda-developers.com/u/...-adb-shell-t3562013/post72212441#post72212441
It seems to be exactly what you wanted. It works without root and on my (unrooted) S7 Edge, I can still use the fingerprint sensor to unlock my device after locking it this way (input keyevent POWER).
Click to expand...
Click to collapse
@snorrski
I know it's been over 2 years since y'all had this discussion, but I hope this still reaches you.
The power button on my Mi A1 stopped working recently and I can't seem to find it's replacement flex cable anywhere. I'm entirely new to Tasker but I have been reading for hours now to find ways to use a screen based interaction (say a double tap on the screen) to simulate the Power button to turn the screen off while still being able to unlock my phone with my fingerprint scanner.
So far, I've understood that it is doable (with an article refering to input keyevent 26), even more so on Android Pie (with another article refering to using Global_Actions) than it was previously possible, but am entirely clueless on how. I also couldn't quite understand the process of using the remote ADB shell plugin you mention here.
Could either of the two of you please share a step-by-step how-to on how to achieve the same? It would really help a lot. Thank you
Note: I'm using unrooted Mi A1 running stock Android Pie with July 1st security patch.

deepesh_p said:
@snorrski
I know it's been over 2 years since y'all had this discussion, but I hope this still reaches you.
The power button on my Mi A1 stopped working recently and I can't seem to find it's replacement flex cable anywhere. I'm entirely new to Tasker but I have been reading for hours now to find ways to use a screen based interaction (say a double tap on the screen) to simulate the Power button to turn the screen off while still being able to unlock my phone with my fingerprint scanner.
So far, I've understood that it is doable (with an article refering to input keyevent 26), even more so on Android Pie (with another article refering to using Global_Actions) than it was previously possible, but am entirely clueless on how. I also couldn't quite understand the process of using the remote ADB shell plugin you mention here.
Could either of the two of you please share a step-by-step how-to on how to achieve the same? It would really help a lot. Thank you
Note: I'm using unrooted Mi A1 running stock Android Pie with July 1st security patch.
Click to expand...
Click to collapse
Your post is getting long in the tooth. Are you still looking for help?
There are button remapping apps and apps that do double tap for off in the play store. Also, launchers can do this. Nova launcher for sure, but others I believe as well.

ktmom said:
Your post is getting long in the tooth. Are you still looking for help?
There are button remapping apps and apps that do double tap for off in the play store. Also, launchers can do this. Nova launcher for sure, but others I believe as well.
Click to expand...
Click to collapse
Hey, thanks for the suggestions. Gravity Screen, Nova Launcher as well as finally being able to understand Tasker, did help solve this issue, as I still look for a flex cable to fix the physical button issue as well.

deepesh_p said:
Hey, thanks for the suggestions. Gravity Screen, Nova Launcher as well as finally being able to understand Tasker, did help solve this issue, as I still look for a flex cable to fix the physical button issue as well.
Click to expand...
Click to collapse
Any chance this is what you're looking for?
https://www.cellspare.com/mi-a1-parts/xiaomi-mi-a1-side-key-flex-cable-module

ktmom said:
Any chance this is what you're looking for?
https://www.cellspare.com/mi-a1-parts/xiaomi-mi-a1-side-key-flex-cable-module
Click to expand...
Click to collapse
It is. Although, the price is 3.5x the price if I got it from an authorised Xiaomi service centre (except the one in my locality doesn't have it) and about 14x than what is available at local mobile spare parts shops (again not available). Hopefully, I'll find it soon.

deepesh_p said:
It is. Although, the price is 3.5x the price if I got it from an authorised Xiaomi service centre (except the one in my locality doesn't have it) and about 14x than what is available at local mobile spare parts shops (again not available). Hopefully, I'll find it soon.
Click to expand...
Click to collapse
https://www.ebay.com/itm/For-Xiaomi...851299?hash=item33fb43b7e3:g:BHEAAOSwfNpbM2Pn
https://www.parts4repair.com/side-key-flex-cable-for-xiaomi-mi-a1-5x/

Related

Running Nexus one in "Kiosk mode"?

I'm looking to use the Nexus one hardware to create a single purpose device that will run an app at boot up and not allow the user to exit the app. This device will be given to users to take home for days so needs to be tamper-proof. i.e. cannot make calls, cannot SMS, cannot access rest of the OS, etc.
At the Android API level, I believe I can auto-start the app and "disable" the home button but cannot get around the long-press home button recent app list.
One possible solution would be to open it up and physically unplug the buttons' ribbon connector from the PCB.
What I would prefer is to somehow disable the home button using a cooked ROM that will ignore it in this particular app and the app can have some kind of secret way to exit. I do not know how difficult this would be using a rooted Nexus one.
Any input will be greatly appreciated.
Thank you.
You would need to build it from source. (non winzip deving)
If any knowledgeable person get's it it would be pretty easy to boot into recovery and edit system files or wipe it.
The nexus would not be suitable for this because of the nature of the bootloader.
To be honest, I personally think you would be better off building your own device for this. I'm sure that the buttons could be disabled easily enough, but the tamper proof part is a little different.
Main reason:
If you make the device so that you can't boot into recovery, fastboot, or tamper with it in anyway. How would you yourself make any additional modifications to the device?
You guy have some good points.
Maybe it's better off just using rooted stock ROM and set it as home screen then physically disable the hardware buttons. The battery cover will be glued shut to prevent access to SIM and battery anyway
As for making changes to the app, I believe ADK will allow me to update the app through USB. I wonder if its feasible to do auto-update it over network...?
wow your trying to lock the device down sounds like steve jobs lol
would not the best approach to this is to write your app as a home replacement and not show any apps? you could disable access to app drawer and settings, then you would only need to hook/disable home long press.
You wont be able stop a savvy user from flashing something on it easily.
What about setting up a pattern lock and using FLAG_SHOW_WHEN_LOCKED
to display on top of the lock? If the user tries to exit your program they'll be greeted with the pattern lock. Have some timer so your app automatically comes back to the top.
Correct me if I'm wrong, but doesn't the last app list show NO apps if no apps were launched yet?
pikipirs said:
Correct me if I'm wrong, but doesn't the last app list show NO apps if no apps were launched yet?
Click to expand...
Click to collapse
Yes you're right. I've set my app as home screen replacement and after reboot there wasn't any 'recent app' list
Looks like I don't need a custom ROM after all.
Just out of curiosity, what exactly are you doing with the phone that requires it to be tamper proof?
-------------------------------------
Sent via the XDA Tapatalk App
The absolute minimum requirement is that we have a device we can give to a user of any technical proficiency and allow them to easily record videos and post them directly onto a website from anywhere.
[email protected] said:
What about setting up a pattern lock and using FLAG_SHOW_WHEN_LOCKED
to display on top of the lock? If the user tries to exit your program they'll be greeted with the pattern lock. Have some timer so your app automatically comes back to the top.
Click to expand...
Click to collapse
That's an interesting approach, I will have to explore that more.
How can users actually exit the app when it's over the lock screen? Does that mean all buttons including home will not do anything since lock screen is keyguarded? Does touch still register? Is this the workaround that the custom lock screen app uses?
dzeikei said:
Yes you're right. I've set my app as home screen replacement and after reboot there wasn't any 'recent app' list
Looks like I don't need a custom ROM after all.
Click to expand...
Click to collapse
How do you set an app to be the home screen replacement?

Enable tethering blindly

My SGN display was broken including the LCD, hence i'm not able to see anything. I'd like to access and control the device from my PC, what is the best app for this?
My main goal right now is to enable tethering. The touch still works, so i'm confident it can be done.
In the interim, could someone take screenshots of each step from the home screen to enable tethering and post them for me?
I'm going to try and enable it blindly.
Thanks in advance.
The device is a N7000 running stock ICS.
I had a similar problem...
http://forum.xda-developers.com/showthread.php?p=29188511
I won't say it's easy but if you are on a Samsung based ROM you might have a chance. (Obviously you'll need to buy a MHL cable though.)
Alternatively, if you've got USB Debugging turned on then you might be able to use Droid Explorer which includes a remote control add-on.
Yes, mhl cable +hdmi is the best chance
↖(^▽^)↗ Sent from Rego Galaxy Note ↖(^▽^)↗
sahyf3r said:
My SGN display was broken including the LCD, hence i'm not able to see anything. I'd like to access and control the device from my PC, what is the best app for this?
My main goal right now is to enable tethering. The touch still works, so i'm confident it can be done.
In the interim, could someone take screenshots of each step from the home screen to enable tethering and post them for me?
I'm going to try and enable it blindly.
Thanks in advance.
The device is a N7000 running
I read it before, he suggest to use your tv as your diplay.
Click to expand...
Click to collapse
I don't have one of those cables right now, and i really need to enable tethering. Could someone please post the screen shots? I don't think it will be that hard, i just need to see the position of the options on the screen
sahyf3r said:
I don't have one of those cables right now, and i really need to enable tethering. Could someone please post the screen shots? I don't think it will be that hard, i just need to see the position of the options on the screen
Click to expand...
Click to collapse
Hit Home
Swipe to Unlock
Hit Menu
Hit approx 1cm above menu button (You're now in Settings)
Hit roughly the middle of the screen (on the left hand side - its just easier on the side) "More"
Hit approximately 1cm down from the middle of the screen - "Tethering....."
Press approximately 1 inch down from the Samsung logo.. - "USB Tethering"
Good luck...
Thanks a million.
Haven't gotten it done yet, but i feel much closer.
Trying to get to settings from swiping down from the top of the screen as i'm not familiar with the other method.
sahyf3r said:
Thanks a million.
Haven't gotten it done yet, but i feel much closer.
Trying to get to settings from swiping down from the top of the screen as i'm not familiar with the other method.
Click to expand...
Click to collapse
Assuming you have swipe to Unlock
Just lock the screen with the power button - Press power button again then;
Swipe anywhere to unlock
and then press the Menu key..
The Settings option is about 1 cm or so above the Menu key
Lol, i just figured out what the menu key is. I must admit it wasn't a key i used alot.
Something else i just found out, the bottom 1/4 of the screen, touch doesn't work.
I'm starting to lose hope of getting this done.
Could you swipe down from the top of the screen to open the notification screen, there is a settings link there, thats where i'm use to getting to the settings from. I think with a screen shot of that i'll be able to get it done.
Got it done. Found a pic on the internet of the screen i was talking about. Would still like a proper pic. :good:
Removed...
Any chance you have AirDroid installed? It has a live view (screenshot) in pc browser ability built in, it can help if you don't have an MHL adapter.
If not, force an install from accessing play store from pc.
Sent from my GT-N7000 using Tapatalk 2
se1988 said:
Any chance you have AirDroid installed? It has a live view (screenshot) in pc browser ability built in, it can help if you don't have an MHL adapter.
If not, force an install from accessing play store from pc.
Sent from my GT-N7000 using Tapatalk 2
Click to expand...
Click to collapse
From what i remember starting the download from the browser just does the download and not the install, is this correct?
If thats so, i'm out of luck :crying:
sahyf3r said:
From what i remember starting the download from the browser just does the download and not the install, is this correct?
If thats so, i'm out of luck :crying:
Click to expand...
Click to collapse
Now that i clicked install on play store and see it saying installed, i'm wondering if the problem is that it won't be installed or it won't be started
sahyf3r said:
Now that i clicked install on play store and see it saying installed, i'm wondering if the problem is that it won't be installed or it won't be started
Click to expand...
Click to collapse
It is installed. Just start the app, then go to
Code:
http://(INSERT PHONE IP HERE):8888/
with your pc browser. Then work the magic from there!
EDIT: hm, you might need to set a password, dont know how easily it is to do this blindly... Anyways, worth a try!

Things to know about the Honor Note 8

I got the idea to create a topic about important things to know about the Note 8 such like in which country the LTE/4G will work and in which country not.
Real on screen time, tips and tricks to bypass certain issues and some other interesting things to know about the phablet.
I will update the main post everytime when something new is found and keep it up 2 date for users so everyone can see a quick fix or a quick answer.
If you have a fix for anything or information to update the list, please provide it in the reply`s so i can update the main post.
4G/LTE works in:
The Netherlands
Canada
UK
Germany
Spain
Poland
Greece
Russia
Australia
Switzerland
Indonesia
Things to know
Max recording resolution is not 2160p as said on the internet but max 1080P.
If you unlock the bootloader it will give you a warning when you boot up the phone saying your phone has been unlocked and can`t be trusted, this is normal when you unlocked the bootloader.
Only 1 of the 2 simcards can use 4g at the time, so there is no 4g for both of the simcards at the same time.
Hold power and volume up when starting the phone to get in the E-recovery menu.
There is only one version of this phone, the chinese one.
This version is called the EDI-AL10, and all the languages are provided on the phone.
Some websites who are selling this phone are telling that this phone misses certain languages such as dutch.
This is not true, every language is present so no worries.
Playstore is not included on the phone, you can simply download it from the HiApp which is already pre-installed on the phone.
The fingerprintscanner can take up to 4 fingers, the fingerprintscanner only works when you activate an unlock code or password to get out of the lockscreen.
Latest rom version is B029.
Previous B027
Previous B022
Previous B017
Quickfixes/Tips and tricks:
Push notifcations
To make push notifications work again create a widget (provided with the app) and place it on your home screen.
The widget will keep the services alive, even when you close the app in the taskmanager.
Make sure you toggle them on in the protected apps menu and put the powerplan on performance mode.
This works for all apps that came with the option to create a widget for it.
Homebutton changer (provided by kalinskym)
To disable HiVoice to allow a different application/ shortcut to work as the Home Button without being rooted. Download Debloater from http://forum.xda-developers.com/android/software/debloater-remove-carrier-bloat-t2998294 and disable HiVoice.apk. (com.huawei.vassistant) After you have done that you won't see HiVoice anymore and will be able to change an app/ shortcut to the home button long press by going into Apps in Settings, clicking on Advance at the bottom. Then click Default app settings and finally Assistance & voice input to change assist app (home button app/shortcut)
One handed mode
To activate one handed mode drag you finger on the navigation bar from left to right to make the screen smaller and using for the right hand.
And drag it from right to left to make the screen smaller for using it with your left hand.
Once activated drag it in the opposite way once to restore full screen or tap once on the screen above that isn't in use.
Knuckle gesture/Splitscreen
To activate "Knuckle gesture" or just splitscreen, swipe your knuckle in the center of the screen from left to right or right to left.
When doing this succesfully the knuckle command will activate splitscreen.
Knuckle gesture/Advanced screenshot
Touch (knock) your knuckle on the screen and keep touching the screen, there will come a blue sparkle once activated drag a circle or square and it will give you a selection field.
On top are some figures you can choose from.
You can now select the part you want the screenshot from and save it directly on to the phone.
Double tap your knuckle on the screen to make a full screenshot. (same as volume down+power button)
Drawing an S on the screen with your knuckle will create a screen shot while it scrolls down the page.
This wil create a screenshot with a larger screenshot containing all the footage on the screen.
Now you don't have to make multiple screenshots to get everything on the screen and down.
(Check screenshot in the attachments)
Please let me know in which country you guys are and if 4g/lte works in your country so i can update the 4g/lte list.
http://consumer.huawei.com/nl/support/downloads/detail/index.htm?id=92028
Huawei just released a beta app for android M, does anyone knows what we can do with it?
Version says Android 7
To disable HiVoice to allow a different application/ shortcut to work as the Home Button without being rooted. Download Debloater from http://forum.xda-developers.com/android/software/debloater-remove-carrier-bloat-t2998294 and disable HiVoice.apk. After you have done that you won't see HiVoice anymore and will be able to change an app/ shortcut to the home button long press by going into Apps in Settings, clicking on Advance at the bottom. Then click Default app settings and finally Assistance & voice input to change assist app (home button app/shortcut)
---------- Post added at 02:32 PM ---------- Previous post was at 02:30 PM ----------
what does it do?
Nicksterrr said:
I got the idea to create a topic about important things to know about the Note 8 such like in which country the LTE/4G will work and in which country not.
Real on screen time, tips and tricks to bypass certain issues and some other interesting things to know about the phablet.
I will update the main post everytime when something new is found and keep it up 2 date for users so everyone can see a quick fix or a quick answer.
If you have a fix for anything or information to update the list, please provide it in the reply`s so i can update the main post.
4G/LTE works in:
The Netherlands
Canada
Things to know
Max recording resolution is not 2160p as said on the internet but max 1080P.
If you unlock the bootloader it will give you a warning when you boot up the phone saying your phone has been unlocked and can`t be trusted, this is normal when you unlocked the bootloader.
Only 1 of the 2 simcards can use 4g at the time, so there is no 4g for both of the simcards at the same time.
Hold power and volume up when starting the phone to get in the E-recovery menu.
There is only one version of this phone, the chinese one.
This version is called the EDI-AL10, and all the languages are provided on the phone.
Some websites who are selling this phone are telling that this phone misses certain languages such as dutch.
This is not true, every language is present so no worries.
Playstore is not included on the phone, you can simply download it from the HiApp which is already pre-installed on the phone.
The fingerprintscanner can take up to 4 fingers, the fingerprintscanner only works when you activate an unlock code or password to get out of the lockscreen.
Latest rom version is B022.
Quickfixes:
Push notifcations
To make push notifications work again create a widget (provided with the app) and place it on your home screen.
The widget will keep the services alive, even when you close the app in the taskmanager.
Make sure you toggle them on in the protected apps menu and put the powerplan prestation mode.
This works for all apps that came with the option to create a widget for it.
Homebutton changer (provided by kalinskym)
To disable HiVoice to allow a different application/ shortcut to work as the Home Button without being rooted. Download Debloater from http://forum.xda-developers.com/android/software/debloater-remove-carrier-bloat-t2998294 and disable HiVoice.apk. After you have done that you won't see HiVoice anymore and will be able to change an app/ shortcut to the home button long press by going into Apps in Settings, clicking on Advance at the bottom. Then click Default app settings and finally Assistance & voice input to change assist app (home button app/shortcut)
Click to expand...
Click to collapse
This is useful information. Thanks for that! I have been having an issue with the fingerprint reader taking a second longer to unlock when the phone goes into a deep sleep; However, whenever the screen is recently turned off or when the phone is charging and I try to unlock it with the fingerprint scanner, it works super fast. It's only slow when I initially wake the phone from a deep sleep. Has this happened to you/anyone? I think it may either be an app or marshmallow doze feature. I would appreciate any suggestion/advice. Thanks.
Mrplennium said:
This is useful information. Thanks for that! I have been having an issue with the fingerprint reader taking a second longer to unlock when the phone goes into a deep sleep; However, whenever the screen is recently turned off or when the phone is charging and I try to unlock it with the fingerprint scanner, it works super fast. It's only slow when I initially wake the phone from a deep sleep. Has this happened to you/anyone? I think it may either be an app or marshmallow doze feature. I would appreciate any suggestion/advice. Thanks.
Click to expand...
Click to collapse
I don`t have any delays with the fingerprint, however i use Smart Unlock to bypass the fingerprint in trusted locations.
Did you already tried to remove the old prints and register new?
Only thing else i can say if thats not working is to factory reset the phone.
on what powerplan did you put your phone? And did you toggle answer calls with fingerprint.
Sounds silly but if thats disabled there is a possibilty that the fingerprint app goes in sleep while activated for answering calls could keep it alive....Always worth trying...
Nicksterrr said:
I don`t have any delays with the fingerprint, however i use Smart Unlock to bypass the fingerprint in trusted locations.
Did you already tried to remove the old prints and register new?
Only thing else i can say if thats not working is to factory reset the phone.
on what powerplan did you put your phone? And did you toggle answer calls with fingerprint.
Sounds silly but if thats disabled there is a possibilty that the fingerprint app goes in sleep while activated for answering calls could keep it alive....Always worth trying...
Click to expand...
Click to collapse
I tried removing the old fingerprints and replaced with new ones. I even did a factory reset. The factory reset did it. That's what leads me to believe it's more an app than marshmallow doze. I just don't know how to identify which app. I even played with turning on all the features of fingerprint scanner. I am on performance mode. It's not a HUGE deal since the phone still unlocks faster than others, but it's a nuance since you know the phone is capable of unlocking faster. If you can think of another recommendation as to identifying the app or cause I would be grateful.
4g working fine in Spain too
Enviado desde mi EDI-AL10 mediante Tapatalk
EduMonzter said:
4g working fine in Spain too
Enviado desde mi EDI-AL10 mediante Tapatalk
Click to expand...
Click to collapse
Thnx, will update the topic!
4g working fine in Poland
wynotowane z Huawei Note 8
4g works fine in greece
Thnx guys!
I updated the main post!
Nicksterrr said:
Please let me know in which country you guys are and if 4g/lte works in your country so i can update the 4g/lte list.
Click to expand...
Click to collapse
Hi, 4G works in Russia.
I think an easier way to change the voice assistant would be to download the Microsoft Clip Layer app. When it asks you to Tap on Assist app click on that setting and choose something different. I had already had HiVoice disabled when I downloaded the app so if someone else can confirm that it will work I'm sure someone would appreciate it.
4G/Lte works in Melbourne, Australia on Optus
4G/LTE is working fine in Switzerland! (16ms ping, 89Mb/s DL and 20Mb/s in UL in the alps)
Thnx guys, post updated!
Nicksterrr said:
Thnx guys, post updated!
Click to expand...
Click to collapse
Hi, I did a factory reset and confirmed that the Microsoft Clip Layer app does allow you to switch the voice assistant. It is a much easier process than disabling the app and does not require a computer hook-up.
4g works fine for me in England on O2/Tesco
But I have had no luck in rooting the device .... any chance you can provide a link to some instructions ?
Denevil said:
4g works fine for me in England on O2/Tesco
But I have had no luck in rooting the device .... any chance you can provide a link to some instructions ?
Click to expand...
Click to collapse
Did you tried King root?
Most of time time king root will succes to install root access.

[MOD] Disable High Volume Warning (no root)

If you're like me you're bummed that we have no root and are missing the abilities of root. Namely having the ability to use Xposed to turn off the annoying high volume warning. The following information aims to restore that functionality without root but requires some work but when you're done it's "set it and forget it.". You will never have to do it again. (Unless you wipe your phone)
I have this running on my phone and it works perfectly. I've attached a screenshot showing that the high volume warning is disabled on my phone. Note there is no popup on my volume slider when it's at max, so it's working. This mod uses Tasker and AutoTools. If you're not familiar with them it's OK, the article I'm linking has a step by step process for creating events and tasks.
Once again this isn't my work. I'm just bringing the information to the masses.
All set? Click here to go to the article. Enjoy!
P.S. You will need to open AutoTools and activate the 30 day trial if you don't have the full version. Then grant it permission, If not this won't work. To get the full version just open AutoTools and clock "Get full version".
***********UPDATE 09/15***********
I have confirmed that you will have to manually "test" this procedure first before it survives a reboot.
To do this:
Open tasker.
Click on the Monitor Start event.
Click on the 30 second task.
Click the "play" button in the lower left corner.
The task will begin manually.
If all is well both of the actions will turn green.
If anything turns red something isn't configured correctly.
***********UPDATE 09/17***********
For those that either don't want to or are having difficulty setting up the profiles I have attached them to this post in XML form, Then all you have to do is give the apps permission in ADB as stated in the article and import the profiles.
To import them into Tasker:
Download the file called "Tasker Profiles.zip" from the link below.
Unzip it and save it anywhere on your internal storage. Open up Tasker and disable Beginner Mode in Preferences.
Then, go back to the main screen and long-press on the “Profile” tab up top. You should see a pop-up with one of the options being “Import.”
Tap on that and browse to where you saved the .prf.xml files and select that file to import.
Repeat for the second profile.
Screenshots for this are attached to this OP.
I have also attached a quick demo video to show that this process works perfectly. No popup.
Credit:
Mishaal Rahman
reboot and see if it still works.
I already tried this and after reboot it still prompts the first time.
I've rebooted several times. It works for me. There is a 30 second delay before the task is executed. That is by design.
Compusmurf said:
reboot and see if it still works.
I already tried this and after reboot it still prompts the first time.
Click to expand...
Click to collapse
Try this to see if everything is set up correctly:
Open tasker.
Click on the Monitor Start event.
Click on the 30 second task.
Click the "play" button in the lower left corner.
The task will begin manually.
If all is well both of the actions will turn green.
If anything turns red something isn't configured correctly.
I've attached screenshots of this procedure.
Also something to consider is that if you have any task killers installed or anything that kills tasks on startup you should add tasker to the ignore list of that app.
Hope this helps.
It's configured correctly. Here is the thing. If you pull the value before without using, then pull the value after clicking ok manually, it is NOT 2, it's 0. This was discussed on the s7 and s8 forums. Odd that yours works and dozens of other folks doesn't.
Sent from my SM-N950U using Tapatalk
I dont know what to tell you. It does work for me just fine as my screen shots show. Sorry it's not working for you.
Can you screenshot your configuration screen? Is the value your sending "int" for integer? It shouldn't matter but what Carrier are you using? I'm Sprint.
One other thing to check is under app permissions ensure that AutoTool has the ability to change system settings. Just running the adb shell pm command isn't enough.
Compusmurf said:
It's configured correctly. Here is the thing. If you pull the value before without using, then pull the value after clicking ok manually, it is NOT 2, it's 0. This was discussed on the s7 and s8 forums. Odd that yours works and dozens of other folks doesn't.
Sent from my SM-N950U using Tapatalk
Click to expand...
Click to collapse
According to the article 0 is 'not configured' 1 is 'disabled' which is what the value would be when you click ok. 2 is 'inactive'.(How this differs from 'not configured' or 'disabled' I do not know). and 3 is 'enabled'. All depending on your mobile country code. Perhaps changing it to 1 will work for you?
Specifically, we will be modifying the System.Global property audio_safe_volume_state both on boot and periodically so Android will always think you have consented to bypass the warning. This property is defined in AOSP, which we’re reproducing below. There are several states this property can take, ranging from 0-3. 30 seconds after boot or after every 20 hours of continuous music playback, the state is set to ‘0’ or ‘not configured.’ It is then set to ‘1’ for ‘disabled’ or ‘3’ for ‘enabled’ depending on your Mobile Country Code. If you live in the E.U., this property is set to ‘3’ by default but is changed to ‘2’ for ‘inactive’ whenever the user manually bypasses the volume warning. We will be changing the value of this property to the ‘inactive’ state (changing it to ‘disabled’ never worked for me, in case you’re wondering).
Click to expand...
Click to collapse
Hope this helps.
This is already built in...Vibration>Volume>3 dots menu in upper right hand corner> Media Volume Limiter> Turn it off.
Namuh said:
This is already built in...Vibration>Volume>3 dots menu in upper right hand corner> Media Volume Limiter> Turn it off.
Click to expand...
Click to collapse
Confirmed.
Going to Settings -> Sound and Vibration -> Volume -> hit the 3 dot menu -> Media Volume Limiter -> Off works.
I came from a Note 4 with Android 5.1.1 that didn't have this feature. I had no idea Samsung finally caved and added it.
Thank you.
Or not. I rebooted again and it does NOT work anymore. I'm really not trusting Samsung with this. The tasker method works every time. Every reboot. See attached screenshots showing it's turned on (and set to max) and still showing this message. I rebooted several times just in case I had a weird reboot. I'm still getting the popup even with it turned on and the max adjusted to the maximum or even with it turned off completely.
I only wish I was wrong. Thanks for the try though.
Yeah will reset after a boot
https://forum.xda-developers.com/showpost.php?p=73802232&postcount=4
marctronixx said:
https://forum.xda-developers.com/showpost.php?p=73802232&postcount=4
Click to expand...
Click to collapse
Yup...so with tasker I don't have to do any of that. I never have to touch it again. It never comes back.
Thanks again though.
I did learn something from this process. When I re-enabled the tasker even it didn't work when I rebooted. So I hit the "play" button that I mentioned earlier to retest the task and once everything turned green I rebooted and it now works again...after every reboot. So I'll add this to the OP that the task must be "tested" after it's set up in order to get it to work.
Even more interesting is who posted it. Compusmurf was the guy who stated in this thread that this did not work for him. Interesting.
I did get it to work finally. I had another tasker/app that was stepping on it.
Compusmurf said:
I did get it to work finally. I had another tasker/app that was stepping on it.
Click to expand...
Click to collapse
Well I also confirmed that when I disabled it and allowed the popup to come back by rebooting simply re-enabling the tasker even then rebooting did not make it work again. I had to "test" it with the play button to get it to work again. So I'm updating the OP to reflect this.
rawintellect said:
Yup...so with tasker I don't have to do any of that. I never have to touch it again. It never comes back.
Thanks again though.
Click to expand...
Click to collapse
Yeah my point of my post was to show the reason why the built in way doesn't work long term. The tasker way is preferred for those who find the nanny thing an annoyance. :good:
System ui tuněr app should be able to do it
Techvir said:
System ui tuněr app should be able to do it
Click to expand...
Click to collapse
I looked at every single screenshot of System UI Tuner in the play store. I saw no option to disable the high volume warning. Only an option to remove the volume icon which isn't the same thing.
Can you show me a screenshot of it working?
I know this process I linked is a long one and I would really love to be shown a better way but until I am this works for non rooted devices every time.

Home button/finger print readrer

Had my phone for just over 90 days and the home button crapped out. It just suddenly stopped working. At first it disappeared in the settings menu and if I searched it would show options but they were all locked out. Did a hard reset and now it's as if it doesn't exists. Of course it's c605 and I'm in Canada bought from amazon hope the warranty checks out.
selfxd said:
Had my phone for just over 90 days and the home button crapped out. It just suddenly stopped working. At first it disappeared in the settings menu and if I searched it would show options but they were all locked out. Did a hard reset and now it's as if it doesn't exists. Of course it's c605 and I'm in Canada bought from amazon hope the warranty checks out.
Click to expand...
Click to collapse
What do you see when you go to Settings - System - System Navigation? Check Navigation Bar settings.
Make sure it's just not hidden, try swiping up from the bottom of your phone. Or you could enable the Navigation Dock.
ante0 said:
What do you see when you go to Settings - System - System Navigation? Check Navigation Bar settings.
Make sure it's just not hidden, try swiping up from the bottom of your phone. Or you could enable the floating navbar.
Click to expand...
Click to collapse
I can still use it but damn I was used to gestures and well just lame. When I search in settings it's no longer there.
selfxd said:
I can still use it but damn I was used to gestures and well just lame. When I search in settings it's no longer there.
Click to expand...
Click to collapse
Oh, I thought you meant the Nav bar, but it seems your whole fingerprint reader is gone?
It's weird though. If you could use gestures on it... That's usually only available to front mounted fingerprint readers.
This is the prop that's supposed to enable it: ro.config.hw_triple_finger=true
I could get it working on previous builds, but it's not working anymore. edit: I lied, that was 3 finger screenshot.
See if you can reinstall your current build using eRecovery
Edit: it seems I assumed you had a Mate 10 Pro which has a rear fp reader, but you have a Mate 10 according to your post history. If the FP reader/home button is broken you should get it rrplaced
ante0 said:
you have a Mate 10 according to your post history. If the FP reader/home button is broken you should get it rrplaced
Click to expand...
Click to collapse
Yup, definitively ask for a replacement and contact Huawei customer service about the issue. Give a try to backup and factory reset in order to check it's not a software issue.
You could also use Gesture Control, free version has no nagging ads and should be enough, but without fp reader, I'd be lost.
Because of being in Canada and the device not being sold in Canada they were of no help. But on a brighter note I bought the device from Amazon and they have agreed to allow me to return the device.
I will say if anyone is every looking to buy a device from jpmobiles.com DON'T!! At the time of my purchase it did not state no warranty included. Sometime after my purchase the description was updated and they just gave me the run around even tho I had many screenshots to disprove them. The best thing out of this is I'm about to go get the P20 Pro. :good:

Categories

Resources