Xposed does not find method. - Xposed Framework Development

Hello.
I'm trying to create a module for the recents window.
When I'm trying to do it, I get the error of "NoSuchMethodError".
Code:
java.lang.NoSuchMethodError: com.android.systemui.recents.RecentsActivity#addSearchBarWidgetView()#exact
What can I do?
The method does exist in Google's source code.

Related

Help! framework.jar modification causes bootloop

I appreciate the time you are taking to read this. I searched a lot, but could not find an answer to my problem.
I am trying to implement a recent patch to bidi text rendering that was created for CM rom and runs on Nexus 1. I downloaded the vanilla source code to 2.1, and compiled it with and without the patch. Then I disassembled framework.jar and compared the smali files, to discover that the following ones were modified:
android/graphics/Canvas.smali
android/graphics/Canvas$EdgeType.smali
android/graphics/Canvas$VertexMode.smali
android/text/Layout.smali
android/text/SpannableStringBuilder.smali
android/text/Styled.smali
android/widget/TextView$CharWrapper.smali
My idea was that if I run baksmali on the framework.jar file from my Desire, replace these files with the new ones, run smali on the result, repack it as framework.jar and upload it to the device - the fix will be implemented.
This actually worked very well for a previous fix, which involved only the file StaticLayout.smali. It worked without having to sign framework.jar; however, that fix did not change the file size, whereas the current one does change it - especially for Canvas.smali. I did not try to sign framework.jar - I don't really know how to and if it is necessary.
The result was a bootloop. Logcat showed that the device is unable to load a native library:
Code:
D/AndroidRuntime( 103): --- registering native functions ---
W/dalvikvm( 103): Unable to register: not native: Landroid/graphics/Canvas;.drawText (Ljava/lang/String;FFLandroid/graphics/Paint;)V
E/JNIHelp ( 103): RegisterNatives failed for 'android/graphics/Canvas'
E/AndroidRuntime( 103): Unable to register all android natives
This is where I am stuck. What I really wanted to do was to create a script-based fix that would work on any device running 2.1. It was possible for the StaticLayout fix. Now I'll settle for figuring out how to make it work for the Desire.
I am attaching Canvas.smali, the file I think is responsible for the problem, in 2 forms: vanilla is compiled from source with no modification, patched is compiled from source after the patch. It seems that the other Canvas files were unchanged by the modification.
Thank you very much in advance!
I am a fool - you would need, of course, the smali file that actually works on the device. Attached here.
ClassicalDude said:
I am a fool - you would need, of course, the smali file that actually works on the device. Attached here.
Click to expand...
Click to collapse
this is a bit off topic but how to change in .jar file? thanks
jullejul said:
this is a bit off topic but how to change in .jar file? thanks
Click to expand...
Click to collapse
http://www.villainrom.co.uk/viewtopic.php?f=61&t=921&start=0
this will teach you how to patch a jar file..
hi thanxxxx

Compiling Lollipop

when I try to compile Lollipop
I get this error
device/nokia/normandy/Android.mk:27: *** my-dir must be called before including any other makefile ... stop
I've been search on google and XDA
but all the same, must edit the Android.mk, which " LOCAL_PATH :=$(call my-dir) " must be at the beginning
I'm done with it, and still get that error
anyone know how to fix this?

CM 12-1 compile htc m9 himaul image

Hi all,
I have downloaded the sources for cm 12.1, I have already build many ROMs for htc m7, m8 and some others. Cyanogen have not released the source for htc m9 yet, however you and find a github repo with all the neccesary parts for building you himaul ROM over a CM_12.1 source. It is called Hima-Dev
I have cloned all necessary parts for building it and I have placed them into the right place. Bellow I attach a listh of what I downloaded.
The kernel
Then the common vendor propietary folder
And finally the device specific folder along with its common folder for device.
Before building I run the ./extract-files script in order to get all propietary libraries, apps and files. Then I start a building for "himaul" and everythhing works very ok. (breakfast himaul && brunch himaul)
The problem comes after install the new ROM. It raises many exceptions during boot screen. Bellow I attach some of the log messages I get.
Code:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__htclog_init_mask" referenced by "libtime_genoff.so"...
java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.IActivityManager.handleApplicationCrash(android.os.IBinder, android.app.ApplicationErrorReport$CrashInfo)' on a null object reference
My question is. Should I wait for cyanogen in order to get a stable source or is there any workout for solving this? :good:

System Classes Import

I've observed that some modules source code have system package specific imports
example:
Code:
import com.android.systemui.statusbar.BaseStatusBar;
import com.android.systemui.statusbar.NotificationData;
import com.android.systemui.statusbar.NotificationData.Entry;
I've picked this code from serajr blurred systemui module.
I'm using android studio but even in eclipse I cant import them
but I've tried lots of methods but I coudn't find a way for importing it, it says that it's not there, can someone help me please?
thank you
Depends on the SDK version you're targeting.
If I recall correctly before Lollipop (or maybe KitKat?) you could simply import system classes by adding private Andoid libraries to classpath in your IDE.
But for never Androids you need to move all your Class loading to handleLoadPackage in the module because of ClassLoader changes, or else your module isn't gonna work even if it compiles right.
XspeedPL said:
Depends on the SDK version you're targeting.
If I recall correctly before Lollipop (or maybe KitKat?) you could simply import system classes by adding private Andoid libraries to classpath in your IDE.
But for never Androids you need to move all your Class loading to handleLoadPackage in the module because of ClassLoader changes, or else your module isn't gonna work even if it compiles right.
Click to expand...
Click to collapse
I solved it by adding the hidden libs and decompiling systemui, picking the dex file, converting it to jar and adding provide dependency on android studio, but thanks anyway
Xiaomi Poco F1 [ROM] [8.1.0] ResurrectionRemix v6.2.1
I installed xposed v90beta3, I can not start the module, it gives an error.
Help solve the problem
zygote64(3278): ClassLoaderContext size mismatch. expected=1, actual=2 (PCL[] | PCL[];PCL[/data/dalvik-cache/xposed_XResourcesSuperClass.dex*2802528989:/data/dalvik-cache/xposed_XTypedArraySuperClass.dex*708326108])

How do I provide libqdMetaData_intermediates/export_includes?

When trying to build AOSP Nougat for the Z1C according to Sony's HowTo (which is for MarshMallow) the build runs on the following error:
Code:
Running kati to generate build-aosp_d5503.ninja...
No need to regenerate ninja file
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/target/product/amami/obj/SHARED_LIBRARIES/libqdMetaData_intermediates/export_includes', needed by 'out/target/product/amami/obj/SHARED_LIBRARIES/camera.msm8974_intermediates/import_includes', missing and no known rule to make it
make: *** [build/core/ninja.mk:149: ninja_wrapper] Error 1
#### make failed to build some targets (5 seconds) ####
How do I fix this? I don't know how the build chain works ...looks like there can always be an export_includes folder and an import_includes folder. I guess these are folders for C header files. Sony's manifest xml removes the default camera and adds a different camera project. I already tried disabling both xml tags, re-run lunch and started compiling again - but with the same result.
Maybe I should start with this question: How can I provide a required dependency in the build chain in general?
Meanwhile I found Sony's HowTo for Nougat and now all dependencies are fulfilled. Anyway I would like to understand the build process, so answers to my question are still welcome.
thorstenhirsch said:
Meanwhile I found Sony's HowTo for Nougat and now all dependencies are fulfilled. Anyway I would like to understand the build process, so answers to my question are still welcome.
Click to expand...
Click to collapse
I don't think you're gonna get anywhere with this because there are no Nougat binaries available ATM.

Categories

Resources