RAW/DNG photos on G4? - Moto G4 Questions & Answers

Hey guys, I know that the G4 doesn't have the greatest camera in the world, but I was just wondering for tinkering/P.O.C. purposes if RAW photos are possible. According to freedcam, this phone is only using the camera1 API, which from what I understand does not natively support RAW capture. Would a custom ROM, like that CM13 build being worked on for example, be able to shoot in RAW format even if the phone doesn't originally support it?

LeifEricson said:
Hey guys, I know that the G4 doesn't have the greatest camera in the world, but I was just wondering for tinkering/P.O.C. purposes if RAW photos are possible. According to freedcam, this phone is only using the camera1 API, which from what I understand does not natively support RAW capture. Would a custom ROM, like that CM13 build being worked on for example, be able to shoot in RAW format even if the phone doesn't originally support it?
Click to expand...
Click to collapse
It seems with Motorola you just need to patch the hal add me on telegram at defcomk them send me the camera.msm**** / camera.vendor.***.so found in /system/lib/hw/

I've seen that defcomg found a solution for moto g5 to get raw working by enabling camera2 API. I want to know if I can use the same terminal command for moto g4 plus to get raw, even if with freedcam only

Martinezjpo said:
I've seen that defcomg found a solution for moto g5 to get raw working by enabling camera2 API. I want to know if I can use the same terminal command for moto g4 plus to get raw, even if with freedcam only
Click to expand...
Click to collapse
It should work the same as Moto G5 plus but it seemed nobody was interested

defcomg said:
It should work the same as Moto G5 plus but it seemed nobody was interested
Click to expand...
Click to collapse
I AM!
I've tried the following codes that you posted here:
Enable Camera 2 API
via editing the build.prop
Code:
persist.camera.HAL3.enabled=1
or
via terminal / shell
Code:
su persist.camera.HAL3.enabled 1
I've tried this code via terminal but returned as "Unknown ID" for the string.
Also, this string at the build.prop wasn't available, so I created, but with no sucess enabling raw.
If you want some files to test, I can help you out. Anyway, I'll look for any string related at the build.prop. If I have any sucess, I'll return here.

Martinezjpo said:
I AM!
I've tried the following codes that you posted here:
Enable Camera 2 API
via editing the build.prop
or
via terminal / shell
I've tried this code via terminal but returned as "Unknown ID" for the string.
Also, this string at the build.prop wasn't available, so I created, but with no sucess enabling raw.
If you want some files to test, I can help you out. Anyway, I'll look for any string related at the build.prop. If I have any sucess, I'll return here.
Click to expand...
Click to collapse
From terminal
Type su grant it permission if it ask
Then type setprop persist.camera.HAL3.enable 1
Reboot then in freedcam clear app data start it check in menu if it's on api2

defcomg said:
From terminal
Type su grant it permission if it ask
Then type setprop persist.camera.HAL3.enable 1
Reboot then in freedcam clear app data start it check in menu if it's on api2
Click to expand...
Click to collapse
The command worked. Camera2 API is now enabled and I was able to enable two raw modes: raw_sensor and raw10. Only raw10 "worked", as the other showed black only.
EDIT1: There are DNGs at the FreeDcam files, but when I've tried to open any, the Moto Files app crash repeatedly.
FreeDcam constantly crashes using the Camera2 API, and I couldn't take any pictures with raw enabled. It just freeze when I hit the trigger button and capture no image. It returns with "Error 4" when doesn't crash.
Also, the 2160p recording option was enabled, but didn't seem to work too. Maybe a tweak in the app would solve these problems?

Martinezjpo said:
The command worked. Camera2 API is now enabled and I was able to enable two raw modes: raw_sensor and raw10. Only raw10 "worked", as the other showed black only.
EDIT1: There are DNGs at the FreeDcam files, but when I've tried to open any, the Moto Files app crash repeatedly.
FreeDcam constantly crashes using the Camera2 API, and I couldn't take any pictures with raw enabled. It just freeze when I hit the trigger button and capture no image. It returns with "Error 4" when doesn't crash.
Also, the 2160p recording option was enabled, but didn't seem to work too. Maybe a tweak in the app would solve these problems?
Click to expand...
Click to collapse
Yeah there is a bug with Moto devices where the camera calibration matrix in the dng becomes invalid rendering it useless there is a workaround for that I'm on telegram @defcomk I'll forward you an apk to test

defcomg said:
Yeah there is a bug with Moto devices where the camera calibration matrix in the dng becomes invalid rendering it useless there is a workaround for that I'm on telegram @defcomk I'll forward you an apk to test
Click to expand...
Click to collapse
Maybe I can help you by testing whatever you're going to develope. ? Seems enabling camera 2 api is not enough for this device. Good luck with your work.

[email protected] said:
Maybe I can help you by testing whatever you're going to develope. ? Seems enabling camera 2 api is not enough for this device. Good luck with your work.
Click to expand...
Click to collapse
I got a g5 plus had the same bug anyway I just hardcoded the metadata that was incorrect all's well

defcomg said:
I got a g5 plus had the same bug anyway I just hardcoded the metadata that was incorrect all's well
Click to expand...
Click to collapse
What changes you made in metadata? Can you help me with that?

Martinezjpo said:
I AM!
I've tried the following codes that you posted here:
Enable Camera 2 API
via editing the build.prop
or
via terminal / shell
I've tried this code via terminal but returned as "Unknown ID" for the string.
Also, this string at the build.prop wasn't available, so I created, but with no sucess enabling raw.
If you want some files to test, I can help you out. Anyway, I'll look for any string related at the build.prop. If I have any sucess, I'll return here.
Click to expand...
Click to collapse
Is it for Moto G5 or G4

Related

Enable DCI-P3 for OP3T with S6E3FA5 display panel

Update: Thanks to @MishaalRahman for the great summary article. More discussion there.
Update: Thanks to @GR0S for the app solution, available in this post
Update: Thanks to @doubleaykay for the magisk module, available in this post
I am no developer but I was researching the OP5 DCI-P3 calibration, saw that some international users were able to activate the calibration on their OP3T, and thought I would share what I have found so far. Long story short, this probably works if your device is a OP3T with the S6E3FA5 display panel, but not if your device is a OP3T with the S6E3FA3 display panel.
Note: I believe this changes the actual calibration for the "Default" selection in the display settings, but you will not see the name "Default" change to "DCI-P3"
Sources:
Credit to @rquandt on Twitter for getting the ball rolling: Tweet
Proposed command-line solution from ITHome: Link
Proposed modified apk solution from OnePlusBBS: Link
More discussion from OnePlusBBS: Link
Even longer thread (86 pages) from OnePlusBBS: Link
Even longer thread (583 pages) from OnePlusBBS: Link
This post to Weibo discusses S6E3FA5 vs S6E3FA3 compatibility: Post
Procedure:
Find out if your display panel is compatible (looking for S6E3FA5)
Install AIDA64 and check Display > "Panel ID"
(optional) I also checked to see if the profiles were available on my OP3T running Oxygen OS Open Beta 9 using a file explorer.
Open Terminal Emulator on your phone and enter these two commands:
Code:
su
echo 1 > sys/devices/virtual/graphics/fb0/DCI_P3
The changes will revert to previous configuration on reboot, so this must be re-applied after reboot.
To revert changes
Open Terminal Emulator on your phone and enter these two commands:
Code:
su
echo 0 > sys/devices/virtual/graphics/fb0/DCI_P3
I'm on VertexOS and DCI-P3 profile is not available in said location. Will flash OB9 and report back.
---------- Post added at 03:53 PM ---------- Previous post was at 03:20 PM ----------
It works perfectly, no need to reboot. Looks great, think I will keep it for a while.
I have S6E3FA5. DCI-P3 file is available in it's location. Just tried on Freedom OS 4.1.6, and nothing. Phone switches back to sRGB after reboot... not sure how to actually confirm it's DCI-P3....
twoxa said:
I have S6E3FA5. DCI-P3 file is available in it's location. Just tried on Freedom OS 4.1.6, and nothing. Phone switches back to sRGB after reboot... not sure how to actually confirm it's DCI-P3....
Click to expand...
Click to collapse
You can immediately see the difference in color after issuing the command on Terminal Emulator, especially if sRGB is enabled. DCI-P3 is a lot more colorful, but not quite as the default calibration, which is borderline psychodelic. The selected calibration will still read "sRGB" though, as this new standard isn't officialy included in OP3T software. And yes, after a reboot, calibration will return either to standard values, or sRGB.
Yup got it now, thanks. Looks nice. Too bad it doesn't stick after reboot.
twoxa said:
Yup got it now, thanks. Looks nice. Too bad it doesn't stick after reboot.
Click to expand...
Click to collapse
Yup, that's a shame. Nothing a quick script in Tasker can't fix, though.
redsmith said:
You can immediately see the difference in color after issuing the command on Terminal Emulator, especially if sRGB is enabled.
Click to expand...
Click to collapse
Cool, sounds like it works even if you don't select "Default" before running the commands. Thanks!
redsmith said:
It works perfectly, no need to reboot. Looks great, think I will keep it for a while.
Click to expand...
Click to collapse
twoxa said:
Phone switches back to sRGB after reboot...
Click to expand...
Click to collapse
redsmith said:
after a reboot, calibration will return either to standard values, or sRGB.
Click to expand...
Click to collapse
I'll update the instructions accordingly. Thanks!
redsmith said:
Yup, that's a shame. Nothing a quick script in Tasker can't fix, though.
Click to expand...
Click to collapse
So i think it's useless for now!
Let's hope for a magisk module,maybe...
Still trying to see if there's a way to enable a setting to allow this to work on S6E3FA3 display panels.
Found this mention of a "OPScreenColorMode.java" configuration file on the OP3T but I can't find where that would be on the device.
I decompiled the Settings.apk and couldn't find the file, but I did see a mention of that synonym (as well as OPNightMode and OPReadingMode) inside "display_settings.xml":
Code:
<PreferenceScreen android:title="@string/oneplus_night_mode_enabled_op" android:key="oneplus_night_mode" android:fragment="com.oneplus.settings.better.OPNightMode" />
<PreferenceScreen android:title="@string/oneplus_reading_mode" android:key="oneplus_reading_mode" android:fragment="com.oneplus.settings.better.OPReadingMode" />
<PreferenceScreen android:title="@string/oneplus_screen_color_mode_title" android:key="screen_color_mode" android:fragment="com.oneplus.settings.better.OPScreenColorMode" />
Not sure where to go from here, though.
soccerwuedo5 said:
Not sure where to go from here, though.
Click to expand...
Click to collapse
It won't be there on not supported devices as there is a condition to remove that preference as shown in your attached screenshot.
Hi all,
I packaged this into a Magisk module for everyone to enjoy. It simply runs the provided command as part of the Magisk late_start service.
Here is a link to the GitHub repo: https://github.com/doubleaykay/DCI-P3_Enabler_OP3T. I have submitted it to the repo.
In the meantime, I have attached a zip you can install in Magisk.
I have tested it on my own device and it works perfectly!
Enjoy!
Edit: Yes, this allows it to persist through reboots!
nicesoni_ash said:
It won't be there on not supported devices as there is a condition to remove that preference as shown in your attached screenshot.
Click to expand...
Click to collapse
Thanks for taking a look! It seems the guys on OnePlusBBS have overridden that removal for compatible devices to add the menu items back in on the OP3T. It's over my head but maybe someone can replicate their efforts here.
Root required
Will add srgb button tomorrow
GR0S said:
Root required
Will add srgb button tomorrow
Click to expand...
Click to collapse
I have an A3 display and I still see a change when using DCI-P3!
vampire36 said:
I have an A3 display and I still see a change when using DCI-P3!
Click to expand...
Click to collapse
That's awesome! I tried the app and saw no change but maybe there's some other variable involved.
Magisk module isn't working for me, but the command is
Navi44 said:
Magisk module isn't working for me, but the command is
Click to expand...
Click to collapse
You could at least be more specific and include OxygenOS version and Magisk version for him/her to compare. . .
I have the A5 panel on my 3T, and magisk module isn't working for me. Currently running FreedomOS 2.11.2 with Blu_Spark kernel r151 and Magisk v13. Let me know if there's any other information I should add.
tzbigworm said:
I have the A5 panel on my 3T, and magisk module isn't working for me. Currently running FreedomOS 2.11.2 with Blu_Spark kernel r151 and Magisk v13. Let me know if there's any other information I should add.
Click to expand...
Click to collapse
That is bizzare, maybe it's an issue with Magisk v13. Could you post your Magisk log?
I am using Magisk v12, the stable release, and it works perfectly fine for me.... odd.
Could we have more people test the Magisk module to make sure it works?
GR0S said:
Root required
Will add srgb button tomorrow
Click to expand...
Click to collapse
This works like a charm! The colours take a bit of getting used to though.

