[MOD/Tutorial] Use back cam as selfie cam - Redmi Note 8 Themes, Apps, and Mods

Long story short: Xiaomi uses a different sensor for selfie cam in recent manufactured Redmi Note 8 phones. This uses a different driver/firmware than the older one. I am personally not aware of what is the exact sensor in the old or new one.
So, some of the older Redmi Note 8 phones have selfie cam with custom roms, some newer ones don't.
This results in the situation like when you install LinageOS 17.1 to the ginkgo and you dont have a selfie cam. It simply does not reported by the OS to the apps, like when it's completely missing.
Some application require you to take a selfie as a security measure on first login (fintech/bank apps, etc), and they just crash. So you are completely unable to use your banking app.
Solution is to report the back camera as front camera from the OS side to the apps, so you can take a selfie with the back cam temporarily.
This is how I resolved:
- turn off your phone
- enter TWRP recovery
- mount vendor partition
- plug your USB cable
- BACKUP CURRENT camera settings: adb pull /vendor/etc/camera/camera_config.xml camera_config.original.xml
- use adb push camera_config.modded.xml /vendor/etc/camera/camera_config.xml
- reboot system, and take your selfie with back cam
- OPTIONAL steps: revert to stock camera settings
- OPTIONAL: turn off phone, enter TWRP, mount vendor, plug USB cable
- OPTIONAL: use adb push camera_config.original.xml /vendor/etc/camera/camera_config.xml
- OPTIONAL: reboot again, and have the original camera layout with selfie cam missing
The attached file is modified in two places:
- modified position from BACK to FRONT on one of the back cams
- front cam section is removed
But you can modify your original file too if you are afraid to use random files from the internet

Thanks in advance. But after using your attachment file, can't use the back camera now.

The attach file is my original config file in my Havoc OS. Could you please give me some suggestions about it? Or is it just work in LineageOS?

myixl0823 said:
Thanks in advance. But after using your attachment file, can't use the back camera now.
Click to expand...
Click to collapse
It is meant to be a temporary solution to allow apps to take selfies if that is absolutely required. One of my banking apps refuse to work without a selfie on first start. Then you must revert the config to use your back cameras.
Anyways you can modify the original file to fit your actual needs.

HUN_Gyuszi said:
Long story short: Xiaomi uses a different sensor for selfie cam in recent manufactured Redmi Note 8 phones. This uses a different driver/firmware than the older one. I am personally not aware of what is the exact sensor in the old or new one.
So, some of the older Redmi Note 8 phones have selfie cam with custom roms, some newer ones don't.
This results in the situation like when you install LinageOS 17.1 to the ginkgo and you dont have a selfie cam. It simply does not reported by the OS to the apps, like when it's completely missing.
Some application require you to take a selfie as a security measure on first login (fintech/bank apps, etc), and they just crash. So you are completely unable to use your banking app.
Solution is to report the back camera as front camera from the OS side to the apps, so you can take a selfie with the back cam temporarily.
This is how I resolved:
- turn off your phone
- enter TWRP recovery
- mount vendor partition
- plug your USB cable
- BACKUP CURRENT camera settings: adb pull /vendor/etc/camera/camera_config.xml camera_config.original.xml
- use adb push camera_config.modded.xml /vendor/etc/camera/camera_config.xml
- reboot system, and take your selfie with back cam
- OPTIONAL steps: revert to stock camera settings
- OPTIONAL: turn off phone, enter TWRP, mount vendor, plug USB cable
- OPTIONAL: use adb push camera_config.original.xml /vendor/etc/camera/camera_config.xml
- OPTIONAL: reboot again, and have the original camera layout with selfie cam missing
The attached file is modified in two places:
- modified position from BACK to FRONT on one of the back cams
- front cam section is removed
But you can modify your original file too if you are afraid to use random files from the internet
Click to expand...
Click to collapse
i hears that this problem is fixed in A11 roms
why not trying to port the config ?

loopypalm said:
i hears that this problem is fixed in A11 roms
why not trying to port the config ?
Click to expand...
Click to collapse
Thanks but you would need driver/firmware, not config. Config here is a temporary workaround to trick Revolut and their friends to take a selfie.

Related

XA2 Ultra front cam startup error

Anytime that I attempt to open the standard [non-wide angle] front camera, I receive an unknown error warning (see screenshot). Have reset phone, etc.
Sony test utility shows error in standard front cam, however the wide-angle front cam functions normally. Rather than send the phone in for repair, I'm wondering if it's possible to have the front camera open on the wide-angle by default?
Unfortunately, once the camera app is open, the switch to wide angle is not functional, so there's no way that I can activate the wide-angle front camera. Any ideas? Thanks
pseudonym58 said:
Anytime that I attempt to open the standard [non-wide angle] front camera, I receive an unknown error warning (see screenshot). Have reset phone, etc.
Sony test utility shows error in standard front cam, however the wide-angle front cam functions normally. Rather than send the phone in for repair, I'm wondering if it's possible to have the front camera open on the wide-angle by default?
Unfortunately, once the camera app is open, the switch to wide angle is not functional, so there's no way that I can activate the wide-angle front camera. Any ideas? Thanks
Click to expand...
Click to collapse
Is a bug
It is not a bug. I do not have this problem at all. First.......
-Tell me what mods you have install
-tell me what you have for root and if magisk what modules
The camera error is being caused by something you have flashed or modded. Worst case scenario your camera is broken
lonewolfbtown said:
It is not a bug. I do not have this problem at all. First.......
-Tell me what mods you have install
-tell me what you have for root and if magisk what modules
The camera error is being caused by something you have flashed or modded. Worst case scenario your camera is broken
Click to expand...
Click to collapse
I think the camera module is broken, as the phone is unrooted and unmodded, running the latest official stock for the region (Customized US). I might not bother to send it in for repair, as I don't use the front cameras much, anyway.
BUT- Is there any way to have the camera app open the wide-angle front camera by default? This would circumvent the problem. Thanks.
pseudonym58 said:
I think the camera module is broken, as the phone is unrooted and unmodded, running the latest official stock for the region (Customized US). I might not bother to send it in for repair, as I don't use the front cameras much, anyway.
BUT- Is there any way to have the camera app open the wide-angle front camera by default? This would circumvent the problem. Thanks.
Click to expand...
Click to collapse
Probably not unless you know to edit an app and recompile the app. But good luck cause Sonys camera is tied into the framework so mess something and ur back to square one

