[MOD] Volume Boost for i9506 ver. 4.3 - Galaxy S 4 i9506 Android Development

This Mod is designed to increase the limit output volume of your Galaxy S4 i9506.
How to install:
1- Download the file of this post.
2- Download Root Browser in your S4 (need Root)
3- Open with Root Browser : System / etc / snd_soc_msm , place the file that you have downloaded here (and replace the existing file)
4- Set parameters to rw-r-r (permissions)
5- Finally, restart your device and... ready!
thanks to the user Cortisan to prepare our mod version. :good:
Tell me if it doesn´t work for you.

I ended up with Android OS upgrade "opening programs" and nothing happens... nandroid restore now.

[email protected] said:
I ended up with Android OS upgrade "opening programs" and nothing happens... nandroid restore now.
Click to expand...
Click to collapse
it should work for you. what version of Android have you got?
do you allow the permissions correctly?

pablogalanmusic said:
This Mod is designed to increase the limit output volume of your Galaxy S4 i9506.
How to install:
1- Download the file of this post.
2- Download Root Browser in your S4 (need Root)
3- Open with Root Browser : System / etc / snd_soc_msm , place the file that you have downloaded here (and replace the existing file)
4- Set parameters to rw-r-r (permissions)
5- Finally, restart your device and... ready!
thanks to the user Cortisan to prepare our mod version. :good:
Tell me if it doesn´t work for you.
Click to expand...
Click to collapse
don't work, I have needed to reinstall the rom and applications

Does it work for someone and does this work with the CM12 ROM's?

Doesn`t work on CM12 and had to restore backup. Useless thread. Using still Viper4Android.

Thanks, I'm going to try that then

kornelius1982 said:
Doesn`t work on CM12 and had to restore backup. Useless thread. Using still Viper4Android.
Click to expand...
Click to collapse
OMG, you were not joking, Viper4Android f**king rocks, I didn't know my phone was capable of such high quality audio even at an higher output (headphones), thank you so much for the suggestion

Can we do something to use it on lollipop?

You can use this diff on CM (/system/etc/mixer_paths.xml). The example below lowers from 84db(?) to 72.
Code:
--- mixer_paths-84.xml
+++ mixer_paths.xml
@@ -544,7 +544,7 @@
<path name="speaker">
<path name="spk" />
- <ctl name="RX7 Digital Volume" value="84" />
+ <ctl name="RX7 Digital Volume" value="72" />
<ctl name="SPK DRV Volume" value="7" />
<ctl name="COMP0 Switch" value="1" />
</path>
Optionally, a companion init.d script to patch the latest version after rom update.
Code:
#!/system/bin/sh
# Patching mixer_paths.xml (changing volume)
if [ ! -e /system/etc/.mixer_paths.xml_is_patched ]; then
mount -o remount,rw /system
cd /system/etc
patch mixer_paths.xml < /data/local/bin/mixer_paths.patch
if [ $? == 0 ]; then
touch .mixer_paths.xml_is_patched
else
touch .mixer_paths.xml_is_patched
touch .mixer_paths.xml_patching_error
fi
mount -o remount,ro /system
fi

Related

4.3 sd card issues fixed

