Can Camera2 be enabled ? - Xiaomi Mi Pad 4 Questions & Answers

It is possible to enable Camera2 API ? Do you know how to check if we have all the required files ?
On MIUI, I tried "setprop persist.camera.HAL3.enabled 1" (from https://forum.xda-developers.com/mi-a1/how-to/guide-how-to-enable-hal3-camera2api-t3747073), and it didn't change anything (still Limited profile).

Related

[CM13] ALSA instead of tinyALSA

Hey guys
I already asked this in some way over at Zenfone 2 sub forum but it might be better to post it here since it could be more CM-related than phone related.
At work we're developing an app which requires an x86 based processor to function properly. But we also need to use ALSA instead of tinyALSA related to various startup scripts required for that mentioned application and the application itself. Rewrite the whole parser is out of question due to the amount of work involved to port it over ARM platform.
Anyway we digged through the mixer settings of tinyALSA and came to the conclusion that it's not suitable for our app.
Currently I'm using the CyanogenMod 13 source code with ALSA lib and ALSA utils packages from Android x86 project (the Marshmallow-one of course). The build process is all fine and the binaries are usable inside an ADB shell but I'm not really able to use aplay for recording or playback of audio files.
Right now I'm stuck with the following error:
Code:
aplay: pcm_write:1684: write error: I/O error
I used "alsa_aplay /sdcard/Front_Center.wav -D hw:0,5 " to test the audio playback.
Some other problems occur when I want to use "alsa_ctl init", alsa_amixer can't load default mixer settings, "alsa_aplay -L" results in "NULL" output and so on.
Any suggestions on how to get audio capabilities working with true ALSA?
By the way: Our Zenfone 2 uses an Intel Atom Z3560 processor with rt5647-audio codec.

google lollipop camera app debugging

Hi All,
I am doing camera HAL v3 development and while running below app then panorama is crashing.
com.google.android.GoogleCamera-2.4.008_(1519572-30)-24008130-minAPI19.apk
I wanted to debug the app and therefore decompiled the apk.
I found below type of logging in decompiled source code.
Log.m6v(TAG,"some logging info here");
I tried doing below setting but in vain.
adb shell setprop log.tag.PanoramaModule VERBOSE
adb shell setprop log.tag.PhotoModule VERBOSE
probably Log.m6v is logging based on setting some number.
decompiled code is reading some sort of logging level as below.
this.mLoggingOverrideLevel = Gservices.getInt(context.getContentResolver(), "camera:logging_override_level", 0);
How can I set this number on adb shell ?

[Overlay] Dil3mm4's Overlays for Huawei Prague Series devices (all variants)

This overlay APK it's "born" because of the necessity to overcome missing overlays (thanks Huawei, love ya xoxo) under /vendor/overlay .
What it does exactly?
Nothing more than adding AOSP overlay matching our device capabilities and also, inherits Prague power profile.
Do I need it?
Well, better having than don't.
This will conisderably enhance your experience on every GSI ROM giving better functionality overall.
Why you did that?
Because I'm sick of inheriting stuff that belongs to /vendor, in system.
Project Treble it's all about separating vendor implementation from system.
So why we should keep adding OEM stuff in that doesn't belong no more in /system
I have XYZ device with ZYX firmware can I use it?
As long as you're on a PRA-*** device (with a non-EMUI firmware), you're good to go.
Otherwise DO NOT USE IT FOR THE LOVE OF MANKIND.
I don't have PRA, but I want it on my Huawei device !
Well, that's fine, join the Telegram group @GSI_HI6250, so that you could help me with stock files grabbing to make an overlay for your device.
Overlay configs (aka "what does dis do, ser tell pl0x"):
Allows all rotations;
Configs autobrightness levels;
Configs autobrightness Lcd values;
Configs BLE;
Sets Doze Component;
Sets Doze After screen off;
Configs autopowermodes (doze related);
Configs power management on:
screen off due to proximity sensor interaction;
decouple on suspend state;​
Configs brightness doze value;
Configs Intrusive led;
Configs dual band wifi support (where available);
Configs hotswap (where available);
Configs Color Transform on HWC;
Configs VoLTE available (even tho it needs support on GSI side);
Configs WFC over IMS;
Configs wifi background scanning support.
Installation Instructions
Download the attached overlay
With root, push the overlay to /vendor/overlay. Create the folder if it doesn't exist.
Run the following command in a rooted terminal or ADB shell:
Code:
chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/dil3mm4_overlay_PRA.apk
Does it has something related to the other thread?-Enable Night Light, Auto-Brightness-​
I just ran the following command, it seems to be installed properly.
for what exactly is this overlay?
Thank you!
osk4rin said:
Does it has something related to the other thread?-Enable Night Light, Auto-Brightness-​
I just ran the following command, it seems to be installed properly.
for what exactly is this overlay?
Thank you!
Click to expand...
Click to collapse
I have XYZ device with ZYX firmware can I use it?
As long as you're on a PRA-*** device (with a non-EMUI firmware), you're good to go.
Otherwise DO NOT USE IT FOR THE LOVE OF MANKIND.
Click to expand...
Click to collapse
You seem to use a Mate 9 according to your signature.
So please, do not use it.
Also, it enables what it's "supposed" to be enabled on stock EMUI, including auto-brightness, night-light, ambient display and other features that PRA is capable of.
Read again the whole thread, thanks.
dil3mm4.dev said:
You seem to use a Mate 9 according to your signature.
So please, do not use it.
Also, it enables what it's "supposed" to be enabled on stock EMUI, including auto-brightness, night-light, ambient display and other features that PRA is capable of.
Read again the whole thread, thanks.
Click to expand...
Click to collapse
Thanks!
please help
adb shell su
chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay;chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay/dil3mm4_overlay_PRA.apk
chcon: '/vendor/overlay' to ubject_r:vendor_overlay_file:s0: Read-only file system
chcon: '/vendor/overlay/dil3mm4_overlay_PRA.apk' to ubject_r:vendor_overlay_file:s0: Read-only file system
jeuxtype said:
please help
adb shell su
chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay;chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay/dil3mm4_overlay_PRA.apk
chcon: '/vendor/overlay' to ubject_r:vendor_overlay_file:s0: Read-only file system
chcon: '/vendor/overlay/dil3mm4_overlay_PRA.apk' to ubject_r:vendor_overlay_file:s0: Read-only file system
Click to expand...
Click to collapse
write
Code:
mount -o remount,rw /vendor
after this write needed command
UPDATE
-P compatibility
-Improved brightness levels
DOWNLOAD
When this overlay is used, the phone doesn't detect headphone plug correctly, therefore sound doesn't come out of the speakers sometimes, phone thinks it still has a headphone jack plugged in.

Development High Resolution Mod for Xperia 1 IV

Hey everyone,
before the official Android 12 release from Sony it was possible to force the display to render at full 4K resolution via "wm size" command.
With the release of Android 12 this behaviour changed and it´s no longer possible to force 4K resolution that way.
I looked into quite a few ways go get full 4K rendering back and discovered that even for supported apps, where the kernel switches to timings for 4k resolution, the actual rendering for the displayed content is upscaled 2k.
That means there unfortunately is no way, that I was able to find, to force full 4k rendering on the device as of now.
The best I could do, is to force the default 4k mode where kernel panel timings are at 4k, but content is upscaled 2k for regular usage. The result is the following: Every app, except the ones you add to game optimizer app, will be rendered like apps that sony enabled 4k resolution for.
That´s the best I can do at the moment.
This mod might impact battery life, smoothness and other things, as more resources are needed.
However I didn´t have any problems during my usage.
The difference is not huge, but it´s visible if you look for it. For example the fonts at the bottom of Google Fotos app, like Fotos, Search etc are way more crisp.
You can check in logcat if high-resolution config is used via:
Code:
adb logcat | grep "high resolution"
While having this mod flashed, the following line means high-resolution mode (panel running at 4k, content is upscaled 2k at 120fps) is enabled:
Code:
11-11 18:56:49.801 1475 1758 D SDM : HWCDisplay::SetActiveConfigWithConstraints: Setting to a high resolution config: 1
While having this mod flashed, the following line means high-resolution mode (panel running at 4k, content is upscaled 2k at 60fps) is enabled:
Code:
11-11 18:56:56.725 1475 1761 D SDM : HWCDisplay::SetActiveConfigWithConstraints: Setting to a high resolution config: 0
Changelog:
update with dtbo.img for firmware 64.1.A.0.869
Requirements:
- Sony Xperia 1 IV running on A13, with at unlocked bootloader
- fastboot method does not require root
- method via kernel managers does require root
- backup your current dtbo.img or make sure you have a copy of the same (EXKM can backup dtbo.img, or you can grab it from xperifirm)
Installation:
1. Download one of the attached dtbo.imgs
Please note: This mod is made for Android 13 firmware, it will not work on Android 12 firmware
2. Do either 2a or 2b!
2.a Boot to fastboot and flash via:
Code:
fastboot flash dtbo filenameofdtbo.img
2.b Flash filenameofdtbo.img via EXKM or any app that allows flashing dtbo.img
3. reboot
this one is mine too
this as well
Anyone tried this yet, if so what was the impact on the battery?
sillygooes said:
Anyone tried this yet, if so what was the impact on the battery?
Click to expand...
Click to collapse
Please refrain from asking questions which can be answered with your own common sense lmao
Mijan94 said:
Please refrain from asking questions which can be answered with your own common sense lmao
Click to expand...
Click to collapse
Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.
A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
OhayouBaka said:
Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.
A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
Click to expand...
Click to collapse
Yes, boot animation can get scrambled up indeed.
It depends on changes done to future firmware updates. Can't foresee the future, but it's unlikely there are much changes.
It's easy to either backup dtbo.img before flashing the modded one or simply reflash Stock extracted from Xperiafirm/unsin tool though.
No Bootloader unlock needed. Still.
service call SurfaceFlinger 1035 i32 x
(x=0,1,2,3)
1. 1096x2560x60x397132cmd
2. 1644x3840x120x397108cmd
3. 1644x3840x60x397108cmd
4. 1096x2560x120x397132cmd
Google changed the behavior for native Resolution switches in the Android Settings. Just like Samsung has it since YEARS. Thanks for the alternative tho
Also note that some apps do not work with an unlocked bootloader, for security standards requires a locked bootloader.
All throughout the internetz, people have had issues with apps like banking/finance apps, Google proprietary finance apps like Wallet or Google pay, or apps store like Google play.
OhayouBaka said:
Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.
A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
Click to expand...
Click to collapse
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.
You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:
Just run:
Code:
adb shell
Code:
su
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
OhayouBaka said:
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.
You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:
Just run:
Code:
adb shell
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
Click to expand...
Click to collapse
Was about to do a Module. Thanks for sharing the Details!
OhayouBaka said:
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.
You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:
Just run:
Code:
adb shell
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
Click to expand...
Click to collapse
Thanks for this also I just found out you can add the script to fkm so you can easily switch between all resolution
Edit: Actually I think you can only run 2 res at a time 4k @120/60 or 1080 @120/60
Miustone said:
No Bootloader unlock needed. Still.
service call SurfaceFlinger 1035 i32 x
(x=0,1,2,3)
1. 1096x2560x60x397132cmd
2. 1644x3840x120x397108cmd
3. 1644x3840x60x397108cmd
4. 1096x2560x120x397132cmd
Google changed the behavior for native Resolution switches in the Android Settings. Just like Samsung has it since YEARS. Thanks for the alternative tho
Click to expand...
Click to collapse
OhayouBaka said:
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.
You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:
Just run:
Code:
adb shell
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
Click to expand...
Click to collapse
raven213 said:
Thanks for this also I just found out you can add the script to fkm so you can easily switch between all resolution
Edit: Actually I think you can only run 2 res at a time 4k @120/60 or 1080 @120/60
Click to expand...
Click to collapse
nice, thanks for the information. Much appreciated!
Wasn´t aware of this command or this way to set the ID.
One thing I noticed. This way basically breaks refresh rate switching though. E.G. if a different FPS is set for any app via game enhancer that will break for some reason.
I use this little trick to set 60hz mode for video apps for example as colours and gamma are way better on 60fps, and it´s unnecessary to drive the phone at 120hz during 60fps videos.
Had a small hope this would circumvent the upscaled 2k content despite running 4k panel mode, but it´s still the same.
Is it available on xperia1iii?
1219545479 said:
Is it available on xperia1iii?
Click to expand...
Click to collapse
Check Sony xda TG I think someone created a zip file for the III
First thanks for this mod. But 4k 120hz is sooooo hot although my room's temp is 9°C .... Fxxk 8gen1 that's why I want to buy s23ultra
1219545479 said:
Is it available on xperia1iii?
Click to expand...
Click to collapse
Yeah see here.... 2nd post by me.....
High Resolution & High Refresh Guide for Xperia 1 III
Welcome! Short and painless for You No Root needed Download the Android Platform Tools from Google Extract the Folder Containing adb & fastboot open a Terminal in the extracted Folder run one by one: adb shell service call SurfaceFlinger 1035...
forum.xda-developers.com
updated for firmware 64.1.A.0.869
It's so awesome that this mod exists and I don't even have the phone! Thank you for this mod. I really do hope more people discover this, as I'm sure many Xperia 1 users would want it.

How To Guide Force 120Hz MIUI 13 & MIUI 14

This is a thread for those who don't want to root their device to force 120Hz on every app.​If you are looking for a root solution, then use the LSPosed module called MIUI Performance Saver - Download here
In this way, you can force 120Hz in applications such as: YouTube, MX Player, Google Maps and many others that run at 60Hz by default in MIUI.
You will notice the changes, but you can check it by turning on the refresh rate counter in developer options and check the changes before and after.
​First method via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in the platform tools folder
4. Enter the following command:
For MIUI 13:
Code:
adb shell settings put system user_refresh_rate 1
For MIUI 14:
Code:
adb shell settings put secure user_refresh_rate 1
If first method doesn't work for you, then try second method.
Second method via Settings Database Editor app
Download this app from the Play Store and for it to work properly, download and install this file from github (settings-database-provider.apk).
For MIUI 13:
1. Open Settings Database Editor app
2. Search "user_refresh_rate"
3. Cick on it to edit the value and replace 120 with 1 and save changes
4. Done
For MIUI 14:
MIUI 14 requires you to grant permissions to the Settings Database Provider app via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in platform tools folder
4. Enter the following command:
Code:
adb shell pm grant com.netvor.settings.database.provider android.permission.WRITE_SECURE_SETTINGS
5. Open Settings Database Editor app
6. Search "user_refresh_rate"
7. Cick on it to edit the value and replace 120 with 1 and save changes
8. Done
Keep in mind that it may not work because Xiaomi changes something under the hood of the updates.
I dont know what to say, force fps can cause useless battery drain on app that dont really need ... Do you really need 120hz when you send sms or making call or even messenger ... All do what they want but i wont use it
snx413 said:
I dont know what to say, force fps can cause useless battery drain on app that dont really need ... Do you really need 120hz when you send sms or making call or even messenger ... All do what they want but i wont use it
Click to expand...
Click to collapse
I've been using this method since I had the Poco F3 and I've never noticed that the battery was draining much because of it. I'm used to 120Hz and find it irritating to suddenly switch to 60Hz when scrolling in YouTube or some other app. I am not forcing anyone to force 120Hz on their devices.
Yeah but its most of the time at 120 btw, only you tube and tik tok seems to lower it at 60,
I miss my poco f3... They have all custom rom they want pfff, i sold to my brother ...
root and non root method doesnt work for my poco f3 with xiaomi.eu, i tried global too
HappyTrix said:
root and non root method doesnt work for my poco f3 with xiaomi.eu, i tried global too
Click to expand...
Click to collapse
Can you provide more information? Any errors when executing commands in ADB? Can't find user_refresh_rate in setedit app? It's impossible that it wouldn't work on Poco F3, because I had this device until recently (now I don't have it anymore) and both methods worked perfectly in global ROMs and xiaomi.eu.
is there any way to force it from 120hz to 60hz instantly when i stop swiping? it only works when brightness is above 50%, if below 50% it's always 120hz
nhquocnam said:
is there any way to force it from 120hz to 60hz instantly when i stop swiping? it only works when brightness is above 50%, if below 50% it's always 120hz
Click to expand...
Click to collapse
This is MIUI, nothing can be done about it. You can try Magisk root + LSPosed "MIUI Performance Saver" module and force 120hz, which "maybe" will solve your problem, or you can wait for some custom rom that will hopefully come out for the Xiaomi 12T Pro someday, as long as Xiaomi releases kernel source code for this device.
I cant seem to get my ADB to work u have any guides? and there is no "console" in the platform tools folder please help me
uvzen said:
This is a thread for those who don't want to root their device to force 120Hz on every app.​If you are looking for a root solution, then use the LSPosed module called MIUI Performance Saver - Download here
In this way, you can force 120Hz in applications such as: YouTube, MX Player, Google Maps and many others that run at 60Hz by default in MIUI.
You will notice the changes, but you can check it by turning on the refresh rate counter in developer options and check the changes before and after.
​First method via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in the platform tools folder
4. Enter the following command:
For MIUI 13:
Code:
adb shell settings put system user_refresh_rate 1
For MIUI 14:
Code:
adb shell settings put secure user_refresh_rate 1
Second method via SetEdit app
Download this app from Play Store
For MIUI 13:
1. Open Setedit app and scroll down to the end
2. Find "user_refresh_rate" "120"
3. Cick on it to edit the value and replace 120 with 1 and save changes
4. Done
For MIUI 14:
MIUI 14 requires you to grant permissions to the Setedit app via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in the platform tools folder
4. Enter the following command:
Code:
adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
5. Open Setedit app
6. In the right corner, change the "System Table" tab to "Secure Table"
7. Scroll down to the end and find "user_refresh_rate" "120"
8. Cick on it to edit the value and replace 120 with 1 and save changes
9. Done
Click to expand...
Click to collapse
Thank you, useful af
I'm getting an error while running the adb command :
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2331)
at com.android.providers.settings.SettingsProvider.mutateSecureSetting(SettingsProvider.java:1768)
at com.android.providers.settings.SettingsProvider.insertSecureSetting(SettingsProvider.java:1719)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:467)
at android.content.ContentProvider.call(ContentProvider.java:2533)
at android.content.ContentProvider$Transport.call(ContentProvider.java:530)
at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:382)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:278)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
SooRaj SuResh said:
I'm getting an error while running the adb command :
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2331)
at com.android.providers.settings.SettingsProvider.mutateSecureSetting(SettingsProvider.java:1768)
at com.android.providers.settings.SettingsProvider.insertSecureSetting(SettingsProvider.java:1719)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:467)
at android.content.ContentProvider.call(ContentProvider.java:2533)
at android.content.ContentProvider$Transport.call(ContentProvider.java:530)
at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:382)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:278)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
Click to expand...
Click to collapse
Changing refresh rate via ADB doesn't work for me either. Xiaomi changed something in the permissions again during one of the updates. I just updated my thread, so try second method through the Settings Database Editor app, because I checked and it works for me on Xiaomi.eu weekly 23.5.22.
Very good find! I had it working on MIUI 13 but I had been waiting to get it working on MIUI 14 since forever, didn't know we had to modify the secure table for this. Also, do you know any more efficient ways to do this with root? I am always rooted.
SooRaj SuResh said:
I'm getting an error while running the adb command :
Spoiler: Code
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2331)
at com.android.providers.settings.SettingsProvider.mutateSecureSetting(SettingsProvider.java:1768)
at com.android.providers.settings.SettingsProvider.insertSecureSetting(SettingsProvider.java:1719)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:467)
at android.content.ContentProvider.call(ContentProvider.java:2533)
at android.content.ContentProvider$Transport.call(ContentProvider.java:530)
at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:382)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:278)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
Click to expand...
Click to collapse
Try with granting permission to the app. Even with that you will get an error which you can solve as follows:
How can I use adb to grant permission without root?
Background I'm trying to create an app that can grant and revoke permissions of other apps. To do this I'm using adb commands: pm grant packageName permissionName This works great if I call it
stackoverflow.com
Unknown.Guy said:
Also, do you know any more efficient ways to do this with root? I am always rooted.
Click to expand...
Click to collapse
If you have root then use LSPosed module MIUI Performance Saver.

Categories

Resources