Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Can this method work on APK's that are already compiled? #9

Open
NeoToriyama opened this issue Aug 31, 2017 · 22 comments
Open

Can this method work on APK's that are already compiled? #9

NeoToriyama opened this issue Aug 31, 2017 · 22 comments
Labels

Comments

@NeoToriyama
Copy link

NeoToriyama commented Aug 31, 2017

Basically, the title is the issue. Some people on YouTube have released test APK's for ARCore but not the project files. Obviously, they aren't supported because they don't use the modified .aar file. If we have an APK file, how can it be used in combination with this method? If that's possible.

(I'm using the Samsung Galaxy S8+ btw)

@tomthecarrot
Copy link
Owner

You can use apktool to decompile the APK, then follow the Android build instructions in this repo's README to replace the library. Then rebuild the APK using apktool and sign it using apksigner before installing it to your Android device via adb.

@NeoToriyama
Copy link
Author

Okay, so I learned how to decompile and recompile the APK, but the only instructions I see are for modifying the aar library. Here's the folder structure of the decompiled APK: http:https://imgur.com/a/w9uRI

How would I go about modifying it with your method from this point forward? Thanks for all the help so far.

@tomthecarrot
Copy link
Owner

The AAR file you need to modify (or replace with the one in this repo) should be inside the libs directory.

@NeoToriyama
Copy link
Author

Okay, so here's the folder structure within the libs directory: http:https://imgur.com/a/w9uRI
The file doesn't seem to exist. Could it be hidden?

@tomthecarrot
Copy link
Owner

Ah I see. This is a compiled Unity project. Unity compiles multiple project libraries into shared object files. You might be able to decompile the shared object containing the AAR (assuming that it's still in that format), replace the AAR, and recompile. It would be simplest to modify the original Unity project, if you have access to it.

@NeoToriyama
Copy link
Author

No, it was uploaded online so I don't have access. I also don't have Unity installed either. Is there possibly a way to modify the ARCore service APK provided by Google to support unsupported devices. Or can it only be currently accomplished on the actual app?

@tomthecarrot
Copy link
Owner

That's an interesting thought. It would make this modification far more universal. I'll look into it.

@NeoToriyama
Copy link
Author

It's definitely something I've been contemplating lately. It could be like a hook service that runs on the phone so when you load up an APK using ARCore, it would spoof your device as compatible or disable the compatibility check. Although, something on this level might require root access. Thanks for all the help. I'm installing Unity now in hopes of using the method you mentioned above. I'll let you know how it goes.

@NeoToriyama
Copy link
Author

Here's the link to the APK if you want to take a crack at it.
http:https://208107.selcdn.ru/TestVR_OPEN/TestVR_RC3.apk

@tomthecarrot
Copy link
Owner

tomthecarrot commented Sep 1, 2017

Cool! Thank you. I built an early version of a modified ARCore Service, which seems to be functional without per-app modifications, all on my "unsupported" device.

Please try it on your device and let me know if it works. You'll need to uninstall the existing "Tango Core" first. Thanks!

@NeoToriyama
Copy link
Author

Thank you, but the link appears to be down.

@tomthecarrot
Copy link
Owner

Sorry about that. I just updated the comment's URL.

@NeoToriyama
Copy link
Author

No worries, I installed it but no luck yet. I'm gonna restart my phone and see if it works then.

@NeoToriyama
Copy link
Author

Okay, so the unmodified HelloAR Java apk works without the modified aar file, but the other app I downloaded still displays the "unsupported" message. So far this is good as it seems the modified Tango Core apk does it's job for the most part. Hopefully Google will release new apps so we can determine if it only works with their apps or if it's dependant on which SDK the app is built under. Thanks again.

@tomthecarrot
Copy link
Owner

tomthecarrot commented Sep 1, 2017

@NeoToriyama That's good to hear! Does it actually show a camera with full ARCore tracking? If so, which device are you using? Exciting!

@NeoToriyama
Copy link
Author

Yes it does and the tracking works very well. I'm using the Samsung Galaxy S8+.

@tomthecarrot
Copy link
Owner

Thanks! Will close this once we complete testing and build instructions for the shared library.

@NeoToriyama
Copy link
Author

Of course and no thank you for all the work. It's greatly appreciated!

@NeoToriyama
Copy link
Author

Just confirmed that the tracking is much better on the unmodified Java APK. I don't know how it's possible, but after several tests back and forth I'm fairly certain. This could due to fact that it's a Java build. It also loads much faster than the modified HelloAR apk.

@tomthecarrot
Copy link
Owner

Good to know for testing the issue on other devices, thank you!

@NeoToriyama
Copy link
Author

You're welcome!

@Indashio
Copy link

Not working on Xperia XZ Premium

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants