Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Skype fails to connect with Xprivacy enabled. #50

Closed
cobaltdr opened this issue Jun 21, 2013 · 18 comments
Closed

Skype fails to connect with Xprivacy enabled. #50

cobaltdr opened this issue Jun 21, 2013 · 18 comments
Labels

Comments

@cobaltdr
Copy link

Originally reported by Tassos_i on xda.

Reproduced on stock rooted Galaxy S3 4.1.2 with Skype 3.2.0.6673 (current version), with Xprivacy 0.26 and 0.27.

Can't supply a logcat at the moment or for the next week, but I have a lovely screenshot.
screenshot_2013-06-21-21-33-05

@cobaltdr
Copy link
Author

Exit kills the process, sign in ends with the same screen.

@M66B
Copy link
Owner

M66B commented Jun 21, 2013

I cannot reproduce this problem, so please provide a logcat.
Which ROM/device are you using?

@cobaltdr
Copy link
Author

Stock rooted Galaxy S3 4.1.2 GT-I9300 baseband i9300xxemc2.

Logcat is gonna be a problem... I left it on for the 15s that I needed to reproduce the issue. It's 1.8Mb. I need to figure out what's spamming my logs. And maybe get you some relevant information. Won't likely be able to do that before I get back, I'll keep looking and update. In the meantime, I wonder if anyone else can logcat this.

@cobaltdr
Copy link
Author

This may be relevant:

I/XPrivacy/XRuntime(21042): get 10137/load shell=false # D/dalvikvm(21042): Trying to load lib /data/data/com.skype.raider/lib//libnvomxadaptor.so 0x40cbf568 I/Xposed (21042): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1892]: 1917 could not load needed library 'libsurfaceflinger_client.so' for 'libnvomxadaptor.so' (load_library[1094]: Library 'libsurfaceflinger_client.so' not found) I/Xposed (21042): at java.lang.Runtime.load(Runtime.java:340) I/Xposed (21042): at java.lang.Runtime.load(Runtime.java:328) I/Xposed (21042): at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method) I/Xposed (21042): at de.robv.android.xposed.XposedBridge.invokeOriginalMethod(XposedBridge.java:624) I/Xposed (21042): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:455) I/Xposed (21042): at java.lang.Runtime.load(Native Method) I/Xposed (21042): at com.skype.AndroidVideoHost.Core.VideoHost.a(Unknown Source) I/Xposed (21042): at com.skype.AndroidVideoHost.Core.VideoHost.a(Unknown Source) I/Xposed (21042): at skype.raider.n.<init>(Unknown Source) I/Xposed (21042): at com.skype.data.kitabstract.VideoHostFactory.a(VideoHostFactory.java:75) I/Xposed (21042): at com.skype.data.kitabstract.c.b(Loader.java:265) I/Xposed (21042): at com.skype.data.kitmodel.d.run(LoginRunnable.java:53) I/Xposed (21042): at skype.raider.af$1.run(AppThreads.java:92) I/Xposed (21042): at android.os.Handler.handleCallback(Handler.java:615) I/Xposed (21042): at android.os.Handler.dispatchMessage(Handler.java:92) I/Xposed (21042): at android.os.Looper.loop(Looper.java:137) I/Xposed (21042): at android.os.HandlerThread.run(HandlerThread.java:60) E/VH_VideoHost(21042): Failure: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1892]: 1917 could not load needed library 'libsurfaceflinger_client.so' for 'libnvomxadaptor.so' (load_library[1094]: Library 'libsurfaceflinger_client.so' not found) I/XPrivacy/XRuntime(21042): Queue usage data=10137/shell/loadLibrary size=2 I/XPrivacy/XRuntime(21042): get 10137/loadLibrary shell=false #14 I/Xposed (21042): java.lang.UnsatisfiedLinkError: Couldn't load nvomxadaptor: findLibrary returned null I/Xposed (21042): at java.lang.Runtime.loadLibrary(Runtime.java:365) I/Xposed (21042): at java.lang.Runtime.loadLibrary(Runtime.java:355) I/Xposed (21042): at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method) I/Xposed (21042): at de.robv.android.xposed.XposedBridge.invokeOriginalMethod(XposedBridge.java:624) I/Xposed (21042): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:455) I/Xposed (21042): at java.lang.Runtime.loadLibrary(Native Method) I/Xposed (21042): at com.skype.AndroidVideoHost.Core.VideoHost.a(Unknown Source) I/Xposed (21042): at com.skype.AndroidVideoHost.Core.VideoHost.a(Unknown Source) I/Xposed (21042): at skype.raider.n.<init>(Unknown Source) I/Xposed (21042): at com.skype.data.kitabstract.VideoHostFactory.a(VideoHostFactory.java:75) I/Xposed (21042): at com.skype.data.kitabstract.c.b(Loader.java:265) I/Xposed (21042): at com.skype.data.kitmodel.d.run(LoginRunnable.java:53) I/Xposed (21042): at skype.raider.af$1.run(AppThreads.java:92) I/Xposed (21042): at android.os.Handler.handleCallback(Handler.java:615) I/Xposed (21042): at android.os.Handler.dispatchMessage(Handler.java:92) I/Xposed (21042): at android.os.Looper.loop(Looper.java:137) I/Xposed (21042): at android.os.HandlerThread.run(HandlerThread.java:60) E/VH_VideoHost(21042): Failure: java.lang.UnsatisfiedLinkError: Couldn't load nvomxadaptor: findLibrary returned null I/XPrivacy/XRuntime(21042): Replacing usage data=10137/shell/load I/XPrivacy/XRuntime(21042): Queue usage data=10137/shell/load size=2 I/XPrivacy/XRuntime(21042): get 10137/load shell=false #

