6

After updating my Huawei Ascend P7 to Android Lolipop (5.1.1) from Android Kitkat (4.4.2) I'm started to experience 2 very problematic issues when I'm launching app:

1) (Android Studio, Eclipse, ADB from 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't find anything in logcat.

I can't find any solid solution only workaround: restart eclipse/android studio, kill-start adb server, reconnect device. If it'll manage to work it only works for a short period of time. Problem persists on 2 different machines with different usb cables. It's definitely some bug in lollipop (everything worked on kitkat), because I've found some topics about that happening on lolipop on asus or htc devices too. I can't find any universal workaround for Huawei however.

I use Mac OS X so solutions for windows won't work for me.

I ofc have programmer mode on, usb debugging on, disabled confirmation on installation from adb. But the option "verify apps via usb" it grayed out and some people said that disabling it can make it working. Adb 1.0.32.

Makalele
  • 7,431
  • 5
  • 54
  • 81

2 Answers2

4

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

Meanwhile I found this other discussion that present different workarounds that could be further attempts if you didn't try yet.

Using terminal, just reinstall with adb to avoid the Android Studio recompile time:

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

And usually it works. If it fails again, just run this command again

If you really want to try it, the process would be:

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

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

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

$ (am start command from comment #4/#5) Restart IDE (or Re-enable ADB Integration).

Community
  • 1
  • 1
Luca S.
  • 1,132
  • 2
  • 16
  • 31
  • Yeah, I was even saying about that discussion. But how can I use this on development process? I want to test a change in code so I have to generate apk, close android studio, push and install it from console, then test and open studio back? As I said reconnecting device and restarting studio works (not always first time), but I can't work like that. As for updates I wish we will get an update from Huawei, but there were already a lot of small updates for lolipop and it's still there. Also there's no 6.0 planned for this phone even though it's a flagship from 2014... – Makalele Oct 23 '15 at 12:35
  • can't you test it on a virtual device? x86 virtual devices are pretty fast! – Luca S. Oct 23 '15 at 12:39
  • Unfortunately I have a lot of problems with android simulator. It works pretty fast, but after several minutes my mac totally hangs and I have to reboot it. I have a great phone and I prefer using it, but Huawei destroyed all it with lolipop. Well I can go back to 4.4.2, but I want to test my apps on highest android version I can use. – Makalele Oct 23 '15 at 12:49
  • I understand. Anyway I suggest you to find a solution for your simulator too (maybe reducing its RAM or experimenting different configurations). Usually you don't want only to test your app on a single device/android os version. You should check that anything is working as expected on older phones and with devices with different screen sizes too. – Luca S. Oct 23 '15 at 13:00
  • 1
    I know, but I'm making games which scales well across different screen sizes. And as for this purpose it's tested a lot on all iOS devices. I also have slow old tablet, where I can test performance, but I prefer my phone :) – Makalele Oct 23 '15 at 13:17
1

Latest Huawei released firmware (B839) fixed the problem.

Makalele
  • 7,431
  • 5
  • 54
  • 81