[GUIDE] How to properly change / remove zoom error in eui/miuipro

Guys as we all know when we root our eui we get stuck with zoom sheeting on every app.
But I have found out a fix.
First things first tools required:
1:terminal emulator
2:build prop editor / root file manager
Fix:
Go ahead and open terminal emulator.
Enter the following code
Su
And click enter
wm density ###
### us where you input the amount of DPI you want 420 is normal DPI
-1st part done!
Now open build prop editor
Next Look for "ro.sf.lcd_density=###"
Change ### to previous value which you have set in terminal emulator.
Reboot!
Done!
Now you may think I might have done this in some DPI app but it will make more problems than solving it . believe me!
Special thanks my friend: snehashish
For providing me the fix
Hit thanks if you like my work!
Cheers:highfive:
Guys you can also use this to properly change DPI in eui and miui pro without font or clock glitches.:good:
Gautham V said:
Guys as we all know when we root our eui we get stuck with zoom sheeting on every app.
But I have found out a fix.
First things first tools required:
1:terminal emulator
2:build prop editor / root file manager
Fix:
Go ahead and open terminal emulator.
Enter the following code
Su
And click enter
wm density ###
### us where you input the amount of DPI you want 420 is normal DPI
-1st part done!
Now open build prop editor
Next Look for "ro.sf.lcd_density=###"
Change ### to previous value which you have set in terminal emulator.
Reboot!
Done!
Now you may think I might have done this in some DPI app but it will make more problems than solving it . believe me!
Special thanks my friend: snehashish
For providing me the fix
Hit thanks if you like my work!
Cheers:highfive:
Click to expand...
Click to collapse
The first part works. The second part does not: there is no ro.sf.lcd_density setting in the build.prop. And the settings app still reports the display as zoomed.
emkorial said:
The first part works. The second part does not: there is no ro.sf.lcd_density setting in the build.prop. And the settings app still reports the display as zoomed.
Click to expand...
Click to collapse
It does still say zoomed in settings but it is not
emkorial said:
The first part works. The second part does not: there is no ro.sf.lcd_density setting in the build.prop. And the settings app still reports the display as zoomed.
Click to expand...
Click to collapse
You wil fund the line ro.sf.lcd_density in all ROM except eUI, in eUI you can search for persist.ro.sf.lcd_density
Or similar to this one but that line start with persist
after doing this trick in miui pro rom i am continuously getting an error that system stopped
Rajashekar0675 said:
after doing this trick in miui pro rom i am continuously getting an error that system stopped
Click to expand...
Click to collapse
You must have messed somewhere
I tried the fix and didnt get any errors, but it still randomly switches from zoom mode to normal when opening apps. I really only notice it in gmail and chrome.
Guess changing the DPI has resulted in zoomed in pictures when cropping, cropping happens right as the markers indicate but the crop preview is zoomed in which makes it impossible to edit pictures. Is there a solution/hack for this?

