color adjustment via script manager/init.d - Galaxy Note 3 Android Development

I was using note 2 and loving the color calibration make by andreilux's kernel.
Since I don't want to void warranty so I decided to try calibrate myself without custom kernel.
My current profile (using script manager, run as su and at boot)
Code:
#!/system/bin/sh
echo 1 > /sys/class/mdnie/mdnie/scenario
echo 3 > /sys/class/mdnie/mdnie/mode
Each code is capped at 4
If u all want to try, can use adb command..
adb shell
su
Then echo between 1 to 4 to see the difference

Related

[HOW TO] Create your own Frequency Table. Works on 2.2

Ok so I Overclocked/undervolted via Milestone Overclock - no problems, however it got me thinking, all we are doing with this app is changing the maximum frequency and the maximum vsel.
I was looking for some extra oomph but also wanted to maximise battery life. My current set up is a 900mhz/46vsel maximum, but what about the other available frequencies - 600/300mhz - we ain't touching the vsel on these - are we getting the most out of this??
I did a bit of delving around so firstly I found the following when performing a cat /proc/overclock/mpu_opps with my overclock in place:
mpu_opps[3] rate=900000000 opp_id=3 vsel=46
mpu_opps[2] rate=600000000 opp_id=2 vsel=48
mpu_opps[1] rate=300000000 opp_id=1 vsel=33
So this is showing that the vsel for 600mhz is actually higher than 900mhz - not very economical! so how can we change this, well delving around various forums i got the jist of how to change this so here's a tutorial
IMPORTANT READ THIS!!! Disclaimer: I will not be held responsible for any damage to your phone, your PC or indeed your life from following this guide. The steps in this guide worked for me. Doing this kind of thing could affect your warranty and all that so have a long hard think about it before you go ahead. If anything goes wrong and your phone freezes or reboots spontaneously, remove the sdcard and boot the phone which will disable the overclock module and enable you to reverse whatever you did! As always I would always recommend a backup using Clockworkmod recovery. This is hacking and bad things can happen so be prepared. This is only tested on a stock/rooted 2.21 UK Generic/2.34 Deblur ROM with no apps removed - I have no idea if this works on other ROMs like JBoogie's (stock roms should be ok), because I don't know what changes/tweaks the Dev has done - If you try it and find it does/doesn't work then report back, but I can't offer any support for that
1) Create a setscaling.sh (I have attached mine as a base) script, this is what mine looks like. You can change frequencies/vsels, but it MUST stay in the format below.
echo 46 > /proc/overclock/max_vsel
echo 900000 > /proc/overclock/max_rate
echo 1 300000000 28 > /proc/overclock/mpu_opps
echo 2 600000000 38 > /proc/overclock/mpu_opps
echo 3 900000000 46 > /proc/overclock/mpu_opps
echo 0 900000 > /proc/overclock/freq_table
echo 1 600000 > /proc/overclock/freq_table
echo 2 300000 > /proc/overclock/freq_table
Lines 1/2 are your custom vsel/freq as loaded into Milestone Overclock
Lines 3/4/5 are your freq's and the custom vsels you want to use at those freq's (you can see they are much less than what they were originally!)
Lines 6/7/8 are your frequency table
I can't stress enough you must keep the format the same, and make sure you use the corect number of. It is possible to for example add an extra step/Frequency in - I haven't tested this so just be careful. Also bear in mind if you lower the vsels too much then you will cause the phone to fall over. However if you do get this just pull the SD card an it will boot the phone with the overclock module disabled
when you have set your setscaling.sh up you then need to do the following.
copy it to your sdcard, then via adb (you can also use root explorer)
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/setscaling.sh /system/xbin/setscaling.sh
chmod 755 /system/xbin/setscaling.sh
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Then to after this to execute via adb you can just type:
setscaling.sh
Seriously though guys get root explorer as that will enable you to edit you setscaling.sh on the fly as you do your testing (finding optimum vsel), once edited you can then execute it by simply clicking on the file.
Once you have got your setscaling.sh just the way you want it, you can then get it to initialise automatically after boot - this had me stumpted for a while as the script was executing before the overclock module had loaded hence the settings weren't taking effect and I was having to start it manually. I'm more windows orientated and this actually turned out to be a really easy fix.
the key is another script called install-recovery.sh (again I have attached this to the post) and it contains the following info
#!/system/bin/sh
sleep 80
setscaling.sh
So what this does is it waits 80 secs before executing setscaling.sh - which gives the system more than enough time to boot up and load the overclock module. Intall this as per below after plaing on sdcard:
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/install-recovery.sh /system/etc/install-recovery.sh
chmod 755 /system/etc/install-recovery.sh
reboot
Once rebooted do a cat /proc/overclock/mpu_opps and check your setscaling.sh has applied ok (i.e it is displaying your custom vsels)
Jobs a good un - enjoy!
##If you are reporting problems with it not working please post the exact steps of what you have done, otherwise I won't be able to assist##
Reserved...............
I've searched for an hour how to use Motorola Overclock. I've put the kernelmodule.tar.gz on the sdcard...
But i don't understand how to load it. Or where to place it...
The wiki on the googlecode page leaves me without a clue.
vanloque said:
I've searched for an hour how to use Motorola Overclock. I've put the kernelmodule.tar.gz on the sdcard...
But i don't understand how to load it. Or where to place it...
The wiki on the googlecode page leaves me without a clue.
Click to expand...
Click to collapse
mate just download milestone overclock from the market!
Higgsy said:
mate just download milestone overclock from the market!
Click to expand...
Click to collapse
That's what i did... And then i can't do anything in the app...
Oh Hey, i did forget to Re-Root after FrozenEclairing!
vanloque said:
That's what i did... And then i can't do anything in the app...
Click to expand...
Click to collapse
Do you have root?
after you apply this how do you tell if its worked?
edit: wow im retarded ignore this post -.-
A one right here
thanks, needed this for my overclock
I use gscript lite, and this info is perfet A 1
thanks for the idea and this should work with just adb; no need to download the scripts...
Code:
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
echo "#!/system/bin/sh
echo 46 > /proc/overclock/max_vsel
echo 900000 > /proc/overclock/max_rate
echo 1 300000000 28 > /proc/overclock/mpu_opps
echo 2 600000000 38 > /proc/overclock/mpu_opps
echo 3 900000000 46 > /proc/overclock/mpu_opps
echo 0 900000 > /proc/overclock/freq_table
echo 1 600000 > /proc/overclock/freq_table
echo 2 300000 > /proc/overclock/freq_table" > /system/xbin/setscaling.sh
chmod 755 /system/xbin/setscaling.sh
setscaling.sh
echo "#!/system/bin/sh
sleep 80
/system/xbin/setscaling.sh" > /system/etc/install-recovery.sh
chmod 755 /system/etc/install-recovery.sh
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
really glad others are using this and liking it, everyone who is using milestone overclock should be using it!
Hey Higgsy,
i installed your scripts through Root Explorer (incl. executing + rebooting), but checking the mpu_opps file still gives me standard frequencies. You got an idea for this?
Greets, Jack
basshamster said:
Hey Higgsy,
i installed your scripts through Root Explorer (incl. executing + rebooting), but checking the mpu_opps file still gives me standard frequencies. You got an idea for this?
Greets, Jack
Click to expand...
Click to collapse
is the milestone overlock installed and module loaded?
Custom setting in milestone overclock set to 900mhz/46vsel?
Did you set the permissions? (ie the chmod bit).
- Milestone Overclock installed and loaded (incl. startup-load)
- i use different settings 1000/50 (300/30, 600/40 -> in setscaling-script), but 1000/50 is also set in custom settings so it seems equal to me
- permissions of both scripts are "rwxr-xr-x"
hmmm....
little edit: mpu_opps gives me 300/33, 600/48, 1000/50 so it#s not completely standard
basshamster said:
- Milestone Overclock installed and loaded (incl. startup-load)
- i use different settings 1000/50 (300/30, 600/40 -> in setscaling-script), but 1000/50 is also set in custom settings so it seems equal to me
- permissions of both scripts are "rwxr-xr-x"
hmmm....
little edit: mpu_opps gives me 300/33, 600/48, 1000/50 so it#s not completely standard
Click to expand...
Click to collapse
yeah it is standard apart from the max overclock you set in Milestone Overclock.
Please attach your exact setscaling.sh so I can take a look at it.
Thx for helping!
basshamster said:
Thx for helping!
Click to expand...
Click to collapse
hmm looked ok on the face of it, however when I recreated the file it was 355bytes as opposed to yours that was 353bytes
anyway, i think I might know the problem, in root explorer, open setscaling.sh in text editor - look at the end of each line - is there a little box? If there is the delete them - save and then execute.
Your permissions were ok
This is working ok on my phone now
Unfortunately still not working ... don't know what's the problem. Maybe someone else joins us with another solution. Thx for your help anyway!
I posted on the google forum bugreport.
When i click LOAD that reboots the phone and when i relaunch the app the clocks are still empty, so i click load again and it reboots again... Etc.