I am currently working on a solution to fix 4.4 with more stable results.
I have created a flashable zip that works in an aftermarket recovery. It replaces the platform.xml file with modified file that has the necessary permission line to make the sd card writable now. That is the only thing changed. I added the under WRITE_EXTERNAL_STORAGE.
You need to be on a custom recovery. This update only applies to I9505G. If you do not have an S4 GOOGLE EDITION PHONE, then please disregard and move on.
Warning; You are flashing this at your own risk. I am not responsible for broken devices, deleted memory cards, phones thrown from raging, or WW3.
Download the flashable from here: http://d-h.st/Eif
Download the modified platform.xml to replace the original from here if you would rather push it: http://d-h.st/ooU
(this is not needed with zip, already included)
1. Place the zip the on your internal or external drive.
2. Reboot to your custom recovery, ie ( twrp, cwm)
3. Create a backup, have a restore point if it does not work.
4. Wipe dalvik and cache
5. Install the zip file
6. Wipe the dalvik and cache just to be sure.
7. Reboot phone.
Test to make sure it worked by using any file explorer, ie(solid explorer, root explorer, etc.) and creating a new folder, text document, or whatever. Do this through the phone, not a p.c. If it does not work, reboot to recovery, restore back to previous point and let me know asap.
I like it
Sent from my SGH-I317 using Tapatalk 2
cdshepherd said:
I like it
Sent from my SGH-I317 using Tapatalk 2
Click to expand...
Click to collapse
Thanks I will incorporate this on the 4.3 if you don't mind with credit.
Sent from my GT-I9505G using Tapatalk 2
I don't mind at all. Use what ya need.
Sent from my GT-I9505G using Tapatalk 4
I did use Samurai's Odin package to update to mh5. I figures it would revert the permissions. My zip still works.
And TWRP 2.6.3.0 is out.
Sent from my GT-I9505G using Tapatalk 4
occupational_hazard said:
I have created a flashable zip that works in an aftermarket recovery. It replaces the platform.xml file with modified file that has the necessary permission line to make the sd card writable now. That is the only thing changed. I added the <group gid="media_rw"/> under WRITE_EXTERNAL_STORAGE.
You need to be on a custom recovery. This update only applies to I9505G. If you do not have an S4 GOOGLE EDITION PHONE, then please disregard and move on. This is only for the MH1 4.3 firmware that does not allow you to write to the sdcard.
Warning; You are flashing this at your own risk. I am not responsible for broken devices, deleted memory cards, phones thrown from raging, or WW3.
Download the flashable from here: http://d-h.st/Eif
Download the modified platform.xml to replace the original from here if you would rather push it: http://d-h.st/ooU
(this is not needed with zip, already included)
1. Place the zip the on your internal or external drive.
2. Reboot to your custom recovery, ie ( twrp, cwm)
3. Create a backup, have a restore point if it does not work.
4. Wipe dalvik and cache
5. Install the zip file
6. Wipe the dalvik and cache just to be sure.
7. Reboot phone.
Test to make sure it worked by using any file explorer, ie(solid explorer, root explorer, etc.) and creating a new folder, text document, or whatever. Do this through the phone, not a p.c. If it does not work, reboot to recovery, restore back to previous point and let me know asap.
Click to expand...
Click to collapse
You're welcome.
http://forum.xda-developers.com/showthread.php?p=44370296
When dialog fails, it's time for violence.
Really I would have never thought of doing that. That's ground breaking. Extraordinary!
Now do more research and you will see people have trouble writing to that file with root and trying a multitude of file explorers. And mounting system r/w. I still couldn't. Hence the links to the flashable in the op.
So....
Your welcome.
Sent from my GT-I9505G using Tapatalk 4
occupational_hazard said:
Really I would have never thought of doing that. That's ground breaking. Extraordinary!
Now do more research and you will see people have trouble writing to that file with root and trying a multitude of file explorers. And mounting system r/w. I still couldn't. Hence the links to the flashable in the op.
So....
Your welcome.
Sent from my GT-I9505G using Tapatalk 4
Click to expand...
Click to collapse
My sincere apologies. I'm having a bad day. I'm glad I could contribute to your work.
When dialog fails, it's time for violence.
Its all good and understandable.
Sent from my GT-I9505G using Tapatalk 4
That worked great, thank you!
Sent from my GT-I9505G using Tapatalk 2
apollokid said:
That worked great, thank you!
Sent from my GT-I9505G using Tapatalk 2
Click to expand...
Click to collapse
Works well on 4.4 also.
This is good to know
Sent from my GT-I9505G using Tapatalk
wilbarger said:
Works well on 4.4 also.
Click to expand...
Click to collapse
I had read that some folks were having troubles with the 4.4 update, can you update and then edit that file again the same way as before?
Prior to updating, I was running CM 10.2. I flashed back to stock 4.3 from here http://forum.xda-developers.com/showthread.php?t=2442445 and then flashed 4.4 from here http://forum.xda-developers.com/showthread.php?t=2544056. After that (which went flawlessly), I copied the SD card fix from this thread and then installed it. No issues at all and everything works perfectly.
We are lucky to have SamuriHL and MJHawaii helping us out with our phones. Sorry, left out occupational_hazard. No disrespect meant.
Below is the text from the platform.xml that is on my phone after I updated. There shouldn't be any need to flash on 4.4. But please let me know if I am wrong. I also can make the original 4.3 platform.xml file to flash so you can update through recovery of that is the issue
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- This file is used to define the mappings between lower-level system
user and group IDs and the higher-level permission names managed
by the platform.
Be VERY careful when editing this file! Mistakes made here can open
big security holes.
-->
<permissions>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- The following tags are associating low-level group IDs with
permission names. By specifying such a mapping, you are saying
that any application process granted the given permission will
also be running with the given group ID attached to its process,
so it can perform any filesystem (read, write, execute) operations
allowed for that group. -->
<permission name="android.permission.BLUETOOTH_ADMIN" >
<group gid="net_bt_admin" />
</permission>
<permission name="android.permission.BLUETOOTH" >
<group gid="net_bt" />
</permission>
<permission name="android.permission.BLUETOOTH_STACK" >
<group gid="net_bt_stack" />
</permission>
<permission name="android.permission.NET_TUNNELING" >
<group gid="vpn" />
</permission>
<permission name="android.permission.INTERNET" >
<group gid="inet" />
</permission>
<permission name="android.permission.READ_LOGS" >
<group gid="log" />
</permission>
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
</permission>
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
<permission name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="sdcard_all" />
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
</permission>
<permission name="android.permission.ACCESS_MTP" >
<group gid="mtp" />
</permission>
<permission name="android.permission.NET_ADMIN" >
<group gid="net_admin" />
</permission>
<!-- The group that /cache belongs to, linked to the permission
set on the applications that can access /cache -->
<permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
<group gid="cache" />
</permission>
<!-- RW permissions to any system resources owned by group 'diag'.
This is for carrier and manufacture diagnostics tools that must be
installable from the framework. Be careful. -->
<permission name="android.permission.DIAGNOSTIC" >
<group gid="input" />
<group gid="diag" />
</permission>
<!-- Group that can read detailed network usage statistics -->
<permission name="android.permission.READ_NETWORK_USAGE_HISTORY">
<group gid="net_bw_stats" />
</permission>
<!-- Group that can modify how network statistics are accounted -->
<permission name="android.permission.MODIFY_NETWORK_ACCOUNTING">
<group gid="net_bw_acct" />
</permission>
<permission name="android.permission.LOOP_RADIO" >
<group gid="loop_radio" />
</permission>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- The following tags are assigning high-level permissions to specific
user IDs. These are used to allow specific core system users to
perform the given operations with the higher-level framework. For
example, we give a wide variety of permissions to the shell user
since that is the user the adb shell runs under and developers and
others should have a fairly open environment in which to
interact with the system. -->
<assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />
<assign-permission name="android.permission.WAKE_LOCK" uid="media" />
<assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="media" />
<assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="media" />
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
<!-- This is a list of all the libraries available for application
code to link against. -->
<library name="android.test.runner"
file="/system/framework/android.test.runner.jar" />
<library name="javax.obex"
file="/system/framework/javax.obex.jar"/>
</permissions>
Sent from my GT-I9505G using Tapatalk
I think you may be mistaken. After flash, it is as you stated. From what I understand, you will need to add (either by editing or by using your file in this thread) to change platform.xml to have <group gid="media_rw" /> statement under WRITE_EXTERNAL_STORAGE
Are you saying that you can store to external SD without this statement? I could not until I made the change.
occupational_hazard said:
Below is the text from the platform.xml that is on my phone after I updated. There shouldn't be any need to flash on 4.4. But please let me know if I am wrong. I also can make the original 4.3 platform.xml file to flash so you can update through recovery of that is the issue
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- This file is used to define the mappings between lower-level system
user and group IDs and the higher-level permission names managed
by the platform.
Be VERY careful when editing this file! Mistakes made here can open
big security holes.
-->
<permissions>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- The following tags are associating low-level group IDs with
permission names. By specifying such a mapping, you are saying
that any application process granted the given permission will
also be running with the given group ID attached to its process,
so it can perform any filesystem (read, write, execute) operations
allowed for that group. -->
<permission name="android.permission.BLUETOOTH_ADMIN" >
<group gid="net_bt_admin" />
</permission>
<permission name="android.permission.BLUETOOTH" >
<group gid="net_bt" />
</permission>
<permission name="android.permission.BLUETOOTH_STACK" >
<group gid="net_bt_stack" />
</permission>
<permission name="android.permission.NET_TUNNELING" >
<group gid="vpn" />
</permission>
<permission name="android.permission.INTERNET" >
<group gid="inet" />
</permission>
<permission name="android.permission.READ_LOGS" >
<group gid="log" />
</permission>
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
</permission>
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
<permission name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="sdcard_all" />
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
</permission>
<permission name="android.permission.ACCESS_MTP" >
<group gid="mtp" />
</permission>
<permission name="android.permission.NET_ADMIN" >
<group gid="net_admin" />
</permission>
<!-- The group that /cache belongs to, linked to the permission
set on the applications that can access /cache -->
<permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
<group gid="cache" />
</permission>
<!-- RW permissions to any system resources owned by group 'diag'.
This is for carrier and manufacture diagnostics tools that must be
installable from the framework. Be careful. -->
<permission name="android.permission.DIAGNOSTIC" >
<group gid="input" />
<group gid="diag" />
</permission>
<!-- Group that can read detailed network usage statistics -->
<permission name="android.permission.READ_NETWORK_USAGE_HISTORY">
<group gid="net_bw_stats" />
</permission>
<!-- Group that can modify how network statistics are accounted -->
<permission name="android.permission.MODIFY_NETWORK_ACCOUNTING">
<group gid="net_bw_acct" />
</permission>
<permission name="android.permission.LOOP_RADIO" >
<group gid="loop_radio" />
</permission>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- The following tags are assigning high-level permissions to specific
user IDs. These are used to allow specific core system users to
perform the given operations with the higher-level framework. For
example, we give a wide variety of permissions to the shell user
since that is the user the adb shell runs under and developers and
others should have a fairly open environment in which to
interact with the system. -->
<assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />
<assign-permission name="android.permission.WAKE_LOCK" uid="media" />
<assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="media" />
<assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="media" />
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
<!-- This is a list of all the libraries available for application
code to link against. -->
<library name="android.test.runner"
file="/system/framework/android.test.runner.jar" />
<library name="javax.obex"
file="/system/framework/javax.obex.jar"/>
</permissions>
Sent from my GT-I9505G using Tapatalk
Click to expand...
Click to collapse
Are you sure about this? I think this is wrong and that the platform.xml file does not have that line in 4.4
That's the platform.XML I have after updating to 4.4 with no sdcard fix.
Sent from my GT-I9505G using Tapatalk
You can check it under /etc/permissions/platform.xml
Sent from my GT-I9505G using Tapatalk
Maybe since I did not use your file on 4.3 and did the text edit of the file instead, it didn't carry forward when I upgraded. I do know that when I flashed your file, it changed the statement to "media" instead of <group gid="sdcard_r" />.
Here is what I now have <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_rw" />
<groud gid="media_rw" />
</permission>
Just to clarify, you can create a new folder on the SD card without the "media" statement??

L90 Volume Boost FOUND

I have the L90, d415 variant. Headphone volume is awful so after some research I found the correct procedure and lines to mod in mixer_paths.xml. Android limits the volume using this file. I have only modified paths-headphones-lite
This could damage your ears, equipment etc. I am not responsible for any damage to you or your device. Follow the instructions.
You will need: Root access, a good root browser (Root Browser confirmed working, others cause issues), custom recovery
1. Open Root browser and copy system/etc/mixer_paths.xml to somewhere on sdcard0, change permissions to rw-rw-r and reboot
2 Open copied file with text editor, scroll until you find this: <path name="headphones-lite">
<ctl name="SLIM RX1 MUX" value="AIF1_PB" />
<ctl name="SLIM RX2 MUX" value="AIF1_PB" />
<ctl name="SLIM_0_RX Channels" value="Two" />
<ctl name="RX1 MIX1 INP1" value="RX1" />
<ctl name="RX2 MIX1 INP1" value="RX2" />
<ctl name="CLASS_H_DSM MUX" value="RX_HPHL" />
<ctl name="RDAC3 MUX" value="DEM2" />
<ctl name="HPHL DAC Switch" value="1" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<ctl name="RX1 Digital Volume" value="70" />
<ctl name="RX2 Digital Volume" value="70" />
</path>
Change HPHL HPHR RX1 and RX2 to the values shown above. Save changes
2. Open root browser, copy and paste edited file into /system/etc confirm overwrite.
3 IMMEDIATELY REBOOT INTO RECOVERY wipe cache, wipe dalvik
4 Reboot, you will have no audio, mics, etc. Immediately open root browser, go to system/etc/mixer_paths.xml and change permissions to rw-r-r 0644
5 IMMEDIATELY REBOOT INTO RECOVERY, wipe cache, wipe dalvik, reboot and enjoy
Correct me if im wrong but why would you need to copy the file then edit and replace it? Just edit the existing file and reboot. Im also sure that a cache and dalvik wipe isn't needed.
I attempted to do that, for whatever reasons I ran into serious mounting/remounting issues was not able to edit/save file and boot looped a couple times, have seen others with the same issue, this works no issues. Not sure if the dalvik wipe is truly necessary, my paranoia from the boot loop perhaps...
Does this work on Bluetooth volume? Also which variant of the l90 is this confirmed to work on? I have D415

[Q] Lollipop ROM failed to write external SDCard

