[Q]Help replacing drawables please - Xposed General

I'm trying to replace the lock screen handle
this is my code
Code:
public void handleInitPackageResources(InitPackageResourcesParam resparam)
throws Throwable {
if(!resparam.packageName.equals("com.android.keyguard"))
return;
XposedBridge.log("woo");
Drawable d = Drawable.createFromPath("/data/data/" + pname + "/files/lock_ic.png");
XResources.setSystemWideReplacement("com.android.keyguard", "drawable", "ic_lockscreen_handle_normal", d);
}
But get this error
08-12 20:40:33.155: I/Xposed(1051): woo
08-12 20:40:33.255: I/Xposed(1051): android.content.res.Resources$NotFoundException: com.android.keyguard:drawable/ic_lockscreen_handle_normal
08-12 20:40:33.255: I/Xposed(1051): at android.content.res.XResources.setSystemWideReplacement(XResources.java:325)
08-12 20:40:33.255: I/Xposed(1051): at com.hamzah.lockscreentweakbox.Main.handleInitPackageResources(Main.java:144)
08-12 20:40:33.255: I/Xposed(1051): at de.robv.android.xposed.IXposedHookInitPackageResources$Wrapper.handleInitPackageResources(IXposedHookInitPackageResources.java:20)
08-12 20:40:33.255: I/Xposed(1051): at de.robv.android.xposed.callbacks.XC_InitPackageResources.call(XC_InitPackageResources.java:28)
08-12 20:40:33.255: I/Xposed(1051): at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:70)
08-12 20:40:33.255: I/Xposed(1051): at de.robv.android.xposed.XposedBridge$6.afterHookedMethod(XposedBridge.java:344)
08-12 20:40:33.255: I/Xposed(1051): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
08-12 20:40:33.255: I/Xposed(1051): at android.app.ResourcesManager.getTopLevelResources(Native Method)
08-12 20:40:33.255: I/Xposed(1051): at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1537)
08-12 20:40:33.255: I/Xposed(1051): at android.app.LoadedApk.getResources(LoadedApk.java:480)
08-12 20:40:33.255: I/Xposed(1051): at android.app.ContextImpl.<init>(ContextImpl.java:2030)
08-12 20:40:33.255: I/Xposed(1051): at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:1906)
08-12 20:40:33.255: I/Xposed(1051): at com.android.server.AttributeCache.get(AttributeCache.java:114)
08-12 20:40:33.255: I/Xposed(1051): at com.android.server.wm.AppTransition.getCachedAnimations(AppTransition.java:263)
08-12 20:40:33.255: I/Xposed(1051): at com.android.server.wm.AppTransition.loadAnimation(AppTransition.java:288)
08-12 20:40:33.255: I/Xposed(1051): at com.android.server.wm.WindowStateAnimator.applyAnimationLocked(WindowStateAnimator.java:1568)
08-12 20:40:33.255: I/Xposed(1051): at com.android.server.wm.WindowManagerService.relayoutWindow(WindowManagerService.java:2958)
08-12 20:40:33.255: I/Xposed(1051): at com.android.server.wm.Session.relayout(Session.java:190)
08-12 20:40:33.255: I/Xposed(1051): at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:235)
08-12 20:40:33.255: I/Xposed(1051): at com.android.server.wm.Session.onTransact(Session.java:125)
08-12 20:40:33.255: I/Xposed(1051): at android.os.Binder.execTransact(Binder.java:404)
08-12 20:40:33.255: I/Xposed(1051): at dalvik.system.NativeStart.run(Native Method)
But when decompiling Keyguard.apk I have these files under drawable-xhdpi and all other dpi folders
http://screencloud.net/v/yOo9

I'm curious about this one, too. I just noticed yesterday that I got a similar problem. I replaced R.color.outline_color successfully for the Google Now Launcher. Trebuchet (which uses Launcher3 as a base) uses R.color.outline_color, too. So when running the same code on Trebuchet I get a Resources$NotFoundException even though the source code on Github shows that they use R.color.outline_color as well.
Any guess?

I don't think you should use setSystemWideReplacement for these resources, since they're not part of the framework but specific to the package.
theknut said:
I'm curious about this one, too. I just noticed yesterday that I got a similar problem. I replaced R.color.outline_color successfully for the Google Now Launcher. Trebuchet (which uses Launcher3 as a base) uses R.color.outline_color, too. So when running the same code on Trebuchet I get a Resources$NotFoundException even though the source code on Github shows that they use R.color.outline_color as well.
Any guess?
Click to expand...
Click to collapse
Different problem as far as I can tell. I'd double check the package name or paste the full error.

I got a similar problem. I replaced R.bool.config_systemui_feature_floating_launcher successfully for LGSystemUI.apk but when running the module i got a Resources$NotFoundException.
Code:
android.content.res.Resources$NotFoundException: com.android.systemui:bool/config_systemui_feature_floating_launcher
at android.content.res.XResources.setReplacement(XResources.java:307)
at com.riskey.optimustoolbox.hooks.StatusBarTweaks.handleInitPackageResources(StatusBarTweaks.java:23)
at com.riskey.optimustoolbox.Main.handleInitPackageResources(Main.java:21)
at de.robv.android.xposed.IXposedHookInitPackageResources$Wrapper.handleInitPackageResources(IXposedHookInitPackageResources.java:20)
at de.robv.android.xposed.callbacks.XC_InitPackageResources.call(XC_InitPackageResources.java:28)
at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:70)
at de.robv.android.xposed.XposedBridge$6.afterHookedMethod(XposedBridge.java:344)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
at android.app.ActivityThread.getTopLevelResources(Native Method)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1633)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
at android.app.ActivityThread.getTopLevelResources(Native Method)
at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:714)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
at android.app.ApplicationPackageManager.getResourcesForApplication(Native Method)
at android.app.ApplicationPackageManager.getXml(ApplicationPackageManager.java:944)
at android.content.pm.PackageItemInfo.loadXmlMetaData(PackageItemInfo.java:222)
at android.content.pm.RegisteredServicesCache.parseServiceInfo(RegisteredServicesCache.java:375)
at android.content.pm.RegisteredServicesCache.generateServicesMap(RegisteredServicesCache.java:261)
at android.content.pm.RegisteredServicesCache.<init>(RegisteredServicesCache.java:105)
at android.accounts.AccountAuthenticatorCache.<init>(AccountAuthenticatorCache.java:47)
at android.accounts.AccountManagerService.<init>(AccountManagerService.java:212)
at com.android.server.ServerThread.run(SystemServer.java:237)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
at com.android.server.ServerThread.run(Native Method)
theres my code
Code:
private static final String PACKAGE_NAME = "com.android.systemui";
private static final String QSLIDE_FEATURE = "config_systemui_feature_floating_launcher";
Code:
boolean qslide = mSettings.getBoolean(Prefs.ENABLE_QSLIDE_FEATURE, false);
resparam.res.setReplacement(PACKAGE_NAME, "bool", QSLIDE_FEATURE, qslide);

riskey95 said:
I got a similar problem. I replaced R.bool.config_systemui_feature_floating_launcher successfully for LGSystemUI.apk but when running the module i got a Resources$NotFoundException.
Click to expand...
Click to collapse
Full code, please?

GermainZ said:
Full code, please?
Click to expand...
Click to collapse
Check this StatusBarTweaks.java and Main.java

riskey95 said:
Check this StatusBarTweaks.java and Main.java
Click to expand...
Click to collapse
handleInitPackageResources is called for all packages. You should return if it's not com.android.systemui. You already are, never mind.
Check that LGSystemUI.apk is actually com.android.sytemui and not another package.

Thank you @GermainZ it worked by using setReplacement, not systemwide
silly error to be honest
Is it possible to get the size of the old drawable in pixels, so i can scale my new one to be the same size?

hamzahrmalik said:
Thank you @GermainZ it worked by using setReplacement, not systemwide
silly error to be honest
Is it possible to get the size of the old drawable in pixels, so i can scale my new one to be the same size?
Click to expand...
Click to collapse
Drawables don't have a size until they're drawn. If you have access to the canvas it's drawn on, you can check that. Otherwise, if it's a resource drawable check the dimensions in the res/ directory.

GermainZ said:
Drawables don't have a size until they're drawn. If you have access to the canvas it's drawn on, you can check that. Otherwise, if it's a resource drawable check the dimensions in the res/ directory.
Click to expand...
Click to collapse
I meant the size it would have been drawn if if my mod didnt exist

hamzahrmalik said:
I meant the size it would have been drawn if if my mod didnt exist
Click to expand...
Click to collapse
I know. As I've said, that depends on the canvas.

@GermainZ,
so this is the error when replacing the color when hooking Trebuchet
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This my code
resparam.res.setReplacement(resparam.packageName, "color", "outline_color", PreferencesHelper.glowColor);
Click to expand...
Click to collapse
And this is their code
final int outlineColor = getResources().getColor(R.color.outline_color);
Click to expand...
Click to collapse
It's 1:1 the same code from GNL which I'm able to replace. The same code and the same replacement but it doesn't work...

GermainZ said:
handleInitPackageResources is called for all packages. You should return if it's not com.android.systemui. You already are, never mind.
Check that LGSystemUI.apk is actually com.android.sytemui and not another package.
Click to expand...
Click to collapse
it work, i didn't notice that

theknut said:
@GermainZ,
so this is the error when replacing the color when hooking Trebuchet
This my code
And this is their code
It's 1:1 the same code from GNL which I'm able to replace. The same code and the same replacement but it doesn't work...
Click to expand...
Click to collapse
Their AndroidManifest shows that the package name is still com.android.launcher3, not sure if that's true for what you have installed.
If that's not it, the only thing I can think of is this.

GermainZ said:
Their AndroidManifest shows that the package name is still com.android.launcher3, not sure if that's true for what you have installed.
If that's not it, the only thing I can think of is this.
Click to expand...
Click to collapse
Thank you sooo much! It actually was "com.android.launcher3". Wow I would have never tried that. Thank you!!

Related

Modifying Contacts.apk