How do I get Voodoo Color settings to stick after reboot?

So I applied the voodoo color settings from this thread here: http://forum.xda-developers.com/showthread.php?t=1401759
But they don't stick after reboot. Can anyone tell me how I can get them to stay when I reboot my Nexus?
You can always make an init.d script if your ROM supports it
Here's an example of how it should look, you can change the values to whatever you like
#! /sys/bin/sh
echo 2863311680 >/sys/class/misc/voodoo_color/red_multiplier
echo 3336681600 >/sys/class/misc/voodoo_color/green_multiplier
echo 3925507840 >/sys/class/misc/voodoo_color/blue_multiplier
echo -33 >/sys/class/misc/voodoo_color/blue_v1_offset
echo -26 >/sys/class/misc/voodoo_color/red_v1_offset
echo -30 >/sys/class/misc/voodoo_color/green_v1_offset
Or you can use an app called ROM Toolbox and use the "Scripter" to run this at boot
Sent from my Nexus S 4G using Tapatalk 2
Thanks! It's working great! However, I do notice that it sometimes makes my phone reboot on bootup about two times before it applies. But better than trying to remember my screen's values in Voodoo.

[APP] Scheduled Automatic CWM Nandroid Backup - Intika Automatic Backup MoD

Waw Grrrr... a whole day to make it possible
as i never posted... i can not post link... so google is your friend for downloading lol
Here is a little tutorial to make
Scheduled Automatic CWM Nandroid Backup
Intika Automatic Backup MoD ^^
First what you need :
- Rooted device
- CWM Recovery
- Application SL4A (Free google dev. sl4a_r5.apk)
- Apllication "TaskBomb Task Scheduler" (Free on market)
- Application "SL4A Script Launcher" (Free plugin on market)
- A Script to do the stuff
How it work ? :
The idea is simple, it's running an automated task with a script without any interact... the Automated nandroid backup will erase her self for a new one when the task is launched...
the backup is always made at the same place under your clockworkmod backup folder "IntikaAutomaticTask" so it will always take the size of one backup even if the task is scheduled every day ... and naturally you will keep your manually make backup.
You can set up the backup to made different backup of keep 3 last one or else... not explained but easy to do with TaskBomb
The Script For a backup to "sdcard/clockworkmod" :
Code:
cd \ ;
mkdir -p /cache/recovery ;
rm /cache/recovery/mounter? ;
rm /cache/recovery/extendedcommand? ;
rm /cache/recovery/mounter ;
rm /cache/recovery/extendedcommand ;
echo '#!/sbin/ext/busybox sh' > /cache/recovery/mounter ;
echo '/sbin/ext/busybox mount /sdcard' >> /cache/recovery/mounter ;
echo '/sbin/ext/busybox mount /dev/block/mmcblk1p1 /emmc' >> /cache/recovery/mounter ;
echo '/sbin/ext/busybox rm /cache/recovery/mounter' >> /cache/recovery/mounter ;
chmod 777 /cache/recovery/mounter ;
echo 'run_program("/cache/recovery/mounter");' > /cache/recovery/extendedcommand ;
echo 'ui_print("Intika Backup MoD... Processing Backup...");' > /cache/recovery/extendedcommand ;
echo 'backup_rom("/emmc/clockworkmod/backup/IntikaAutomaticTask");' >> /cache/recovery/extendedcommand ;
sync ;
echo 1 > /sdcard/external_sd/clockworkmod/.recoverycheckpoint ;
echo 1 > /sdcard/clockworkmod/.recoverycheckpoint ;
sync ;
reboot recovery ;
The Script For a backup to "sdcard/external_sd/clockworkmod" :
Code:
cd \ ;
mkdir -p /cache/recovery ;
rm /cache/recovery/mounter? ;
rm /cache/recovery/extendedcommand? ;
rm /cache/recovery/mounter ;
rm /cache/recovery/extendedcommand ;
echo '#!/sbin/ext/busybox sh' > /cache/recovery/mounter ;
echo '/sbin/ext/busybox mount /sdcard' >> /cache/recovery/mounter ;
echo '/sbin/ext/busybox mount /dev/block/mmcblk1p1 /emmc' >> /cache/recovery/mounter ;
echo '/sbin/ext/busybox rm /cache/recovery/mounter' >> /cache/recovery/mounter ;
chmod 777 /cache/recovery/mounter ;
echo 'run_program("/cache/recovery/mounter");' > /cache/recovery/extendedcommand ;
echo 'ui_print("Intika Backup MoD... Processing Backup...");' > /cache/recovery/extendedcommand ;
echo 'backup_rom("/sdcard/clockworkmod/backup/IntikaAutomaticTask");' >> /cache/recovery/extendedcommand ;
sync ;
echo 1 > /sdcard/external_sd/clockworkmod/.recoverycheckpoint ;
echo 1 > /sdcard/clockworkmod/.recoverycheckpoint ;
sync ;
reboot recovery ;
Installing needed stuff :
Considering you have a rooted device and CWM installed...
You can use different file and folder name regarding the tutorial
1. Copy the scripts to your device and name it backup.sh and backup.ext.sh
1.1 Copy the script to :
1.1 \sdcard\Intika.Backup.MoD\backup.sh
1.2 \sdcard\Intika.Backup.MoD\backup.ext.sh
1.3 You can test the script with a terminal by writing this
Code:
su -c sh \sdcard\Intika.Backup.MoD\backup.sh
2. Install SL4A (Free google dev. sl4a_r5.apk)
3. Install "TaskBomb Task Scheduler" (Free on market)
4. Install "SL4A Script Launcher" (Free plugin on market)
How to Setup ? :
1. Open SL4A hit menu and then "add" select "Shell" if you are asked to select the application to continue with select SL4A... put backup.sh or backup.ext.sh on the title and put the code below on the script after that hit menu and then "save & exit"
Code:
su -c sh \sdcard\Intika.Backup.MoD\backup.sh
or
Code:
su -c sh \sdcard\Intika.Backup.MoD\backup.ext.sh
2. Open TaskBomb hit "Task" click " + " to add a new one , on action type leave or set VIEW and on data choose "Select script" and choose backup.sh ... on Activity choose background or foreground if you want to see when the script is launched.
3. Here we are, we just need to specify when to run the task ... on TaskBomb hit Alarm and then " + " and then select the wanted script
choose a start time and then the day you want to launch the backup.
Bla Bla :
AAAhhhhhh !!!!!!! finally get it work after many research and after trying Rom Manager (not working with every device and he tray to install an other CWM "very dangerous" )
My way is not the only one
Any way good luck
I don't have the time for the moment but when i got some free time i will make an application to do the stuff
Could you please explain how it works? Does it reboot your phone to make backup?
Hello
Here what it do :
1. Set a backup at a time and day (or every day or every week or what you want regarding time and repetition)
2. On selected time, the phone reboot to recovery without any interact make the backup (every think is displayed) ... once finish it reboot the phone to normal state.
example you set to make a backup every day at 4h o clock... your phone will reboot and make the backup and then restart to normal mode... so when you wake up you just have to enter the Code pin of the phone or just unlock it if it's does not ask for a code pin.
Ok, so user will have to input PIN... not like that really.
best stable backup are backup made from recovery...
generally we would make an automatic backup when we are not using the phone so at night... so it's not really a problem to do not have incoming call after backup until the pin is entered...
any way all other stuff like wake up alarm and other application will be running they don't need the pin to be entered ! ...
you can also remove pin request and put just a code to unlock the screen, it's a solution if you want to be reachable any time...
LA_ said:
Ok, so user will have to input PIN... not like that really.
Click to expand...
Click to collapse
I think intika means that it will reboot once the backup are done.
The pin input is normal if you enabled it in security settings. It happens when you reboot your phone.
---------- Post added at 05:06 PM ---------- Previous post was at 05:01 PM ----------
intika said:
Bla Bla :
AAAhhhhhh !!!!!!! finally get it work after many research and after trying Rom Manager (not working with every device and he tray to install an other CWM "very dangerous" )
My way is not the only one
Any way good luck
Click to expand...
Click to collapse
Any screenshots for this? Seems like the script is too simple to be true.
Is there a command to stop Recovery from rebooting? I have an OTA app that flashes a ROM and I want Recovery to stay in it and not just auto reboot, because the user might want to install gapps before rebooting.
Sorry to bump an old thread, but has anyone gotten this to work? I really miss the automated full backup from my windows mobile device.
Sorry, mistake.
any review on this?
i just spent few bucks on ROM manager only to find out the auto backup only work on internal memory. if i set it to sd card, it will get error and just stuck in recovery. kind of sucks for paid app. and my question to dev just went unanswered. really sucks for a paid app.