does anyone has experienced this?
seems no problem when write on internal
I had that problem too... Decided to try KitKat External SD Card Patch from Google Play to see if it would work and it did. Requires Root, though, as I'm sure any sort of fix for this would.
I used ES file explorer, I had to allow SD card access before I was able to use it normally. No root require. I tried to moved some apps to my sd card works too. You should try to move apps to sd. If that doesn't work then its either your SD card is dead or the writer is dead.
nyongrand said:
does anyone has experienced this?
seems no problem when write on internal
Click to expand...
Click to collapse
If you have root access.
1. As Root, Browse to "system/etc/permissions" (I recommend using FX File Explorer)
2. Open the file "platform.xml" for Edit.
3. Under "android.permission.WRITE_EXTERNAL_STORAGE", add the line "<group gid="media_rw" />".
From:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
to:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
4. Save and reboot.
You'll have normal SD card access for all your apps.
IaguCool said:
If you have root access.
1. As Root, Browse to "system/etc/permissions" (I recommend using FX File Explorer)
2. Open the file "platform.xml" for Edit.
3. Under "android.permission.WRITE_EXTERNAL_STORAGE", add the line "<group gid="media_rw" />".
From:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
to:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
4. Save and reboot.
You'll have normal SD card access for all your apps.
Click to expand...
Click to collapse
Hi @LaguCool, I decided to do what you write, unfortunately I can't save the file after I edit the file, I use ES File explorer, I swear I have root, is this called half root?
nyongrand said:
Hi @LaguCool, I decided to do what you write, unfortunately I can't save the file after I edit the file, I use ES File explorer, I swear I have root, is this called half root?
Click to expand...
Click to collapse
Before you open the file for edit, you need to "remount system as R/W". I'm not sure where to do that in ES, but it's really straightforward in FX.
EDIT: See here how to do that:
http://www.guidingtech.com/14709/es-file-explorer-edit-modify-system-files-android/
IaguCool said:
Before you open the file for edit, you need to "remount system as R/W". I'm not sure where to do that in ES, but it's really straightforward in FX.
EDIT: See here how to do that:
http://www.guidingtech.com/14709/es-file-explorer-edit-modify-system-files-android/
Click to expand...
Click to collapse
I have never experienced this before, FS always work for me,
I already do the step on the link too, maybe I should try other file explorer.
nyongrand said:
I have never experienced this before, FS always work for me,
I already do the step on the link too, maybe I should try other file explorer.
Click to expand...
Click to collapse
Well, in FX File Explorer you just go into "System (Root)", then to "system" folder and click the lock icon on the action bar to remount as read/write. After editing you click that icon again to remount as read-only. Really simple.
IaguCool said:
Well, in FX File Explorer you just go into "System (Root)", then to "system" folder and click the lock icon on the action bar to remount as read/write. After editing you click that icon again to remount as read-only. Really simple.
Click to expand...
Click to collapse
OK, thats working, thanks..
IgorEisberg said:
If you have root access.
1. As Root, Browse to "system/etc/permissions" (I recommend using FX File Explorer)
2. Open the file "platform.xml" for Edit.
3. Under "android.permission.WRITE_EXTERNAL_STORAGE", add the line "<group gid="media_rw" />".
From:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
to:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
4. Save and reboot.
You'll have normal SD card access for all your apps.
Click to expand...
Click to collapse
in my htc M8 i have not <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
i have only <permission name="android.permission.WRITE_MEDIA_STORAGE" >
so i add the llines manually and save chmod 0644 restare the phone but not work
any suggestion ?
Samy6699 said:
in my htc M8 i have not <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
i have only <permission name="android.permission.WRITE_MEDIA_STORAGE" >
so i add the llines manually and save chmod 0644 restare the phone but not work
any suggestion ?
Click to expand...
Click to collapse
If your file don't have it you could inject these lines in to your file at
Code:
Starting at line 65 or 66
<permission name=android.permission.WRITE_EXTERNAL_STORAGE >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Starting at line 76
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
I looked at platform.xml on both my honami and Endeavoru (HTC) and they are very similar, the HTC starts one line below each 65.
If you keep those lines inside the same area I think it will be okay.
source:
https://android.stackexchange.com/q...ternal-sd-card-on-htc-one-m8-running-lollipop
https://forum.xda-developers.com/xp...ailed-to-write-external-t3083401/post75536106
https://forum.xda-developers.com/showthread.php?t=2687734
SUPERUSER said:
If your file don't have it you could inject these lines in to your file at
Code:
Starting at line 65 or 66
<permission name=android.permission.WRITE_EXTERNAL_STORAGE >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Starting at line 76
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
I looked at platform.xml on both my honami and Endeavoru (HTC) and they are very similar, the HTC starts one line below each 65.
If you keep those lines inside the same area I think it will be okay.
source:
https://android.stackexchange.com/q...ternal-sd-card-on-htc-one-m8-running-lollipop
https://forum.xda-developers.com/xp...ailed-to-write-external-t3083401/post75536106
https://forum.xda-developers.com/showthread.php?t=2687734
Click to expand...
Click to collapse
It work for lollipop and kitkat but not in android 6
Samy6699 said:
It work for lollipop and kitkat but not in android 6
Click to expand...
Click to collapse
Yes I know. In marshmallow it changed to per-app basis prompt when the request is sent.
https://developer.android.com/training/permissions/requesting.html

[guide][root] Tweaks Redmi 4x stock ROM

