[Question] input keyevent shell not working anymore - Tasker Tips & Tricks

[Question] input keyevent shell not working anymore
Hello everyone !
I have been using a lot of profiles with a task to turn screen off (simulate a power button press) without locking it.
Was quite helpful in some cases. So I was using the shell command "input keyevent 23" (23 if I remember well, whatever).
But since lollipop, it seems input keyevent command is not working anymore...
Anyone knows why ? Is there any workaround ?
Thanks !

Work. ROOT needed.
23 - dpad center
26 - power
Lolipop. NOTE3.

Thanks for the heads up
Yeah 26, I remember now...
I'm rooted. Just tried and I get the error message in tasker :
16.04.09/Shell runBackground input keyevent 26 root: true timeout: -1
16.04.09/Shell start process-thread ID 196
16.04.09/E add wait type Shell2 time 2147483647
16.04.09/E add wait type Shell2 done
I'm using a HTC One M9. Maybe this is a HTC Sense limitation... No idea why it isn't working. Root checked.

KingoRoot? Kingroot? [Never remember]

frrancuz. said:
KingoRoot? Kingroot? [Never remember]
Click to expand...
Click to collapse
Nope, rooted the good old' way! Unlocking BL, flashing custom ROM with superSU...

try to use the:
Display - system lock.
it is similar to power button.

AutoInput might also work for you.

I had to set SELinux to permissive to get input keyevent working again.

Sukarn said:
I had to set SELinux to permissive to get input keyevent working again.
Click to expand...
Click to collapse
Thanks ! That was the thing It's working again !
For whoever interested, now have to change the code to :
setenforce 0; input keyevent 26; setenforce 1
Thanks !

frrancuz. said:
try to use the:
Display - system lock.
it is similar to power button.
Click to expand...
Click to collapse
Thanks ! It works but I want the system to remain unlocked if it is

MishaalRahman said:
AutoInput might also work for you.
Click to expand...
Click to collapse
I have been trying to do that, but with no luck. Can you give a hint as to how to set it up correctly?

edit: sorry, wrong thread ^^"
Hello guys
I have a question, does this tool also support keyevent "code" only ?, or only scancodes ?
I have a controller which does only report "Code" event numbers to the Android, Scancode is always 0.
I want to use it with tasker but it does only know scancodes, so i want to try to bind the codes to scancodes.
i attaches an image of the keyevent log.
sincerely Kri

Chrisu02 said:
edit: sorry, wrong thread ^^"
Hello guys
I have a question, does this tool also support keyevent "code" only ?, or only scancodes ?
I have a controller which does only report "Code" event numbers to the Android, Scancode is always 0.
I want to use it with tasker but it does only know scancodes, so i want to try to bind the codes to scancodes.
i attaches an image of the keyevent log.
sincerely Kri
Click to expand...
Click to collapse
Tasker with the AutoInput plugin can intercept key codes or scan codes. See this post for an example.

ktmom said:
Tasker with the AutoInput plugin can intercept key codes or scan codes. See this post for an example.
Click to expand...
Click to collapse
Thanks for that information, maybe i`ll switch if find other issue.
for now i got it to work with help from a other forums, it is working with a logcat event (profile -event - system - logcat entry)
Kri

Glad you solved it. Yes, the "new" logcat event could perform many of the existing events.

Related

[GUIDE] How to enable Chromecast Mirroring on Lollipop for the N7 2012

So this doesn't work outright on the new Lollipop build for the N7, but it can easily be made to work. Unfortunately the MirrorEnabler app doesn't work on Lollipop yet, and the SQLite Installer app that would make it work hasn't caught up; it installs a non-executable binary that even when set with the correct permissions doesn't run. Credit goes to @r3pwn for finding the initial method for doing this.
UPDATE: MirrorEnabler had been updated for 5.0, and i've seen reports it works now. You can try it Here. Don't forget to thank @r3pwn if it works for you! Otherwise, this method still works, so take your pick. [emoji2]
UPDATE 2: The update of the crhomecast app supposedly supports this natively now on ALL devices, so this may not even be needed anymore. If someone who has not applied this fix can test that out (Has to be chromcast v 1.9.6 or higher) and report back in this thread, that'd be great.
So because I wanted my screen mirroring back, I dove in and made it work. Yes, there are 20 steps, but they are all outlined precisely. If done correctly this shouldn't take more than 5 minutes.
Here's how:
1) Be rooted on Android 5.0 (L)
2) Install chromecast app from play store - Link
3) Open the chromecast app and set up your chromecast device
4) Install busybox (I prefer sterricson version) - Link
5) Open Busybox app and click Install.
6) Install SQLite Editor (not free, but works great on L and worth the money if you like to tinker) - Link
7) get adb shell and issue the commands:
Code:
[email protected]:/ $ su
[email protected]:/ # setenforce 0
[email protected]:/ # getenforce
Permissive
[email protected]:/ #
DO NOT EXIT ADB YET!
8) Open SQLite Editor on your device and navigate to "Google Services Framework"
9) Under google services Framework, select "gservices.db"
10) In gservices.db select "overrides"
11) Click "+ NEW RECORD"
12) In the name field put (exactly as shown):
Code:
gms:cast:mirroring_enabled
13) In the value field put (exactly as shown):
Code:
true
14) Click Save
15) Click "+ NEW RECORD" again
16) In the name field put (exactly as shown):
Code:
gms:cast:remote_display_enabled
17) In the value field put (exactly as shown):
Code:
true
18) Click Save
19) Exit SQLite Editor
20) In your adb shell ( you didn't close it, right? ):
Code:
[email protected]:/ # am force-stop com.google.android.gsf
[email protected]:/ # am force-stop com.google.android.gms
[email protected]:/ # am force-stop com.google.android.apps.chromecast.app
[email protected]:/ #
If it worked you won't see any output from these three commands; You can now exit adb and disconnect your device.
If you see this:
Code:
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:298)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:99)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
You didn't do step 7 correctly. Repeat step 7 and then try this step again.
That's it! NO reboot required! You should now be able to stream screen mirror to a chromecast device from your N7(2012) using Lollipop!
To test it, you should now be able to use your quick settings "Cast Screen" button, or the "Cast Screen" option from within the chromecast app.
Enjoy!
Nice guide !
Gesendet von meinem GT-I9195 mit Tapatalk
Nice guide.
Can confirm after following this guide casting from settings pull down is indeed working on lollipop N7 2012!!
Cheers!
Its works great! thank you!
I think Mirror Enabler only set the first one row, and it is the reason it stopped working on this tablet
Unfortunately not working with panasonic ptv3000
does this hack survive a Google Services Framework update, and is there really need to install chromecast app?
thanks
m52 power! said:
Unfortunately not working with panasonic ptv3000
Click to expand...
Click to collapse
Never said it would.
Sent from my leanKernel 3.11.3 powered stock 4.4.2 (NF9) SM-N900T
donpippo said:
does this hack survive a Google Services Framework update, and is there really need to install chromecast app?
thanks
Click to expand...
Click to collapse
Theoretically yes. It's just a data change. Add for having to install the chromecast app, you can try without installing it but i do believe it's required.
Sent from my leanKernel 3.11.3 powered stock 4.4.2 (NF9) SM-N900T
Wow. Yep. Works with Chromecast.
not working on my N7 [emoji26]
Edit: tried again with success. I started from 0 again. thank you
I would like to annonce that this method worked perfectly in the Moto X 2014 (Lollipop)... the only problem is, when i restart the phone it stops working and i need to do the whole process again..... Any way to fix that?
Thank you
toastido said:
So this doesn't work outright on the new Lollipop build for the N7, but it can easily be made to work. Unfortunately the MirrorEnabler app doesn't work on Lollipop yet, and the SQLite Installer app that would make it work hasn't caught up; it installs a non-executable binary that even when set with the correct permissions doesn't run.
So because I wanted my screen mirroring back, I dove in and made it work. Yes, there are 20 steps, but they are all outlined precisely. If done correctly this shouldn't take more than 5 minutes.
Here's how:
1) Be rooted on Android 5.0 (L)
2) Install chromecast app from play store - Link
3) Open the chromecast app and set up your chromecast device
4) Install busybox (I prefer sterricson version) - Link
5) Open Busybox app and click Install.
6) Install SQLite Editor (not free, but works great on L and worth the money if you like to tinker) - Link
7) get adb shell and issue the commands:
Code:
[email protected]:/ $ su
[email protected]:/ # setenforce 0
[email protected]:/ # getenforce
Permissive
[email protected]:/ #
DO NOT EXIT ADB YET!
8) Open SQLite Editor on your device and navigate to "Google Services Framework"
9) Under google services Framework, select "gservices.db"
10) In gservices.db select "overrides"
11) Click "+ NEW RECORD"
12) In the name field put (exactly as shown):
Code:
gms:cast:mirroring_enabled
13) In the value field put (exactly as shown):
Code:
true
14) Click Save
15) Click "+ NEW RECORD" again
16) In the name field put (exactly as shown):
Code:
gms:cast:remote_display_enabled
17) In the value field put (exactly as shown):
Code:
true
18) Click Save
19) Exit SQLite Editor
20) In your adb shell ( you didn't close it, right? ):
Code:
[email protected]:/ # am force-stop com.google.android.gsf
[email protected]:/ # am force-stop com.google.android.gms
[email protected]:/ # am force-stop com.google.android.apps.chromecast.app
[email protected]:/ #
If it worked you won't see any output from these three commands; You can now exit adb and disconnect your device.
If you see this:
Code:
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:298)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:99)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
You didn't do step 7 correctly. Repeat step 7 and then try this step again.
That's it! NO reboot required! You should now be able to stream screen mirror to a chromecast device from your N7(2012) using Lollipop!
To test it, you should now be able to use your quick settings "Cast Screen" button, or the "Cast Screen" option from within the chromecast app.
Enjoy!
Click to expand...
Click to collapse
I would like to annonce that this method worked perfectly in the Moto X 2014 (Lollipop)... the only problem is, when i restart the phone it stops working and i need to do the whole process again..... Any way to fix that?
Thank you
Anyone have any idea if this is necessary on the newer ver2 N7 after OTA?
MLT2004 said:
Anyone have any idea if this is necessary on the newer ver2 N7 after OTA?
Click to expand...
Click to collapse
Not sure after OTA update, but my son's N7 (2013 / gen 2) needed zero mods to get screen casting to work. It worked fine after installing the google N7 image from https://developers.google.com/android/nexus/images
Sent from either Maguro or Grouper via XDA free
On step 9) Under google services Framework, select "gservices.db" i get the error
An error occurred while opening the database. attempt to write a readonly database (code 776) while compiling: select * from sqlite_master where type in('table','view') order by name
How can i solve this?
theone_s_me said:
I would like to annonce that this method worked perfectly in the Moto X 2014 (Lollipop)... the only problem is, when i restart the phone it stops working and i need to do the whole process again..... Any way to fix that?
Thank you
Click to expand...
Click to collapse
Unknown. Don't own that device. Only tested on the n7 2012.
boriznl said:
On step 9) Under google services Framework, select "gservices.db" i get the error
An error occurred while opening the database. attempt to write a readonly database (code 776) while compiling: select * from sqlite_master where type in('table','view') order by name
How can i solve this?
Click to expand...
Click to collapse
No idea. You are rooted, right? Might see if remounting /system in read/write mode would help. Also make sure you granted root privileges to sqlite editor if it asked.
Sent from my SM-T320 using Tapatalk
Creds? Or at least link to my source code that you took this from.
r3pwn said:
Creds? Or at least link to my source code that you took this from.
Click to expand...
Click to collapse
I didn't steal any source code, since it's a guide and not an application. I will, however, credit you for finding the method initially, although your app did not work in Lollipop at the time.
toastido said:
I didn't steal any source code, since it's a guide and not an application. I will, however, credit you for finding the method initially, although your app did not work in Lollipop at the time.
Click to expand...
Click to collapse
I know you didn't "steal the code", but parts of this guide are letter-for-letter in the code of my app. And don't worry, Lollipop-compatible version coming soon.
EDIT: Thanks for adding that to the OP, but I found the ActivityManager commands to kill the required processes, too.
r3pwn said:
I know you didn't "steal the code", but parts of this guide are letter-for-letter in the code of my app. And don't worry, Lollipop-compatible version coming soon.
EDIT: Thanks for adding that to the OP, but I found the ActivityManager commands to kill the required processes, too.
Click to expand...
Click to collapse
D'oh. My bad. Updated OP to be a bit more generic.
Also, when you get the Lollipop compatible version ready, let me know and I'll gladly update the OP to point people that way for those who don't want to manually do this

Best run shell commands in Tasker

Hello guys.
I stumbled across a reddit thread providing some run shell commands to replace secure settings. The fixes on Android 6.0 allowed me to install and grand the root permissions but never actually worked as intended. Secure settings still returns errors when used.
Long story short I built on the list adding ones I used before from my list.
Here is about 30 most common run shell commands. I will update list if i come across some new ones. Also appreciate your input if you happen to use some good ones.
You can access it all here:
http://www.notenoughtech.com/tasker/tasker-run-shell-commands/
Happy tasking. :good:
Boy, where do I start? The list would be endless. Anyway, here are some, not all, that I use.
Root commands
Open power menu: sendevent /dev/input/event0 1 116 108 && sendevent /dev/input/event0 0 0 0
Restart SystemUI: pkill -l TERM -f com.android.systemui
Safe reboot: svc power reboot
Safe reboot to recovery: svc power reboot recovery
Get list of all system/global/secure settings along with their values; using system settings as example: settings list system
Read system/global/secure setting to a variable; using secure setting accessibility_enabled as example: settings get secure accessibility_enabled
Change system/global/secure setting; using secure setting accessibility_enabled as example: settings put secure accessibility_enabled 0
Make /system rewritable: mount -o remount,rw /system
Make /system read-only: mount -o remount,ro /system
Change file permissions, using /system/etc/hosts as example; numbers are 7 for rwx, 6 for rw, 4 for r; first number is for root (system user), second is for group, third is for all users: chmod 644 /system/etc/hosts
Tap at x,y pixels on screen, using 540,1500 as example: input tap 540 1500
Swipe from x1,y1 to x2,y2, using 540,1500 to 540,300 (swipe up) as example: input swipe 540 1500 540 300
Read/change another app's database; can't give examples as this would need a full tutorial: sqlite3 /path/to/.db_file "sqlite3 commands";
non-root command
Open any app from a variable %package_name containing com.paclage.name; this one is javascript, not shell script [note that you don't want to put % before variable in javascript]: loadApp(package_name, '', false);
Extract %file zip file to /sdcard: unzip %file /sdcard/
Move a file: mv /original/path /new/path
Copy a file: cp /original/path /new/path
Read a file to a variable: cat /path/to/file
Write %var to a file: echo %var > /path/to/file
Delete a file: rm /path/to/file
Delete a folder and all its contents: rm -r /path/to/folder
Check whether a process is doing something or not; set the output to a variable, set a wait for some time, and then get the output again, if output has changed then the process is doing something: ps | grep com.package.name
Sukarn said:
Boy, where do I start? The list would be endless. Anyway, here are some, not all, that I use.
Click to expand...
Click to collapse
Thanks I'm updating the page as I type this! - I completely forgot about file operations if I'm honest. Good to have others to contribute!
quintaar said:
Thanks I'm updating the page as I type this! - I completely forgot about file operations if I'm honest. Good to have others to contribute!
Click to expand...
Click to collapse
You need to proofread that page. There are lots of errors in there that will stump newbs
Sukarn said:
You need to proofread that page. There are lots of errors in there that will stump newbs
Click to expand...
Click to collapse
That's what I'm doing now , trying to put them, in some logical order as well, to make it easy to find, and use. I do appreciate the time taken to type this.
Is input keyevent correct for emulating the power button in a shell command? The # on the website didn't work. I found the generic.kl file in my /system/usr folders and the key # for power listed there did now work with that shell command, either. Even with run as root checked.
{
"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"
}
LeftyGR said:
Is input keyevent correct for emulating the power button in a shell command? The # on the website didn't work. I found the generic.kl file in my /system/usr folders and the key # for power listed there did now work with that shell command, either. Even with run as root checked.
Click to expand...
Click to collapse
I believe hardware keys would be device specific, ego could have different codes.
quintaar said:
I believe hardware keys would be device specific, ego could have different codes.
Click to expand...
Click to collapse
I guess my real question is that the correct shell command as it is written? Because with my specific device key code did not do anything.
Are you trying to do this when the phone display is on or off? this only works when screen is on. input keyevent 26 works fine on my device
quintaar said:
Are you trying to do this when the phone display is on or off? this only works when screen is on. input keyevent 26 works fine on my device
Click to expand...
Click to collapse
On... Guess it does not like me.
LeftyGR said:
On... Guess it does not like me.
Click to expand...
Click to collapse
Do you get any error? My most common mistake is spelling the run shell with upper case, as my keyboard automatically corrects it. And if I forget to change it, it returns an error
quintaar said:
Do you get any error? My most common mistake is spelling the run shell with upper case, as my keyboard automatically corrects it. And if I forget to change it, it returns an error
Click to expand...
Click to collapse
Yes. Appears to be a timeout error.
Background Data On/Off? Thanks in advance
Sent from my hlte using XDA-Developers mobile app
LeftyGR said:
Yes. Appears to be a timeout error.
Click to expand...
Click to collapse
I stumbled on this:
http://forum.xda-developers.com/showthread.php?t=2063741
Perhaps will help you more as well
shaharofir said:
Background Data On/Off? Thanks in advance
Sent from my hlte using XDA-Developers mobile app
Click to expand...
Click to collapse
I've not come across the setting, but try to use:
settings list system
settings list global
settings list secure​and see what your device will give you in options lists.
I totally forgot about another shell command that I have set up in Tasker: md5sum /path/to/file
I use it to verify the integrity of downloads in an OTA app I made for a custom ROM using only Tasker.
---------- Post added at 10:52 AM ---------- Previous post was at 10:43 AM ----------
quintaar said:
Are you trying to do this when the phone display is on or off? this only works when screen is on. input keyevent 26 works fine on my device
Click to expand...
Click to collapse
On my phone (OnePlus One), "input keyevent 26" just turns the screen off, while 116 does nothing.
LeftyGR said:
I guess my real question is that the correct shell command as it is written? Because with my specific device key code did not do anything.
Click to expand...
Click to collapse
Did you try the command I posted at the top of my post here? It's the second post in this thread.
quintaar said:
I've not come across the setting, but try to use:
settings list system
settings list global
settings list secure
and see what your device will give you in options lists.
Click to expand...
Click to collapse
Thanks. Will give it a try.
Sukarn said:
I totally forgot about another shell command that I have set up in Tasker: md5sum /path/to/file
.
Click to expand...
Click to collapse
I have added this one as well Thanks
shaharofir said:
Thanks. Will give it a try.
Click to expand...
Click to collapse
Looked, nothing there. Any suggestions?
Sent from my hlte using XDA-Developers mobile app
shaharofir said:
Looked, nothing there. Any suggestions?
Sent from my hlte using XDA-Developers mobile app
Click to expand...
Click to collapse
Perhaps maybe more luck with intents? I'm working on the similar list for it
Sent from my Nexus 6P using Tapatalk

Changing the DPI/"display size" on the stock global rom without root

tldr; the stock global MIUI rom lacks a display size setting, but an awesome free option by zacharee1 lets you set it anyway, even without root, and with no need to reboot or anything:
https://labs.xda-developers.com/store/app/com.zacharee1.dpichanger
----
I love the Max 2 -- way more than I thought I would! I bought it as a replacement for my old, sadly dead Nexus 7 tablet, but if it had LTE bands for US T-Mobile, this might have been my next phone. But for all that, MIUI made some "customization" decisions to android that I just don't understand... like two finger drag for expanding a notification... and removing the "Display Size" setting.
On other Android N roms, you can easily adjust the zoom/DPI/display size, making things smaller or larger. The stock global MIUI version on the Max 2, however, is missing the setting (and the "Smallest width" setting in developer options.) I thought I was out of luck after trying an option from the play store that failed, but found an app in XDA Labs from zacharee1 that worked!
It did require enabling adb, and developer options; in addition steps, I had to go to developer options and enable "USB debugging (security settings)" with a sim card inserted. Normally I used the Max 2 without one, but if you don't have a sim card inserted it will tell you to insert one, then fail.
Anyway, if anyone else would like to fit a bit more content on the screen, I'm really happy with this app so far! Some of Xiaomi's own apps don't quite scale well, which is probably why they disabled it, but they just have extra padding around the content. They still work just fine.
Awesome!
Sorry, noob here. When I run the command it tells me "error : no devices/emulators found"
I have turned on both USB debugging options in developer options and am using Minimal ADB and Fastboot. No Root.
Any help would be greatly appreciated!
Worked well!
Just chiming in and letting you guys know that the app package is zacharee1 (one), not zachareel (L). Gave me some problems for a bit!
user4001 said:
I have turned on both USB debugging options in developer options and am using Minimal ADB and Fastboot. No Root.
Any help would be greatly appreciated!
Click to expand...
Click to collapse
Oh, sorry. I've never used minimal adb before -- have you tried running the adb command as an administrator? (You might have to run "adb kill-server" first, it will used an existing adb server with fewer privileges if it exists.)
whd5015 said:
Worked well!
Just chiming in and letting you guys know that the app package is zacharee1 (one), not zachareel (L). Gave me some problems for a bit!
Click to expand...
Click to collapse
Nice! That's a good tip, too, thanks. (I've wasted hours before figuring out a capital O wasn't a 0 before...)
ldrn said:
Oh, sorry. I've never used minimal adb before -- have you tried running the adb command as an administrator? (You might have to run "adb kill-server" first, it will used an existing adb server with fewer privileges if it exists.)
Nice! That's a good tip, too, thanks. (I've wasted hours before figuring out a capital O wasn't a 0 before...)
Click to expand...
Click to collapse
I'll try the administrator thing, thanks. I have no idea what
what ADB kill server is but will Google when I get home.
I tried it without root. I using adb in administrator mode, but it gives me an error:
C:\adb>adb shell pm grant com.zacharee1.dpichanger android.permission.WRITE_SECURE_SETTINGS
Operation not allowed: java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
Any suggestions?
ruairi said:
Operation not allowed: java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
Click to expand...
Click to collapse
Actually, yep! In developer options, there is a "USB debugging" toggle, then three lines down a "USB Debugging (Security settings)" toggle, that's the error you get when you have the first one toggled but not the second. You need both turned on.
(I'm speaking from personal experience, I made that same mistake at first; it's a bit confusing that the names are almost the same!)
thanks @ldrn, I'll give it a shot.
Works like Charm. I have set the DPI to 410 Thanks!
adb shell wm density XXX
i use "adb shell wm density 420"
display will refresh every time i change dpi. no sestart require
Is this safe for MIUI rom?
w4h1d said:
Is this safe for MIUI rom?
Click to expand...
Click to collapse
Yes it is safe tested in MIUI Global 8.5 | Stable
make sure USB debugging (Security settings) is enabled in developer options
The link is dead. Where can I download the app?
inunt said:
i use "adb shell wm density 420"
display will refresh every time i change dpi. no sestart require
Click to expand...
Click to collapse
So do I have to write this command on my computer? No app needed? If app from first post is needed, where can i find it?
Link is not working. Please new link? Thank you.
Link dont work
Can some one tell me what is the stock value of DPI
reversegear said:
Can some one tell me what is the stock value of DPI
Click to expand...
Click to collapse
stock value of dpi is 440
Link does not exist
The link to above app says that the file does not exist on the server. Can anyone please give me the valid link for it?

how to auto override force dark mode in android Q

In AOSP based android Q roms, there is a force dark option in developer settings whoich makes almost all apps to be appreaded in dark mode.
This option gets unselected after reboot.
One has to enable it after every reboot.
However it's possible to enable it by default after reboot.
For rooted phone.
Just add the following line in your build.prop file
debug.hwui.force_dark=true
Thats all.
It's working in my phone. Tested.
For unrooted Phone
execute the following line after reboot
setprop debug.hwui.force_dark true
To make it auto after reboot use tasker or script manager app or smthing similer.
Check the space after setprop and dark.
Hit a thanks to me if you are benifited.
Screenshots.??
Screenshot
Hmmmm.
Screenshot for many apps.?
Thanks
LoveFootJob said:
Hmmmm.
Screenshot for many apps.?
Thanks
Click to expand...
Click to collapse
look at your back....its there already
[email protected] said:
For unrooted Phone
execute the following line after reboot
setprop debug.hwui.force_dark true
To make it auto after reboot use tasker or script manager app or smthing similer.
Check the space after setprop and dark.
Click to expand...
Click to collapse
Hi
How did you manage that?
As far as I know, setprop needs root or it won't work unless it's done via adb on a computer
Sent from my SM-N976B using XDA Labs
paolo200 said:
Hi
How did you manage that?
As far as I know, setprop needs root or it won't work unless it's done via adb on a computer
Click to expand...
Click to collapse
No...it will work...
Just auto execute it after every reboot thru tasker
[email protected] said:
No...it will work...
Just auto execute it after every reboot thru tasker
Click to expand...
Click to collapse
Ok. Thanks.
May I ask what is the action to use within tasker?
Sent from my SM-N976B using XDA Labs
davidking2893 said:
First, turn off regular dark mode (if enabled) and reboot your cell phone. Then, toggle the override-dark-mode option in developer settings and restart the settings app. This will force all apps into the override-dark-mode color scheme. Thats' it.
Click to expand...
Click to collapse
Question is how to do it auto after reboot
[email protected] said:
For unrooted Phone
execute the following line after reboot
setprop debug.hwui.force_dark true
To make it auto after reboot use tasker or script manager app or smthing similer.
Check the space after setprop and dark.
Hit a thanks to me if you are benifited.
Click to expand...
Click to collapse
I don't get you. Can you give a detailed tutorial?
Not working
Im on a non-rooted Galaxy S10e [Android 10, OneUI 2.0]. If I run the command with tasker, it gives me the following message ("Ausführen" is german and means "execute", "Fehler" means "error"):
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/Shell runBackground setprop debug.hwui.force_dark true root: false timeout: -1
05.06.39/Shell start process-thread ID 672
05.06.39/E add wait type Shell1 time 2147483647
05.06.39/E add wait type Shell1 done
05.06.39/E add wait task
05.06.39/E Fehler: 1
If I do it with the app "Android Terminal Emulator" it gives me the following error:
:/ $ setprop debug.hwui.force_dark true
setprop: failed to set property 'debug.hwui.force_dark' to 'true'
Either way, it doesnt work for me. Does anybody know what could be the issue here? Ive also tried setting it to "1" instead of "true", same result. Setting the real setting to enabled or disabled doesnt matter either.
RnKn98 said:
Im on a non-rooted Galaxy S10e [Android 10, OneUI 2.0]. If I run the command with tasker, it gives me the following message ("Ausführen" is german and means "execute", "Fehler" means "error"):
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/Shell runBackground setprop debug.hwui.force_dark true root: false timeout: -1
05.06.39/Shell start process-thread ID 672
05.06.39/E add wait type Shell1 time 2147483647
05.06.39/E add wait type Shell1 done
05.06.39/E add wait task
05.06.39/E Fehler: 1
If I do it with the app "Android Terminal Emulator" it gives me the following error:
:/ $ setprop debug.hwui.force_dark true
setprop: failed to set property 'debug.hwui.force_dark' to 'true'
Either way, it doesnt work for me. Does anybody know what could be the issue here? Ive also tried setting it to "1" instead of "true", same result. Setting the real setting to enabled or disabled doesnt matter either.
Click to expand...
Click to collapse
In Samsung phone setprop command is diff i guess... Google it for command.
[email protected] said:
In Samsung phone setprop command is diff i guess... Google it for command.
Click to expand...
Click to collapse
Do you have proof it's working for non root??
[email protected] said:
In Samsung phone setprop command is diff i guess... Google it for command.
Click to expand...
Click to collapse
First thanks for the answer , but...
I dont think its different. The getprop command (getprop debug.hwui.force_dark) works fine, gives me true if its turned on.
If i do the setprop command over adb (adb shell setprop debug.hwui.force_dark true) it also works fine.
The only thing not working is the setprop command executed directly on my device. Which lets me conclude that i probably need root?
RnKn98 said:
First thanks for the answer , but...
I dont think its different. The getprop command (getprop debug.hwui.force_dark) works fine, gives me true if its turned on.
If i do the setprop command over adb (adb shell setprop debug.hwui.force_dark true) it also works fine.
The only thing not working is the setprop command executed directly on my device. Which lets me conclude that i probably need root?
Click to expand...
Click to collapse
No... Its working in non rooted device... Tested.
There may be one more thing... Shell need to have write secure settings permission. Its permission issue.
[email protected] said:
In AOSP based android Q roms, there is a force dark option in developer settings whoich makes almost all apps to be appreaded in dark mode.
This option gets unselected after reboot.
One has to enable it after every reboot.
However it's possible to enable it by default after reboot.
For rooted phone.
Just add the following line in your build.prop file
debug.hwui.force_dark=1
Thats all.
It's working in my phone. Tested.
Hit a thanks to me if you are benifited.
Click to expand...
Click to collapse
Hello,
Thank you so much for your solution that works very well on my rooted phone :good:
1) I would like to know how to totally disable this feature if I no longer want the override force-dark someday please ?
2) Actually, how to force the rest of the remaining white applications to become black please ?
Thank you in advance for your help.
Cordially
MobAndro said:
Hello,
Thank you so much for your solution that works very well on my rooted phone :good:
1) I would like to know how to totally disable this feature if I no longer want the override force-dark someday please ?
2) Actually, how to force the rest of the remaining white applications to become black please ?
Thank you in advance for your help.
Cordially
Click to expand...
Click to collapse
Just switch off dark theme... Force dark need not to be changed. Add dark theme icon in qs header
[email protected] said:
Just switch off dark theme... Force dark need not to be changed. Add dark theme icon in qs header
Click to expand...
Click to collapse
Hello,
I've been using the dark mode since I bought my S10.
I discovered the override force-dark a few days ago then I realized that after the reboot this option was disabled on its own and every time.
I did some research to have it automatically and I came across your tuto that worked very well for me. Only some applications had problems with the override force-dark.
Since yesterday, I don't know why now the override force-dark disables itself. When I turn it on, it immediately turns off itself without even restarting.
I don't understand what's going on because this option was automatically activated after each reboot.
I didn't again even touch the build.prop either...
MobAndro said:
Hello,
I've been using the dark mode since I bought my S10.
I discovered the override force-dark a few days ago then I realized that after the reboot this option was disabled on its own and every time.
I did some research to have it automatically and I came across your tuto that worked very well for me. Only some applications had problems with the override force-dark.
Since yesterday, I don't know why now the override force-dark disables itself. When I turn it on, it immediately turns off itself without even restarting.
I don't understand what's going on because this option was automatically activated after each reboot.
I didn't again even touch the build.prop either...
Click to expand...
Click to collapse
It's tough to tell the problem from here. U hv to find it.
[email protected] said:
It's tough to tell the problem from here. U hv to find it.
Click to expand...
Click to collapse
Do you think that I can delete this line "debug.hwui.force_dark=1" and put it back in the build.prop again after reboot please ?
Because it's the first time that I've modified this system file so I'm not used to manipulating it...
Thank you in advance for your answer.

Question Request: Run a few "adb shell" commands on a Xiaomi 11

Hey you lucky Mi 11 owners,
I'm trying to compile a database for Android Devices - something like the Grade Partition Table Reference started a while ago here @xda, but a lot more detailed, including:
-cat /proc/cpuinfo
- getprop
- service list
- lshal
- ps -Zef
- ls -l /dev
- ls -l /dev/block/by-name
- cat /proc/partitions
- df
- mount
- dumpsys (lots of output)
I make the results public at http://newandroidbook.com/ddb/ so other people, primarily researchers and rooters/modders, can benefit. Any help would be *greatly* appreciated. It's really simple to do this (especially on Linux, just use "script" then "adb shell", then run all these , exit from device, exit from script, and grab typescript.txt)
I have sent my debugging records, copied and saved by CMD of win10. Because my linux can't seem to load usb
G731882624 said:
I have sent my debugging records, copied and saved by CMD of win10. Because my linux can't seem to load usb
Click to expand...
Click to collapse
That's great! Thank you! But... where did you send them? I didn't get anything either here or at the [email protected] mail..
And btw, running "Adb" as root usually fixes the usb problems on Linux. Either that, or changing dev rules
morpheus______ said:
That's great! Thank you! But... where did you send them? I didn't get anything either here or at the [email protected] mail..
And btw, running "Adb" as root usually fixes the usb problems on Linux. Either that, or changing dev rules
Click to expand...
Click to collapse
Oh, I probably sent the wrong email address. I am using the Linux subsystem under win10. Run lsusb to get [email protected]:/mnt/c/Users/Ge# lsusb
unable to initialize libusb: -99
G731882624 said:
Oh, I probably sent the wrong email address. I am using the Linux subsystem under win10. Run lsusb to get [email protected]:/mnt/c/Users/Ge# lsusb
unable to initialize libusb: -99
Click to expand...
Click to collapse
Is it the address at [email protected]? . .
G731882624 said:
Is it the address at [email protected]? . .
Click to expand...
Click to collapse
Got it! Thank you so much! This is super helpful!!!
how to root ?any one can help?
feng.zh.cfo said:
how to root ?any one can help?
Click to expand...
Click to collapse
It should be as easy as unlocking the bootloader and trying magisk through Magisk Manager on the boot.img from the OTA (which I put at http://NewAndroidbook.com/ddb/Mi11/OTA). Let me know if you need help with that.
feng.zh.cfo said:
how to root ?any one can help?
Click to expand...
Click to collapse
I am rooted, very simple
G731882624 said:
I am rooted, very simple
Click to expand...
Click to collapse
I have unlocked the bootloader, what should I do?Can you give me detailed steps, thank you!
I have unlocked the bootloader, what should I do?Can you give me detailed steps, thank you!
morpheus______ said:
It should be as easy as unlocking the bootloader and trying magisk through Magisk Manager on the boot.img from the OTA (which I put at http://NewAndroidbook.com/ddb/Mi11/OTA). Let me know if you need help with that.
Click to expand...
Click to collapse
I have unlocked the bootloader, what should I do?Can you give me detailed steps, thank you!
morpheus______ said:
It should be as easy as unlocking the bootloader and trying magisk through Magisk Manager on the boot.img from the OTA (which I put at http://NewAndroidbook.com/ddb/Mi11/OTA). Let me know if you need help with that.
Click to expand...
Click to collapse
I have unlocked the bootloader, what should I do?Can you give me detailed steps, thank you!
morpheus______ said:
Got it! Thank you so much! This is super helpful!!!
Click to expand...
Click to collapse
I'm rooted, I will do the un-debugged part later
127|venus:/data/local/tmp # ./bindump
Usage: bindump [-h|-?]
bindump [ns] list
bindump [ns] check SERVICE
bindump [ns] call SERVICE [i32 N | i64 N | s16 STR ] ...
bindump [ns] users SERVICE # As per my 'bindump' tool (try 'all' for SERVICE)
bindump [ns] dump SERVICE # As per 'dumpsys' tool
Where: [ns] is optionally 'binder' (default), 'hwbinder' or 'vndbinder'
Bindump, Dumpsys, Service & more - v0.1 - By Jonathan Levin
This tool is part of the resources for 'Android Internals', Volume II
Free for non-commercial use at http://NewAndroidBook.com/
用于商业用途(和纯C活页夹库)mail://[email protected]
I don’t know how to enter next to get debugging information
127|venus:/data/local/tmp # ./bindump users all
venus:/data/local/tmp #
For example, he has no output
G731882624 said:
127|venus:/data/local/tmp # ./bindump users all
venus:/data/local/tmp #
For example, he has no output
Click to expand...
Click to collapse
That happens if debugs is not mounted
mount -t debugfs none /sys/kernel/debug
fixes problem

Categories

Resources