Alright, I'm trying to make a JPY ROM. Normally I'd put the Captivate Contacts.apk in the ROM instead so it doesn't say "Video Chat", etc. Of course the Stock Widget too.
However, on JPY it force closes.
So, I decided to try and edit the i9000 Contacts.apk directly.
I found these four files:
contact_call_row.xml
contact_call_row_land.xml
contact_detail_dialog_layout.xml (there's two of them)
And removed the line with "video_call" in it.
Putting the .apk on my phone, the Contacts app opens. When you click on a contact, it force closes.
Here's the logcat:
Code:
--------- beginning of /dev/log/main
W/PowerManagerService( 2745): Timer 0x3->0x3|0x3
D/dalvikvm( 3325): GC_EXPLICIT freed 3104 objects / 184344 bytes in 103ms
--------- beginning of /dev/log/system
V/InputDevice( 2745): ID[0]=0(0) Dn(0=>1)
V/WindowManager( 2745): Dsptch > Window{48e39338 com.android.contacts/com.sec.android.app.contacts.PhoneBookTopMenuActivity paused=false}
V/WindowManager( 2745): Dsptch > Window{48e39338 com.android.contacts/com.sec.android.app.contacts.PhoneBookTopMenuActivity paused=false}
V/InputDevice( 2745): ID[0]=0(0) Up(1=>0)
V/WindowManager( 2745): Dsptch > Window{48e39338 com.android.contacts/com.sec.android.app.contacts.PhoneBookTopMenuActivity paused=false}
V/InputDevice( 2745): ID[0]=0(0) Dn(0=>1)
D/TwIndexScrollView( 4464): dispatchDraw(Canvas canvas) is now being called!!
D/TwIndexScrollView( 4464): dispatchDraw(Canvas canvas) is now being called!!
E/AudioTrack( 2745): getAudioMode[0]
I/ContactsListActivity( 4464): uri is content://com.android.contacts/contacts/lookup/0i1/1
I/ActivityManager( 2745): Starting activity: Intent { act=android.intent.action.VIEW dat=content://com.android.contacts/contacts/lookup/0i1/1 cmp=com.android.contacts/com.sec.android.app.contacts.PhoneBookDetailTabActivity }
D/ContactsListActivity( 4464): onSaveInstanceState
D/ContactsListActivity( 4464): onPause------------------------------------------
D/TwIndexScrollView( 4464): dispatchDraw(Canvas canvas) is now being called!!
D/AudioHardwareALSA( 2613):
D/AudioHardwareALSA( 2613): ALSA OPEN mode 0,device 2
I/AudioHardwareALSA( 2613): Try to open ALSA PLAYBACK device AndroidPlayback_Speaker_normal
I/AudioHardwareALSA( 2613): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
D/AudioHardwareALSA( 2613): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2613): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2613): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2613): Buffer size: 2048
D/AudioHardwareALSA( 2613): Latency: 46439
V/InputDevice( 2745): ID[0]=0(0) Up(1=>0)
D/PhoneBookDetailTabActivity( 4464): onResume, mJustCreated : true
D/TwIndexScrollView( 4464): dispatchDraw(Canvas canvas) is now being called!!
I/ActivityManager( 2745): Displayed activity com.android.contacts/com.sec.android.app.contacts.PhoneBookDetailTabActivity: 282 ms (total 282 ms)
D/ContactsListActivity( 4464): onStop--------------------=------------------------
D/AndroidRuntime( 4464): Shutting down VM
W/dalvikvm( 4464): threadid=1: thread exiting with uncaught exception (group=0x4001d7d0)
E/AndroidRuntime( 4464): FATAL EXCEPTION: main
E/AndroidRuntime( 4464): java.lang.NullPointerException
E/AndroidRuntime( 4464): at com.android.contacts.ViewContactActivity$ViewAdapter.bindView(ViewContactActivity.java:3690)
E/AndroidRuntime( 4464): at com.android.contacts.ViewContactActivity$ViewAdapter.getView(ViewContactActivity.java:3327)
E/AndroidRuntime( 4464): at android.widget.AbsListView.obtainView(AbsListView.java:1431)
E/AndroidRuntime( 4464): at android.widget.ListView.makeAndAddView(ListView.java:1802)
E/AndroidRuntime( 4464): at android.widget.ListView.fillDown(ListView.java:727)
E/AndroidRuntime( 4464): at android.widget.ListView.fillFromTop(ListView.java:784)
E/AndroidRuntime( 4464): at android.widget.ListView.layoutChildren(ListView.java:1655)
E/AndroidRuntime( 4464): at android.widget.AbsListView.onLayout(AbsListView.java:1263)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.FrameLayout.onLayout(FrameLayout.java:334)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.FrameLayout.onLayout(FrameLayout.java:334)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.FrameLayout.onLayout(FrameLayout.java:334)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.FrameLayout.onLayout(FrameLayout.java:334)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
E/AndroidRuntime( 4464): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.FrameLayout.onLayout(FrameLayout.java:334)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.widget.FrameLayout.onLayout(FrameLayout.java:334)
E/AndroidRuntime( 4464): at android.view.View.layout(View.java:7088)
E/AndroidRuntime( 4464): at android.view.ViewRoot.performTraversals(ViewRoot.java:1056)
E/AndroidRuntime( 4464): at android.view.ViewRoot.handleMessage(ViewRoot.java:1752)
E/AndroidRuntime( 4464): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 4464): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 4464): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 4464): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4464): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 4464): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime( 4464): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime( 4464): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 2745): Force finishing activity com.android.contacts/com.sec.android.app.contacts.PhoneBookDetailTabActivity
I/ ( 2745): dumpmesg > "/data/log/dumpstate_app_error.log"
W/ActivityManager( 2745): Activity pause timeout for HistoryRecord{48d51008 com.android.contacts/com.sec.android.app.contacts.PhoneBookDetailTabActivity}
V/WindowManager( 2745): Dsptch > Window{48cc09a8 Sorry! paused=false}
V/InputDevice( 2745): ID[0]=0(0) Dn(0=>1)
V/InputDevice( 2745): ID[0]=0(0) Up(1=>0)
V/WindowManager( 2745): Dsptch > Window{48cc09a8 Sorry! paused=false}
V/InputDevice( 2745): ID[0]=0(0) Dn(0=>1)
V/WindowManager( 2745): Dsptch > Window{48cc09a8 Sorry! paused=false}
V/WindowManager( 2745): Dsptch > Window{48cc09a8 Sorry! paused=false}
V/InputDevice( 2745): ID[0]=0(0) Up(1=>0)
E/AudioTrack( 2745): getAudioMode[0]
I/Process ( 4464): Sending signal. PID: 4464 SIG: 9
I/ActivityManager( 2745): Process android.process.acore (pid 4464) has died.
I/WindowManager( 2745): WIN DEATH: Window{48e39338 com.android.contacts/com.sec.android.app.contacts.PhoneBookTopMenuActivity paused=false}
I/WindowManager( 2745): WIN DEATH: Window{48fb9bd0 com.android.contacts/com.sec.android.app.contacts.PhoneBookDetailTabActivity paused=false}
I/UsageStats( 2745): Unexpected resume of com.android.launcher while already resumed in com.android.contacts
D/Launcher( 2995): onResume+
D/Launcher.DragController( 2995): +endDrag: false
D/Launcher.DragController( 2995): mDragging == false
D/Launcher.DragController( 2995): -endDrag: false
D/Launcher( 2995): onResume-
V/RenderScript_jni( 2995): surfaceCreated
D/Launcher.AllApps3D( 2995): +super.surfaceChanged
V/RenderScript_jni( 2995): surfaceChanged
D/Launcher.AllApps3D( 2995): -super.surfaceChanged
W/InputManagerService( 2745): Got RemoteException sending setActive(false) notification to pid 4464 uid 10002
W/Resources( 2745): Converting to boolean: TypedValue{t=0x3/d=0x692e "res/anim/accelerate_decelerate_interpolator.xml" a=1 r=0x10a0004}
Any help would be appreciated.
I removed the offending lines based on the logcat (I think).
It stopped the force close, but it looks like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You have a null pointer error. It's most probably a findViewById() in the code that does not find now the corresponding xml entry.
One way to solve it would be to make the entry very small and transparent, but IDK how it will mess up the rest of the layout.
Another option is to try an aosp contact. I'm assuming the source for the captivate contacts for eclair is not available. Right?
aleadam said:
One way to solve it would be to make the entry very small and transparent, but IDK how it will mess up the rest of the layout.
Click to expand...
Click to collapse
Worked better than before.
Now I need to figure out what governs the icons when you click on the Contact picture. The thing that lets you jump to MMS, Dialer, Gmail, Facebook, etc.
..
This is what I meant, that's what's left to erase:
Can you post the apk you've modded?
Sent from my SAMSUNG-SGH-I897
In due time.
MikeyMike01 said:
In due time.
Click to expand...
Click to collapse
Doesn't need to be working. We could test something and avoid duplicate work.
There are three different quick_contact_videocall.png images. In drawable-hdpi, drawable-hdpi-finger and drawable-land-hdpi-finger. I would reduce to 1x1 each and see the effect of it.
Sorry, I should have clarified. I'm not looking for the finished apk. I just wanted to lend a hand and tear it apart to see if I can help.
Sent from my SAMSUNG-SGH-I897
I am sure you already know, but the Phone.apk and DialerTabActivity.apk from the telus rom work beautifully with JPY roms.
I'm not at my computer.
What I changed was the four .xml files in the original post. Only, instead of removing the line I changed the size of it to be practically nothing.
moosefist said:
I am sure you already know, but the Phone.apk and DialerTabActivity.apk from the telus rom work beautifully with JPY roms.
Click to expand...
Click to collapse
Neither of those is the problem. Contacts.apk is what won't play nice.
MikeyMike01 said:
Neither of those is the problem. Contacts.apk is what won't play nice.
Click to expand...
Click to collapse
Yeah, i figured i would mention it.
Just a thought, rather than modifying this file why don't we look into why the 2.2 apk's with out video calling are force closing on JPY to begin with?
Do we have a log of what it happening in that situation? it may be easier...
aleadam said:
There are three different quick_contact_videocall.png images. In drawable-hdpi, drawable-hdpi-finger and drawable-land-hdpi-finger. I would reduce to 1x1 each and see the effect of it.
Click to expand...
Click to collapse
Did that:
Inside QuickContactWindow.smali there is the following:
Code:
new-array v0, v0, [Ljava/lang/String;
const-string v1, "vnd.android.cursor.item/phone_v2"
aput-object v1, v0, v2
const-string v1, "vnd.android.cursor.item/vcall-address"
aput-object v1, v0, v3
const-string v1, "vnd.android.cursor.item/sms-address"
aput-object v1, v0, v4
const-string v1, "vnd.android.cursor.item/email_v2"
aput-object v1, v0, v5
const-string v1, "vnd.android.cursor.item/contact"
I imagine this is a good place to start.
MikeyMike01 said:
Did that:
Click to expand...
Click to collapse
hmm, maybe instead of trying to completely removing the box, change the video call to Email perhaps?? just my .02
MikeyMike01 said:
This is what I meant, that's what's left to erase:
Click to expand...
Click to collapse
OK, I'm rethinking this: the buttons in that bar are not fixed and will depend on the options that are possible in your phone and with that contact, i.e., if you have gtalk you'll have a button for chat, if the contact has an address you will have a maps icon.
That means that the list of icons are created at runtime based on some info. We need to figure out what is reading it and where the info is stored. Then, we should be able to remove the item very cleanly. I'm guessing is a list of intents somewhere. I'll dig a little bit tonight, but I don't know how much I will be able to understand those .smali files...
aleadam said:
OK, I'm rethinking this: the buttons in that bar are not fixed and will depend on the options that are possible in your phone and with that contact, i.e., if you have gtalk you'll have a button for chat, if the contact has an address you will have a maps icon.
That means that the list of icons are created at runtime based on some info. We need to figure out what is reading it and where the info is stored. Then, we should be able to remove the item very cleanly. I'm guessing is a list of intents somewhere. I'll dig a little bit tonight, but I don't know how much I will be able to understand those .smali files...
Click to expand...
Click to collapse
I wish there was a way to search through the .smali files the way Windows can search through .xml files or .txt files.
USHERROB said:
hmm, maybe instead of trying to completely removing the box, change the video call to Email perhaps?? just my .02
Click to expand...
Click to collapse
Email is already there, I just didn't have an account set up so it wasn't shown.

[Q] Weird ClassLoader bug

I tried to hook method "java.lang.System.loadLibrary", but it caused the process crashed.
My code is simple:
@Override
public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam loadPackageParam) throws Throwable {
if (!loadPackageParam.packageName.equals("com.shinybox.yongchuandixiachengfortx13"))
return;
XposedHelpers.findAndHookMethod("java.lang.System", loadPackageParam.classLoader, "loadLibrary",
String.class,
new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
String libName = (String) param.args[0];
XposedBridge.log("XPOSED:" + libName);
XposedBridge.log("XPOSED:" + loadPackageParam.classLoader.toString());
super.beforeHookedMethod(param);
}
});
}
Click to expand...
Click to collapse
And I could got some output:
I/Xposed ( 1709): XPOSED:crypto
I/Xposed ( 1709): XPOSED:dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.shinybox.yongchuandixiachengfortx13-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.shinybox.yongchuandixiachengfortx13-1, /vendor/lib, /system/lib]]]
I/Xposed ( 1709): XPOSED:ssl
I/Xposed ( 1709): XPOSED:dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.shinybox.yongchuandixiachengfortx13-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.shinybox.yongchuandixiachengfortx13-1, /vendor/lib, /system/lib]]]
I/Xposed ( 1709): XPOSEDpenal
I/Xposed ( 1709): XPOSED:dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.shinybox.yongchuandixiachengfortx13-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.shinybox.yongchuandixiachengfortx13-1, /vendor/lib, /system/lib]]]
Click to expand...
Click to collapse
But the app crashed and here is the error info:
E/AndroidRuntime( 1709): java.lang.UnsatisfiedLinkError: Couldn't load openal from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/data/de.robv.android.xposed.installer/bin/XposedBridge.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]]: findLibrary returned null
E/AndroidRuntime( 1709): at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
E/AndroidRuntime( 1709): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
E/AndroidRuntime( 1709): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
Click to expand...
Click to collapse
The reason is that the app tried to load the library "openal" from xposed installer's class loader rather than its own's. How this happened?

