So far I have been unsuccessful in getting Android M to work with Unity 4.6.7p4. Has anyone had any success with Android M? Here are the repro steps for the bug I am seeing. Unity QA is currently investigating the issue.
Repro: create a blank Unity 4.6.7p4 project, with an AndroidManifest.xml that targets sdk version 23. Launch game on a Nexus 6 with Android 6.0.
The following error log appears on startup.
E linker : readlink(‘/proc/self/fd/39’) failed: Permission denied [fd=39]
I believe this log error message is the reason that we are unable to load libraries, based on the following log that we are seeing in our game.
E linker : readlink(‘/proc/self/fd/61’) failed: Permission denied [fd=61]
E linker : warning: unable to get realpath for the library “/data/app/com.company.app-1/lib/arm/libjni.so”. Will use given name.
E linker : readlink(‘/proc/self/fd/61’) failed: Permission denied [fd=61]
E linker : warning: unable to get realpath for the library “/data/app/com.company.app-1/lib/arm/libjni.so”. Will use given name.
E Unity : Unable to find jni
E linker : readlink(‘/proc/self/fd/61’) failed: Permission denied [fd=61]
E linker : warning: unable to get realpath for the library “libjni.so”. Will use given name.
E Unity : Unable to find jni
I Unity : DllNotFoundException: jni
I Unity : at (wrapper managed-to-native) JavaVM:AttachCurrentThread ()
I Unity : ClearNotifications () [0x00000] in :0
I Unity : ClearNotifications () [0x00000] in :0
I Unity : at LocalNotificationManager.ClearNotificationsFromOS () [0x00000] in :0
I Unity : at LocalNotificationManager.Start () [0x00000] in :0
Notes:
The game runs find on the same Android device, when targeting sdk 22.
I successfully granted myself the following permissions (the only group permissions we use) through the new Android 6.0 permissions system, and I still receive the same errors.
android.permission.GET_ACCOUNTS
android.permission.READ_PHONE_STATE
android.permission.WRITE_EXTERNAL_STORAGE
We had the same issue here. And we found that Android M did not give us storage access permission even we asked for it in AndroidManifest. Try enabling the storage access for the app from Android settings menu and see if it goes away.
Hi, I also experience this issue. I cannot push obb files anymore when using split apk using the Unity3d editor ‘run’. On my Android M device the obb downloader neither works also related to the permissions. Unfortunately I have to keep the targetSDK to 23 since I want to use the latest android facebook sdk.
Ugg, we’re having this issue in 5.1.4, but are unable to upgrade to 5.2+ due to several other bugs and problems we’ve encountered. Is there a way to get this fix in 5.1.4?
I update unity to 4.6.9p3 and there is still this problem. I want to save image on External but nothing happens, apk don’t have permission but i add it in manifest. On older version ( < 6.0) works fine.
@breaker2005 : 4.6.9p3 should have the fix.
If the permission is in manifest, and it is considered “unsafe” by Google, - we should ask for it at startup.
If it’s not the case - please report a bug, attach the project and post the case #.