Front camera not working after installing custom rom. Please help :(

So I just decided to unblock bootloader, recovery and all that stuff to get on the custom rom.
Have been tried 2 rom: Evolution X and Pixel Exp
The rom seems to be working perfectly fine and the camera app as well but when I switch to the front camera, it just crashes all the time for any camera applications, I can use the camera and toggle the front camera then slide the phone down a bit and actually seeing the camera works through the small light gap appear on the screen but as soon as the slider full slides down, the app just stops right away without any warning.
How do I troubleshoot this ? Does anyone here encounter the same thing ?
I facetime my mother a lot so this really sucks for these recent couple of days already. Should I switch back to og software ?
If your on EvoX and use this camera: https://www.celsoazevedo.com/files/android/google-camera/f/changelog590/
When you slide down your front camera should work immediately.
Schumi_wk said:
If your on EvoX and use this camera: https://www.celsoazevedo.com/files/android/google-camera/f/changelog590/
When you slide down your front camera should work immediately.
Click to expand...
Click to collapse
Just swap back the rom and tried the app. Well it still doesn't work. Its go black screen for a sec and close the application.
None of the application with front camera works as well.
Is this a common thing ?
No, it seems like you are the only one with this problem. If it above does not solve it, I don't know.
This is a known issue. Start the camera, switch to portrait mode, then switch to FFC. It works fine with the latest Google camera port than with the Xiaomi camera. Once the app has crashed, to recover it, dismiss the app from Recents.
I had it too i switched back to stock then i formated from twrp then if you don't know what to do when you dont have an os don't freak out just connect it to the pc and drag and drop the files/rom into the phone install and you should be good to go

Rear Camera not working after installing MIUI 13.0.8.0

Hello everyone, after years of resolving my issues just by looking here on XDA, it's time that I post an issue with my Poco F2 Pro. Sorry if my english is not correct (i'm from Italy btw).
So, yesterday i got a notification that told me that i could download and install the MIUI latest version (13.0.8.0), and i did it. Later, when I wanted to send a photo i opened the rear camera and "surprise" it wasn't working. Here's what I found out trying some apps:
GCam >> when I open the app, the rear camera comes out but on the screen i see the frontal camera. If I swipe to the rear camera, the app freezes for a bit and then it cloes itself.
Camera's Stock App >> when I open the app, the rear camera comes out but on the screen i see the frontal camera. If I swipe to the rear camera, i visualize the Macro Camera.
Whatsapp >> the app doesn't even give the option to switch to the rear camera (in fact, i think that the app does not detect the rear camera) but i can easily take photos with the frontal camera.
Instagram >> here i have the option to swap to the rear camera but if I do so, the app freezes and it closes itself.
CIT Mode >> when I check for the Rear Camera, i get the error "get the empty or null camera id".
I brought these examples hoping to show that it's not an hardware problem, since before the update I used the phone and the rear camera easy as always, and i think that the update could have compromised or smth the way the phone detects the rear camera. Anybody has the same problem? Or at least anybody knows how to fix that?
MrBeits said:
Hello everyone, after years of resolving my issues just by looking here on XDA, it's time that I post an issue with my Poco F2 Pro. Sorry if my english is not correct (i'm from Italy btw).
So, yesterday i got a notification that told me that i could download and install the MIUI latest version (13.0.8.0), and i did it. Later, when I wanted to send a photo i opened the rear camera and "surprise" it wasn't working. Here's what I found out trying some apps:
GCam >> when I open the app, the rear camera comes out but on the screen i see the frontal camera. If I swipe to the rear camera, the app freezes for a bit and then it cloes itself.
Camera's Stock App >> when I open the app, the rear camera comes out but on the screen i see the frontal camera. If I swipe to the rear camera, i visualize the Macro Camera.
Whatsapp >> the app doesn't even give the option to switch to the rear camera (in fact, i think that the app does not detect the rear camera) but i can easily take photos with the frontal camera.
Instagram >> here i have the option to swap to the rear camera but if I do so, the app freezes and it closes itself.
CIT Mode >> when I check for the Rear Camera, i get the error "get the empty or null camera id".
I brought these examples hoping to show that it's not an hardware problem, since before the update I used the phone and the rear camera easy as always, and i think that the update could have compromised or smth the way the phone detects the rear camera. Anybody has the same problem? Or at least anybody knows how to fix that?
Click to expand...
Click to collapse
Delete all other camera apps, erase all Miui camera data, reboot.
Same, factory reset.
NOSS8 said:
Delete all other camera apps, erase all Miui camera data, reboot.
Same, factory reset.
Click to expand...
Click to collapse
Thx i'll try asap, meanwhile i have a question: erasing all Miui camera data means that I lose the photos that I took with the miui camera?
MrBeits said:
Thx i'll try asap, meanwhile i have a question: erasing all Miui camera data means that I lose the photos that I took with the miui camera?
Click to expand...
Click to collapse
Nope, it's cache and settings.
Also, check permissions, long press camera icon, info/permissions.
NOSS8 said:
Delete all other camera apps, erase all Miui camera data, reboot.
Click to expand...
Click to collapse
This didn't work, i'll try a factory reset when my phone is completely charged
MrBeits said:
This didn't work, i'll try a factory reset when my phone is completely charged
Click to expand...
Click to collapse
Is the bootloader unlocked?
NOSS8 said:
Is the bootloader unlocked?
Click to expand...
Click to collapse
nope, but since i have to do a factory reset a could do it so it's unlocked and i can try different roms, i don't know yet
MrBeits said:
nope, but since i have to do a factory reset a could do it so it's unlocked and i can try different roms, i don't know yet
Click to expand...
Click to collapse
This is indeed the solution if the factory reset does not change anything and before to concluded that there is a hardware problem.

CRDroid v316 GSI (Variant of AOSP-Phh-treble + CRDroid)