[THEME][CM12][CM12.1] Dark WhoAmI v1.2 (20150827) DISCONTINUED

Today, i will share the dark theme called "dark whoami"...Ofcourse this theme have a lot of bugs. so please report the bugs here and give me some suggestions
NB:
*Please forgive me if my theme has expired
**If you got error like can't install or fc please give me LOGCAT
Requirement :
Stock framework cm12/cm12.1
Latest build cm12/cm12.1
Changelog :
v1.0
initial release
v1.1
Improvement material dark
Fixed some background and text
Change some drawables
New font UI
etc
v1.2
Fixed issue can't install, reported by @Enoalife
Fixed QS tile in settings
Fixed music theme (eleven)
Themed sony apps (music, album, video)
Now you can't see material light
etc
Themed apps:
Almost all system apps
Root explorer
Greenify
Xperia Home
soon
Bug :
Greenify
tell me
Installation :
Just install as normal apk
Reboot after update
Enjoy
Screenshots and Download:
See second post​
Credit:
@mikeioannina and @Mardon for cm12.1 build :good:
@nicholaschum for awesome guide and help :good:
@Ambor for xperia themes port :good:
@gamzekal for guide and help :good:
@gianton for awesome font :good:
all users for test and report the issue :good:
Please pm me if i forgot
Simply press thank's button :good:
Screenshots and Download
Screenshots
v1.0
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
v1.1
v1.2
Download
v1.0 Click Here
v1.1 Click Here
v1.2 Click Here
It's failing to install
Sent from my Nexus 6 using XDA Free mobile app
bigstunta101 said:
It's failing to install
Sent from my Nexus 6 using XDA Free mobile app
Click to expand...
Click to collapse
Give me a logcat...
Nice work:good:
Can't install...temasek build , LG G2.
Envoyé de mon LG-D802 en utilisant Tapatalk
Updated
V1.1 Updated
Changelog :
Improvement material dark
Fixed some background and text
Change some drawables
New font UI
etc
Important note !!!
You must read the first post before download
Failed to install cm-12.1-20150825-NIGHTLY (Nexus 5)
Code:
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
D/Finsky ( 4043): [1] DailyHygiene.goMakeHygieneIfDirty: No need to run daily h
ygiene.
I/ActivityManager( 687): Start proc 4079:com.google.android.gms:car/u0a22 for s
ervice com.google.android.gms/.car.CarService
W/Settings( 4043): Setting download_manager_max_bytes_over_mobile has moved from
android.provider.Settings.Secure to android.provider.Settings.Global.
W/Settings( 4043): Setting download_manager_recommended_max_bytes_over_mobile ha
s moved from android.provider.Settings.Secure to android.provider.Settings.Globa
l.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getCurrentAccount: No account configured on thi
s device.
W/Finsky ( 4043): [1] FinskyApp.getDfeApi: No account configured on this device
.
D/Finsky ( 4043): [1] PackageVerificationReceiver.onReceive: Verification reque
sted, id = 1
D/Finsky ( 4043): [1] WorkerTask.onPreExecute: Verification Requested for id =
1, data=file:///storage/emulated/0/DarkWhoamI_v1.1.apk flags=16 fromVerification
Activity=false
W/ResourcesManager( 4079): Asset path '/system/framework/com.android.media.remot
edisplay.jar' does not exist or contains no resources.
W/ResourcesManager( 4079): Asset path '/system/framework/com.android.location.pr
ovider.jar' does not exist or contains no resources.
I/MultiDex( 4079): VM with version 2.1.0 has multidex support
I/MultiDex( 4079): install
I/MultiDex( 4079): VM has multidex support, MultiDex support library is disabled
.
V/JNIHelp ( 4079): Registering com/google/android/gms/org/conscrypt/NativeCrypto
's 227 native methods...
D/Finsky ( 4043): [1] GmsCoreHelper.cleanupNlp: result=false type=4
D/Finsky ( 4043): [1] RestoreTracker.stopServiceIfDone: Restore complete with 0
success and 0 failed.
I/ProviderInstaller( 4079): Installed default security provider GmsCore_OpenSSL
D/GCM ( 1477): GcmService start Intent { act=com.google.android.gms.INITIALI
ZE flg=0x10 pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmServic
e } com.google.android.gms.INITIALIZE
D/AuthorizationBluetoothService( 1477): Received GmsCore event: Intent { act=com
.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=com.googl
e.android.gms/.auth.be.proximity.authorization.bt.AuthorizationBluetoothService$
AutoStarter }.
V/GmsCoreStatsServiceLauncher( 1835): Received broadcast intent Intent { act=com
.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=com.googl
e.android.gms/.common.stats.GmsCoreStatsServiceLauncher }
D/WearableService( 1933): callingUid 10022, callindPid: 1933
E/MDM ( 1413): [144] b.run: Couldn't connect to Google API client: Connectio
nResult{statusCode=API_UNAVAILABLE, resolution=null}
D/LocationInitializer( 1835): Restart initialization of location
I/Timeline( 687): Timeline: Activity_windows_visible id: ActivityRecord{160be2c
1 u0 com.android.packageinstaller/.InstallAppProgress t17} time:386239
V/Finsky ( 4043): [1] GearheadStateMonitor.onReady: sIsProjecting:false
I/qtaguid ( 4043): Failed write_ctrl(u 36) res=-1 errno=22
I/qtaguid ( 4043): Untagging socket 36 failed errno=-22
W/NetworkManagementSocketTagger( 4043): untagSocket(36) failed with errno -22
D/Finsky ( 4043): [1] 1.onResponse: Verification id=1 response=0
D/Finsky ( 4043): [1] PackageVerificationReceiver.onReceive: Verification reque
sted, id = 1
D/DefContainer( 3537): Copying /storage/emulated/0/DarkWhoamI_v1.1.apk to base.a
pk
I/auditd ( 4122): Starting up
E/auditd ( 4122): Failed on audit_set_pid with error: Protocol not supported
I/auditd ( 4122): Exiting
D/audio_hw_primary( 197): disable_audio_route: reset and update mixer path: low
-latency-playback
D/audio_hw_primary( 197): disable_snd_device: snd_device(2: speaker)
D/PackageManager( 687): Renaming /data/app/vmdl500165273.tmp to /data/app/com.a
fah_me.dark.whoami-1
V/BackupManagerService( 687): restoreAtInstall pkg=com.afah_me.dark.whoami toke
n=2 restoreSet=0
V/BackupManagerService( 687): Finishing install immediately
W/Settings( 687): Setting install_non_market_apps has moved from android.provid
er.Settings.Global to android.provider.Settings.Secure, returning read-only valu
e.
I/InputReader( 687): Reconfiguring input devices. changes=0x00000020
D/BackupManagerService( 687): Received broadcast Intent { act=android.intent.ac
tion.PACKAGE_ADDED dat=package:com.afah_me.dark.whoami flg=0x4000010 (has extras
) }
W/BackupManagerService( 687): Removing schedule queue dupe of com.afah_me.dark.
whoami
D/installd( 198): aapt source_apk=/data/app/com.afah_me.dark.whoami-1/base.apk
internal_path=assets/icons/ out_restable=/data/resource-cache/com.afah_me.dark.w
hoami/icons uid=50070, pkgId=98, min_sdk_version=21, common_res_path=
D/Documents( 3712): Update found 6 roots in 63ms
E/cutils-trace( 4128): Error opening trace file: No such file or directory (2)
W/ResourcesManager( 1112): Asset path '/system/framework/com.google.android.medi
a.effects.jar' does not exist or contains no resources.
I/Launcher( 1112): Deferring update until onResume
I/art ( 687): Explicit concurrent mark sweep GC freed 122434(6MB) AllocSpac
e objects, 22(7MB) LOS objects, 32% free, 32MB/48MB, paused 79.554ms total 538.9
48ms
I/ActivityManager( 687): Start proc 4135:com.google.android.partnersetup/u0a25
for broadcast com.google.android.partnersetup/.RlzPingBroadcastReceiver
D/ChimeraCfgMgr( 1835): Loading module com.google.android.gms.games from APK com
.google.android.gms
D/ChimeraCfgMgr( 1835): Loading module com.google.android.gms.vision from APK co
m.google.android.gms
D/Vision ( 1835): Received broadcast Intent { act=android.intent.action.PACKAGE
_ADDED dat=package:com.afah_me.dark.whoami flg=0x4000010 cmp=com.google.android.
gms/.vision.DependencyBroadcastReceiverProxy (has extras) }
D/PackageBroadcastService( 1835): Received broadcast action=android.intent.actio
n.PACKAGE_ADDED and uri=com.afah_me.dark.whoami
D/Vision ( 1835): Failed to find package metadata for com.afah_me.dark.whoami
D/Vision ( 1835): No vision deps
I/ConfigService( 1477): onCreate
I/ConfigFetchService( 1835): onStartCommand Intent { act=android.intent.action.P
ACKAGE_ADDED dat=package:com.afah_me.dark.whoami cmp=com.google.android.gms/.con
fig.ConfigFetchService (has extras) }
I/ConfigFetchService( 1835): launchTask
I/ConfigFetchService( 1835): service connected
I/PeopleContactsSync( 1835): CP2 sync disabled
D/ConfigFetchService( 1835): ConfigApi connection successful.
V/ConfigFetchTask( 1835): ConfigFetchTask getDeviceDataVersionInfo(): ABFEt1XZ_s
LyAHRryZH2gS3VcNRc16ABP_sUsHwq2H_XUgOgq3hjuIiFHo9qgYEXHtGccGbpQLSdl4_OLMiSNUnylj
RlzvkqbxN7gpdRqCbNZzpw5jD-Ft8m-R4Pkc4B18LppXEEn7ByASg0oJbY6C6WVdCOCkmy8M79QL3_B9
GOso_g7TJvMZX-7ldsYEdcidxU0V1yjPXk6MdHduN8voL4D5p9qWQ4Y6fNNoPjgHwT1jynGWYzRRQ2B6
U8zb_b8sh_yS23ZLluCg8oRDywR8RXAoFt8f4ugnDwyveIkoH-d5Ixh9W6dUtltQqd0aZVX0ZxSSK4sx
wE8P_1YDAPINSnWKu1WK-sPKsVTGyMTMZ8G6KzHgUkK84
I/UpdateIcingCorporaServi( 2643): Updating corpora: APPS=com.afah_me.dark.whoami
, CONTACTS=MAYBE
I/GoogleURLConnFactory( 1835): Using platform SSLCertificateSocketFactory
I/UpdateIcingCorporaServi( 2643): UpdateCorporaTask done [took 26 ms] updated ap
ps [took 26 ms]
D/installd( 198): aapt source_apk=/data/app/com.afah_me.dark.whoami-1/base.apk
internal_path=assets/overlays/common/ out_restable=/data/resource-cache/com.afah
_me.dark.whoami/common uid=50070, pkgId=95, min_sdk_version=21, common_res_path=
E/cutils-trace( 4167): Error opening trace file: No such file or directory (2)
D/installd( 198): aapt source_apk=/data/app/com.afah_me.dark.whoami-1/base.apk
internal_path=assets/overlays/com.android.cellbroadcastreceiver/ out_restable=/d
ata/resource-cache/com.afah_me.dark.whoami/com.android.cellbroadcastreceiver uid
=50070, pkgId=97, min_sdk_version=21, common_res_path=/data/resource-cache/com.a
fah_me.dark.whoami/common/resources.apk
E/cutils-trace( 4168): Error opening trace file: No such file or directory (2)
D/installd( 198): idmap target_apk=/system/priv-app/CellBroadcastReceiver/CellB
roadcastReceiver.apk overlay_apk=/data/app/com.afah_me.dark.whoami-1/base.apk ca
che_path=/data/resource-cache/com.afah_me.dark.whoami/com.android.cellbroadcastr
eceiver uid=50005
I/ConfigFetchService( 1835): fetch service done; releasing wakelock
I/ConfigFetchService( 1835): stopping self
D/installd( 198): aapt source_apk=/data/app/com.afah_me.dark.whoami-1/base.apk
internal_path=assets/overlays/com.android.gallery3d/ out_restable=/data/resource
-cache/com.afah_me.dark.whoami/com.android.gallery3d uid=50070, pkgId=97, min_sd
k_version=21, common_res_path=/data/resource-cache/com.afah_me.dark.whoami/commo
n/resources.apk
E/cutils-trace( 4170): Error opening trace file: No such file or directory (2)
D/installd( 198): idmap target_apk=/system/app/Gallery2/Gallery2.apk overlay_ap
k=/data/app/com.afah_me.dark.whoami-1/base.apk cache_path=/data/resource-cache/c
om.afah_me.dark.whoami/com.android.gallery3d uid=50044
D/installd( 198): aapt source_apk=/data/app/com.afah_me.dark.whoami-1/base.apk
internal_path=assets/overlays/com.android.calendar/ out_restable=/data/resource-
cache/com.afah_me.dark.whoami/com.android.calendar uid=50070, pkgId=97, min_sdk_
version=21, common_res_path=/data/resource-cache/com.afah_me.dark.whoami/common/
resources.apk
E/cutils-trace( 4172): Error opening trace file: No such file or directory (2)
E/InstallTheme( 198): Failed to generate resource table for split ''
E/InstallTheme( 198): assets/overlays/com.android.calendar/res/values/drawables
.xml:4: error: Error: Resource is not public. (at 'list_primary_holo' with value
'@android:color/background_material_dark').
E/InstallTheme( 198):
E/installd( 198): aapt failed, status=0x0100
E/PackageManager( 687): Unable to process theme, uninstalling com.afah_me.dark.
whoami
E/PackageManager( 687): com.android.server.pm.PackageManagerService$AaptExcepti
on: Failed to run aapt
E/PackageManager( 687): at com.android.server.pm.PackageManagerService.c
ompileResourcesWithAapt(PackageManagerService.java:7071)
E/PackageManager( 687): at com.android.server.pm.PackageManagerService.c
ompileResources(PackageManagerService.java:6987)
E/PackageManager( 687): at com.android.server.pm.PackageManagerService.c
ompileResourcesIfNeeded(PackageManagerService.java:6976)
E/PackageManager( 687): at com.android.server.pm.PackageManagerService.c
ompileResourcesAndIdmapIfNeeded(PackageManagerService.java:6959)
E/PackageManager( 687): at com.android.server.pm.PackageManagerService.p
rocessThemeResources(PackageManagerService.java:14691)
E/PackageManager( 687): at android.app.ApplicationPackageManager.process
ThemeResources(ApplicationPackageManager.java:1859)
E/PackageManager( 687): at com.android.server.ThemeService$ResourceProce
ssingHandler.handleMessage(ThemeService.java:197)
E/PackageManager( 687): at android.os.Handler.dispatchMessage(Handler.ja
va:102)
E/PackageManager( 687): at android.os.Looper.loop(Looper.java:135)
E/PackageManager( 687): at android.os.HandlerThread.run(HandlerThread.ja
va:61)
I/ActivityManager( 687): Force stopping com.afah_me.dark.whoami appid=10070 use
r=-1: uninstall pkg
I/ActivityManager( 687): Force stopping com.afah_me.dark.whoami appid=10070 use
r=0: pkg removed
W/GeofencerStateMachine( 1413): Ignoring removeGeofence because network location
is disabled.
D/BackupManagerService( 687): Received broadcast Intent { act=android.intent.ac
tion.PACKAGE_REMOVED dat=package:com.afah_me.dark.whoami flg=0x4000010 (has extr
as) }
D/JobSchedulerService( 687): Receieved: android.intent.action.PACKAGE_REMOVED
I/InputReader( 687): Reconfiguring input devices. changes=0x00000020
I/art ( 3586): Explicit concurrent mark sweep GC freed 1563(112KB) AllocSpac
e objects, 0(0B) LOS objects, 24% free, 16MB/21MB, paused 212us total 18.477ms
I/Launcher( 1112): Deferring update until onResume
I/LatinIME:LogUtils( 965): Dictionary info: dictionary = ? ; version = 26 ; dat
e = 1351062238
D/Documents( 3712): Update found 6 roots in 48ms
D/VoicemailCleanupService( 2555): Cleaning up data for package: com.afah_me.dark
.whoami
I/Launcher( 1112): Deferring update until onResume
W/Launcher( 1112): setApplicationContext called twice! old=com.android.launcher3
[email protected] [email protected]
0c07
E/NetworkScheduler.SchedulerReceiver( 1477): Invalid parameter app
E/NetworkScheduler.SchedulerReceiver( 1477): Invalid package name : Perhaps you
didn't include a PendingIntent in the extras?
D/PackageBroadcastService( 1835): Received broadcast action=android.intent.actio
n.PACKAGE_REMOVED and uri=com.afah_me.dark.whoami
D/ChimeraCfgMgr( 1835): Loading module com.google.android.gms.games from APK com
.google.android.gms
D/AccountUtils( 1835): Clearing selected account for com.afah_me.dark.whoami
I/LocationSettingsChecker( 1835): Removing dialog suppression flag for package c
om.afah_me.dark.whoami
I/ConfigFetchService( 1835): onStartCommand Intent { act=android.intent.action.P
ACKAGE_REMOVED dat=package:com.afah_me.dark.whoami cmp=com.google.android.gms/.c
onfig.ConfigFetchService (has extras) }
D/GOOGLEHELP_CompatibleDatabase( 1835): Open SQLiteDatabase: /data/data/com.goog
le.android.gms/databases/metrics.db, release reference: 1
D/GOOGLEHELP_CompatibleDatabase( 1835): Acquire reference of SQLiteDatabase: /da
ta/data/com.google.android.gms/databases/metrics.db: 2
D/gH_MetricsDatabase( 1835): 0 metrics were deleted when clearing package com.af
ah_me.dark.whoami.
D/GOOGLEHELP_CompatibleDatabase( 1835): Release reference of SQLiteDatabase: /da
ta/data/com.google.android.gms/databases/metrics.db: 1
I/ConfigFetchService( 1835): service connected
I/PeopleContactsSync( 1835): CP2 sync disabled
D/GOOGLEHELP_CompatibleDatabase( 1835): Open SQLiteDatabase: /data/data/com.goog
le.android.gms/databases/help_responses.db, release reference: 1
D/GOOGLEHELP_CompatibleDatabase( 1835): Acquire reference of SQLiteDatabase: /da
ta/data/com.google.android.gms/databases/help_responses.db: 2
D/GOOGLEHELP_CompatibleDatabase( 1835): Release reference of SQLiteDatabase: /da
ta/data/com.google.android.gms/databases/help_responses.db: 1
D/GOOGLEHELP_CompatibleDatabase( 1835): Open SQLiteDatabase: /data/data/com.goog
le.android.gms/databases/auto_complete_suggestions.db, release reference: 1
D/GOOGLEHELP_CompatibleDatabase( 1835): Acquire reference of SQLiteDatabase: /da
ta/data/com.google.android.gms/databases/auto_complete_suggestions.db: 2
D/GOOGLEHELP_CompatibleDatabase( 1835): Release reference of SQLiteDatabase: /da
ta/data/com.google.android.gms/databases/auto_complete_suggestions.db: 1
D/GOOGLEHELP_CompatibleDatabase( 1835): Close SQLiteDatabase: /data/data/com.goo
gle.android.gms/databases/metrics.db, release reference: 0
D/GOOGLEHELP_CompatibleDatabase( 1835): Close SQLiteDatabase: /data/data/com.goo
gle.android.gms/databases/help_responses.db, release reference: 0
D/GOOGLEHELP_CompatibleDatabase( 1835): Close SQLiteDatabase: /data/data/com.goo
gle.android.gms/databases/auto_complete_suggestions.db, release reference: 0
I/Icing ( 1835): doRemovePackageData com.afah_me.dark.whoami
W/ContextImpl( 3686): Calling a method in the system process without a qualified
user: android.app.ContextImpl.startService:1721 android.content.ContextWrapper.
startService:522 android.content.ContextWrapper.startService:522 com.android.key
chain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleRe
ceiver:2641
I/UpdateIcingCorporaServi( 2643): Updating corpora: APPS=com.afah_me.dark.whoami
, CONTACTS=MAYBE
I/UpdateIcingCorporaServi( 2643): UpdateCorporaTask done [took 21 ms] updated ap
ps [took 21 ms]
I/art ( 687): Explicit concurrent mark sweep GC freed 17743(1297KB) AllocSp
ace objects, 14(5MB) LOS objects, 33% free, 27MB/41MB, paused 1.428ms total 173.
967ms
W/PackageManager( 687): Couldn't remove dex file for package: at location /dat
a/app/com.afah_me.dark.whoami-1/base.apk, retcode=-1
E/org.cyanogenmod.themes.provider.AppReceiver( 3586): Unable to update theme com
.afah_me.dark.whoami, result=-400
I/ActivityManager( 687): Killing 3733:com.android.externalstorage/u0a10 (adj 15
): empty #17
V/ActivityManager( 687): killProcessGroupAsync took 41 ms for PID 3733 on threa
d 17
I/auditd ( 4200): Starting up
E/auditd ( 4200): Failed on audit_set_pid with error: Protocol not supported
I/auditd ( 4200): Exiting
I/ConfigService( 1477): onDestroy
I/auditd ( 4202): Starting up
E/auditd ( 4202): Failed on audit_set_pid with error: Protocol not supported
I/auditd ( 4202): Exiting
^C
E:\Nexus5\Stock>
Fast Update
Changelog:
v1.2
Fixed issue can't install by @Enoalife
Fixed QS tile in settings
Fixed music theme (eleven)
Themed sony apps (music, album, video)
Now you can't see material light
etc
NB:
If not themed all please reboot or soft reboot
If still failed to install please give me logcat