The Linux shell for beginners.

I just wanted to share some links to help out some of the users who may already use Linux from time to time. Linux can be a very intimidating sometimes.
I finaly left Windows for good and was having trouble remembering shell commands. Thought I would post some refrences to maybe help some of you guys out who are new to the Linux shell as well. Good luck!
http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
http://bash.cyberciti.biz/guide/Main_Page
http://linuxcommand.org/learning_the_shell.php
http://www.fortystones.com/40-linux-shell-commands-beginners/
http://community.linuxmint.com/tutorial/view/100
Another one... Thank you Jim!
http://sunsite.utk.edu/UNIX-help/quickref.html
Maribou said:
I just wanted to share some links to help out some of the users who may already use Linux from time to time. Linux can be a very intimidating sometimes.
I finaly left Windows for good and was having trouble remembering shell commands. Thought I would post some refrences to maybe help some of you guys out who are new to the Linux shell as well. Good luck!
http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
http://bash.cyberciti.biz/guide/Main_Page
http://linuxcommand.org/learning_the_shell.php
http://www.fortystones.com/40-linux-shell-commands-beginners/
http://community.linuxmint.com/tutorial/view/100
Click to expand...
Click to collapse
This is another one, and it is a great reference:
http://sunsite.utk.edu/UNIX-help/quickref.html
I like this idea and think this should be a sticky! Great idea!
jimbridgman said:
This is another one, and it is a great reference:
http://sunsite.utk.edu/UNIX-help/quickref.html
I like this idea and think this should be a sticky! Great idea!
Click to expand...
Click to collapse
Thank you for the link Jim! I added it to the original post.:good:
+1 Been going to this guide for quite a while now has most everything you need to get started.....
The shell is really cool. Once you get the commands down you can start learning shell scripting. It automates processes and make some things easier. Like for example I am really rusty when it comes to Linux and I was getting tired of having to Cd into my sdk tools directory every time I wanted to mess around with Adb. So I created a little shell script that automates the process for me. Like I said, I am new to all of this and I am sure there is a much easier way, but it was fun learning how to do it. This is just a really really simple shell script to change in to my /android-sdk-linux/platform-tools directory, then start the Adb server and list my device. Here is my script...
Code:
#!/bin/bash
#Intro
echo "::::::::::::::::::::::::::"
echo ":: Maribou's Adb Script ::"
echo "::::::::::::::::::::::::::"
sleep 3
#Changing directory
echo "::::::::::::::::::"
echo ":: Locating Adb ::"
echo "::::::::::::::::::"
cd /usr/bin/android-sdk-linux/platform-tools
sleep 3
echo ""
echo ""
#Starting adb
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
echo ":: Starting Adb services and connecting device::"
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
sleep 2
./adb start-server
echo ""
echo ""
sleep 2
./adb devices
sleep 3
#Connection Message
echo ":::::::::::::::::::::::"
echo ":: Atrix 2 connected ::"
echo ":::::::::::::::::::::::"
sleep 3
echo ""
echo ""
#Goodbye
echo ":::::::::::::::::::::::::"
echo ":: Have a nice day! :D ::"
echo ":::::::::::::::::::::::::"
Maribou said:
The shell is really cool. Once you get the commands down you can start learning shell scripting. It automates processes and make some things easier. Like for example I am really rusty when it comes to Linux and I was getting tired of having to Cd into my sdk tools directory every time I wanted to mess around with Adb. So I created a little shell script that automates the process for me. Like I said, I am new to all of this and I am sure there is a much easier way, but it was fun learning how to do it. This is just a really really simple shell script to change in to my /android-sdk-linux/platform-tools directory, then start the Adb server and list my device. Here is my script...
Code:
#!/bin/bash
#Intro
echo "::::::::::::::::::::::::::"
echo ":: Maribou's Adb Script ::"
echo "::::::::::::::::::::::::::"
sleep 3
#Changing directory
echo "::::::::::::::::::"
echo ":: Locating Adb ::"
echo "::::::::::::::::::"
cd /usr/bin/android-sdk-linux/platform-tools
sleep 3
echo ""
echo ""
#Starting adb
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
echo ":: Starting Adb services and connecting device::"
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
sleep 2
./adb start-server
echo ""
echo ""
sleep 2
./adb devices
sleep 3
#Connection Message
echo ":::::::::::::::::::::::"
echo ":: Atrix 2 connected ::"
echo ":::::::::::::::::::::::"
sleep 3
echo ""
echo ""
#Goodbye
echo ":::::::::::::::::::::::::"
echo ":: Have a nice day! :D ::"
echo ":::::::::::::::::::::::::"
Click to expand...
Click to collapse
Better yet, you could
Code:
sudo gedit .bashrc
, scroll to the bottom, and add that directory to your path (google how, you need to know!), and use it anywhere you want.
then add some aliases to make things shorter. some I use are:
ins= sudo apt-get install
swp= whatever the heck mounts my swap file I use.
Also I would recommend ditching the stock terminal of ubuntu for something better like the life-hacker acclaimed terminator.
lkrasner said:
Better yet, you could
Code:
sudo gedit .bashrc
, scroll to the bottom, and add that directory to your path (google how, you need to know!), and use it anywhere you want.
then add some aliases to make things shorter. some I use are:
ins= sudo apt-get install
swp= whatever the heck mounts my swap file I use.
Also I would recommend ditching the stock terminal of ubuntu for something better like the life-hacker acclaimed terminator.
Click to expand...
Click to collapse
Awesome! thank you for the sugesstions! I thought there was an easier way of doing things I just couldn't remember at the time.
Installing Terminator now... :good:
lkrasner.... YOU ROCK MAN! Totally saved me from all of the typing. And I had no idea about the alises. Thank you!

