Open inio opened 5 years ago
Got this working, can confirm it still works for the latest apk (v1.17).
Also I figured out the source of the error Physical cameras don't match device profile. Camera not found. camera_id=1, cameras count=0
some people were seeing.
Based on the log files, arCore uses the native camera libraries. Native lib requires LIMTIED
or better Camera2 Api support. You can check your phone with a hardware info app (e.g. Camera2 API Probe), if it says hardware support is LEGACY
, then arCore can't see the cameras, and reports 0 camera found.
Although, apparently some phones can have proper Camera2 API support enabled. Something to look into if you really need ArCore running on your phone
i've tried this method and it work in redmi note 8 2021 but the camera is little bit dark and the tracking isn't the best
can anyone share with me the database profile for redmi note 8 @inio ?
Thank You :)
Seasons greetings!
First off, I want to apologize for nerfing this project with ARCore 1.2. It was an unfortunate side effect of some important changes we had to make and wasn't intended to limit exploration. We think it's cool that users are so excited about ARCore that they're willing to jump through hoops to use it.
Now, on with the gift:
Though undocumented and totally unsupported, ARCore version 1.6 will look for a file at
/data/data/com.google.ar.core/files/custom_device_profile.textproto
before trying to load a profile normally from the database. This file has the same format as any other device profile and can be injected on a an unrooted device by using the backup/restore mechanism provided byadb
as follows:adb backup
to back upcom.google.ar.core
.apps/com.google.ar.core/f/custom_device_profile.textproto
.android-backup-extractor
may be useful in doing the backup modifications, but be careful of the file order (see the documentation).Unfortunately 1.6 adds a wrinkle when figuring out the nearest profile to start from: device profile names are obfuscated. Here's a couple common places to start with (warning: these will probably change with each release):
1U-j16
ggXzI1
zIGRDW
Qualcomm:ngqwNz
Wvs3US
Qualcomm:y3dvz_
Qk0fSK
Qualcomm:6xH1dn
To build a bigger table, you should be able to find a logcat message that reports the name of the profile loaded, so get at it 😉.
Two final notes:
First, this only works on devices where the ARCore background process can run. We've seen some devices (mostly in China) with a security mechanism that prevents background apps without a launcher icon from running. On these devices the ARCore runtime can't access the ARCore ContentProvider, which prevents reading the profile from ARCore's data directory.
Finally, we really only intended this mechanism for internal development use. We're mentioning it here because we see users super excited about running ARCore on additional devices, and agree that having to root your phone to do that is dumb. That said, we really only want to expose this to users already familiar with adb, side-loading, rooting, and the instability and wackyness that can arise from those things. Don't go out of your way to make it easy for novice users run ARCore on unsupported devices, and don't ask for support through official channels. If either of those start happening, we may have to cripple or remove this capability, and I think that's a loss for everyone involved.