[Solved] Problem while running the app

Hello everybody, I'm having a problem developing an application (a launcher) with android studio.
Log:
01-31 15:26:27.744 22983-22983/joe2k01.launcher E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at joe2k01.launcher.DrawerLongClickListener.onItemLongClick(DrawerLongClickListener.java:36)
at android.widget.AbsListView.performLongPress(AbsListView.java:2878)
at android.widget.AbsListView$CheckForLongPress.run(AbsListView.java:2828)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method)
01-31 15:26:27.986 22983-22989/joe2k01.launcher D/jdwp: processIncoming
01-31 15:26:27.986 22983-22989/joe2k01.launcher D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x40002CA3, flags=0x0, dataLen=0x9
01-31 15:26:27.986 22983-22989/joe2k01.launcher D/jdwp: sendBufferedRequest : len=0x34
Click to expand...
Click to collapse
Code :
package joe2k01.launcher;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.SlidingDrawer;
import android.widget.TextView;
public class DrawerLongClickListener implements AdapterView.OnItemLongClickListener
{
SlidingDrawer drawerForAdapteer;
RelativeLayout homeViewForAdapter;
Context mContext;
public DrawerLongClickListener(Context ctxt, SlidingDrawer slidingDrawer, RelativeLayout homeView)
{
mContext = ctxt;
drawerForAdapteer = slidingDrawer;
homeViewForAdapter = homeView;
}
@override
public boolean onItemLongClick(AdapterView arg0, View item, int arg2, long arg3)
{
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(item.getWidth(), item.getHeight());
lp.leftMargin = (int) item.getX();
lp.topMargin = (int) item.getY();
LayoutInflater li = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout ll = (LinearLayout) li.inflate(R.layout.drawer_layout, null);
((ImageView)ll.findViewById(R.id.icon_image)).setImageDrawable(((ImageView) item.findViewById(R.id.icon_image)).getDrawable());
((TextView)ll.findViewById(R.id.icon_text)).setText(((TextView) item.findViewById(R.id.icon_text)).getText());
homeViewForAdapter.addView(ll, lp);
drawerForAdapteer.animateClose();
return false;
}
}
Click to expand...
Click to collapse
I'm tryng the app on my phone that runs android 4.2.1.
Can anyone help me? :silly:
Anyone can help me?
NullPointerException indicates that one of objects that you're using has null value. You can set breakpoint at the line on which this exceptions happens and inspect values of your objects. To do that, you should run application in Debug mode (a button next to Run).
Ok man, I' ll try later
Thank you, I fixed it. :good: :highfive:
Correct. A object has not yet create but you already call some method of it, system return null pointer
I've already solved the problem

Dagger2 And Xposed

So I'm trying to hook my specific application's class onCreate method, because that's when I initialize my DaggerComponent.
My application looks like this:
Code:
private ApplicationComponent component;
@Override
public void onCreate() {
super.onCreate();
component = DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this))
.build();
}
public ApplicationComponent getComponent() {
return component;
}
And in my Xposed loadPackage method, I'm trying to hook the component so I can inject it into the module like so:
Code:
String name = lpparam.packageName;
if (name.equals(Common.PACKAGE_NAME)) {
XposedHelpers.findAndHookMethod(Application.class, "attach", Context.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
findAndHookMethod(
XposedHelpers.findClass(Common.APPLICATION, lpparam.classLoader),
"onCreate",
new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
Application application = (Application) param.thisObject;
Class clazz = param.method.getDeclaringClass();
for (Field field: clazz.getDeclaredFields()) {
String typeName = field.getType().getName();
if (typeName.equals(ApplicationComponent.class.getName())) {
Object object = XposedHelpers.getObjectField(param.thisObject, field.getName());
Class<?> component = object.getClass();
Method injector = component.getDeclaredMethod(
ApplicationComponent.INJECTOR, Loader.class);
injector.invoke(Loader.this);
Logg.log("GOT PAST THE BULL");
}
}
}
});
}
});
}
However, this always leads to a ClassNotFoundException where my Loader (the xposed module) is not found on my apk.
Code:
03-29 15:13:05.186 8571-8571/software.umlgenerator I/Xposed: java.lang.NoClassDefFoundError: software/umlgenerator/xposed/loaders/Loader
at java.lang.Class.getDeclaredConstructorOrMethod(Native Method)
at java.lang.Class.getConstructorOrMethod(Class.java:468)
at java.lang.Class.getDeclaredMethod(Class.java:640)
at software.umlgenerator.xposed.loaders.Loader$1$1.afterHookedMethod(Loader.java:67)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
at software.umlgenerator.UMLApplication.onCreate(Native Method)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
at android.app.ActivityThread.handleBindApplication(Native Method)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "software.umlgenerator.xposed.loaders.Loader" on path: DexPathList[[zip file "/data/app/software.umlgenerator-1.apk"],nativeLibraryDirectories=[/data/app-lib/software.umlgenerator-1, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at java.lang.Class.getDeclaredConstructorOrMethod(Native Method)*
at java.lang.Class.getConstructorOrMethod(Class.java:468)*
at java.lang.Class.getDeclaredMethod(Class.java:640)*
at software.umlgenerator.xposed.loaders.Loader$1$1.afterHookedMethod(Loader.java:67)*
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)*
at software.umlgenerator.UMLApplication.onCreate(Native Method)*
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)*
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)*
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)*
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)*
at android.app.ActivityThread.handleBindApplication(Native Method)*
at android.app.ActivityThread.access$1500(ActivityThread.java:135)*
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)*
at android.os.Handler.dispatchMessage(Handler.java:102)*
at android.os.Looper.loop(Looper.java:136)*
at android.app.ActivityThread.main(ActivityThread.java:5001)*
at java.lang.reflect.Method.invokeNative(Native Method)*
at java.lang.reflect.Method.invoke(Method.java:515)*
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)*
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)*
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)*
at dalvik.system.NativeStart.main(Native Method)*
Any ideas?

Categories

Resources