Proximity sensor: how to flash persist.img ?

Search This thread

Antik86

Member
Nov 15, 2018
9
1
Hi!
Please help me: I have some problems with proximity sensor, how I can flash persist region?
This commands not working, write about data protection:
fastboot devices
fastboot erase persist
fastboot flash persist persist.img
fastboot reboot



Maybe I can add this region to rawprogram0 file for example like a recovery region?? But persist still not flashing after adding

<program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="persist.img" label="persist" num_partition_sectors="16384" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="true" start_byte_hex="0x4000000" start_sector="16384"/>


<program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="recovery.img" label="recovery" num_partition_sectors="16384" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x8000000" start_sector="32768"/>

I flashed rom for fastboot but this region not flashed, options for proximity sensor was saved like before install
 
Last edited:

Vin87

Senior Member
Jul 4, 2007
446
127
What are your problems ? Sensor acts strange or doesn't work , but calibration is missing from rom ? My sensor was fixed by cleaning it. I've used an A4 sheet, and used them to clean the two slots on both sides of the speaker grill. I've cleaned them both with a A4 (they were so full of gunk in the beginning that the A4 didn't want to go through). Needless to say, I now have a perfect working proximity sensor again (device is a year old, I'm using a Mi Mix 2). There is really a small slot there and the corner of the A4 should dissapear in it for like 5 mm. If this is not your issue, please ignore :p
 

Antik86

Member
Nov 15, 2018
9
1
What are your problems ? Sensor acts strange or doesn't work , but calibration is missing from rom ? My sensor was fixed by cleaning it. I've used an A4 sheet, and used them to clean the two slots on both sides of the speaker grill. I've cleaned them both with a A4 (they were so full of gunk in the beginning that the A4 didn't want to go through). Needless to say, I now have a perfect working proximity sensor again (device is a year old, I'm using a Mi Mix 2). There is really a small slot there and the corner of the A4 should dissapear in it for like 5 mm. If this is not your issue, please ignore :p

It was clean but I have some problems, Idecided to flash this region, I fixed sensor according to this manuals, because this region doesn`t flash with fastboot method or recovery :
1. Enable EDL mode https://forum.xda-developers.com/mi-mix-2/how-to/tool-edl-tool-mi-mix-2-t3822677
2. Flash with MiFlash, before flashing you must edit file rawprogram0 https://forum.xda-developers.com/re.../how-to-flash-persist-partiton-redmi-t3830310

rawprogram0 after editing
f7caed9c8d33.jpg


Mi flash log file- this region was written
8dc520dcda99.jpg
 
  • Like
Reactions: Vin87
proximity sensor glitch

What are your problems ? Sensor acts strange or doesn't work , but calibration is missing from rom ? My sensor was fixed by cleaning it. I've used an A4 sheet, and used them to clean the two slots on both sides of the speaker grill. I've cleaned them both with a A4 (they were so full of gunk in the beginning that the A4 didn't want to go through). Needless to say, I now have a perfect working proximity sensor again (device is a year old, I'm using a Mi Mix 2). There is really a small slot there and the corner of the A4 should dissapear in it for like 5 mm. If this is not your issue, please ignore :p
Thank you very much. I'm already wanted to sell my mi mix 2, but your advice helped me to fix problem with proximity sensor.
 
  • Like
Reactions: Vin87

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    What are your problems ? Sensor acts strange or doesn't work , but calibration is missing from rom ? My sensor was fixed by cleaning it. I've used an A4 sheet, and used them to clean the two slots on both sides of the speaker grill. I've cleaned them both with a A4 (they were so full of gunk in the beginning that the A4 didn't want to go through). Needless to say, I now have a perfect working proximity sensor again (device is a year old, I'm using a Mi Mix 2). There is really a small slot there and the corner of the A4 should dissapear in it for like 5 mm. If this is not your issue, please ignore :p
    1
    What are your problems ? Sensor acts strange or doesn't work , but calibration is missing from rom ? My sensor was fixed by cleaning it. I've used an A4 sheet, and used them to clean the two slots on both sides of the speaker grill. I've cleaned them both with a A4 (they were so full of gunk in the beginning that the A4 didn't want to go through). Needless to say, I now have a perfect working proximity sensor again (device is a year old, I'm using a Mi Mix 2). There is really a small slot there and the corner of the A4 should dissapear in it for like 5 mm. If this is not your issue, please ignore :p

    It was clean but I have some problems, Idecided to flash this region, I fixed sensor according to this manuals, because this region doesn`t flash with fastboot method or recovery :
    1. Enable EDL mode https://forum.xda-developers.com/mi-mix-2/how-to/tool-edl-tool-mi-mix-2-t3822677
    2. Flash with MiFlash, before flashing you must edit file rawprogram0 https://forum.xda-developers.com/re.../how-to-flash-persist-partiton-redmi-t3830310

    rawprogram0 after editing
    f7caed9c8d33.jpg


    Mi flash log file- this region was written
    8dc520dcda99.jpg
    1
    proximity sensor glitch

    What are your problems ? Sensor acts strange or doesn't work , but calibration is missing from rom ? My sensor was fixed by cleaning it. I've used an A4 sheet, and used them to clean the two slots on both sides of the speaker grill. I've cleaned them both with a A4 (they were so full of gunk in the beginning that the A4 didn't want to go through). Needless to say, I now have a perfect working proximity sensor again (device is a year old, I'm using a Mi Mix 2). There is really a small slot there and the corner of the A4 should dissapear in it for like 5 mm. If this is not your issue, please ignore :p
    Thank you very much. I'm already wanted to sell my mi mix 2, but your advice helped me to fix problem with proximity sensor.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone