-
Notifications
You must be signed in to change notification settings - Fork 145
Install core service on earlier versions than Android 7.0 #70
Comments
Hi, can I ask you to send me modified version of apk so I can test it on my device. I don't really want to go through all of these steps. (But thanks a lot for the info) |
Yay! Thank you @kenfast!! Will link to this in the README. |
@thegreengree , I am not sure if my apk will work for you since it would have a locally generated certificate that does not go against a public verification authority. You can give it a try. File is zipped. |
Is there any differences between this modified apk and the one from this repo? |
@detomato, the only difference is the values for minSdkVersion and targetSdkVersion in the manifest file. In the original one these are set to 23 (0x18) and 22 (0x17) respectively. In this file both are set to 22 (Android 5.1, 0x16). Oh, one other difference is the certificate. I had to resign this apk, so it has a local certificate from me instead of the original one from Google. |
@kenfast So, I was able to install your arcore-preview on my Meizu M2 Note with Flyme 6 (Android 5.1). Android Studio project gave me black screen with "searching for surfaces" as well. Wonder if something can change if I upgrade to LineageOS 14.1 (Android 7.1.2) |
Hey @kenfast this looks promising but as earlier Android does not have libcamera2ndk.so and libmediandk.so then it cannot work. (On rooted device there is some chance) |
@kenfast i was trying your hack but having trouble reading binary xml file. Can u plz providea way to read the file. I am getting the binary file as: |
@anky6, It is not just a matter of reading the binary, but also editing it and writing it back out. I did this using vim. There would be other ways to do it, depending on what tools you have available. In my binary view I see: The values you want are in bold above. I changed the values for minSdk and targetSdk to 0x16, Android 22 (5.1) As @lvonasek pointed out, this is a dead end unless there is some way to get a long list of shared libraries to bundle with the app APK. According to a comment by Alex Cohn in [this] (https://stackoverflow.com/questions/44185714/which-are-the-android-native-camera-supported-platforms) the following additional libraries would be needed: |
@kenfast not able to install the arcore apk after performing all the beforementioned steps on my s6 edge phone. Saying "Package cannot be parsed". |
@kenfast getting searching for surfaces with blank screen on note 2. |
@kenfast hi! |
Next step? https://play.google.com/store/apps/details?id=com.google.android.apps.motionstills&hl=it Works fine on my Samsung S7. |
And, from official ARcore list of compatibile devices, some new entries!
|
This app works for me (others do not): |
@jumpjack Thanks for providing that information. The application you referenced might be utilizing an ARCore API modification (such as the one from this repo). |
S7 working with Atom Visualizer and Motion Still NOT working with Measure |
there are 2 versions of arcore measure: "standard" and "for all". |
After system reboot Measure (NOT the one for all obviously) works |
I figured out how to modify the Tango core service (arcore-preview.apk) so that it would install on earlier versions of Android than the 7.0 that is specified in the current file. I was able to install the core service on my Moto X running 5.1, but it is only a 32bit CPU so it didn't work anyway.
Here is my approach.
Rename the .apk file to .zip and unzip to a new folder
Find the android:minSdkVersion and android:targetSdkVersion entries in the AndroidManifest.xml
The manifest file is in binary form. I used [xml-file-format] (http://www.olafdietsche.de/2015/05/11/exploring-android-binary-xml-file-format) to find the locations in the binary manifest.
In the stock Google version of the arcore manifest, 14272 bytes, the locations were:
android:minSdkVersion value 0x18 location 0x00001c09
android:targetSdkVersion value 0x17 location 0x00001c1d
Use vim to edit the binary manifest file and change the min and target values to Android 22, 5.1, 0x16.
I found help on the binary settings in vim [here] (https://vi.stackexchange.com/questions/343/how-to-edit-binary-files-with-vim).
vim name.xml
:set binary
:%!xxd
.... find locations, change values...
:%!xxd -r
:w new_name.xml
Replace the original manifest file with the new modified file.
Zip up the contents and rename package back to arcore-preview.apk
Sign the new apk with a local certificate.
I followed the directions [here] (https://stackoverflow.com/questions/31911149/adb-install-parse-failed-unexpected-exception).
I had deleted the META-INF folder from the apk before adding the new signature. I am not sure if this is necessary or not.
Install with adb install -r -d arcore-preview.apk
I built the arcore sample app in Android Studio and set the min and target sdk to 22.
When I run the sample app I get a message right away that Tango Core has stopped. It tries to restart, and then gives another identical message. I end up with a black screen with "searching for surfaces."
Logcat messages show fatal exception, couldn't find "libtango_service_library.so"
The text was updated successfully, but these errors were encountered: