Override force dark settings command - Android Q&A, Help & Troubleshooting

Is there any command I could use to automate the enabling of force override dark mode:
{
"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"
}
I tried listing
Code:
`settings list [global, system, secure]
but doesn't seem it is there:
Code:
# matheus @ arch-matheus in ~ [15:53:31] C:255
$ adb shell settings list global | grep dark
# matheus @ arch-matheus in ~ [15:53:40] C:1
$ adb shell settings list system | grep dark
# matheus @ arch-matheus in ~ [15:53:47] C:1
$ adb shell settings list secure | grep dark
sysui_qs_tiles=wifi,bt,dnd,flashlight,rotation,battery,cell,airplane,cast,hotspot,dark,adb_network,livedisplay,custom(com.google.android.apps.wellbeing/.screen.ui.GrayscaleTileService),custom(com.google.android.apps.wellbeing/.focusmode.quicksettings.FocusModeTileService),volume_panel,usb_tether,vpn,inversion,cast
# matheus @ arch-matheus in ~ [15:53:52]
$
The device is an harpia (moto-g 4 play). I am using lineageOS.
I am doing this just because I'm curious. I don't know, could be useful for someone who is developing a automatic night mode or whatever but I just have some bug on my custom room (lineageOS 17.1) that it gets disabled after reboot and I would like to automatically run that after boot. So I just got curious with how to change developer settings through script and I just need to know what to run to set that on/off.
Another small question. Why the settings command only work as root?
Code:
[email protected]  ~  settings
cmd: Failure calling service settings: Failed transaction (2147483646)
✘ [email protected]  ~  sudo settings
Settings provider (settings) commands:
help
Print this help text.
get [--user <USER_ID> | current] [--lineage] NAMESPACE KEY
Retrieve the current value of KEY.
put [--user <USER_ID> | current] [--lineage] NAMESPACE KEY VALUE [TAG] [default]
Change the contents of KEY to VALUE.
TAG to associate with the setting.
{default} to set as the default, case-insensitive only for global/secure namespace
delete [--user <USER_ID> | current] [--lineage] NAMESPACE KEY
Delete the entry for KEY.
reset [--user <USER_ID> | current] NAMESPACE {PACKAGE_NAME | RESET_MODE}
Reset the global/secure table for a package with mode.
RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}, case-insensitive
list [--user <USER_ID> | current] [--lineage] NAMESPACE
Print all defined keys.
NAMESPACE is one of {system, secure, global}, case-insensitive
That is from a termux shell, that's why sudo works.

Related

HTC Touch Application (Original CHT Chinese)

another New HTC launcher looks like iPhone
http://forum.xda-developers.com/showthread.php?p=1579059#post1579059
deleted for fail installation, need to re cab again
By the way here are the links to make shortcuts:
Control Panel
Connections:
Beam: 8#"ctlpnl"cplmain.cpl,15,0?shellres.dll,-13910
Bluetooth: 8#"ctlpnl"cplmain.cpl,23,0?shellres.dll,-13909
Connections: 8#"ctlpnl"cplmain.cpl,19,0?shellres.dll,-13953
Network cards: 8#"ctlpnl"cplmain.cpl,17,0?shellres.dll,-13888
Personal:
Buttons: 8#"ctlpnl"cplmain.cpl,12,0?shellres.dll,-13944
Input: 8#"ctlpnl"cplmain.cpl,8,0?shellres.dll,-13936
Lock: 8#"ctlpnl"cplmain.cpl,1,0?shellres.dll,-13942
Menus: 8#"ctlpnl"cplmain.cpl,11,0?shellres.dll,-13937
Owner Info: 8#"ctlpnl"cplmain.cpl,2,0?shellres.dll,-13841
Phone: 8#"ctlpnl"cplmain.cpl,20,0?shellres.dll,-13954
Sounds: 8#"ctlpnl"cplmain.cpl,9,0?shellres.dll,-13924
Today: 8#"ctlpnl"cplmain.cpl,13,0?shellres.dll,-13952
System:
about: 8#"ctlpnl"cplmain.cpl,5,0?shellres.dll,-13899
Certificates: 8#"ctlpnl"cplmain.cpl,22,0?shellres.dll,-13941
Clock n Alarm: 8#"ctlpnl"cplmain.cpl,16,0?shellres.dll,-13840
Error Reporting: 8#"ctlpnl"cplmain.cpl,24,0?shellres.dll,-13997
Memory: 8#"ctlpnl"cplmain.cpl,4,0?shellres.dll,-13900
Power: 8#"ctlpnl"cplmain.cpl,3,0?shellres.dll,-13895
Regional Settings: 8#"ctlpnl"cplmain.cpl,18,0?shellres.dll,-13901
Remove Programs: 8#"ctlpnl"cplmain.cpl,10,0?shellres.dll,-13943
Screen: 8#"ctlpnl"cplmain.cpl,7,0?shellres.dll,-13906
*additional info:
You might've noticed, there're 2 number delimited by comma in every shortcut. Eg. Bluetooth, the 2 numbers are "23,0". The first number is the id for Bluetooth, while the second number is the tab's id. If you open up the bluetooth setting, you will see 3 tabs: Mode, Devices, and COM Ports. 0 is for the first tab, 1 is for the second, and so on. So if you wish to open up Bluetooth and point straight to the Devices tab, just change it to "23,1".
SMS & Mail
SMS list view: 20#"\Windows\tmail.exe"-service "SMS"
New SMS: 20#"\Windows\tmail.exe"-service "SMS" -to "" -body ""
Email list view: 20#"\Windows\tmail.exe"-service "Name of email account"
New Email: 20#"\Windows\tmail.exe"-service "Name of email account" -to "" -body ""
*additional info:
The name for the default "Outlook" account is "ActiveSync" (case sensitive). To open up your own email account, make sure you type the exact name inside the quotes, including symbols and punctuations if necessary (case sensitive, too).
Phone Dialer
Phone dialer: 20#"\Windows\cprog.exe"
Prompt to call 1234567: 20#"\Windows\cprog.exe"-url tel: 1234567
*some phones use vtkey.exe instead of cprog.exe. I believe cprog.exe is used by Atoms only.
Important:
1) make sure you encase the path with quotes. eg. "\Windows\cprog.exe"
2) make sure there is no space between the path and the parameters. eg. "ctlpnl"cplmain.cpl
3) the number preceding the # character is the length of the path including the quotes (" "). eg. The length of "\Windows\cprog.exe" is 20.
{
"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"
}
great...

[krn.module] smartass v2 governor for X10 mini

I've finally managed to compile smartass v2 governor (source code) and get it to work on X10 mini.
Few members insisted if I could give it a try and I accepted the challenge
It is ment for X10 mini stock kernel 2.6.29 preempt mod_unload ARMv6.
{
"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"
}
You can configure various parameters:
Code:
-sh-3.2# pwd
/sys/devices/system/cpu/cpu0/cpufreq/smartassV2
-sh-3.2# ls
debug_mask
up_rate_us
down_rate_us
sleep_ideal_freq
sleep_wakeup_freq
awake_ideal_freq
sample_rate_jiffies
ramp_up_step
ramp_down_step
max_cpu_load
min_cpu_load
Installation guide:
Download the archive and copy the cpufreq_smartass2.ko onto the root of your /sdcard/. Then, type in the following commands:
Code:
mount -oremount,rw /dev/block/mtdblock0 /system
cd /system/lib/modules
cp /sdcard/cpufreq_smartass2.ko .
insmod cpufreq_smartass2.ko
Then you can switch to the smartassV2 governor using SetCPU.
Configuration:
SetCPU does not support configuring it - so you will have to manage from command line. Have a look at this thread to understand how to configure - it is for the old smartass module for X10 - but the configuration is done the same way.
Each parameter (and its meaning) is defined in the source code found above.
Download:
Use it at your own risk!
cpufreq_smartass2_x10mini.zip
Enjoy!
I just installed the module, but now I want to manage it to load at startup. Which is the correct sentence?
echo "smartass" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor [OR]
echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
The last one - with smartassV2.
viulian said:
The last one - with smartassV2.
Click to expand...
Click to collapse
how about detial?
i want it at startup, too
Got Mini Pro. Flashed Xperian Blaze, but it's 11W40, so only stock kernel is in play. But when trying to insmod this governor device freezes and reboots.
Is there any other thing I'm missing? Or maybe other way to get additional governors for stock kernel?

ADB install problem on SGS3/JB

I'm on SGS 3 (I9300) with freshly installed I9300XXDLIH_I9300VFGDLJ1_VIP and rooted afterwards.
Since I upgraded my phone to Jelly Bean, I can't test/debug any development project on the phone.
The Eclipse APK build passes OK and this is what I get in the step afterwards -- when the APK is tried to be deployed on the phone:
Code:
Installation failed due to invalid APK file!
Please check logcat output for more details.
Launch canceled!
This is what I get when I try installing directly with ADB:
Code:
>adb install -r test.apk
3484 KB/s (1616779 bytes in 0.453s)
pkg: /data/local/tmp/test.apk
Failure [INSTALL_FAILED_INVALID_APK]
I've found some hints that the tmp folder may have invalid permissions, so I have done this:
Code:
chmod 777 /data /data/local /data/local/tmp
With the result:
Code:
[email protected]:/ # ls -ld data data/local data/local/tmp
ls -ld data data/local data/local/tmp
drwxrwxrwx system system 2012-10-23 15:40 data
drwxrwxrwx root root 2012-08-25 10:40 local
drwxrwxrwx shell shell 2012-10-23 16:36 tmp
Eclipse or ADB still refuse to install (any) APK.
If I copy the Eclipse-generated APK to the phone and initiate the install from there, it works OK.
What can I do to fix this? Please help.
FYI, I'm using 20.0.3 Android SDK (and Eclipse 4.2.1).
My system properties:
{
"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"
}
Update:
Installed SiyahKernel S3-v1.6.8 and w/o any tampering with the settings (e.g. through ExTweak) the problem is solved.
Root cause seems to be UMASK.
- on stock kernel I had 0077
- now on SiyahKernel I have 0000
Still, as can be seen from numerous other threads on the same issue out there, it's very wrong for the stock kernel to cause that problem.
Moved to Android Q&A.

[recovery mode] [download mode] not working

Hi,
I am trying to flash a new ROM to my Samsung Galaxy S5830i, but unfortunately, I can't use either Recovey Mode, or Download Mode.
When I try to access Download Mode, it simply boots in as nothing happened. (I tried to access Download Mode by pressing Vol Up + Vol Down + Power)
When I try to access Recovery Mode, I can't move with the volume buttons, but the home button does work (and it reboots the phone). It says, "Applying Multi-CSC", but nothing happens, I tried to leave it there for 1 hour, but nothing changed:
{
"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"
}
I tried the following soultions, but none of them solved the problem:
I rooted the phone, and tried using Terminal to flash CWM as recovery.IMG, as this tutorial suggests:
Launch terminal emulator
Change user as superuser, type
$su
the $ symbol wil change to #
Mount and change the permission
# mount -o remount rw /system
Concatenate flash_image files and set the permission.
# cat /sdcard/flash_image > /system/xbin/flash_image
# chmod 755 /system/xbin/flash_image
Install the CWM recovery
# flash_image recovery /sdcard/recovery.img
set back the permission for /system and reboot
# mount -o remount ro /system
# reboot recovery
Click to expand...
Click to collapse
It got stuck on installing the CWM recovery:
I tried to access Download Mode with ADB using the "reboot download", but the phone rebooted normally, not in Download Mode.
Any suggestions, on how to access Download Mode or fix the Recovery Mode, so I can flash a new ROM to the phone?

General Extend WSA by 428 Linux commands

To my knowledge Windows Subsystem for Android ( WSA ) is not created to run apps from the Amazon store only, but is configured for testing via ADB, will say run Linux commands in an Android shell, too.
WSA ( what at time of this writing is running Android 12 ) has merged Landley's Toybox v0.8.4, a bag of over 200 Linux command line applets - I have not really counted them.
A typical Linux distribution provides 428 command line applets - the SU incorporated. I have uploaded .ZIP ( 263 MB ) what contains them all here to:
428-cmds
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
If you are interested in this project, too, then it's on you to download and extract the .ZIP and push the 428 files onto Android, preferredly to /storage/emulated/0/428-cmds, and make them executable.
Example .BAT-file - assumed .ZIP got extracted into D:\428-cmds folder & ADB is installed on PC
Code:
adb connect 127.0.0.1:58526
adb devices
adb shell "cd /sdcard & mkdir -p -m06755 428-cmds 2>/dev/null"
adb push "D:\428-cmds" "/sdcard/428-cmds/"
adb shell "SM='getenforce';setenforce 0;cd /sdcard/428-cmds;CMDS='$(find .-name "*" -maxdepth 1 -type f 2>&1 | grep -i -v denied)';while read x;do chmod 06755 "$x" & chown root:shell "$x";done; << "$CMDS";chcon "$x" u:object_r:su_exec:s0;setenforce "$SM";"
{
"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"
}
Note:
The 428 commands provided all are ELF32 binaries, so 32-bit:
That doesn't have to stop you from using them on a x86_64 PC because a 64-bit CPU can handle 32-bit commands.
Hmm... Great Work
I am getting an error on the last command.
/system/bin/sh: here document '$CMDS' unclosed
I tried the method in your toybox thread but it doesn't connect to wsa.
I think it is looking on the wrong port from the looks of the script. I am just trying to get root. I updated my rooted build of wsa and it no longer would load. i have tried different ones making sure to remove the one from the microsoft store first. Installing the one from the microsoft store by installing the amazon store gets wsa working again but without root and without my userdata.vhdx that I backed up. Any help would be appreciated. Thanks

Categories

Resources