The Google Pixel smartphones (both the 1st and 2nd generation) received an awesome new feature yesterday: Augmented Reality stickers. These AR stickers allow users to place 3D digital objects inside of their smartphone's camera viewfinder. The first AR stickers centered around characters from the Star Wars and Stranger Things franchises, and they're pretty fun to play around with. The feature is officially exclusive to the Google Pixel smartphones, however, but that doesn't mean it can't be brought to other smartphones. Today, we'll show you how to enable the Google Pixel AR stickers on any rooted Nexus 5X or Nexus 6P running Android 8.1. We'll also show you how to get it running on the OnePlus 3, OnePlus 3T, and Xiaomi Mi 5.
A demonstration of AR Stickers by Google
Enable AR Stickers on Rooted Nexus 5x or Nexus 6P Running Android 8.1
How is this possible? It's because the AR stickers are coded to only work on the Google Pixel phones, but the restrictions are actually fairly easy to spoof. Decompiling the APK for the AR Stickers shows the following lines in the AndroidManifest:
<meta-data android:name="com.android.device.restriction" android:value="brand=google, deviceName=marlin; brand=google, deviceName=sailfish; brand=google, deviceName=walleye; brand=google, deviceName=taimen" />
As you can see, the application won't run unless the device's brand is 'Google' and the device name is one of marlin, sailfish, walleye, or taimen. That refers to the Google Pixel XL, Pixel, Pixel 2, and Pixel 2 XL respectively. Next, the minimum SDK version of the app is 27, which means it requires Android 8.1 to run. Fortunately, Android 8.1 is officially available for both the Google Nexus 5X and the Google Nexus 6P, so that's not a problem.
So what we need to do is modify our device's name to match one of the whitelisted device models. That requires root access since we will be modifying a property in the build.prop file located in /system. If your device is rooted, follow these steps to enable AR Stickers:
- Download and install the ARCore app and the AR Stickers app. I've uploaded them to AndroidFileHost since the Google Play Store will mark them as incompatible with the Nexus 5X/6P.
- Download and install BuildProp Editor from the Play Store.
- Find and change "ro.build.product", "ro.product.name", "ro.product.device", and "ro.product.model" to equal "marlin"
- Reboot your phone
- Download the More Shortcuts app. We'll use this to create a shortcut to launch the AR Stickers activity.
- Open the app and select "Activity."
- Scroll down and find AR Stickers. Expand it and tap on "MainActivity."
- Add the shortcut to your launcher.
- Go back to your launcher and tap on the shortcut to launch AR Stickers!
Enable AR Stickers on the OnePlus 3/3T or Xiaomi Mi 5
XDA Senior Member Arnova8G2 modified the AR Sticker, AR Core, and Google Camera APKs so it can run on other non-Google devices.
Follow these steps to enable AR Stickers on the OnePlus 3, OnePlus 3T, or Xiaomi Mi 5. I have not tested this myself, but the above video shows it working on the Xiaomi Mi 5, and several users on our forums report that it works on their OnePlus 3/3T.
- Install the modified ARCore and AR Stickers APKs.
- Download calibration_cad.xml.
- Install MiXplorer or use any other root-enabled file explorer.
- Move calibration_cad.xml to /system/etc.
- Download and install BuildProp Editor from the Play Store.
- Open it and add this line: ro.config.calibration_cad=/system/etc/calibration_cad.xml
- Install one of the following modified Google Camera APKs from here: GCam5_5.1.018, MGC_5.1.018, or GoogleCamera_5.1.018.
- Open up Google Camera and look for AR Stickers in the menu.
Conclusion
Enjoy Star Wars and Stranger Things augmented reality stickers on your rooted device! This method might work on other devices not mentioned here, but you'll need a calibration_cad.xml file that is specific for your device. Check your device's particular XDA forum to see if someone has gotten it working on your model!
If anyone is willing to try any of these workarounds on their devices, please do so and let us know if it works. Google's AR Core already works on the Samsung Galaxy S8, so it's possible that AR Stickers might make their way officially to other devices anyways. Until then, this unofficial method is the only way we know that will enable this feature on other devices.
from xda-developers http://ift.tt/2AOZCMS
via IFTTT
Aucun commentaire:
Enregistrer un commentaire