Java.lang.UnsatisfiedLinkError and unknown error in ADB

After updating my Huawei Ascend P7 to Android Lolipop (5.1.1) from Android Kitkat (4.4.2) I had problems with 2 problems when launching the application:

1) (Android Studio, Eclipse, ADB from the terminal)

[2015-10-20 09:34:48 - myapp] ------------------------------ [2015-10-20 09:34:48 - myapp] Android Launch! [2015-10-20 09:34:48 - myapp] adb is running normally. [2015-10-20 09:34:48 - myapp] Performing com.example.myapp.MainActivity activity launch [2015-10-20 09:34:49 - myapp] Automatic Target Mode: using device '7N2SRA153S024947' [2015-10-20 09:34:49 - myapp] Uploading myapp.apk onto device '7N2SRA153S024947' [2015-10-20 09:34:51 - myapp] Installing myapp.apk... [2015-10-20 09:35:12 - myapp] Success! [2015-10-20 09:35:13 - myapp] Starting activity com.example.myapp.MainActivity on device 7N2SRA153S024947 [2015-10-20 09:35:13 - myapp] ActivityManager: java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String android.os.SystemProperties.native_get(java.lang.String, java.lang.String) (tried Java_android_os_SystemProperties_native_1get and Java_android_os_SystemProperties_native_1get__Ljava_lang_String_2Ljava_lang_String_2) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.os.SystemProperties.native_get(Native Method) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.os.SystemProperties.get(SystemProperties.java:64) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.os.Environment$UserEnvironment.<init>(Environment.java:144) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.os.Environment.initForCurrentUser(Environment.java:82) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.os.Environment.<clinit>(Environment.java:76) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.os.Environment.getLegacyExternalStorageDirectory(Environment.java:421) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.os.Debug.<clinit>(Debug.java:96) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.ddm.DdmHandleHello.handleHELO(DdmHandleHello.java:164) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:91) [2015-10-20 09:35:13 - myapp] ActivityManager: at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171) [2015-10-20 09:35:13 - myapp] ActivityManager: java.lang.UnsatisfiedLinkError: android.os.Debug [2015-10-20 09:35:13 - myapp] ActivityManager: at android.ddm.DdmHandleHello.handleFEAT(DdmHandleHello.java:176) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:93) [2015-10-20 09:35:13 - myapp] ActivityManager: at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171) [2015-10-20 09:35:13 - myapp] ActivityManager: java.lang.UnsatisfiedLinkError: android.os.Debug [2015-10-20 09:35:13 - myapp] ActivityManager: at android.ddm.DdmHandleProfiling.handleMPRQ(DdmHandleProfiling.java:187) [2015-10-20 09:35:13 - myapp] ActivityManager: at android.ddm.DdmHandleProfiling.handleChunk(DdmHandleProfiling.java:88) [2015-10-20 09:35:13 - myapp] ActivityManager: at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171) 

2) (Eclipse only)

 [2015-10-20 09:38:15 - myapp] Android Launch! [2015-10-20 09:38:15 - myapp] adb is running normally. [2015-10-20 09:38:15 - myapp] Performing com.example.myapp.MainActivity activity launch [2015-10-20 09:38:15 - myapp] Automatic Target Mode: using device '7N2SRA153S024947' [2015-10-20 09:38:16 - myapp] Uploading myapp.apk onto device '7N2SRA153S024947' [2015-10-20 09:38:18 - myapp] Installing myapp.apk... [2015-10-20 09:38:19 - myapp] Installation error: Unknown failure [2015-10-20 09:38:19 - myapp] Please check logcat output for more details. [2015-10-20 09:38:19 - myapp] Launch canceled! 

I can not find anything in logcat.

I can not find any solid solution only in a workaround: restart eclipse / android studio, kill-start adb server, reconnect the device. If he succeeds in doing this, he only works for a short time. The problem persists on two different machines with different USB cables. This is definitely some kind of bug in candy (everything worked on kitkat) because I found several topics about this that happen on lolipop on asus or htc devices. However, I can not find a universal solution for Huawei.

I use Mac OS X, so window solutions will not work for me.

I have programmer mode, usb debugging is enabled, confirmation is disabled when installing from adb. But the option β€œscan applications via usb” was grayed out and some people said that disabling it could make it work. Adb 1.0.32.

+6
source share
2 answers

The latest firmware version of Huawei (B839) fixed the problem.

+1
source

This is a mistake of the manufacturer of your smartphone, an update from Huawei (when available) should be the final solution to your problem.

At the same time, I found this other discussion, which presents various workarounds that may be further attempts if you have not already tried.

Using a terminal, just reinstall it using adb to avoid recompiling Android Studio:

$ terminal: / sdk / platform-tools / adb install -r

And usually it works. If it does not work again, just run this command again

If you really want to try, the process will be as follows:

Close Studio (or try disabling Tools | Android | Enable ADB Integration) Do the following in the shell:

$ adb push / path / to / your / project / app / build / outputs / apk / app-debug.apk / data p>

$ adb shell pm install / data / app-debug.apk

$ (am start command from comment # 4 / # 5) Restart the IDE (or activate ADB integration).

+4
source

All Articles