@M66B
Copy link
Owner

M66B commented Jun 21, 2013

Long logcat's are normal.
XPrivacy adds logging too and it will not slow down your device.

This may be caused by a bug in Xposed.
Could you please try this test version of XPrivacy and let me know if the problem still occurs?
http://www.faircode.eu/xprivacy/XPrivacy_0.29.1.apk

M66B pushed a commit that referenced this issue Jun 21, 2013
@vipere
Copy link
Contributor

vipere commented Jun 21, 2013

Just checked it myself,
The problem disappears after removing those 2 hooks.
Pretty weird..

Also, I don't seem to have the file 'libsurfaceflinger_client.so
Only:

./system/lib/libsurfaceflinger.so
./system/lib/libsurfaceflinger_ddmconnection.so

@M66B
Copy link
Owner

M66B commented Jun 21, 2013

Thanks, vipere.
If you like to chat, please send me a PM.

In any case we now know the cause.
I will look into this tomorrow further.

My best guess is that something that is done here causes this, although I have no idea yet what and why:
https://github.com/M66B/XPrivacy/blob/master/src/biz/bokhorst/xprivacy/XRestriction.java#L302

@cobaltdr
Copy link
Author

0.29.1 solves the issue. I wonder why you could not reproduce it.

@vipere
Copy link
Contributor

vipere commented Jun 21, 2013

I couldn't see what in getRestricted(...) would cause this since the log doesn't show denied access to the shell.
So I figured I'd try something else - adding a dummy hook to the function "load"

findAndHookMethod(java.lang.Runtime.class, "load", String.class, new XC_MethodHook() {
    @Override
    protected void afterHookedMethod(MethodHookParam param) throws Throwable {}
});

After this, the problem returns:

D/dalvikvm( 3030): Trying to load lib /data/app-lib/com.skype.raider-1//libnvomxadaptor.so 0x40a82d78
E/dalvikvm( 3030): dlopen("/data/app-lib/com.skype.raider-1//libnvomxadaptor.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libsurfaceflinger_client.so" needed by "libnvomxadaptor.so"; caused by load_library(linker.cpp:771): library "libsurfaceflinger_client.so" not found
E/VH_VideoHost( 3030): Failure: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libsurfaceflinger_client.so" needed by "libnvomxadaptor.so"; caused by load_library(linker.cpp:771): library "libsurfaceflinger_client.so" not found

Looks like a bug in Xposed, or perhaps a limitation since java.lang.Runtime is some internal stuff.

@M66B M66B closed this as completed in ac56ab9 Jun 22, 2013
@M66B M66B reopened this Jun 22, 2013
@M66B M66B closed this as completed in 2be29b0 Jun 22, 2013
@M66B M66B reopened this Jun 22, 2013
@Tassos-i
Copy link

Just to confirm that on my I9505, v 0.29.1 resolves the skype issue. Should I keep it, or is it really a test version ?

@M66B
Copy link
Owner

M66B commented Jun 22, 2013

@Tassos-i could your please try this test version:

http://www.faircode.eu/xprivacy/XPrivacy_0.29.2.apk

You can keep the test versions and upgrade later to 0.30+

@cobaltdr
Copy link
Author

What changed between 0.29.1 and 0.29.2?

@M66B
Copy link
Owner

M66B commented Jun 22, 2013

See the latest commit a little bit up.
(second "Attempt to fix 50")

@Tassos-i
Copy link

Unfortunately, 0.29.2 brings back he skype issue!

@cobaltdr
Copy link
Author

I can confirm. Problem recurs with 0.29.2. However, as stated above, 0.29.1 works fine.

M66B pushed a commit that referenced this issue Jun 22, 2013
@M66B
Copy link
Owner

M66B commented Jun 22, 2013

@rovo89 could you please take a look at this.
Simply hooking Runtime.load or Runtime.loadLibrary leads to this problem.
(even without any code in the hook itself)
http://developer.android.com/reference/java/lang/Runtime.html

@rovo89
Copy link

rovo89 commented Jun 22, 2013

I think this is because these methods check the calling method:

public void load(String pathName) {
    load(pathName, VMStack.getCallingClassLoader());
}

public void loadLibrary(String libName) {
    loadLibrary(libName, VMStack.getCallingClassLoader());
}

The caller is not the Skype package but the boot class loader (including XposedBridge.jar) when the methods are hooked. I can't think of a way to resolve this, but you should be able to work around it by hooking the methods with two arguments (String and ClassLoader).

@M66B
Copy link
Owner

M66B commented Jun 22, 2013

Solved by hooking the private methods and skipping checks when uid=0.

@M66B M66B closed this as completed Jun 22, 2013
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

5 participants