Hello xda world,
EDIT 24 may 2018: using Luis kernel now on RR 5.8.4. Best I have tried so far!!
Link: http://luis-builds.de/downloads/lineageos/rr/Xiaomi_Redmi_4X_(santoni)/
EDIT 10-feb-2018: battery drain due to *alarm* and *launcher* system wakelocks solved with firmware V32.
Grab it here and flash with TWRP: https://forum.xda-developers.com/xiaomi-redmi-4x/how-to/firmwares-t3682965
Here I hope to collect some tweaks and mods that work in rooted Redmi 4x stock rom. (8.2.10.0 Global)
EDIT: since I use Resurrection Remix now I also added some RR tweaks
Since I just own the device it will be work in progress for a while. I search the forums for solutions for problems I encounter.
My Redmi 4x is OEM unlocked via Xiaomi, has twrp and Magisk root. (you need root for tweaks)
For OEM unlock you need account and register at miui.com, ask for unlock, wait 30+ hours and then use the miui unlock tool that checks if you are granted bij Xiaomi for unlock.
Some Redmi 4x facts:
- Xiaomi Redmi 4x has codename Santoni
- The Soc is Qualcomm 435 (msm8940 socid 313, msm8937 for the firmware), 4 cpu cores perf and 4 cpu cores power
- The gpu is Adreno 505
- main camera is Samsung S5K3L8, front camera is Omnivision ov5675
- notification LED has RGB!
- 5 GHz (11ac) only supported for wifi hotspot (wlan.ko issue)
- MIUI features are setup in the /etc/device_features/santoni.xml file
- CPU/kernel features are mostly setup in the /etc/init.qcom.post_boot.sh file
- fastboot: hold vol- and power, release power after vibrate
- recovery: hold vol+ and vol- and power, release power after vibrate
Redmi 4x related sites:
- Official miui.com for Redmi 4x http://en.miui.com/forum-123-1.html
- Resurrection Remix ROM for Redmi 4x https://sourceforge.net/projects/resurrectionremix/files/santoni/ (Antutu score 43000+)
- Miui EU ROM https://xiaomi.eu/community/forums/miui-weekly-rom-releases.103/
- Mi-Globe ROM (like EU ROM but with options) Mi-Globe
- Miui Belarus (MiuiPro) ROM https://miuipro.by/roms/
- Redmi 4x Global Edition on Bangood
- AOSP Extended (AEX) ROM Redmi 4X http://downloads.aospextended.com/santoni/
Note: If you change any file always make a copy of it first. I always copy the file in the same folder and give it extension .ORG. So build.prop becomes build.prop.ORG with adb shell: cp -p build.prop build.prop.ORG
Be sure the permissions of the files are set to rw-r--r-- (644)!!!!!!
Example adb/linux commands
From pc:
adb push "afile" /sdcard
adb shell
On device:
su
stop
mount -o remount,rw /system
cd "/afolder"
cp -p "afile" "afile.ORG"
cp /sdcard/"afile" .
ls -l "afile*"
chmod 644 "afile"
reboot
Ofcourse afile and afolder are just example names.
If you are not familiar with linux shell or adb then you can find zip files to flash in TWRP mode.
You need to REBOOT after changing any of these files.
Note 2: I am not responsible for any damage to your device. Use this at your own risk!
Audio recording mod (mixer mod)
Recording audio on stock rom is terrible. On the internet I found a solution. You need to change 2 mixer files.
If you also want louder speaker you need to copy /etc/mixer_paths.xml too.
/etc/mixer_paths_qrd_sku1.xml
mic volume for voice call
Code:
<path name="voice-call">
<!-- tweakradje add 2 lines -->
<ctl name="DEC1 Volume" value="88" />
<ctl name="DEC2 Volume" value="88" />
<ctl name="PRI_MI2S_RX_Voice Mixer CSVoice" value="1" />
<ctl name="Voice_Tx Mixer TERT_MI2S_TX_Voice" value="1" />
</path>
mic volume for audio rec like movie, try between 100-124, use 100 for very loud env
Code:
<path name="handset-mic">
<path name="adc1" />
<!-- tweakradje add 2 lines -->
<ctl name="DEC1 Volume" value="110" />
<ctl name="DEC2 Volume" value="110" />
<ctl name="IIR1 INP1 MUX" value="DEC1" />
</path>
mic volume for audio rec like movie, try between 100-124, use 100 for very loud env
Code:
<path name="handset-stereo-dmic-ef">
<!-- tweakradje add 2 lines -->
<ctl name="DEC1 Volume" value="110" />
<ctl name="DEC2 Volume" value="110" />
<path name="speaker-dmic-endfire" />
</path>
/etc/audio_platform_info.xml
Code:
<acdb_ids>
<!-- tweakradje add 2 lines, but no more auto rec mic volume -->
<device name="SND_DEVICE_IN_HANDSET_MIC" acdb_id="1"/>
<device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" acdb_id="1"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="136"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" acdb_id="136"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" acdb_id="136"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT" acdb_id="136"/>
<device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" acdb_id="137"/>
</acdb_ids>
Now audio is fine when recording video and sounds even great!
You can download the 2 files below. Check if you need to insert these lines in your file or that you can use mine.
For recording stereo audio only I use Sony Audio Recorder which is free and perfect.
EDIT 18 dec 2017: Found that acdb_id="4" works well, which is the default mic profile in ACDB. However you need to lower the "DEC1 Volume" and "DEC2 Volume" to 94.
EDIT 23 dec 2017: About Audio Calibration (ACDB) files
You might have noticed that there are more than one set of acdb file in /etc/acdbdata folder. There are MTP end QRD sets. QRD stands for Qualcomm Reference Design. You can play with these Calibration Profiles for speakers and microphone.
Easiest is to create a new build.prop (644) in the /vendor folder.
Then play with these values. You can also mix MTP and QRD for devices. Like using all MTP but for General and Handset use the QRD version.
Code:
persist.audio.calfile0=/etc/acdbdata/QRD/QRD_Bluetooth_cal.acdb
persist.audio.calfile1=/etc/acdbdata/QRD/QRD_General_cal.acdb
persist.audio.calfile2=/etc/acdbdata/QRD/QRD_Global_cal.acdb
persist.audio.calfile3=/etc/acdbdata/QRD/QRD_Handset_cal.acdb
persist.audio.calfile4=/etc/acdbdata/QRD/QRD_Hdmi_cal.acdb
persist.audio.calfile5=/etc/acdbdata/QRD/QRD_Headset_cal.acdb
persist.audio.calfile6=/etc/acdbdata/QRD/QRD_Speaker_cal.acdb
#persist.audio.calfile0=/etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb
#persist.audio.calfile1=/etc/acdbdata/MTP/MTP_General_cal.acdb
#persist.audio.calfile2=/etc/acdbdata/MTP/MTP_Global_cal.acdb
#persist.audio.calfile3=/etc/acdbdata/MTP/MTP_Handset_cal.acdb
#persist.audio.calfile4=/etc/acdbdata/MTP/MTP_Hdmi_cal.acdb
#persist.audio.calfile5=/etc/acdbdata/MTP/MTP_Headset_cal.acdb
#persist.audio.calfile6=/etc/acdbdata/MTP/MTP_Speaker_cal.acdb
MIUI Camera mod (features unlock)
This is how you unlock those high end features you find on higher end models. To enable the features you need to edit the /etc/device_features/santoni.xml (or /sdcard/device_features/santoni.xml) file. Mostly change false into true to enable them.
Some are also added from other Xiaomi devices.
Download from below.
Camera parameters found:
Code:
support_camera_4k_quality
support_camera_age_detection
support_camera_aohdr
support_camera_audio_focus
support_camera_boost_brightness
support_camera_burst_shoot
support_camera_gradienter
support_camera_hfr
support_camera_manual_function
support_camera_movie_solid
support_camera_peaking_mf
!support_camera_press_down_capture
support_camera_quick_snap
support_camera_record_location
support_camera_shader_effect
support_camera_skin_beauty
support_camera_tilt_shift
support_camera_torch_capture
support_camera_ubifocus
support_camera_video_pause
support_camera_water_mark
Camera 2 API
You can enable Camera 2 API for 3rd party camera apps. Think about manual focus etc.
Add this line to your build.prop:
persist.camera.HAL3.enabled=1
More interesting Camera's: https://forum.xda-developers.com/mi-5/themes/app-collection-camera-modded-t3591177
Better (modded) MIUI Camera
From my friends at 4pda. Much better camera at low light. Also JPEG quality set to 98.
http://4pda.ru/forum/index.php?showtopic=793497&view=findpost&p=57013739
Flash zip in twrp (backup of original camera is made by script)
If you want to do it manualy:
- take the MiuiCamera.apk from the zip
- adb push MiuiCamera.apk /sdcard/
- adb shell
- su
- mount -o remount,rw /system
- cd /system/priv-app/MiuiCamera
- mv MiuiCamera.apk MiuiCamera.apk.ORG
- mv oat oat.ORG
- cp /sdcard/MiuiCamera.apk .
- chmod 644 MiuiCamera.apk
- ls -l
- stop
- sync
- reboot
Enable Dalvik JIT (Android 6)
Add this line to your build.prop file:
debug.usejit=true
When cleaning the dalvik cache your phone will boot much faster. Don't have to wait for 5 or 10 minutes anymore
Test Color Notification Led
See here: http://en.miui.com/thread-605570-1-1.html
EDIT 15 sep 2017:
Color Notification led support: http://en.miui.com/thread-850569-1-1.html
or at the source: http://4pda.ru/forum/index.php?showtopic=841683&st=0#entry64978644
Change MIUI theme and launcher
You can change variables of the package (apk) using MIUI themes. But you can also change the default theme.
The default theme is located at /system/media/theme/default
Changes to the MIUI Launcher (home screen) can easily made. It is a zip file (com.miui.home.zip) with a theme_values.xml in it. Change or add values to the xml file, copy it to /system/media/theme/default/com.miui.home and reboot.
Note that the zip has no extension when you copy it to the folder!!! It must have the name of the package.
Below you find an example of a 5x6 launcher grid. If you want to know more better search google with MIUI_Theme_Values
You can do this for example also with MiuiSystemUI.apk (com.android.systemui) and many more
Alternative CPU core control
There are 4 performance cpu's (cpu 0123) and 4 powersave cpu's (cpu 4567). Depending on the task load they increase or decrease their cpu frequency. But they can also switch on or off. Default 2 perf cores and all 4 power cores stay on.
I modified the /etc/init.qcom.post_boot.sh script for the purpose that only 1 perf and 1 power core stay on with no task load. This consumes less power and increases battery life.
Copy init.qcom.post_boot.sh.txt to /etc/init.qcom.post_boot.sh and reboot. Don't forget to make a copy.
Code:
echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
### power cluster min 1 cpu max 4, busy up/down from 0000 to 68 and 40, perf cluster up like 80+
### prefer (low-)power cores cpu4567 up before perf cores cpu0123 (high power consumtion)
echo "80 85 90 95" > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres #68, only looks at 1st value
echo 68 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
### Wait x ms before switching core off, you might need it again
echo 500 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms #100 (test .5 sec)
echo 500 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms #100 (test .5 sec)
Resurrection Remix strange adb shell prompt
Change /etc/mkshrc, comment last 3 lines
Code:
}$HOSTNAME:${PWD:-?} '"$PS1 "
#if [ "z$ANDROID_SOCKET_adbd" != "z" ]; then
# resize
#fi
Force battery charge to 90%
Code:
# Charge only up to 89% instead of 100% for longer battery life? cat /sys/class/power_supply/battery/voltage_now
echo 4260 > /sys/class/power_supply/battery/voltage_max # 4400 (nominal 3.85V)
My additions to build.prop (/vendor/build.prop)
This is my current /vendor/build.prop and the big advantage is that you can leave your ROM's /system/build.prop as it is. The /vendor/build.prop will overwrite settings from /system/build.prop!
High wakelock with low signal data connection? Try this in build.prop
ro.ril.wake_lock_timeout=2000
Ps: Check for property errors direct after reboot with: dmesg | grep prop
Code:
### always check values with "dmesg | grep prop"
### /default.prop
### /system/build.prop
### /vendor/build.prop (*)
### /factory/factory.prop
### /data/local.prop
### tweakradje RR 5.8.4/5
lockscreen.rot_override=true
#ro.radio.noril=true
# dumpsys SurfaceFlinger will give 1920x1200 density of 295 dpi
#ro.sf.lcd_density=295
#30% faster app loading?
sys.use_fifo_ui=1
# pm multitask def = 6
persist.pm.multitask=8
#ro.recents.grid=true
ro.cutoff_voltage_mv=3200
ro.config.swap=false
ro.config.zram=false
ro.sys.sdcardfs=true
ro.ril.wake_lock_timeout=2000
persist.radio.aosp_usr_pref_sel=true
#ro.audio.offload_wakelock=true (default)
#audio.offload.ignore_setawake=false (default)
#opengl 3d hw accel
debug.egl.hw=1
# hw compositing, if 0 then always software
debug.sf.hw=1
#sys.hwc.gpu_perf_mode=1
### composition valid if debug.sf.hw=0 (and sys.hwc.gpu_perf_mode=0)
#debug.composition.type=c2d
debug.composition.type=mdp
ro.sf.compbypass.enable=0
# use development settings for force gpu
#persist.sys.ui.hw=true
debug.gr.numframebuffers=3
#no debug messages
debug.hwui.level=0
#debug.egl.swapinterval=-1 (def)
#debug.egl.swapinterval=0
#HWUI properties
#ro.hwui.texture_cache_size=72
#ro.hwui.layer_cache_size=48
#ro.hwui.r_buffer_cache_size=8
#ro.hwui.path_cache_size=32
#ro.hwui.gradient_cache_size=1
#ro.hwui.drop_shadow_cache_size=6
###ro.hwui.texture_cache_flushrate=0.4
#ro.hwui.text_small_cache_width=1024
#ro.hwui.text_small_cache_height=1024
#ro.hwui.text_large_cache_width=2048
#ro.hwui.text_large_cache_height=2048
###ro.hwui.fbo_cache_size=32
#debug.hwui.skip_empty_damage=true
#debug.hwui.use_buffer_age=true
#debug.hwui.enable_partial_updates=true
#debug.hwui.render_dirty_regions=true
#debug.hwui.disable_draw_defer=false
#debug.hwui.disable_draw_reorder=true
#debug.choreographer.vsync=false
#debug.choreographer.frametime=false
#debug.choreographer.skipwarning=20
# Use UBWC
###debug.gralloc.map_fb_memory=0
###debug.gralloc.enable_fb_ubwc=1
# 0 = force to enable scrollingCacheEnabled regardless of app setting
# 1 = default is to enable scrollingCacheEnabled unless app specifies
# 2 = default is to disable scrollingCacheEnabled unless app specifies
# 3 = force to disable scrollingCacheEnabled regardless of app setting
persist.sys.scrollingcache=3
ro.config.max_starting_bg=12
#ro.sys.fw.bg_apps_limit=20
ro.config.vc_call_vol_steps=14
ro.config.media_vol_steps=30
#ro.hardware.egl=adreno
#perstist.power.usetwilightadj=true
# JIT Android 6
debug.usejit=true
# JIT Android 7
#dalvik.vm.usejit=true
#dalvik.vm.usejitprofiles=true
#ro.core_ctl_min_cpu=0
#ro.min_freq_0=200000
#ro.min_freq_0=384000
#ro.min_freq_4=384000
### EXTRA CAMERA ###
###https://android.googlesource.com/platform/hardware/qcom/camera/+/9fc7225504a6f969bd7277c1070f0b91b0ce4874/msmcobalt/QCamera2/HAL/QCameraParameters.cpp
###https://android.googlesource.com/platform/hardware/qcom/camera/+/nougat-dev/QCamera2/HAL/QCameraParameters.cpp
persist.sys.camera-sound=0
persist.camera.HAL3.enabled=1
###https://android.googlesource.com/platform/hardware/qcom/camera/+/f9a41d251fab1320345588e7654a1b0f4c70ae1c/QCamera2/stack/common/cam_types.h
#-persist.camera.hal3.feature=32
### HAL3 High Frame Rate
#-persist.camera.hal3hfr.enable=1
#-persist.camera.hal3.force.hdr=0
#persist.camera.perflock.enable=1
# fps def is 60
persist.camera.disp.fps=30
persist.camera.max.previewfps=30
#persist.camera.pdaf.enable=1
# focus call back (def 1)
#-persist.camera.depth.focus.cb=0
#persist.camera.disp.num_vsync=4
#persist.camera.disp.ms_to_vsync=2
#persist.camera.disp.filter_max=2
#persist.camera.disp.filter_min=4
# thumbnail needed
#-persist.camera.tn.disable=0
# anti banding 0 1=auto 2=50Hz 1=60Hz
#persist.camera.set.afd=2
# 0=disable 1=with aggressive AEC 2=with fast AEC
#-persist.camera.instant.capture=2
#-persist.camera.instant.aec=2
#persist.camera.dt=0
#persist.camera.vc=0
### adb shell setprop persist.camera.effect <effect>
### none,mono,negative,solarize,sepia,posterize,whiteboard,blackboard,aqua,emboss,sketch,neon,beauty
#persist.camera.effect=none
### check for raw images /data/misc/camera folder!
#persist.camera.raw.dump=0
#persist.camera.raw.debug.dump=0
# raw format 16(yuv?) 17 or 18
#persist.camera.raw.format=17
#persist.camera.raw.subformat=
#persist.camera.raw_yuv=0
#persist.camera.zsl_raw=0
#persist.camera.snapshot_raw=20
# nr buffers, adb shell setprop persist.camera.preview_yuv 20 <20 preview buffers>
#persist.camera.preview_yuv=0
#persist.camera.preview_raw=0
#persist.camera.video_raw=0
# raw data i? mode
#persist.camera.rdi.mode=disable
#persist.camera.offlineraw=0
### manual exposure, enables persist.camera.exposure.time
#persist.camera.manual.capture=1
### adb shell setprop persist.camera.exposure.time "exposure time" (in millisec) 10 = 1/100
#persist.camera.exposure.time=10
#persist.camera.initial.exp.val=10
# 1=CAM_ISO_MODE_DEBLUR 100 200 ...
#persist.camera.iso=1
#persist.camera.continuous.iso=100
#correlated double sampling mode on off auto(def) (noise reduction)
#persist.camera.CDS=on
#persist.camera.video.CDS=auto
# TemporalDenoise (Supported at all?)
#persist.camera.tnr_cds=1
#persist.camera.tnr.snapshot=on
#persist.camera.tnr.video=on
#persist.camera.tnr.preview=on
# Low light noise feature is to avoid noise seen at the snapshot frame edges due to WNR processing
#persist.camera.llnoise=0
# low light capture
#persist.camera.llc=1
# 0=CAM_WAVELET_DENOISE_YCBCR_PLANE
# 1=CAM_WAVELET_DENOISE_CBCR_ONLY
# 2=CAM_WAVELET_DENOISE_STREAMLINE_YCBCR
# 3=CAM_WAVELET_DENOISE_STREAMLINED_CBCR
#persist.denoise.process.plates=2
#persist.tnr.process.plates=2
#persist.camera.tintless=enable
# Burst LED on period 1-799 def 300
#persist.camera.led.on.period=150
#persist.camera.secure.mode=disable
#camera.lowpower.record.enable=1
#cpp or vfe scaling
#persist.camera.pp_scaling=0
#persist.camera.ltmforseemore=1
#persist.camera.preview.seemore=1
#persist.camera.liveshot.size=1280x720
#persist.camera.stats.af.paaf=1
#persist.camera.preview.ubwc=1
# high temp? then lower fps (or frameskip)
persist.camera.thermal.mode=fps
#persist.camera.batchcount=0
#persist.camera.video.batchsize=6
#persist.camera.opt.livepic=1
# Chromatic Aberation enabled? Check logcat grep -i chroma
# E mm-camera: <IMGLIB><ERROR> 695: module_cac_handle_aec_update: module_cac_handle_aec_update 695: Invalid chromatix ptr
#persist.camera.feature.cac=1
persist.camera.eis.enable=1
# preferred IS type for 8937 is IS_TYPE_DIS i.e, 1
# IS_TYPE_NONE=0, IS_TYPE_DIS=1, IS_TYPE_GA_DIS=2, IS_TYPE_EIS_1_0=3, IS_TYPE_EIS_2_0=4 IS_TYPE_MAX=5
persist.camera.is_type=4
persist.camera.is_type_preview=4
#CAMERA_LONGSHOT_STAGES=4
#persist.camera.longshot.stages=1
#persist.camera.longshot.max=5
#persist.camera.longshot.shotnum=5
#persist.camera.longshot.save=0
# use jpeg burst if persist.camera.longshot.save=0
#persist.camera.jpeg_burst=1
### Check whether shutter should be triggered immediately after capture
persist.camera.feature.shutter=1
#persist.camera.facedetect=1
#persist.camera.snapshot.fd=1
# face detect in video 0 1 2(only for focus)
#persist.camera.fdvideo=1
#persist.camera.mem.usepool=1
# video shooting ION cache, disable for faster shooting
persist.camera.mem.usecache=0
persist.sys.exif.make=Xiaomi
persist.sys.exif.model=Redmi 4X Tweakradje
#persist.camera.auto.hdr.enable=enable
### dual camera range finding
persist.camera.dcrf.enable=0
### multi_pass cause 3/4 green effect when zoomin
persist.camera.multi_pass=0
#persist.camera.zsl.mode=1
#persist.camera.zsl.interval=1
#persist.camera.zsl.backlookcnt=2
#persist.camera.zsl.queuedepth=2
#persist.camera.zsl.buffer.size=
# zigzag hdr
#persist.camera.hdr.outcrop=enable
persist.camera.zzhdr.enable=1
persist.camera.zzhdr.video=1
# disable UBWC (universal bandwidth compression) if enable eztune
#debug.gralloc.gfx_ubwc_disable=0
#persist.camera.eztune.enable=0
#persist.camera.perf.memlimit=0x800
#persist.camera.capture.animate=1
camera.qcom.misc.disable=0
persist.ts.rtmakeup=0
#persist.camcorder.4k.nolimit=1
#persist.camcorder.eis.maxfps=30
#debug.camera.yv12=true
#debug.camera.preview.flip=90
#debug.camera.video.flip=90
#debug.camera.picture.flip=90
#ClearSight? settings
#persist.camera.cs.threshold=0xf4240 clearsight threshold (long)
#persist.camera.cs.burstcount=4
#persist.camera.cs.dumpframes=0
#persist.camera.cs.timeout=0x12c
#ro.miui.screen_layout_size=3
#ro.sys.oosenhance.enable=true
#ro.sys.oosenhance.timer=2000
#debug.oosenhance.turnon=true
### EXTRA AUDIO ###
# resampler DEFAULT=0
# OLD values LOW_QUALITY=1(1st order) MED_QUALITY=2(3rd order) HIGH_QUALITY=3(fixed multi-tap FIR) 4 VERY_HIGH_QUALITY
# 1-3 AudioResampler: Assertion failed: format != AUDIO_FORMAT_PCM_16_BIT /system/lib/libaudioresampler.so (_ZN7android14AudioResampler6createE14audio_format_tiiNS0_11src_qualityE+1024)
# Using the new DYN_*_QUALITY resamplers (modes 5-7) allows floating point audio to work. 8 works too
af.resampler.quality=7
# cat /proc/asound/card0/id -> msm8920sku7sndc -> /etc/acdbdata/QRD/msm8920-sku7-snd-card
### QRD (Qualcomm Reference Design) or MTP Audio Calibration files?
#persist.audio.calfile0=/etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb
#persist.audio.calfile1=/etc/acdbdata/MTP/MTP_General_cal.acdb
#persist.audio.calfile2=/etc/acdbdata/MTP/MTP_Global_cal.acdb
#persist.audio.calfile3=/etc/acdbdata/MTP/MTP_Handset_cal.acdb
#persist.audio.calfile4=/etc/acdbdata/MTP/MTP_Hdmi_cal.acdb
#persist.audio.calfile5=/etc/acdbdata/MTP/MTP_Headset_cal.acdb
#persist.audio.calfile6=/etc/acdbdata/MTP/MTP_Speaker_cal.acdb
# calibrate speaker duration (0) if spk prot true
persist.speaker.prot.enable=false
#persist.spkr.cal.duration=50
# audio, offload to audio hardware
audio.offload.disable=false
audio.offload.buffer.size.kb=256
av.streaming.offload.enable=true
audio.offload.multiple.enabled=true
ro.audio.max_fast_tracks=8
ro.audio.flinger_standbytime_ms=500
audio_hal.period_multiplier=2
#audio_hal.period_size=192
audio_hal.in_period_size=50
#Qualcomm Immersive Audio Noise Cancellation (Fluence), Pro is quadmic
#ro.qc.sdk.audio.fluencetype=fluencepro
#ro.qc.sdk.audio.fluencetype=fluence
#ro.qc.sdk.audio.fluencetype=none
#persist.audio.fluence.voicecall=true
#persist.audio.fluence.audiorec=false
persist.audio.fluence.mode=endfire
#persist.audio.fluence.mode=broadside
#rec.playback.conc.disabled=false
#surround recording
ro.qc.sdk.audio.ssr=false
# dump recording /data/misc/audio/ssr_input_3ch.pcm
#ssr.pcmdump=true
# acdb full freq spectrum on speakers ACDB 131
# persist.audio.FFSP.enable=true -> gives acdb error in logcat!!!
# native audio?
audio.nat.codec.enabled=true
persist.audio.hifi.int_codec=true
# active noise cancelation
#persist.aanc.enable=1
#persist.headset.anc.type=
#persist.audio.vbat.enabled=true
#libdirac.so also /vendor/etc/diracmobile.config
audio.dirac.logging=0
#persist.audio.dirac.headset=5
#persist.audio.dirac.eq=
#persist.audio.dirac.music.state=0
# not complete lib files to enable dirac in RR
persist.audio.dirac.speaker=false
#
use.dts_eagle=false
persist.bt.max.hs.connections=4
persist.bt.max.a2dp.connections=4
persist.bt.enableAptXHD=true
persist.service.bt.a2dp.sink=false
#ro.bluetooth.hfp.ver=1.5
#ro.bluetooth.hfp.ver=1.6
ro.bluetooth.hfp.ver=1.7
#persist.bluetooth.disableabsvol=true
#wc_transport.force_special_byte=true
#bt.pts.certification=true
audio.dolby.ds2.enabled=false
audio.dolby.ds2.hardbypass=true
### EXTRA NETWORK ###
ro.net.dns_cache_size=1500
net.dns.cache_size=1500
net.dns.cache_ttl=1800
net.http.threads=20
net.dns2=8.8.8.8
### EXTRA SQLITE ###
# find /data/data \( -name *-journal -o -name *-wal -o -name *-shm \) -exec rm {} \;
#debug.sqlite.journalmode=DELETE
#debug.sqlite.syncmode=FULL
#debug.sqlite.pagesize=
#sqlite Write Ahead Logging on? creates big WAL files and shm (shared mem) files, log 512KB
debug.sqlite.journalmode=WAL
debug.sqlite.wal.autocheckpoint=0
debug.sqlite.wal.syncmode=FULL
debug.sqlite.journalsizelimit=524288
#debug.sqlite.wal.poolsize=
If you have more interesting mods don't hesitate to post them and I will add them to the OP.
EDIT 5 sep 2017: added new RR init script (v2), better CPU cores and audio !!! v2 might cause battery drain, then v3
EDIT 8 sep 2017: added /etc/wifi/WCNSS_qcom_cfg.ini for 40 Mhz channel on 2.4Ghz
added new RR init script (v3) for better battery life
EDIT 15 oct 2017: removed mixer_paths.xml, use stock. Changes applied to new mixer_paths_qrd_sku1.xml
EDIT 21 oct 2017: added V4 for RR, better target_loads for big/little CPU's
EDIT 31 oct 2017: added V5 for RR, better big perf/little lowpower cpu switching. Perf cpu minimal is 0. Most tasks done with lowpower cpu's. Can run youtube for almost 11 hours now!
EDIT 4 nov 2017: Noticed one little error in V5 RR script.
Echo Y > /sys/module/workqueue/parameters/power_efficient
should be
echo Y > /sys/module/workqueue/parameters/power_efficient
EDIT 16 nov 2017: V6 RR script. Optimal use of RAM. Tested for 3 GB only. All apps stay in ram. Almost no swapping. Example, Chrome keep tabs without reloading. Antutu score now 46350!
EDIT 20 nov 2017: V7 RR script. Create 512 MB ZRAM swap if RAM < 2GB and don't lower swappiness (only for 3 GB)
Little change for V7 script:
### tweakradje use small cores to the max before switch to big cores (antutu only 35000 instead of 46000)
echo 0 > /dev/cpuctl/cpu.upmigrate_discourage
EDIT 23 nov 2017: added stereo recording in AAC with Redmi 4X (speakers cyburg needles with Tangband w3-881sjf https://www.youtube.com/watch?v=MsgAFoTghvw )
EDIT 2 dec 2017: little corrections in V7 RR script and changed to flashable zip.
EDIT 6 jan 2018: change emmc max freq from 200 to 300 MHz. Increase the read speed from 80Mb/s to 120 Mb/s (note: you can try 400 or 500 Mhz. Might cause reboot, please report back) Test with busybox hdparm -tT /dev/block/mmcblk0p49
EDIT 13 feb 2018: V9 of the script. Added tweaked deviceidle (doze) settings. Device looses 0-1% overnight!
EDIT 15 feb 2018: V10 of the script. Improved Light/Deep Doze settings with documentation in the script. Put your email app in the whitelist too!!!
EDIT 18 feb 2018: V11 ready. Won battle with Google Play Services that reset the device_idle_constants to "null" every few hours. Solution: pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
Doze settings and explanation are in the script for those who want to change some timings. The script sets it to this scheme:
- Enter light doze after screen off
- Light maintenance windows every 5 minutes
- Enter Deep doze after 15 minutes (enter deep if there is no alarm within 5 minutes from now, was 1 hour)
- Deep maintenance windows every hour
- Whatsapp and Gmail white listed (can do their thing regardless of doze state)
- No delays for phone motion or whatever
EDIT 8 mar 2018: updated some audio related files with comments in it. Change to your liking , now awesome high quality good calibrated stereo sound recording!!
EDIT 6 apr 2018: V13 of the init script. Changed things like min/max cpu speed for custom kernel
EDIT 9 apr 2018: flashable scripts now create backup of replaced files if not exist. (*.ORG)
EDIT 25 may 2018: V15 of the init script for 7.x Nougat ROMs.
EDIT 16 jun 2018: V16 of the init script for 7.x Nougat ROMs (LAST AND FINAL!)
Cheers
PLEASE don't quote first post. Waste of space and it will change anyway. THANKS
Data partition is encrypted
I found that the data partition is encrypted when coming from Miui ROM to RR. Fingerprint is not working with encrypted data partition.
Data is encrypted if TWRP asks for unlock code.
These steps decrypts it and preserves data.
Code:
- Boot into TWRP
- Backup /data to "internal sd" (or to "ext sd card") with TWRP
- On PC: adb pull /data/media/0
- Wipe -> Format /data in TWRP
- Reboot to TWRP again
- On PC: adb push . /data/media/0
- On PC: adb shell chown -R media_rw.media_rw /data/media/0
- Reboot to TWRP again
- Restore the previous backup with TWRP
- On PC: adb shell rm /data/system/locksettings* /data/system/*.key
- On PC: adb shell rm -r /data/dalvik*
- Reboot
Change Doze (deviceidle) settings
On the device you can change the Doze settings very easy. First list the Doze settings to get all current parameters:
Code:
dumpsys deviceidle
Then change parameters by setting some variables in the Android Global Settings db:
Code:
settings put global Phenotype_flags device_idle_constants
settings put global device_idle_constants inactive_to=300000,idle_after_inactive_to=300000
Enable light doze too (mLightEnabled=true mDeepEnabled=true)
Code:
dumpsys deviceidle enable all
Add whatsapp and gmail to the whitelist
Code:
dumpsys deviceidle whitelist +com.whatsapp +com.google.android.gm
Note: Google Play Services reset the device_idle_constants to "null" every few hours. Solution: pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
See more info in post above
Use Fingerprint sensor as button
As you might know hardware keys have keycodes. These keycodes can be found using an app like KeyEvent Dipslay
The mapping between Keycode and Function is done in the kl files in the folder /system/usr/keylayout
To map the Fingerprint key (Keycode 353) you use the gf3208.kl file.
Code:
#key 353 ENTER
#key 353 CAMERA
#key 353 MENU
key 353 SLEEP
Reboot for effect. This will not effect the Fingerprint function.
Super audio for Resurrection Remix
To enable HD audio for headphones and other audio tweaks for RR (maybe for Miui too)
Add these lines to the end of your build.prop
Code:
audio.offload.disable=false
audio.offload.buffer.size.kb=1024
persist.audio.FFSP.enable=true
audio.nat.codec.enabled=true
persist.audio.hifi.int_codec=true
persist.audio.dirac.speaker=false
use.dts_eagle=true
Some tweaks for camera driver
To enable some extra features to play with. You can add these to the end of your build.prop
For the stock camera on RR ROM make sure you disable Color Denoise setting.
Code:
#persist.camera.liveshot.size=1280x720
persist.camera.HAL3.enabled=1
persist.camera.hal3hfr.enable=1
persist.camera.ltmforseemore=1
persist.camera.led.on.period=500
persist.camera.stats.af.paaf=1
persist.camera.manual.capture=1
# high temp? then lower fps (or frameskip)
persist.camera.thermal.mode=fps
persist.camera.opt.livepic=1
# Chromatic Aberation enabled? Check logcat grep -i chroma
# E mm-camera: <IMGLIB><ERROR> 695: module_cac_handle_aec_update: module_cac_handle_aec_update 695: Invalid chromatix ptr
persist.camera.feature.cac=1
persist.camera.eis.enable=1
persist.denoise.process.plates=2
persist.camera.longshot.stages=1
persist.camera.facedetect=1
persist.camera.snapshot.fd=1
# face detect in video 0 1 2(only for focus)
persist.camera.fdvideo=1
persist.camera.mem.usepool=1
persist.camera.mem.usecache=5000000
persist.sys.exif.make=Xiaomi
persist.sys.exif.model=Redmi 4X
persist.camera.feature.shutter=1
persist.camera.auto.hdr.enable=1
persist.camera.tintless=1
#persist.camera.continuous.iso=200
#persist.camera.exposure.time=
# dual camera range finding
persist.camera.dcrf.enable=0
persist.camera.multi_pass=1
persist.camera.zsl.mode=1
persist.camera.zsl.interval=1
persist.camera.zsl.backlookcnt=2
persist.camera.zsl.queuedepth=2
# zigzag hdr
persist.camera.zzhdr.enable=1
persist.camera.zzhdr.video=1
persist.camera.eztune.enable=0
# TemporalDenoise (Supported at all?)
persist.camera.tnr_cds=1
persist.camera.tnr.snapshot=1
persist.camera.tnr.video=1
persist.camera.tnr.preview=1
# low light noise enabled?
persist.camera.llnoise=1
More will follow
oke thanks
Sipppp
Mine has rgb led. See led test script in OP. But even in RR rom it is not suported. Pitty. Perhaps support will come later. I've seen users with tasker scripts to make it work.
Very thanks for the cpu control you have created, my backup is now nearly +30% thanks again and also for camera mod keep up the good work:good:
Abugk said:
Does this redmi 4x has RGB LED . Can you please confirm it ?
From these screenshots I'm assuming that it has a RGB LED . How can I enable it ?
Click to expand...
Click to collapse
Easiest way to get it is install camera mod.
For just led colors, change the line on /system/etc/device_features/santoni.xml
Code:
<bool name="support_led_color">[B]true[/B]</bool>
Wow. Great work... cant wait to try these one too. Thanks
Hi, how can I use your CPU cores tweak in MIUI 9?
Thanks!
You can take the RR version. Make copy of your original file first!
Cheers
Anyone running RR with my V2 script having battery drain issues? I have since yesterday.
I am now running new script to test battery drain. The change is to disable all these
low power modes again. Lets see tomorrow.
Oh and if you see the notification led blinking purple after reboot? The V3 script switches it
off again after 3 sec.
Can everything here useful for any rom with nougat or just RR?
Not everything. A lot is MIUI related.
Except the things that are qualcomm related like xml files and init files.
RR files are for nougat in general.
But always make a copy of your original file first!!!
can u make text percentage only mod for miui9 global. this option is present in miuipro
tweakradje said:
Not everything. A lot is MIUI related.
Except the things that are qualcomm related like xml files and init files.
RR files are for nougat in general.
But always make a copy of your original file first!!!
Click to expand...
Click to collapse
So , that means ,these tweaks can be used in miui9???
Sure. Make copy first so that you can always go back to original.
tweakradje said:
Anyone running RR with my V2 script having battery drain issues? I have since yesterday.
I am now running new script to test battery drain. The change is to disable all these
low power modes again. Lets see tomorrow.
Oh and if you see the notification led blinking purple after reboot? The V3 script switches it
off again after 3 sec.
Click to expand...
Click to collapse
Me too, mine dropped 10% after a night with wifi and data off.
I'm on RR build 170815.
Thanks for the feedback. I use v3 of the script now for 2 days and battery is perfect. Try it. After install switch off the phone completely ( no reboot ) and then switch it on again. It worked for me.
tweakradje said:
Thanks for the feedback. I use v3 of the script now for 2 days and battery is perfect. Try it. After install switch off the phone completely ( no reboot ) and then switch it on again. It worked for me.
Click to expand...
Click to collapse
How to install it? your cpu Config, Iam using 8.2..10 and have copied the txt to my sh file, i already save it and set to rwrr too, but cpu config still default, even after i restart my phone.. still default config cpu running helpppp
You have to remove the txt extension. Then copy it over existing file. Check permissions and then reboot.
Don't edit file. It has unix EOL in it.
thanks for your advice, i have tried it.. is RRV3 version have same config as default? 2 perf 4 power cpu on?

[UNLOCKED][ROOTED]Android 11 system-as-root and privacy policy updates permission problem

Hi,
This is my first post here.
Yesterday I rooted a Samsung A51 SM-A515F/N with android 11 [A515FxxU4EUD7] stock rom with twrp recovery, unlocked bootloader, and magisk.
As far as I can tell zero functionality loss on OS. Got everything to work just right.
Pass SafetyNet Test.
systemized FGL Pro and GPS Joystick as priv-apps.
Both applications recognize system mode but they both crash when you start the location mocking.
I believe I found what is making them crash.
Need confirmation/Advise on how to proceed.
Assume full rooted SM-515F with fully working Magisk 23.0 and Terminal Systemizer module installed
Systemizer command:
a51:/ $ su
a51:/ # systemize
! Busybox not detected
Please install one (@osm0sis' busybox recommended)
df: Unknown option 'm' (see "df --help")
df: Unknown option 'm' (see "df --help")
==============================================
App Systemizer (Terminal Emulator) v17.3.1(70)
by veez21
==============================================
BusyBox not found!
==============================================
Enter logs to upload logs
==============================================
Set SELinux Enabled: false
SELinux Status: Enforcing
==============================================
1 - Systemize Installed Apps (Listed)
2 - Systemize Installed Apps (Enter label)
3 - Systemize given APK
s - Set SELinux
0 - Exit
[CHOICE]: 3
Enter APK Path
Example: /sdcard/launcher.apk
x - Back to Menu
> /sdcard/Download/com.ltp.pro.fakelocation.apk
Checking if file exists - OK
Checking if file is an APK - OK
Checking package name - com.ltp.pro.fakelocation
Where to install?
< 1 - /system/app | 2 - /system/priv-app | 0 - cancel > : 2
df: Unknown option 'm' (see "df --help")
df: Unknown option 'm' (see "df --help")
Checking APK size - 5M
Transfering com.ltp.pro.fakelocation.apk(com.ltp.pro.fakelocation) to '/system/priv-app'...
Granting Permissions
com.ltp.pro.fakelocation - Done
1|a51:/ # mount -o rw,remount /
a51:/ # rm /etc/permissions/privapp-permissions-platform.xml
a51:/ # cp /sdcard/Download/privapp-permissions-platform.xml /etc/permissions/
a51:/ # chown root:root /etc/permissions/privapp-permissions-platform.xml
a51:/ # chmod 644 /etc/permissions/privapp-permissions-platform.xml
a51:/ # mount -o ro,remount /
a51:/ # reboot
Snippet of /etc/permissions/privapp-permissions-platform.xml:
...
<!-- CUSTOM Permissions -->
<privapp-permissions package="com.ltp.pro.fakelocation">
<permission name="android.permission.READ_EXTERNAL_STORAGE" />
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
<permission name="android.permission.ACCESS_FOREGROUND_LOCATION" />
<permission name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<permission name="android.permission.ACCESS_FINE_LOCATION" />
<permission name="android.permission.ACCESS_COARSE_LOCATION" />
<permission name="android.permission.INSTALL_LOCATION_PROVIDER" />
<permission name="android.permission.ACCESS_MOCK_LOCATION" />
<permission name="android.permission.ACCESS_MEDIA_LOCATION" />
</privapp-permissions>
<!-- END -->>
...
snippet from cmd dumpsys package com.ltp.pro.fakelocation:
Packages:
Package [com.ltp.pro.fakelocation] (1e331cd):
userId=10264
pkg=Package{876da82 com.ltp.pro.fakelocation}
codePath=/system/app/com.ltp.pro.fakelocation
resourcePath=/system/app/com.ltp.pro.fakelocation
legacyNativeLibraryDir=/system/app/com.ltp.pro.fakelocation/lib
primaryCpuAbi=null
secondaryCpuAbi=null
versionCode=67 minSdk=15 targetSdk=28
versionName=3.4.9.3
splits=[base]
apkSigningVersion=2
applicationInfo=ApplicationInfo{876da82 com.ltp.pro.fakelocation}
flags=[ SYSTEM HAS_CODE ALLOW_CLEAR_USER_DATA LARGE_HEAP ]
privateFlags=[ PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION PRIVATE_FLAG_REQUEST_LEGACY_EXTERNAL_STORAGE PRIVATE_FLAG_ALLOW_NATIVE_HEAP_POINTER_TAGGING ]
forceQueryable=false
queriesPackages=[]
dataDir=/data/user/0/com.ltp.pro.fakelocation
supportsScreens=[small, medium, large, xlarge, resizeable, anyDensity]
usesLibraries:
android.test.base
android.hidl.manager-V1.0-java
android.hidl.base-V1.0-java
usesOptionalLibraries:
org.apache.http.legacy
usesLibraryFiles:
/system/framework/android.test.base.jar
/system/framework/android.hidl.manager-V1.0-java.jar
/system/framework/android.hidl.base-V1.0-java.jar
/system/framework/org.apache.http.legacy.jar
timeStamp=2021-05-30 19:29:31
firstInstallTime=2021-05-30 19:29:31
lastUpdateTime=2021-05-30 19:29:31
signatures=PackageSignatures{3bad593 version:2, signatures:[721026fa], past signatures:[]}
installPermissionsFixed=true
pkgFlags=[ SYSTEM HAS_CODE ALLOW_CLEAR_USER_DATA LARGE_HEAP ]
declared permissions:
com.ltp.pro.fakelocation.permission.MAPS_RECEIVE: prot=signature, INSTALLED
com.ltp.pro.fakelocation.permission.C2D_MESSAGE: prot=signature, INSTALLED
requested permissions:
android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.SYSTEM_ALERT_WINDOW
com.google.android.providers.gsf.permission.READ_GSERVICES
android.permission.READ_EXTERNAL_STORAGE: restricted=true
android.permission.WRITE_EXTERNAL_STORAGE: restricted=true
android.permission.FOREGROUND_SERVICE
com.android.vending.BILLING
com.android.vending.CHECK_LICENSE
android.permission.WRITE_SETTINGS
android.permission.INSTALL_LOCATION_PROVIDER
android.permission.WRITE_SECURE_SETTINGS
android.permission.ACCESS_MOCK_LOCATION
android.permission.WAKE_LOCK
com.google.android.c2dm.permission.RECEIVE
com.ltp.pro.fakelocation.permission.C2D_MESSAGE
android.permission.ACCESS_BACKGROUND_LOCATION: restricted=true
android.permission.ACCESS_MEDIA_LOCATION
install permissions:
com.ltp.pro.fakelocation.permission.C2D_MESSAGE: granted=true
android.permission.WRITE_SETTINGS: granted=true
com.google.android.c2dm.permission.RECEIVE: granted=true
com.google.android.providers.gsf.permission.READ_GSERVICES: granted=true
android.permission.SYSTEM_ALERT_WINDOW: granted=true
android.permission.FOREGROUND_SERVICE: granted=true
android.permission.INTERNET: granted=true
com.android.vending.CHECK_LICENSE: granted=true
com.android.vending.BILLING: granted=true
android.permission.ACCESS_NETWORK_STATE: granted=true
android.permission.WAKE_LOCK: granted=true
User 0: ceDataInode=46342 installed=true hidden=false suspended=false distractionFlags=0 stopped=false notLaunched=false enabled=0 instant=false virtual=false
overlay paths:
/product/overlay/NavigationBarMode3Button/NavigationBarMode3ButtonOverlay.apk
gids=[3003]
runtime permissions:
android.permission.ACCESS_FINE_LOCATION: granted=true, flags=[ USER_SET]
android.permission.READ_EXTERNAL_STORAGE: granted=false, flags=[ APPLY_RESTRICTION]
android.permission.ACCESS_COARSE_LOCATION: granted=true, flags=[ USER_SET]
android.permission.WRITE_EXTERNAL_STORAGE: granted=false, flags=[ APPLY_RESTRICTION]
android.permission.ACCESS_BACKGROUND_LOCATION: granted=false, flags=[ REVOKE_WHEN_REQUESTED|APPLY_RESTRICTION]
android.permission.ACCESS_MEDIA_LOCATION: granted=true, flags=[ USER_SET|REVOKE_WHEN_REQUESTED]
Please direct your attention to the second last line: "android.permission.ACCESS_BACKGROUND_LOCATION: granted=false, flags=[ REVOKE_WHEN_REQUESTED|APPLY_RESTRICTION]"
This permission is restricted even though permission has been explicitly set with the xml file.
I believe this is due to: https://developer.android.com/training/location/permissions this update of the privacy policy on Android 11.
Now this thread says that the permission for ACCESS_FOREGROUND_LOCATION needs to be requested in the application.manifest file before ACCESS_BACKGROUND_LOCATION is called. This allows the user to select the always allow option that allows background threads to handle location permissions. This is where I believe the app crashes - the thread gets aborted and then crashes the app because it can't get background location access.
I'm thinking the only solution is to get the devs of FGL/GPSJoystick to add these permissions to their minifest files. Am I correct or am I missing something big?
EDIT: interestingly - installing the app as userapp(not system app), gives the "Allow all the time" option under location (Settings->Apps->Permissions->Location). I think I'm missing something, aldo I might be a little sleep deprived, 36 hours straight with this A51
Please let me know if you need any more info from me
RESERVED
Were you able to solve this problem facing same with my custom system app
Hi,
I emailed the devs of the afore mentioned apps, asking for them to add the permission in their manifest files but never got any replies.
After that I just switched over to patching the framework so the OS can not detect when a location mock app is selected in developer settings (using Smali patcher).
I have run into this permission and location settings issue a couple times since then on other apps, some not written by me and others written by me. The only fix I have been able to find is to add the permissions in the app manifest file. Ever since Android 10 google made it much harder to enable the "Always Allow Location Access" in settings.
Hope this helps

Categories

Resources