Proximity sensor issue and solution.

Here is my experience with proximity sensor, and finally got it working back with manual recalibration. So sharing here with you if any one having same issue.
Symptoms : Weired behavior of proximity sensor, I had issue like screen was not turning On after call ends. Air call accept not working
Test : Dial *#0*#
Now this will open up menu, select sensor from there and putting hand near proximity sensor screen should turn green and vibrate. I have had that, but when moving hand away from proximity sensor it was not turning back to normal stat. So once proximity sensor gets activated, it was remaining On always.
Suggestion from net : There wa plenty of cases I have seen having same issue on note3. there was different suggestion like turning auto brightness off / removing Ext SD card was worked for other but not worked on my case. Also someone asked to blow compressed air in earpiece to clean sensor, that helped but just for few minutes only.
Solution that was worked for me.
First thing this setting files remains in EFS folder, so if you have EFS backup, you can try restoring it. In my case I had old EFS backup (MJ1) and have ROM MK2, and later I realized, there is some file difference in both version. (samsung have again screwed EFS, Thanks )
So finally I need to manually recalibrate proximity sensor and that worked fine and since couple of hrs using it without issue.
Requirements :
-Adb access and rooted device.
You should have rooted device, also make sure USB debugging is ON
Connect device to PC and run adb shell
Type following command
Code:
cd /sys/devices/virtual/sensors/proximity_sensor/
then
Code:
cat state #blank value
You will get some value(blank value), note that value. In my case it was 85.
Now enter this command to get actual configuration value
Code:
cat prox_cal
you will get some value, note that value too. In my case it was 46,166,126
Now make total of blank value and actual value(first part) , e.g. in my case it was 85+46 (red above) = 131
Now you need to find HEX value for 131. Get from here OR Here
So in my case it was (HEX value for 131) 83
Now you need to write this value in prox_cal file in EFS folder. For this you need,
Type this with adb
Code:
su
Grant supersu permission from device if ask.
then
Code:
echo -en $'\x83' > /efs/prox_cal
here 83 is my value, you have to replace with your.
then
Code:
sync
Now last step you needs to change permission. here is three steps for that.
Code:
chown system:system /efs/prox_cal
chmod 644 /efs/prox_cal
sync
Reboot device and check proximity sensor is working fine.
GoodLuck !
Referred too many threads on XDa and google, main credit goes to @greaty for clear instruction.
Sorry intended to post on Note3 general forum.
Mod please move this thread.
Hi dr.Ketan,
Good morning!
Sometime back I wrote to you about the proximity sensor not working and also about the weird results I was getting with adb. You told me to wait for some time as you were busy with the kitkat rom for note 2. If you are relatively free now, would you please guide me in this regard. I'm pasting the results I get on adb:
"Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\Admin>adb devices
List of devices attached
4df723a360****** device
C:\Users\Admin>adb shell
[email protected]:/ $ cd /sys/devices/virtual/sensors/proximity_sensor/
cd /sys/devices/virtual/sensors/proximity_sensor/
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $ cat state #blank valu
e
#blank value <
1
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $ cat prox_cal
cat prox_cal
11,9
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $"
You would have noticed that:
1. Once I punch in a command in adb, it puts the cursor at the end of the line rather that at a new line;
2. 'cat prox_cal' is giving me only two values;
3. If I add the blank value, i.e., 1 and the first digit of the cat prox_cal, i.e., 11, I would get 12 and a hex value for the same as 'C'.
Is it normal? If you are busy , would appreciate if you can indicate some resources regarding adb and android
regards,
dcpathak
yeah ut can be any so better first use that value and see if that works or not. If doesn't work then let me know.
you have to use this
echo -en $'\xC' > /efs/prox_cal
Click to expand...
Click to collapse
as per instruction and don't forget to do it with Supreuser (root access)
Did that and it seems to have solved the problem.
Interesting observation: this time the blank value increased to 14 so corresponding hex was E. used that and problem solved.
Any idea why commands were starting from the same line as the previous command?
Thanks and regards,
dcpathak
Thanks man, finally a solution for the promity sensor i really appresiate that you are sharing this with us i finally will get my prox sensor working
i wonder if this value is a normal value
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $ cat prox_cal
cat prox_cal
2013274108,2013274228,2013274188
Hi,
you my friend are a legend, this works finally for me again after over month putting up with it.
Thanks
what should i do it's said not found?
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>adb devices
List of devices attached
4df79c57088840c5 device
C:\Windows\system32>adb shell
[email protected]:/ $ cd/sys/devices/virtual/sensors/proximity_sensor/
cd/sys/devices/virtual/sensors/proximity_sensor/
/system/bin/sh: cd/sys/devices/virtual/sensors/proximity_sensor/: not found
127|[email protected]:/ $
SOLVED
my one has returned back to the same issue again just randomly.
Thanks
Sent from my SM-N9005 using Tapatalk
Thanks @dr.ketan for share this method...and now my proximity sensor is back... i'm on leaked lollipop ????????????????????????????????? i'm very happy?
I had this issue too. After Samsung refused to repair my n9005 because of the triggered Knox counter, I just opened my phone and cleaned the dust that gathers between the prox. sensor and the front glass with isopropanol and a microfiber cloth. Now it's working again. The method described by OP and other methods didn't work for me.
i had the same problem and solved it typing in a terminal emulator
HTML:
$ su
$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
Jager23 said:
i had the same problem and solved it typing in a terminal emulator
HTML:
$ su$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal$ chown system:system /efs/prox_cal$ chmod 644 /efs/prox_cal$ sync
Click to expand...
Click to collapse
Yes it's definitely works for me...
SM-N900 cihazımdan Tapatalk kullanılarak gönderildi
@dr.ketan..
u are a legend, thanks alot. and for the other how found this..
for whom how is noob like me :angel: u could use terminal emulator from playstore after rooting(of course)..
thank you
Just followed the method using terminal emulator, rebooted and now works perfectly so far!!! Was getting different faults on different ROMs. On lollipop the proximity sensor just wouldn't work at all. Then went back to 4.4.4 and would work but only once (soon as you put the phone to ear during a call then remove it , although the screen would come on, the key pad would be unresponsive.) Which meant I had many voice mails that had built up and was unable to delete them lol.
Thanks again for this method....though I'm not entirely sure what this has exactly done....its worked.
Omg thank you. This works for lollipop n9005 too ?
I've been having this issue since upgrading to Lollipop, I'll be sure to try this!
how?
Jager23 said:
i had the same problem and solved it typing in a terminal emulator
HTML:
$ su
$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
Click to expand...
Click to collapse
thanks, but it didnt work for me. I installed terminal emulator from the play market, then started typing the above, but it said su is not found, and echo etc is not allowed.
ive never used the emulator before and googling the subject did not help. could you explain what am i doing wrong?
You have device rooted?
Sent from my SM-N910G using xda premium

Categories

Resources