5,605,373 Members 39,570 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][ATT][4.4] Remove unsafe volume warning

Tip us?
 
Ctrl-Freak
Old
(Last edited by Ctrl-Freak; 5th December 2013 at 08:19 PM.)
#1  
Ctrl-Freak's Avatar
Senior Member - OP
Thanks Meter 60
Posts: 102
Join Date: Oct 2013
Default [MOD][ATT][4.4] Remove unsafe volume warning

I did this for myself, and thought I would share. I got tired of the "Raise volume above safe level?" warning, and I removed it. I like to learn, so rather than use the existing xposed framework mod, I built a flashable zip to make the change via framework-res.apk.

WARNING: I AM NOT RESPONSIBLE IF YOU MESS UP YOUR PHONE

Prerequisite:
  • ATT Moto X running stock official 4.4 kitkat (140.44.5)
  • TWRP or CWM (safestrap for those who don't have an unlocked bootloader, thanks Hashcode)
  • backup all of your data in case something goes horribly wrong
Instructions:
  1. using your choice of file manager, backup /system/framework/framework-res.apk
  2. Download or copy flashable zip (below) to sdcard
  3. Reboot to [safestrap] TWRP recovery
  4. flash zip file


Below are the 'broad strokes' of how I did this in linux: (Each of these steps below require various skills, and my intent is not to do too much 'hand holding.')


DUMP AND DECOMPILE framework-res.apk
  1. make sure java 7 is installed
  2. download/extract apktool_2.0.0b7.jar (thanks brut.all)
  3. move /system/framework/framework-res.apk to apktool directory
  4. install framework: java -jar apktool_2.0.0b7.jar if framework-res.apk
  5. dump framework-res.apk: java -jar apktool_2.0.0b7.jar d framework-res.apk
    --
    CHANGE SETTING IN TWO FILES:
  6. edit this file: framework-res/res/values/bools.xml
  7. search for the line with this info: config_safe_media_volume_enabled
  8. change the value to: false
  9. repeat with framework-res/res/values-mcc310/bools.xml
    --
    DELETE DIRECTORY STRUCTURE (not sure why framework wouldn't compile with this, but it is unused on AT&T phones)
  10. delete this directory: framework-res/values-mcc310-1
    --
    RECOMPILE AND COPY EXISTING SIGNATURE:
  11. recompile: java -jar apktool_2.0.0b7.jar b framework-res -o framework-res-new.apk
  12. move META-INF structure from inside the original framework-res.apk to the new framework-res-new.apk (I used 7z)
    --
    ZIPALIGN NEW FILE:
  13. zipalign -f -v 4 framework-res-new.apk framework-res.apk
    --
    CREATE FLASHABLE ZIP WITH NEW framework-res.apk
  14. you can use mine as a template and just replace my framework-res.apk under /system/framework

TWRP/CWM flashable zip: http://www.androidfilehost.com/?fid=23252070760973197
(Replaces /system/framework/framework-res.apk with my modified version.)
The Following User Says Thank You to Ctrl-Freak For This Useful Post: [ Click to Expand ]
 
slimdizzy
Old
#2  
Senior Member
Thanks Meter 233
Posts: 739
Join Date: Sep 2008
Trying this now on my Rogers ATT KK based Moto X. Ill update soon.
-------------------------
Main: Moto X 1058 (Rogers) Unlocked Bootloader
Other Devices: Galaxy Nexus - Dreams 4.4 KitKat, Nokia 620 WP8, Nexus 7(x2), HTC One XL, Nexus S i9020a, Acer A500, Galaxy Tab 7" (Orginal)
R.I.P Devices: HTC Desire (dropped down stairs), HTC 7 Mozart (eaten by aliens), HTC One X+ (sold)
 
slimdizzy
Old
#3  
Senior Member
Thanks Meter 233
Posts: 739
Join Date: Sep 2008
Updated script brakes at device check.

Sent from my XT1058 using XDA Premium 4 mobile app
-------------------------
Main: Moto X 1058 (Rogers) Unlocked Bootloader
Other Devices: Galaxy Nexus - Dreams 4.4 KitKat, Nokia 620 WP8, Nexus 7(x2), HTC One XL, Nexus S i9020a, Acer A500, Galaxy Tab 7" (Orginal)
R.I.P Devices: HTC Desire (dropped down stairs), HTC 7 Mozart (eaten by aliens), HTC One X+ (sold)
 
Ctrl-Freak
Old
#4  
Ctrl-Freak's Avatar
Senior Member - OP
Thanks Meter 60
Posts: 102
Join Date: Oct 2013
Quote:
Originally Posted by slimdizzy View Post
Updated script brakes at device check.

Sent from my XT1058 using XDA Premium 4 mobile app
Do you mean the updater-script in the flashable zip? If so, you can modify those checks for your phone if you can see the error. I used twrp->advanced->copy logs to /sdcard to see the error messages.
 
slimdizzy
Old
(Last edited by slimdizzy; 8th December 2013 at 08:10 PM.)
#5  
Senior Member
Thanks Meter 233
Posts: 739
Join Date: Sep 2008
Quote:
Originally Posted by Ctrl-Freak View Post
Do you mean the updater-script in the flashable zip? If so, you can modify those checks for your phone if you can see the error. I used twrp->advanced->copy logs to /sdcard to see the error messages.
Will do. Ill post shortly.

Update:


Installing '/sdcard/motox-att-140.44.5-framework-res-1.zip'...
Checking for MD5 file...
I:Cannot find file /sdcard/motox-att-140.44.5-framework-res-1.zip.md5
Skipping MD5 check: no MD5 file found.
I:Zip does not contain SELinux file_contexts file in its root.
script aborted: This package is for "ghost" devices; this is a "xt1060".
This package is for "ghost" devices; this is a "xt1060".
E:Error executing updater binary in zip '/sdcard/motox-att-140.44.5-framework-res-1.zip'

My build.prop shows 1058 for the record.
-------------------------
Main: Moto X 1058 (Rogers) Unlocked Bootloader
Other Devices: Galaxy Nexus - Dreams 4.4 KitKat, Nokia 620 WP8, Nexus 7(x2), HTC One XL, Nexus S i9020a, Acer A500, Galaxy Tab 7" (Orginal)
R.I.P Devices: HTC Desire (dropped down stairs), HTC 7 Mozart (eaten by aliens), HTC One X+ (sold)
 
Ctrl-Freak
Old
#6  
Ctrl-Freak's Avatar
Senior Member - OP
Thanks Meter 60
Posts: 102
Join Date: Oct 2013
Quote:
Originally Posted by slimdizzy View Post
Will do. Ill post shortly.

Update:


Installing '/sdcard/motox-att-140.44.5-framework-res-1.zip'...
Checking for MD5 file...
I:Cannot find file /sdcard/motox-att-140.44.5-framework-res-1.zip.md5
Skipping MD5 check: no MD5 file found.
I:Zip does not contain SELinux file_contexts file in its root.
script aborted: This package is for "ghost" devices; this is a "xt1060".
This package is for "ghost" devices; this is a "xt1060".
E:Error executing updater binary in zip '/sdcard/motox-att-140.44.5-framework-res-1.zip'

My build.prop shows 1058 for the record.
Did you build this from your Rogers framework? (If not, keep in mind my framework-res if from an AT&T phone. I have no idea if there are any differences.)


To continue, you can edit the updater-script and make the change from "ghost to "xt1060".
 
slimdizzy
Old
#7  
Senior Member
Thanks Meter 233
Posts: 739
Join Date: Sep 2008
I have a rogers phone but ATT firmware. This is just what happens when I flash your zip. Your updated script asks for a 1058, which is my model but breaks and says my device is a 1060. That is nowhere in my prop. This should flash no problem and it doesn't. I even tried to manually overwrite using root explorer and my phone wouldn't boot after. I replaced original file and all is well.

Sent from my XT1058 using XDA Premium 4 mobile app
-------------------------
Main: Moto X 1058 (Rogers) Unlocked Bootloader
Other Devices: Galaxy Nexus - Dreams 4.4 KitKat, Nokia 620 WP8, Nexus 7(x2), HTC One XL, Nexus S i9020a, Acer A500, Galaxy Tab 7" (Orginal)
R.I.P Devices: HTC Desire (dropped down stairs), HTC 7 Mozart (eaten by aliens), HTC One X+ (sold)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...