FORUMS
Remove All Ads from XDA

Magisk Based GCAM Port, AR Sticker Support, Portrait Mode, HEVC Enabled

2,351 posts
Thanks Meter: 1,434
 
By aer0zer0, Recognized Contributor on 5th January 2018, 10:26 PM
Post Reply Email Thread
I have created a Magisk based DIY GCAM port for our PH-1 Phones. It has AR Sticker support, AR Support, HEVC, and Slo-Mo.

Prerequisites:
Stock Oreo 8.1, Stock Oreo DP2 and newer, LOS and other roms based on LOS and others should work too
Magisk 15.0 or newer (Uses 1500 template)
No Other GCAM installed (remove any prior to flashing magisk module)

What it does:

It replaces media_profiles_V1_0.xml in vendor/etc : this allows for hevc, slo-mo
It replaces media_profiles_V1_0.dtd in system/etc : this allows for hevc to be enabled
It adds calibration_cad in system/etc : (AR Related)
It adds ARcore, and ARStickers in system/priv-app: Obvious
It adds handheld_core_hardware.xml in system/etc/permissions: VR Support OREO
It adds handheld_core_hardware.xml in vendor/etc/permissions: VR Support P
It sets postfsdata magisk policy (gives camera_config permissions, and allows it to switch faster when in recents)
It sets ro.config.calibration_cad=/system/etc/calibration_cad.xml

This is a free-for-all zip, meaning i dont care if you modify it, pass it off to other groups, help anybody else, etc.
I am not responsible if you get your phone messed up, it works for me, and for others. I will help as much as i can. Its a work in process, hopefully, it will make life easier for everybody.


Also, this is a Essential PH-1 thread, and while i dont mind helping people (I want everybody to have a working GCAM) this magisk module, especially the media_profiles_V1.0.xml is very very very PH-1 specific. You can however, do the legwork, use this zip as a template, and make one for your threads/personal use as well. And i dont mind. Just dont come in here without a logcat with some phone that's not a PH-1 and say its broke. I will at least look at a logcat and help if its not a PH-1, but my demands have been expressed.

Also, for those with a PH-1... Dont come in here and tell me its broke, not tell me anything relevant, have no logcat, and expect a fix...you will be meme flamed for my amusement...You have been warned. You should know better at this point!!!

Thanks:
@bsg - the originator
@Arnova8G2 - for being kind enough to port GCAM to better our lives
@invisiblek and the rest of the hood at discord - everything gets done there
@S4turno - hosting and being a good sport
@emowing - selinux fixes in magisk
@xterminater07 - sending logs, and doing some testing
@cstark27 - building a settings-less version of GCAM to make life easier, and good help (it's hard to find)
@ArtZ IMX258 color profile improvement and excellent GCAM mods
@urikill another GCAM mod contributor
@Tolyan009 another GCAM mod contributor
@SKULSHADY another GCAM mod contributor

DIY GCAM MODULE V2

https://www.androidfilehost.com/?fid=746163614322268667

DIY GCAM MODULE V1

https://www.androidfilehost.com/?fid=673956719939828557

LINK TO GCAM HOSTING (REPO FOR ALL OF THE GCAM VARIANTS)

https://www.celsoazevedo.com/files/a...google-camera/

OLD FILES

https://www.androidfilehost.com/?w=files&flid=255766 (This is the dump for the V15, V16 flavors)

Enjoy Folks
The Following 85 Users Say Thank You to aer0zer0 For This Useful Post: [ View ] Gift aer0zer0 Ad-Free
 
 
5th January 2018, 10:28 PM |#2  
aer0zer0's Avatar
OP Recognized Contributor
Flag Cortland NY
Thanks Meter: 1,434
 
More
Instuctions on how to use the DIY GCAM Module:

Basically, All GCAM ports Mostly, Fully, Sporadically, Sorta, Sometimes, with Caveats, 100% of the time, 60% of the time, more or less...... work with the PH-1. We are lucky to have a phone that doesn't have the headaches of the OP3/5/T, MI5S, and others that need wacky fixes to make GCAM work properly to some degree (This doesn't mean we don't have our own first world problems)

1. Install the latest DIY GCAM Mod from the Post Above, or for you tinkering sorts, use the one from the post below to have the latest ARCore and AR Stickers (read the post below for why).

2. Click on the link in the OP "REPO FOR GCAM VERSIONS" and pick whatever GCAM you want. it is updated almost daily with new versions, different devs, different features and mods. (Im not going to say which one is the best one, that will start a chain in here not worth reading, choose whatever looks good to you)

FYI: You are responsible for figuring out settings in GCAM need to be ticked/unticked/switched to get results

3. Install the APK and go.
The Following 23 Users Say Thank You to aer0zer0 For This Useful Post: [ View ] Gift aer0zer0 Ad-Free
5th January 2018, 10:28 PM |#3  
aer0zer0's Avatar
OP Recognized Contributor
Flag Cortland NY
Thanks Meter: 1,434
 
More
Updating ARCore:

ARCore is a pain, since our phone isnt "technically" supported, but works well otherwise. What is included in the DIY GCAM MOD v1 and the full camera zips is a older beta release, that uses calibration_cad files in order to set up the orientation, etc. So now they are using .textproto files located in /data/data/com.google.ar.core/files/device_profile_database, and they use the buildid from the buildprop to actively select the right textproto file. So anyways, if you want the latest ARCore, here is how.

The mata textproto file is just a renamed OP3T textproto file. It seems to work, if anybody wants to try different textproto files and see if there is a better one, go ahead.

1. Uninstall any DIY GCAM or Camera.zip and reboot.
2. Install this DIY GCAM https://www.androidfilehost.com/?fid=746163614322268649 (i removed the ARCore, stickers, calibration cad, and added handheld_core_hardware.xml) and reboot.
3. Install a GCAM apk, if you dont have one installed already
4. Install this ARCore https://www.apkmirror.com/apk/google...-apk-download/ its the latest at this time
5. Install this ARStickers https://drive.google.com/open?id=17r...vmSHyrDMAxmKQG i guess its the latest?
6. Open GCAM and try to open AR Stickers (it will crash and FC, it needs to here, this is what it is supposed to do, its creating the device proto location, and the mata textproto isnt there, yet)
7. Download the mata device proto from here https://www.androidfilehost.com/?fid=746163614322268648 its zipped, unzip it get the .textproto file out of it
8. Using a file explore/adb/whatever browse to here /data/data/com.google.ar.core/files/device_profile_database and c/p the mata textproto into this directory (not the zip, the file inside of the zip)
9. Now open GCAM again, and open AR Stickers, it should give you the 3 permission prompts. If you open settings/display and goto advanced, you should see a "When device is in VR" with settings, i have reduce flicker selected. try whatever.

I have not figured out a way to magiskly put that mata textproto file where it needs to go. If somebody figures out how to do all of this with magisk, ill be forever in your debt, lol.

Good luck, and thanks to @starcms for method of doing this
The Following 21 Users Say Thank You to aer0zer0 For This Useful Post: [ View ] Gift aer0zer0 Ad-Free
5th January 2018, 10:32 PM |#4  
Senior Member
Flag VIJAYAWADA/FRANKFORT
Thanks Meter: 147
 
Donate to Me
More
Congrats @aer0zer0, for this work. I know u will pull it off. By teh way gr8 work.
The Following User Says Thank You to deepu458 For This Useful Post: [ View ] Gift deepu458 Ad-Free
5th January 2018, 11:36 PM |#5  
Wickidmasshole's Avatar
Senior Member
Flag Boston Mass
Thanks Meter: 397
 
More
are the download links working for anyone?
The Following User Says Thank You to Wickidmasshole For This Useful Post: [ View ] Gift Wickidmasshole Ad-Free
5th January 2018, 11:54 PM |#6  
aer0zer0's Avatar
OP Recognized Contributor
Flag Cortland NY
Thanks Meter: 1,434
 
More
Quote:
Originally Posted by Wickidmasshole

are the download links working for anyone?

Try without chrome, I name things bad
The Following 2 Users Say Thank You to aer0zer0 For This Useful Post: [ View ] Gift aer0zer0 Ad-Free
6th January 2018, 12:05 AM |#7  
sirdicholas's Avatar
Senior Member
Thanks Meter: 47
 
More
Quote:
Originally Posted by aer0zer0

Try without chrome, I name things bad

Not working for me either. Tried on chrome and edge
6th January 2018, 12:08 AM |#8  
aer0zer0's Avatar
OP Recognized Contributor
Flag Cortland NY
Thanks Meter: 1,434
 
More
Quote:
Originally Posted by sirdicholas

Not working for me either. Tried on chrome and edge

Try without chrome
6th January 2018, 12:10 AM |#9  
sirdicholas's Avatar
Senior Member
Thanks Meter: 47
 
More
Quote:
Originally Posted by aer0zer0

Try without chrome

I did try on edge browser. What browser should I use then?

Edit: also tried with dolphin browser. I can select a mirror, after that it says page not found.
6th January 2018, 12:10 AM |#10  
Member
Thanks Meter: 36
 
More
Here is the selinux fix for you. GCam must be installed in /system/priv-app/

in post-fs-data... replace your setenforce 0 with.. I gave it all permissions but you can trim these down to only the necessary one if you want to test every single permission.

magiskpolicy --live "allow priv_app { camera_prop unlabeled } file { append create write relabelfrom link unlink ioctl getattr setattr read rename lock mounton quotaon audit_access open }"
magiskpolicy --live "allow priv_app { unlabeled qti_debugfs } dir { append create execute write relabelfrom link unlink ioctl getattr setattr read rename lock mounton quotaon rmdir audit_access remove_name add_name reparent execmod search open }"
The Following 6 Users Say Thank You to emowing For This Useful Post: [ View ] Gift emowing Ad-Free
6th January 2018, 12:13 AM |#11  
aer0zer0's Avatar
OP Recognized Contributor
Flag Cortland NY
Thanks Meter: 1,434
 
More
Quote:
Originally Posted by sirdicholas

I did try on edge browser. What browser should I use then?

I use firefox
The Following User Says Thank You to aer0zer0 For This Useful Post: [ View ] Gift aer0zer0 Ad-Free
Post Reply Subscribe to Thread

Tags
gcam, magisk, ph-1

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes