Use at your OWN risk!!!
Attached C++ class for using proximity sensor.
And small example of using, which printing to debug output changing of proximity status.
Problems:
1. By default when proximity sensor enabled - screen will be switched off when proximity detected. Use method SetAutoScreenOff to disable auto switching off the screen. But when screen switched off and proximity changed from detected => no proximity, screen will be switched on. So you need to disable proximity sensor as soon as you do not want switching screen on when no proximity.
2. Phone Canvas (dialer skin) using same way of enabling proximity sensor, so, if you do not want to interference with dialer use class constructor parameter handleActiveCalls=true
3. maybe something... but don't remember
Using
Create instance of class. Call Enable().
Set proximity detection status changed signaling method:
- with event signaling: SetProximityChangedEvent
- with window message: SetMonitorWindow
To switch off proximity sensor call Disable().
If you found bug or have advice - post here or pm me please.
If somebody creates port to managed code - it's will be nice as i think
exidler said:
Use at your OWN risk!!!
Attached C++ class for using proximity sensor.
And small example of using, which printing to debug output changing of proximity status.
Click to expand...
Click to collapse
Is the code for the LED control also working on other types of phones?
Or is this HTC specific?
Code:
HANDLE hLedDevice = CreateFile(L"LED1:",
GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (!hLedDevice || hLedDevice == INVALID_HANDLE_VALUE)
return false;
LEDMGR_CONTROLL ctl;
ctl.p1 = 0; // bit number
ctl.p2 = (autoScreenOffWhenProximityDetected ? 1 : 2); // 2 for set bit else - clear bit
DWORD dwRet;
BOOL bResult = DeviceIoControl(hLedDevice, IOCTL_LEDMGR_SCREENOFF_DISABLEDLED_IOCTL, &ctl, sizeof(ctl),
NULL, 0, &dwRet, NULL);
CloseHandle(hLedDevice);
Have tested on HTC HD2. I think it's HTC specific.
Hi. (htc desire android 2.1)
In my app-i'm trying to show on screen values of light (lux) , but i get only few values(0-min 40, 90, 160, 225, 640, 1280-max). Is there oportunity to get much more values between 0 - 1280?? Maybe i use wrong variable. Is there a variable of sensor's current or voltage ?? Can you help me??
sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
sensorManager.registerListener(this, sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT), sensorManager.SENSOR_DELAY_GAME);
sensorManager.unregisterListener(this,sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT));
outputX.setText("E:"+Float.toString(event.values[0]));
ok, from my android tweaking and modding i know it can be somewhat hard to find everything you might need to make the most of your galaxy nexus so i will put links to them here along with providing support and my own little discoveries here...
This will include everything from guides to different type of tweaks, recommended settings, flashable mods, etc...you name it and it will probably be in here (as i update it)
Any suggestions are highly appreciated and will be added with proper credit
***disclaimer- I am not responsible for any damage you may do to your device, please make sure to have a backup before doing any of these tweaks***
(still a work in progress and expect much much more to come)
Guides/Toolkits
[GNex TOOLKIT] Drivers, Backup, Unlock, Root, CWM, Flash, Mods + MORE [VERIZON]
[EASIEST ROOT/UNLOCK TOOLKIT] Wugfresh Galaxy Nexus Root Toolkit v1.4
Build.prop tweaks
To use these just mount /system rw, open build.prop in a text editor, add/modify whichever lines you want, save, reboot recovery, wipe cache and dalvik cache, then reboot
Code:
#incoming ringer delay (already in build.prop) sets how soon (in ms) the phone starts ringing when a call comes in. set between 0 and 3000
ro.telephony.call_ring.delay=
Possible battery saver-
Code:
#disable sending usage data to google
ro.config.nocheckin=1
Code:
#sleep mode for battery savings. 0 power collapse suspend, 1 power collapse (best), 2 apps go to sleep, 3 show clock and wait, 4 wait for interrupt
pm.sleep_mode=
Code:
#change lcd density (already in build.prop), which is like changing the resolution on a windows computer can be anywhere from 240 to 360 (stock 320)
ro.sf.lcd_density=
Performance enhancement, may also help with battery life
Code:
#dalvik cache virtual memory size
dalvik.vm.heapsize= (stock 256m, recommended 320m)
dalvik.vm.heapstartsize= (stock 16m)
dalvik.vm.heapgrowthlimit= (stock 128m)
Can improve overall scrolling fluidity and speed
Code:
# This defines the max event window manager can
# handle in 1 s. We may adjust this # for performance
# reason later
windowsmgr.max_events_per_sec= (recommended 275)
General performance tweak
Code:
#disable the zygote loader
ro.wmt.blcr.enable=0
Extended jni checking is costly in terms of performance and battery life so disabling them is suggested
Code:
#disable extended dalvik jni checking
ro.kernel.android.checkjni=0
dalvik.vm.checkjni=0
Helps with overall performance
Code:
debug.performance.tuning=1
video.accelerate.hw=1
Helps increase picture/video taking quality and video viewing
Code:
#Raise Photo and video quality?
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.media.enc.hprof.vid.fps=65
Code:
#help to free up unused ram
persist.sys.purgeable_assets=1
Disables notification of usb debugging
Code:
#stop usb debugging on notification
persist.adb.notify=0
enables/disables (set to 0) dithering
Code:
#Improve screen quality at the cost of performance
persist.sys.use.dithering=1
Code:
#Use dalvik JIT compiler (Just In Time compiler is much faster and should be enabled by default)
dalvik.vm.execution-mode=int:jit
Code:
#disable camera sound?
persist.sys.camera-sound=0
Dalvik vm dexopt tweaks (USE ONE OR THE OTHER, NOT BOTH, i prefer option 2)-
option 1- disable dalvik checking, increases free ram but less optimized dalvik cache
Code:
dalvik.vm.verify-bytecode=false
dalvik.vm.dexopt-flags=v=n,u=n,o=v
option 2- enable more checking for a better performing dalvik cache but may use a little more ram
Code:
dalvik.vm.verify-bytecode=true
dalvik.vm.dexopt-flags=v=f,u=n,o=v
Init.d tweaks
To use mount /system rw, go to /system/etc/init.d create new file, add the lines in, save, and set permissions to rwxr-xr-x
Code:
#disable logcat
rm dev/log/main
Recoveries/Radios/Etc
List of flashable verizon radios-
radiosvzw-all-radios-in-flashable-zip/
Team win recovery project (custom touchscreen recovery-
twrp-212-touch-recovery-2012-04-20/
Clockwork recovery touch toro-
recovery-clockwork-touch-5.8.0.2-toro.img
clockwork recovery no skip edition-
recoverycdma-clockwork-recovery-v5504-no-skip-edition/
Mods/other
Suggested color control settings-
whitest whites
red 200
green 200
blue 265
gamma red -6
gamma green 0
gamma blue 8
omap4 gamma 6 (1.2 via franco app)
Morfic battery saving settings-
Red 135
green 135
blue 200
gamma red 0
gamma green 0
gamma blue 0
omap4 gamma 6 (1.2 via franco app)
Franco suggested settings-
Red 180
Green 192
Blue 200
gamma red -4
gamma green 0
gamma blue 5
omap4 gamma 6 (1.2 via franco app)
Custom auto brightness tweaks (super power save + conservative power save settings)
For both sets of settings-
Light sensor filter enabled yes
Window length 5s
Reset threshold 400 lux
Sample interval 5s
Use custom yes
Screen dim level 1
Allow light decrease yes
Decrease hysteresis 50%
Conservative power save settings-
Edit other levels under screen column-
15
17
19
21
23
25
27
30
32
40
49
54
65
75
100
125
146
179
211
225
Super power save settings-
Edit other levels under screen column-
6
8
9
11
12
14
16
19
23
27
33
40
50
64
85
97
111
146
178
225
Look here:
http://forum.xda-developers.com/showthread.php?t=1599025&highlight=battery
and here:
http://forum.xda-developers.com/showthread.php?t=1462020&highlight=battery
metalspring said:
Suggested color control settings for whitest whites-
red 200
green 200
blue 265
gamma red -6
gamma green 0
gamma blue 8
omap4 gamma 6 (1.2 via franco app)
Click to expand...
Click to collapse
Could you add the recommended overall color multiplier values?
Red 180
Green 192
Blue 200
Gamma (cannot remember, might be 1.2)
Hi,
Maybe an explanation for each tweaks would be great
X tweaks do this (for battery life or performance) but do this,etc...
The tweaks for the build.prop already exists (there is maybe 3/4 or more threads) in the Android section,some of these have not effect in ICS...
And maybe the general section is more appropriate...?
In any case thanks for this.
viking37 said:
Hi,
Maybe an explanation for each tweaks would be great
Click to expand...
Click to collapse
most have a simple explanation, the ones that dont are general performance/battery life tweaks
any in particular you dont understand?
I'll be happy to add in more detailed explanations on those
metalspring said:
most have a simple explanation, the ones that dont are general performance/battery life tweaks
any in particular you dont understand?
I'll be happy to add in more detailed explanations on those
Click to expand...
Click to collapse
Me,I understand because I've tested most of these and I use Google to understand what they do.But most of the users will ask,for sure...
You suggest some tweaks...I think you could suggest an explanation that comes with.
Not just a compilation of tweaks...
It's just my opinion...
Theshawty said:
Could you add the recommended overall color multiplier values?
Red 180
Green 192
Blue 200
Gamma (cannot remember, might be 1.2)
Click to expand...
Click to collapse
Those are included in the franco app but i guess i can put them in too, maybe morfics battery saver ones too if someone posts them (or i find them somewhere)
viking37 said:
Me,I understand because I've tested most of these and I use Google to understand what they do.But most of the users will ask,for sure...
You suggest some tweaks...I think you could suggest an explanation that comes with.
Not just a compilation of tweaks...
It's just my opinion...
Click to expand...
Click to collapse
I did add some explanations but i still think many explain themselves...unless you're talking about the dalvik dexopt ones...those are somewhat technical
metalspring said:
List of flashable verizon radios-
radiosvzw-all-radios-in-flashable-zip/
Team win recovery project (custom touchscreen recovery-
twrp-212-touch-recovery-2012-04-20/
Clockwork recovery touch toro-
recovery-clockwork-touch-5.8.0.2-toro.img
clockwork recovery no skip edition-
recoverycdma-clockwork-recovery-v5504-no-skip-edition/
Click to expand...
Click to collapse
These all look to be only Verizon / cdma versions,why post this in the GSM section?
For Trinity Spiceeeee use these values:
Multipliers:
Red 135(0000)
Green 135(0000)
Blue 200(0000)
Gamma: 0,0,0
Give your brain some time to adjust like Master Morfic says and you'll never wanna go back to stock colors again
Also play around with Gamma/Omap4 control for contrast
Verstuurd van mijn Galaxy Nexus met Tapatalk
odin13 said:
For Trinity Spiceeeee use these values:
Multipliers:
Red 135(0000)
Green 135(0000)
Blue 200(0000)
Gamma: 0,0,0
Give your brain some time to adjust like Master Morfic says and you'll never wanna go back to stock colors again
Also play around with Gamma/Omap4 control for contrast
Verstuurd van mijn Galaxy Nexus met Tapatalk
Click to expand...
Click to collapse
Are you sure they're the same? also what about OMAP?
What do you mean?
Verstuurd van mijn Galaxy Nexus met Tapatalk
odin13 said:
What do you mean?
Verstuurd van mijn Galaxy Nexus met Tapatalk
Click to expand...
Click to collapse
1) Are you sure the values are the same or they're just similar?
2) What did you set for OMAP4 Gamma Interface?
3rdstring said:
These all look to be only Verizon / cdma versions,why post this in the GSM section?
Click to expand...
Click to collapse
I just put the Verizon/cdma versions up first since that's what I have, I'll add in the sprint and GSM versions too if someone can give me a link to them
Just tried some of your tweaks (build.prop) and coloursettings and everything seems to be working fine. Colours look similiar to Trinities, little better imo. While scrolling a bit it feels a little bit faster, but that can just be the result of a placebo though.
Thnx for posting this!
Added custom auto brightness tweaks for custom roms with that option (should help save a lot of battery, actually can go lower than manual brightness)
I know most roms have an option to disable the led on during charge but i've seen a few that don't (slim 2.7, i think miui)
is there anyway to edit a some system file to disable it? i've read a few different places that to disable it in miui you can make this build.prop edit:
Code:
# LED charging indicator mode
# off = keep LED off during charging
# white = white LED for 'charging', green LED for 'charged'
# rgb = mixed yellowish LED for 'charging', green LED for 'charged'
persist.sys.charge_led=off
will that work in other roms? i have no idea about rom development and i know editing build.prop can mess things up.
Edit: sorry if I wasn't clear. Im on slimbean 2.7 and I don't have a setting to disable it. That's why I'm asking.
Sry nvm
Sent from my SAMSUNG-SGH-I747 using xda premium
More searching on Google... still nothing.
Bump
Hi All!
Kindly share your KCAL settings here
Like this:
Kernel - my kernel - IceMan ( not for public )
OS - LineageOS build myself
My settings:
Red 216
Green 222
Blue 256
Saturation 65
Value 129
Contrast 129
Hue 0
Thank you!
250
240
255
40
132 (140)
132 (140)
10
Red 235
Green 248
Blue 256
Saturation 52
Value 132
Contrast 138
Hue 0
Tianma Panel
Excellent idea to open a thread like this. If anyone has a Kcal profile which makes blacks blacker, whites whiter and colors more vivid, please share your profile. :3. I'm on an LOS based rom by the way.
What app are you using to control the KCal?
techlogik said:
What app are you using to control the KCal?
Click to expand...
Click to collapse
Elementalx app its fine, but also required custom kernel for kcal.
240,240,256,50,130,132,0
Whiter screens
Sent from my HTC 10 using XDA-Developers Legacy app
Hmm, I think I found a profile which I like. I used the DarkDroid profile as the base and changed one value.I only changed saturation.
Red: 250
Blue: 250
Green: 256
Saturation: Default is 45 but I changed it to 65
Value: 120
Contrast: 145
Hue: 0
As different type of panel is available and implemented on our beloved HTC10, shouldn't we share what type of panel too ? it's easily available using DevCheck app
I don't think applying settings from a panel to a different brand is really productive.
It's like calibrating a Sony TV and applying the resulted calibrating profile to a Samsung one, just because models share the same IPS panel ? Hmmmm no !
Btw this topic is an excellent idea !)
Fre$h said:
As different type of panel is available and implemented on our beloved HTC10, shouldn't we share what type of panel too ? it's easily available using DevCheck app
I don't think applying settings from a panel to a different brand is really productive.
It's like calibrating a Sony TV and applying the resulted calibrating profile to a Samsung one, just because models share the same IPS panel ? Hmmmm no !
Btw this topic is an excellent idea !)
Click to expand...
Click to collapse
You are right; I have updated my post