[TREBLE]How to install Android P PPR2 sGSI on Cedric

Code:
#include<disclaimer.h>
Your warranty is now void.
I'm not responsible for bricked devices, dead SD cards,
Thermonuclear wars, or you getting fired because the alarm app failed.
Please note that this is an unofficial ported sGSI and do some research before flashing it.
If you point your finger at me for messing your device, I'll laugh at you!
INSTALL INSTRUCTIONS:
Flash the TWRP with treble support by @CodeZero.
Clear /system, /data and /cache.
Install the Lineage treble build.
Extract the .xz file and install the P-semiGSI PPR2[A-ONLY].img as system image.
Mount vendor using TWRP.
Install the Post sGSI zips.
Install the POST-sGSI-v1.2-cedric.zip.
Reboot to system.
Install the Google Play services.apk
Reboot again.
You're all set. Enjoy!
KNOWN ISSUES:
Same issues as lineage treble and:
Moto Actions crash.
Google Camera settings crash.
Download links:
TWRP by treble support: https://drive.google.com/open?id=14_xqaSHx2X8Oav5WMdRW6tXnpTBN4pgW
Lineage treble build: https://drive.google.com/uc?id=16Ix6nqqyXS6VjkShsH_CCfCZMzpiL_Ah
P-semiGSI PPR2[A-ONLY] and Post sGSI.zips: https://drive.google.com/open?id=1k-9kmsX2ZxNxc_9hZGify7OqBvukjfYa
POST-sGSI-v1.2-cedric.zip: https://drive.google.com/open?id=1_jFz42FYp-B7bjkm17faQmBAnYW21XHY
Google Play services apk: https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-14-3-66-release/google-play-services-14-3-66-100400-213742215-android-apk-download/
More info:
Original PR2[A-ONLY] Thread.
Original P-semiGSI thread.
i will try, today, ty
how can i take video treble roms?
I was able to install Android PPR2 on the Cedric Moto G5.
But the cell phone got hotter.
I think it is a bug in the kernel, because I try to change some options with the "Kernel Adiutor" app but when restarting the smartphone the settings are not applied and they return to the default. In addition there is a small bub in the notifications.
The camera was able to record videos with the program "A Beter Camera".
Moto Actions does not work.
filipedonato said:
I was able to install Android PPR2 on the Cedric Moto G5.
But the cell phone got hotter.
I think it is a bug in the kernel, because I try to change some options with the "Kernel Adiutor" app but when restarting the smartphone the settings are not applied and they return to the default. In addition there is a small bub in the notifications.
The camera was able to record videos with the program "A Beter Camera".
Moto Actions does not work.
Click to expand...
Click to collapse
Does phone calls work, if "preferred network" is set on 4G/LTE? This was a problem, when I tested PPR1.
kare_meesner said:
Does phone calls work, if "preferred network" is set on 4G/LTE? This was a problem, when I tested PPR1.
Click to expand...
Click to collapse
I'm sorry but I have not tested this feature. Because the phone heats up a lot and was only connected on Wifi, I imagine if I had used the 4G network how much it would heat up even more.
filipedonato said:
I was able to install Android PPR2 on the Cedric Moto G5.
But the cell phone got hotter.
I think it is a bug in the kernel, because I try to change some options with the "Kernel Adiutor" app but when restarting the smartphone the settings are not applied and they return to the default. In addition there is a small bub in the notifications.
The camera was able to record videos with the program "A Beter Camera".
Moto Actions does not work.
Click to expand...
Click to collapse
Maybe that's a kernel issue. We'll have to wait until we get a new kernel for Android P, so there's nothing much we can do about it.
Also, the Moto actions is a vendor issue and needs to be fixed on the vendor itself. So, I can't do anything about it and we need to wait until it gets fixed/we get a new base.
kare_meesner said:
Does phone calls work, if "preferred network" is set on 4G/LTE? This was a problem, when I tested PPR1.
Click to expand...
Click to collapse
Yeah they do work, unless you're using jio/any network which doesn't support network fallback cause volte doesn't work and I'm not gonna fix it at any costs.
filipedonato said:
I was able to install Android PPR2 on the Cedric Moto G5.
But the cell phone got hotter.
I think it is a bug in the kernel, because I try to change some options with the "Kernel Adiutor" app but when restarting the smartphone the settings are not applied and they return to the default. In addition there is a small bub in the notifications.
The camera was able to record videos with the program "A Beter Camera".
Moto Actions does not work.
Click to expand...
Click to collapse
Failed record video my moto g5
Amazing and fast!!
AsusZenFone3Deluxe said:
Failed record video my moto g5
Click to expand...
Click to collapse
Turn on the HDR mode
Just asking if anybody knows when a proper, normal, easily flashable rom for pie on the Moto g5 Cedric would be released because I've seen many devices older than this one such as the 2nd gen Moto E receive pie and older Moto g's. Just asking don't want to offend anyone.
Thanks,
johnnywilly16 said:
Amazing and fast!!
Click to expand...
Click to collapse
Is it stable for everyday use? Have you found any majour issues?
Thanks in advance

[Guide] How to Enable Miracast for Pixel

Introduction
Few weeks ago, I got a Pixel 1 as my backup phone, when I try to connect it to the Microsoft Wireless Display Adapter, it couldn't find the Adapter.
I haven't used Android phones for a long time. In my mind, Android natively supports Miracast. After some searching, I was frightened to find that Google has removed Miracast from Android.
I was really disappointed because I often cast my Windows devices easily by using Miracast. My Projector has only two HDMI ports, one for HDMI cable, and one for Wireless Display Adapter. I can't add a Chromecast unless a HDMI switch is used.
One possible solution is to add a line "persist.debug.wfd.enable=1" in "build.prop" to enable WiFi-Display, but many people say that it doesn't work since Android N, the phone can discover WiFi-Displays but unable to cast.
Since Android framework is open source, I did some searching and found that some WiFi-Display related code still exists. Android 9 still keeps the WifiDisplayAdapter in DisplayManagerService, but removed WifiDisplay from MediaPlayerService, that's why we can discover WiFi-Displays but can't cast.
I recovered some code from AOSP history commits, fixed the build errors, and debugged on my Pixel, finally the Miracast can work on my Pixel.
If you also want Miracast to work on your Google phones, you can follow my steps, but first make sure your ROM is open source so that you can change and rebuild it.
If you have a Pixel 1 running the same version of system, you can simply replace some files in your system with the files I built.
If you have other Google phones or running different versions, you can apply my patch to AOSP, and build it by yourself. I have built the latest version for all Google Pixel phones, but I haven't tested except Pixel 1.
If your ROM is not open source, I will no longer be able to help, since MediaPlayerService may have been changed by your ROM, you may can't replace it with the AOSP version.
Prerequisites
Pixel running Android 9.0.0 build number PQ1A.181205.002.A1 or PQ1A.190105.004.
Bootloader unlocked.
adb and fastboot tools and drivers are working for your device.
Note & Disclaimer
These steps will change files in your system, your Pixel should run the exact same version of system. Pushing files to different versions of system may cause unknown problems.
Please check carefully before running each command, a mistaken operation may result in unable to boot up, or destroy your data, or even damage your phone.
If you are not sure about what these steps are doing, but still want to go ahead, please backup your phone firstly, you may not be able to recover your phone to its original state.
I have only tested on Pixel 1 with build number PQ1A.181205.002.A1 and PQ1A.190105.004, for other phones or versions, you should build and test on your own.
Basic Steps
Flash the same version of factory image for your phone.
Download the prebuilt files from https://github.com/sbjbs/android-wfd-patch
Add this line into "build.prop", without it, we will not be able to enable WiFi-Display:
Code:
persist.debug.wfd.enable=1
Replace some files in system:
Code:
system/lib/libaudioflinger.so
system/lib64/libaudioflinger.so
system/lib/libserviceutility.so
system/lib64/libserviceutility.so
system/lib/libmedia.so
system/lib64/libmedia.so
system/lib/libwilhelm.so
system/lib64/libwilhelm.so
system/lib/libandroid_runtime.so
system/lib64/libandroid_runtime.so
system/lib/libstagefright.so
system/lib64/libstagefright.so
system/lib/libstagefright_wfd.so
system/lib64/libstagefright_wfd.so
system/lib/libmediaplayerservice.so
If you have magisk installed, you can refer to Phoenix Wright's post:
Phoenix Wright said:
using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent.
using magisk to overlay them on /system
Click to expand...
Click to collapse
Some extra steps that you may need
Remove dm-verity metadata of system.img
The dm-verity can prevent us from changing the system, and what's more it has a forward-error-correction(FEC) feature, which can detect and correct some corrupted data.
I spend a lot of time on attempting to change the build.prop but fail again and again, it just always correct the file, and I can't enable wifi-display.
I don't know how to disable it. Since the error-correcting info should be stored in the dm-verity metadata, I just removed the dm-verity metadata from the stock system.img, and flash the system.img.
I will list the steps to remove dm-verity metadata, but if you can disable dm-verity entirely, that should work too.
For phones that have a vbmeta partition (like Pixel 2), seems you can flash an special vbmeta.img to disable AVB. You can build the empty vbmeta image by this command, but I don't have a device to test if it works:
Code:
avbtool make_vbmeta_image --flag 2 --padding_size 4096 --output vbmeta.img
For Pixel 1, we need to remove dm-verity metadata that attached to system.img, first convert the sparse system.img to an ext4 image:
Code:
simg2img system.img system.ext4.img
read the block count to calculate the system size:
Code:
od -j 1028 -An -N4 -tu system.ext4.img
for Pixel 1, it should be 516099. You also can read it by a Hex Editor, e.g., WinHEX in Windows, read 4 bytes starting from 1028 bytes, as a little-endian hex value.
so the real system partition size is 516099 * 4096 = 2113941504 bytes.
we need to set the data to zero after that position. It's important to do this, since we need to overwrite the metadata in that area, rather than just truncate the size of system.img.
next get the ext4 image size, for Pixel PQ1A.181205.002.A1, it should be 2147483648.
so we need to write 2147483648 - 2113941504 = 33542144 bytes:
Code:
dd if=/dev/zero of=system.ext4.img seek=2113941504 count=33542144 oflag=seek_bytes iflag=count_bytes
we also can use some other tools to do this, e.g., WinHEX in Windows. Open the file in in-place mode, and jump to 2113941504, and select it as the begin, and jump to the end, and select as the end, and fill the selection with all zero.
after that, flash the changed system.ext4.img to Pixel:
Code:
fastboot flash system system.ext4.img
Test that you can boot up normally. If not, check what's wrong and fix it.
Temporary boot up by TWRP image
We don't have to install TWRP, but just use it to temporary boot up, so that we can mount the system partition for writing. If you have TWRP installed, you can just boot to TWRP.
Download TWRP image for pixel, just need the twrp.img, we won't install the zip file.
boot your device to bootloader:
Code:
adb reboot bootloader
and boot by the twrp.img
Code:
fastboot boot twrp.img
after TWRP booted up, just leave it there, no need to unlock or input password, we will change the system by adb.
Mount system partition for writing.
In the current version of TWRP for Pixel (twrp-3.2.3-1-sailfish.img), its fstab has an entry for system partition, we can directly mount it.
Code:
adb shell mount /system
run mount to check if successfully mounted:
Code:
adb shell mount
you should see an entry like this:
Code:
/dev/block/sda34 on /system type ext4 (rw,seclabel,relatime)
If not, you should stop now, and check the above steps.
after mount, we can use adb to push files into system.
Hey guy,
You helped me a lot to understand why it was not working with Pie. I tried several custom ROMs + the official Pie and it was not working.
There is Wireless display option in quick settings but it' doesn't find my Microsoft Wireless Display Adaptor also.
I so downgrade to Oreo. With Oreo it works without any issue. (there is an option "allow Wireless display" to tick and then your miracast dongle will appear).
You did a great job to make it working on Pie. Congratulations. I will anyway stay on Oreo. I think google will change that (many people already complained i guess).
Jean Michel
jean_michmich said:
Hey guy,
You helped me a lot to understand why it was not working with Pie. I tried several custom ROMs + the official Pie and it was not working.
There is Wireless display option in quick settings but it' doesn't find my Microsoft Wireless Display Adaptor also.
I so downgrade to Oreo. With Oreo it works without any issue. (there is an option "allow Wireless display" to tick and then your miracast dongle will appear).
You did a great job to make it working on Pie. Congratulations. I will anyway stay on Oreo. I think google will change that (many people already complained i guess).
Jean Michel
Click to expand...
Click to collapse
Thanks for your reply!
I have tested on Pie on my Pixel, I often play online games while cast is on, and didn't meet any problems last week.
I also hope that Google will support Miracast again in the future, but it seems unlikely in the near future.
Google has abandoned it since Android 6 (source: Wikipedia), and now they're deleting unused source code related to wifi-display.
I'm more worried about that there will be more build errors and potential issues when we try to enable it for future Android versions.
sbjbs said:
Thanks for your reply!
I have tested on Pie on my Pixel, I often play online games while cast is on, and didn't meet any problems last week.
I also hope that Google will support Miracast again in the future, but it seems unlikely in the near future.
Google has abandoned it since Android 6 (source: Wikipedia), and now they're deleting unused source code related to wifi-display.
I'm more worried about that there will be more build errors and potential issues when we try to enable it for future Android versions.
Click to expand...
Click to collapse
OK it's getting more clear. You are right. Wikipedia says : "but support was dropped with Android 6.0 Marshmallow in 2015 in favor of Google's own proprietary Google Cast protocol.[15] Some manufacturers of Android devices step in and support Miracast through their software"
I'm not an "official android ROM" user.
I always use Pixel Dust custom ROM. For this custom ROM, Miracast was supported for Oreo but not for Pie (not yet).
jean_michmich said:
OK it's getting more clear. You are right. Wikipedia says : "but support was dropped with Android 6.0 Marshmallow in 2015 in favor of Google's own proprietary Google Cast protocol.[15] Some manufacturers of Android devices step in and support Miracast through their software"
I'm not an "official android ROM" user.
I always use Pixel Dust custom ROM. For this custom ROM, Miracast was supported for Oreo but not for Pie (not yet).
Click to expand...
Click to collapse
I used to be a ‘latest official ROM’ user
For custom ROMs, since they may have changed the framework, we can't replace files with AOSP version, but as long as they're open source, we can try to contribute to it.
Adding Miracast support in Android is not difficult, and many manufactures have their own support.
I hope your custom ROM will support Miracast for Pie in the near future.
Tested on Pixel 2 XL and working (for what it's worth, using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent). I built the .so files on my local aosp tree and I'm using magisk to overlay them on /system.
Hi @sbjbs
If I understand you right then you have patched the AOSP codebase. Would you mind sharing the repositories/commits on your GitHub? That would be highly appreciated. :good:
Regards
spezi
Sent from my Pixel 3 using XDA Labs
spezi77 said:
Hi @sbjbs
If I understand you right then you have patched the AOSP codebase. Would you mind sharing the repositories/commits on your GitHub? That would be highly appreciated. :good:
Regards
spezi
Sent from my Pixel 3 using XDA Labs
Click to expand...
Click to collapse
There's a link in the OP: https://github.com/sbjbs/android-wfd-patch/tree/master/patches/android-9.0.0
Phoenix Wright said:
Tested on Pixel 2 XL and working (for what it's worth, using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent). I built the .so files on my local aosp tree and I'm using magisk to overlay them on /system.
Click to expand...
Click to collapse
Great to hear that!
You method is simpler and more elegant, that's awesome!
Phoenix Wright said:
Tested on Pixel 2 XL and working (for what it's worth, using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent). I built the .so files on my local aosp tree and I'm using magisk to overlay them on /system.
Click to expand...
Click to collapse
Can you elaborate how you did use "magisk to overlay them on /system"?
I pushed them using adb as mentioned on github but it is stuck at Google splash screen. I've taimen BTW and am on Pixeldust ROM. It booted while writing this post but the screen was not responding to touch.
Nitin
nitin.chobhe said:
Can you elaborate how you did use "magisk to overlay them on /system"?
I pushed them using adb as mentioned on github but it is stuck at Google splash screen. I've taimen BTW and am on Pixeldust ROM. It booted while writing this post but the screen was not responding to touch.
Nitin
Click to expand...
Click to collapse
I made a module with the .so files I compiled: https://workupload.com/file/pd4EUBdw
Note that I can't vouch for this to work on your ROM, it works on taimen on stock 9.0 with January security patches though.
nitin.chobhe said:
Can you elaborate how you did use "magisk to overlay them on /system"?
I pushed them using adb as mentioned on github but it is stuck at Google splash screen. I've taimen BTW and am on Pixeldust ROM. It booted while writing this post but the screen was not responding to touch.
Nitin
Click to expand...
Click to collapse
Did you build the so files for your ROM from source? the patch has changed the interface of IMediaPlayerService, if anything else in your ROM is using IMediaPlayerService.h, you'd better rebuild and replace them.
that's why I uploaded the libwilhelm.so and libandroid_runtime.so, even though I didn't change the source code of them.
Phoenix Wright said:
I made a module with the .so files I compiled: https://workupload.com/file/pd4EUBdw
Note that I can't vouch for this to work on your ROM, it works on taimen on stock 9.0 with January security patches though.
Click to expand...
Click to collapse
Thanks!
sbjbs said:
Did you build the so files for your ROM from source? the patch has changed the interface of IMediaPlayerService, if anything else in your ROM is using IMediaPlayerService.h, you'd better rebuild and replace them.
that's why I uploaded the libwilhelm.so and libandroid_runtime.so, even though I didn't change the source code of them.
Click to expand...
Click to collapse
I tried building with my ROM but I got build errors related to OMX.h, I need to find a solution for them. Thanks anyways!
Nitin
Someone tries on Pixel 3? Thanks
It works perfectly ! I used the prebuilt files on the march build.
Do you know if we can force the 16/9 ratio ?
Thanks
edit : I will try with second screens !
this works a treat on my Pixel 3 XL (Stock Pie) just overlayed the files from Phoenix Wright using magisk and it works now....sweet thanks, now just need to figure out how to fool sky sports app into letting me cast.....
marshyrob said:
this works a treat on my Pixel 3 XL (Stock Pie) just overlayed the files from Phoenix Wright using magisk and it works now....sweet thanks, now just need to figure out how to fool sky sports app into letting me cast.....
Click to expand...
Click to collapse
Can you explain more how did you do?
Did you just flash the zip from Phoenix Wright in Magisk?
EMJI79 said:
Can you explain more how did you do?
Did you just flash the zip from Phoenix Wright in Magisk?
Click to expand...
Click to collapse
Yes just copied the .zip file from Phoenix Wright's post to my device then used the module install option in Magisk like if you are installing a module found in Magisk (use the plus sign to add your own .zip file instead and browse to the file you just saved) then reboot. Then i went to the cast option in settings - connected devices - connection preferences, there i could tick in the top right corner under the 3 dots "enable wireless display" and it showed my Panasonic TV, chose connected and boom it connected. Needed to enable the mirroring option on my Panasonic but this is a TV setting nothing to do with the phone, you might need to do a similar step based on your TV as they need to be able to see each other.
marshyrob said:
Yes just copied the .zip file from Phoenix Wright's post to my device then used the module install option in Magisk like if you are installing a module found in Magisk (use the plus sign to add your own .zip file instead and browse to the file you just saved) then reboot. Then i went to the cast option in settings - connected devices - connection preferences, there i could tick in the top right corner under the 3 dots "enable wireless display" and it showed my Panasonic TV, chose connected and boom it connected. Needed to enable the mirroring option on my Panasonic but this is a TV setting nothing to do with the phone, you might need to do a similar step based on your TV as they need to be able to see each other.
Click to expand...
Click to collapse
It did work today with my Sony television.
Thanks!
OMG!!! You made my week. Few hiccups tho....
Can anyone else confirm that Hulu and HBO go and Amazon prime . YouTube works.
Hulu and amazon I can log on but when it plays all you get is audio. Haven't tried Netflix I don't sub them.
HBO go as soon as I try to play a video it says this video cannot be played. If I disable the mirror it plays perfectly. Same thing with Hulu and prime. Disable the mirror an it works perfectly on my phone.

Oneplus 8 pro - Android 13 - Call recording AND spam blocker

Now i use joneplus tools + oneplus mod dialer for call recording on Android 13.
I miss a spam call blocker...
Any solution to have the automatic call recording function AND spam call blocker with Android 13?
Thanks.
Try using the Google Dialer with the Pixelify Magisk Module.
ChIP_83 said:
Now i use joneplus tools + oneplus mod dialer for call recording on Android 13.
I miss a spam call blocker...
Any solution to have the automatic call recording function AND spam call blocker with Android 13?
Thanks.
Click to expand...
Click to collapse
Hey there, Can you please explain how did you managed to use call recording on Android 13? I have Oneplus 8 pro IN2025 and can't find solution to make Call Recording work after the upgrade to Android 13 from 12
yaniv.s said:
Hey there, Can you please explain how did you managed to use call recording on Android 13? I have Oneplus 8 pro IN2025 and can't find solution to make Call Recording work after the upgrade to Android 13 from 12
Click to expand...
Click to collapse
I solved it like this:
I installed joneplus tools (from the playstore I know that it doesn't work anymore so it must be installed from the apk - in reality I had already installed it)
set the permissions via ADB as required by the various guides (remember to enable Disable Permission Monitoring in developper options)
loaded the modified oneplus dialer
doing so everything works as before, with the difference that I no longer have the screen where I can change the recording options in the dialer, but the recordings still start automatically (I think it is due to the fact that the "modified dialer" goes to "modify " call screen only.
ChIP_83 said:
I solved it like this:
I installed joneplus tools (from the playstore I know that it doesn't work anymore so it must be installed from the apk - in reality I had already installed it)
set the permissions via ADB as required by the various guides
loaded the modified oneplus dialer
doing so everything works as before, with the difference that I no longer have the screen where I can change the recording options in the dialer, but the recordings still start automatically (I think it is due to the fact that the "modified dialer" goes to "modify " call screen only.
Click to expand...
Click to collapse
Thank you sooo much !!! The modified app was the part missing
ChIP_83 said:
I solved it like this:
I installed joneplus tools (from the playstore I know that it doesn't work anymore so it must be installed from the apk - in reality I had already installed it)
set the permissions via ADB as required by the various guides (remember to enable Disable Permission Monitoring in developper options)
loaded the modified oneplus dialer
doing so everything works as before, with the difference that I no longer have the screen where I can change the recording options in the dialer, but the recordings still start automatically (I think it is due to the fact that the "modified dialer" goes to "modify " call screen only.
Click to expand...
Click to collapse
hi ChiP_83,
about the ADB command in step #2, is it
"/adb shell settings put global op_voice_recording_supported_by_mcc 1"?
thanks in advance
This was working on android 11
ADB command with joneplus tools installed
adb shell pm grant net.jroot3d.joneplustools android.permission.WRITE_SECURE_SETTINGS
ADB command without installing joneplus tools
adb shell settings put global op_voice_recording_supported_by_mcc 1
Hi all. I just tied to set call recording, install joneplus tools, and granted write through adb, install modified dialer, but no luck, call recording not visible. If i try update my regular phone app, looks like it finished with success, but can't find same version number..
Well new android version IN2025_11_F62 and no call recorder again.. any solutions?

Categories

Resources