View Single Post
Old 09-23-2016, 12:31 PM   #14
nivieru
Enthusiast
nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.nivieru has met Morla.
 
Posts: 27
Karma: 19358
Join Date: Nov 2015
Device: Onyx Nova Air, Onyx boox i86ml plus, nook simple touch
Quote:
Originally Posted by cicabum View Post
Dummybear, I'd like to disable ""High Contrast feature" on my T68 as well. Could you say me please how I have to edit my framework-res file to get that result?
Hi cicabum,
I just did the same for my i86 and it works, so I can provide instructions:

Tools needed -
apktool, adb.
Also your device need to be rooted, and in case something goes wrong, make sure you know how to boot into recovery using some key combination (power + volumeup? power+back? something like that).
I issue the commands on a linux shell, but windows also has a command line thing.

1 - Get framework-res.apk from your device with the command
Code:
adb pull /system/framework/framework-res.apk
2 - Install framework in apktool and decompile
Code:
apktool if framework-res.apk
apktool d framework-res.apk
3 - Modify framework-res/res/raw/webview_contrast_enchanced.css as you like.
I commented the first "font-weight:900 !important" line from the "*" element so that regular text will be displayed regularly, but left the rest unchanged so that links are displayed bold.
You can also play with colors to make links grayer or whatever.

4 - Rebuild apk.
First, build the apk
Code:
apktool b framework-res
Carefull - the generated apk won't work and you'll get a bootloop!
Now extract from the original framework-res.apk the META-INF folder and the AndroidManifest.xml file and put them in framework-res/build/apk/ folder.
Note - "extract" here means as you would from a zip file. an apk is a zip file, really.
Now rebuild again
Code:
apktool b framework-res
The generated apk is in framework-res/dist, rename it to framework-res.apk.new1 or something.

5 - Push and replace framework-res.apk using adb
Code:
adb push framework-res.apk.new1 sdcard/
adb shell
Before you continue, make sure you know the name of the device where your /system is
and replace /dev/block/mmcblk0p5 in the following accordingly.
In adb shell, you can find that using
Code:
mount
Now to make the switch:
Code:
su
stop
mount -o remount,rw /dev/block/mmcblk0p5 /system
cd /system/framework/
busybox cp /sdcard/framework-res.apk.new1 ./
chmod 644 framework-res.apk.new1
busybox cp framework-res.apk /sdcard/framework-res.apk.orig
mv framework-res.apk.new1 framework-res.apk
reboot
That's it!
If something went wrong and you get a bootloop, and you can't adb into it to fix things, you can always boot into recovery and reinstall the latest update.zip.
nivieru is offline   Reply With Quote