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

mako 4.3: unusable #372

Closed
heikoengel opened this issue Jul 28, 2013 · 21 comments
Closed

mako 4.3: unusable #372

heikoengel opened this issue Jul 28, 2013 · 21 comments
Labels

Comments

@heikoengel
Copy link

Device: Nexus4
OS: reproducable with official google 4.3 image, AOSP from source 4.3_r1 and 4.3_r2.1
Steps:

(logs hab been stripped off event numbers "/(\s*\d+)//" and GC_EXPLICIT entries to enable a nicer graphical diff)

any ideas anyone?
Thanks

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

I don't see anything obvious that is wrong.

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

XPrivacy seems to run okay.
This seems to be the problem, but it is difficult to relate to XPrivacy:

D/AndroidRuntime: Shutting down VM W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x95a9e700) I/Process : Sending signal. PID: 1382 SIG: 9 E/AndroidRuntime: FATAL EXCEPTION: main E/AndroidRuntime: java.lang.NullPointerException E/AndroidRuntime: at android.app.ActivityThread.attach(ActivityThread.java:4970) E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5090) E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:525) E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:110) E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime: Error reporting crash E/AndroidRuntime: java.lang.NullPointerException E/AndroidRuntime: at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76) E/AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693) E/AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690) E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

FileNotFoundException and NoSuchFieldError for TelephonyManager shouldn't be the problem.

@heikoengel
Copy link
Author

I agree that FileNotFound and NoSuchField may not be related to XPrivacy but they only occur if XPrivacy is installed. The NullPointerException is constantly raised when trying to use the device (with any app). XPosed GUI cannot be opend, XPrivacy not closed anymore once XPrivacy is installed. Do you have any advice how to debug this issue?

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

Since you have already tried five different versions, I guess you don't mind to try two more:

1.7.23 alpha without IoBridge hook: http://d-h.st/WBJ
1.7.23 alpha without ActivityThread hook: http://d-h.st/mYO

I have no clear idea of the problem, but if one of these versions work, it will be easier to search further.

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

The only way I see to debug this, is to disable hooks until we have found the guilty one.
If you can compile XPrivacy yourself, just comments things out here:
https://github.com/M66B/XPrivacy/blob/master/src/biz/bokhorst/xprivacy/XPrivacy.java#L45

Today I have rewritten this code extensively, which makes it now easier to disable groups of hooks :-)

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

Maybe Xposed is not compatible with 4.3, yet

@heikoengel
Copy link
Author

The two 1.7.23 versions show the same behavioir and additionally report "Incompatible android.telephony.TelephonyManager" via GUI - will try to compile on my own tomorrow...

@M66B
Copy link
Owner

M66B commented Jul 28, 2013

I have already fixed the incompatible TelephonyManager message.
And also the FileNotFoundException and NoSuchField exceptions, which are totally harmless.
Contact me by PM if you want to chat with me, so I may help you get things up and running.

@paavo74
Copy link

paavo74 commented Jul 29, 2013

I have this issue on Nexus 4 (Mako) 4.3, too. Now I rather switched back to 4.2.2, so I can't post logcat.
Issue: After phone booted, only app that I was able to launch and use was Xprivacy. Other apps didn't launch at all after touching their icons.

@M66B
Copy link
Owner

M66B commented Jul 29, 2013

@paavo74 privacy wise this is a good solution ;-)

@heikoengel
Copy link
Author

first short update: I disabled all hooks in XPrivacy.java and device is running fine. Will selectively enable one hook after another to see which one is failing...

@M66B
Copy link
Owner

M66B commented Jul 29, 2013

@rndhro Good! Thanks for looking into this. If you have questions, send me a PM.

@M66B
Copy link
Owner

M66B commented Jul 29, 2013

@rndhro try binary searching: enable one half, if it works, enable half of the rest, if it does not work: disable half of the half, etc.

@heikoengel
Copy link
Author

Ok, the causing hook is
XPrivacy@L111: hookAll(XSystemProperties.getInstances());

I have enabled all other hooks but this one and the device is running fine. As soon as I enable the XSystemProperties hook logcat is producing the following two exceptions and the device becomes unusable:

I/XPrivacy/XPackageManagerService( 535): get 10027/sdcard storage=false *
I/XPrivacy/XPackageManagerService( 535): get 10027/media storage=false *
I/XPrivacy/XPackageManagerService( 535): get 10027/inet internet=false *
W/XPrivacy/XSystemProperties( 172): uid <= 0
I/XPrivacy/XSystemProperties( 172): java.lang.Exception: StackTrace
I/XPrivacy/XSystemProperties( 172): at biz.bokhorst.xprivacy.Util.logStack(Util.java:46)
I/XPrivacy/XSystemProperties( 172): at biz.bokhorst.xprivacy.PrivacyManager.getRestricted(PrivacyManager.java:218)
I/XPrivacy/XSystemProperties( 172): at biz.bokhorst.xprivacy.XHook.isRestricted(XHook.java:73)
I/XPrivacy/XSystemProperties( 172): at biz.bokhorst.xprivacy.XSystemProperties.after(XSystemProperties.java:54)
I/XPrivacy/XSystemProperties( 172): at biz.bokhorst.xprivacy.XPrivacy$1.afterHookedMethod(XPrivacy.java:197)
I/XPrivacy/XSystemProperties( 172): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:467)
I/XPrivacy/XSystemProperties( 172): at android.os.SystemProperties.get(Native Method)
I/XPrivacy/XSystemProperties( 172): at com.android.internal.os.ZygoteConnection.applyInvokeWithSystemProperty(ZygoteConnection.java:852)
I/XPrivacy/XSystemProperties( 172): at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:208)
I/XPrivacy/XSystemProperties( 172): at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:613)
I/XPrivacy/XSystemProperties( 172): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
I/XPrivacy/XSystemProperties( 172): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:110)
I/XPrivacy/XSystemProperties( 172): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 1775): FATAL EXCEPTION: main
E/AndroidRuntime( 1775): java.lang.NullPointerException
E/AndroidRuntime( 1775): at android.app.ActivityThread.attach(ActivityThread.java:4970)
E/AndroidRuntime( 1775): at android.app.ActivityThread.main(ActivityThread.java:5090)
E/AndroidRuntime( 1775): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1775): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime( 1775): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime( 1775): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 1775): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:110)
E/AndroidRuntime( 1775): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1775): Error reporting crash
E/AndroidRuntime( 1775): java.lang.NullPointerException
E/AndroidRuntime( 1775): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
E/AndroidRuntime( 1775): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
E/AndroidRuntime( 1775): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
E/AndroidRuntime( 1775): at dalvik.system.NativeStart.main(Native Method)

@M66B
Copy link
Owner

M66B commented Jul 29, 2013

Thanks for finding out the faulty restriction!
Can you try again with the commit I have just done?
4a85956

@heikoengel
Copy link
Author

works! :)
no more exceptions, system remains responsive. Is this already a fix or a temporary workaround to isolate the problem?

@M66B
Copy link
Owner

M66B commented Jul 29, 2013

This is already a fix :-)

@M66B
Copy link
Owner

M66B commented Jul 29, 2013

Consequence is that you cannot restrict system properties for Android anymore, but that is not a good idea anyway.

@M66B M66B closed this as completed Jul 29, 2013
@heikoengel
Copy link
Author

Great job, thanks alot!

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

3 participants