You're stuck on MIUI 12.5.4.0 and you cant flash a working custom recovery?
You're too lazy or too newbish to build your own?
Cant flash any Custom Rom?
Well you can just learn how to flash these TREBLE PHH Images, GSI-AOSP based images.
Here i show you how to flash CRDroid v316 . Its based on Android 11R
These images can be flashed with just fastbootd, and they work PERFECTLY, even better than many of the images i've tried here.
You wont have to face hardbricks ever again (specially when flashing MIUI), you can get rid of it once and for all, get rid of Xiaomi and all of its bloatware.
And you can always continue flashing these ROMS or other ROMS (If they're the same Android version or 1 version above). They have root by default most of them.
I made a guide showing how to flash this image.
Xiaomi Redmi 9A 9i 9AT 10A
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Supported Devices: Xiaomi Redmi 9A 9i 9AT 10A​
To flash
Basically you just need:
Stock Recovery
Bootloader Unlocked
vbmeta.img (you can also use the one that comes with your MIUI IMAGE)
ADB/Fastboot
An " arm32_binder64 " image (Also called A64 image) that is compatible with your Android Version. (For example This image of CRDroid crdrom-v316-220330-a64-bvZ.img.xz is compatible for us, its the one being used in the tutorial).
Patience
What works?
Everything works, there are bugs in Display Brightness and Headphones
VOLTE (UNTESTED)
What doesn't Work?
In some images, of A10 - A13, for somer eason, RIL , the Radio Interface Layer is dead, so SIM doesn't work, we need to build Images or somehow work-around it, or try various images, to see which ones work.
So far RIL works perfectly, sim card works in eremitein Images, you will find a link to these images posted on the guide.,
RIL/SIM works in the the CRDroid image i used, it was built/published by eremitein.
All credits go to these people.
Fixes​*Improve Wifi - Disable Wifi Power Saving
Important fix " In many Android 11 custom roms the Wifi in this phone becomes weaker, Less txpower, refresh 3 times max every 2 mins, has sometimes latency, range issues, this will improve it by 10-15%
Open Terminal Emulator
Turn your wifi on like a big man, use:
su
iw dev wlan0 set power_save off
(to check that your wifi powersaving has been turned off, use)
iw dev wlan0 get power_save
exit
exit
(To make this persistent between reboots, use an apk to launch scripts on boot)
*Improve Wlan0 TxPower
(In the future i will add how to change TxPower, lets be patient, im learning too, it seems possible though, i need it for pentesting, i discovered a way to use our precious monitor mode, but its my secret only, if someone teaches me how to improve txpower i will teach them to use monitor mode, we can trade)
*Fix headphone issues, if present, execute these lines on any Terminal Emulator then reboot.
su
setprop persist.sys.overlay.devinputjack true
*Fix brightness/display adjustment,
setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
Please Report if the CRDroid Image works for you. And if you have the Time/Internet available feel free to download other Images from different developers and report if other Images work perfectly or not.
I for my part will stick to this rom for a looooong time, and wait until android 14-16 has released, maybe then i will meditate upon using another phone/rom (because it just works very well for me).
More information can be found here:
https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list/
Well, was stuck on MIUI 12.5.3.0 global, did not wanna test my luck flashing custom recoveries so tried this, so far good, only bug for my is bluetooth can t transmit data, connects ok but no data or music, so i use headphones and everything is ok, ,RIL is ok, don t use volte, auto brightness bug is more or less livable, haven t tested the fix in terminal yet, SOT more than 5hours in a no game scenario, more than 48 hours of charge from 100% to 13%, phone charges as expected, feels very snappy, using a Gcamgo and almost as good as miui cam, excellent work to eremitein.
cvmg333 said:
.... using a Gcamgo and almost as good as miui cam, excellent work to eremitein.
Click to expand...
Click to collapse
Thanks for this! Do you know if camera2 API is enabled in this ROM? By that, I mean do manual camera options like ISO, shutter speed options exist? You can check by installing camera apps like Open Camera.
Thanks.
MaverickNextDoor said:
Thanks for this! Do you know if camera2 API is enabled in this ROM? By that, I mean do manual camera options like ISO, shutter speed options exist? You can check by installing camera apps like Open Camera.
Thanks.
Click to expand...
Click to collapse
Hi, its not enabled by default, but it can be activated in crdroid settings, and yes Open Camera manual options are working.
cvmg333 said:
Hi, its not enabled by default, but it can be activated in crdroid settings, and yes Open Camera manual options are working.
Click to expand...
Click to collapse
Thanks so much!
Found glitch in this Rom, if i turn on lockscreen security by pattern, sudenly home key and recents key stop working, if i deactivate the lockscreen security feature, navbar buttons work as the should again.

Oppo Reno 2z selfie camera won't pop-up, biometrics disabled after ROM flashing

So I found a way to flash my Oppo Reno 2z (MT6779 Soc).
Tried with two different ROMs and the same issue.
1. front camera doesn't pop-up, and the lighting effect setting for this selfie camera is also missing.
2. Face recognition and fingerprint reader disappeared.
Anyone has an idea about how to fix those issues?
All the ROMs I used are stock.
Thanks.
Please ignore the above question, I flashed the phone back to the original ROM (Android 9), all functions are restored and I started receive OTA updates on the phone.
If you have the same issue, please use this ROM to reverse your phone to original state
ROM: Oppo_Reno_2_Z_CPH1945_11_F.59_210723_RFT

Categories

Resources