NoSuchMethodError when running recompiled app - Android Q&A, Help & Troubleshooting

Hi,
Ive decompiled the miui camera (miui 12, Redmi Note 8 Pro) and have recompiled it and included some libs, I have renamed the package and a few permissions (is this the cause of the error?) so as not to cause conflicts with the system camera app. I run into a problem with registerMarshalQueryable.. which from what I can tell is a camera2 method/class, so really it should just be there in the system, unless its looking in the wrong place?
Below is the error
2020-09-06 16:11:26.182 2694-2694/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.newcamera, PID: 2694
java.lang.NoSuchMethodError: No static method registerMarshalQueryable(Landroid/hardware/camera2/marshal/MarshalQueryableV in class Landroid/hardware/camera2/marshal/MarshalRegistry; or its super classes (declaration of 'android.hardware.camera2.marshal.MarshalRegistry' appears in /system/framework/framework.jar)
at com.android.camera2.vendortag.struct.MarshalQueryableRegister.preload(MarshalQueryableRegister.java:1)
at com.android.camera.CameraAppImpl.onCreateApplicationDelegate(CameraAppImpl.java:11)
at com.android.camera.CameraAppImpl.onCreateApplicationDelegate(CameraAppImpl.java:1)
at miui.external.Application.attachBaseContext(Application.java:4)
at android.app.Application.attach(Application.java:376)
at android.app.Instrumentation.newApplication(Instrumentation.java:1156)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1222)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6562)
at android.app.ActivityThread.access$1500(ActivityThread.java:230)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1911)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7551)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
Click to expand...
Click to collapse

Related

[Solved] Compiling Apps Problem

I've been trying to compile AOSP apps individually and that doesn't seem to work. These are the steps I took:
1. Install GCC and Java
2. The repo commands (sync from android git etc)
3. make Gallery3D
4. push Gallery3D.apk /system/app/
So as you can see, compilation went on fine. And pushing to my phone also went fine (CM 5.0.4.1). However, when I try to run Gallery3D, I got FC. Here's my logcat:
I/ActivityManager( 93): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.cooliris.media/.Gallery }
V/RenderScript_jni( 6329): surfaceDestroyed
V/RenderScript( 6329): setSurface 0 0 0x0
D/ViewFlipper( 6329): updateRunning() mVisible=false, mStarted=true, mUserPresent=true, mRunning=false
D/LocationManager( 6198): removeUpdates: listener = [email protected]
D/NetworkLocationProvider( 93): removeListener(): wallpaper
D/NetworkLocationProvider( 93): enableLocationTracking(): false
E/NetworkLocationProvider( 93): releaseCheckLocationLock: wake lock has already been released
D/SensorManager(18699): found sensor: BMA150 3-axis Accelerometer, handle=0
D/SensorManager(18699): found sensor: AK8973 3-axis Magnetic field sensor, handle=1
D/SensorManager(18699): found sensor: AK8973 Orientation sensor, handle=2
D/SensorManager(18699): found sensor: CM3602 Proximity sensor, handle=4
D/SensorManager(18699): found sensor: CM3602 Light sensor, handle=5
W/ResourceType(18699): Failure getting entry for 0x7f02003a (t=1 e=58) in package 0: 0xffffffb5
D/AndroidRuntime(18699): Shutting down VM
W/dalvikvm(18699): threadid=3: thread exiting with uncaught exception (group=0x4001b178)
E/AndroidRuntime(18699): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime(18699): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cooliris.media/com.cooliris.media.Gallery}: android.content.res.Resources$NotFoundException: Resource ID #0x7f02003a
E/AndroidRuntime(18699): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
E/AndroidRuntime(18699): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
E/AndroidRuntime(18699): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
E/AndroidRuntime(18699): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
E/AndroidRuntime(18699): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(18699): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(18699): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime(18699): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(18699): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(18699): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(18699): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(18699): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(18699): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f02003a
E/AndroidRuntime(18699): at android.content.res.Resources.getValue(Resources.java:891)
E/AndroidRuntime(18699): at android.content.res.Resources.getDrawable(Resources.java:579)
E/AndroidRuntime(18699): at com.cooliris.media.HudLayer.<init>(HudLayer.java:121)
E/AndroidRuntime(18699): at com.cooliris.media.GridLayer.<init>(GridLayer.java:134)
E/AndroidRuntime(18699): at com.cooliris.media.Gallery.onCreate(Gallery.java:78)
E/AndroidRuntime(18699): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(18699): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
E/AndroidRuntime(18699): ... 11 more
I/Process ( 93): Sending signal. PID: 18699 SIG: 3
I/dalvikvm(18699): threadid=7: reacting to signal 3
I/dalvikvm(18699): Wrote stack trace to '/data/anr/traces.txt'
I/DumpStateReceiver( 93): Added state dump to 1 crashes
Click to expand...
Click to collapse
Besides this, I noticed that my Gallery3D.apk is smaller size(~500kb) than the one which comes with CM (~700kb).
Any help guys? Been trying to figure this out and googling. What did I miss?
arctu said:
I've been trying to compile AOSP apps individually and that doesn't seem to work. These are the steps I took:
1. Install GCC and Java
2. The repo commands (sync from android git etc)
3. make Gallery3D
4. push Gallery3D.apk /system/app/
So as you can see, compilation went on fine. And pushing to my phone also went fine (CM 5.0.4.1). However, when I try to run Gallery3D, I got FC. Here's my logcat:
Besides this, I noticed that my Gallery3D.apk is smaller size(~500kb) than the one which comes with CM (~700kb).
Any help guys? Been trying to figure this out and googling. What did I miss?
Click to expand...
Click to collapse
Q&A section ma man
I believe this is the right section, it's a question on compiling/development. I believe Gallery3D might be lacking mdpi images, and you're compiling for mdpi devices (may be wrong, not able to check now).
What you can do is to do a search for "PRODUCT_LOCALES", within all your files, I think it's in build.mk or product.mk. You will see that the default is mdpi, follow by <something> (can't remember now) += nodpi. Add a <something> += hdpi after the nodpi line, and compile and push again. I had a similar issue and was able to fix it this way, with advice from cyanogen.
Thanks Wysie. That helps!
To those facing the same problem here are the exact steps I took (using terminal and nano):
1. Open/Edit build/core/product_config.mk:
nano build/core/product_config.mk
Click to expand...
Click to collapse
2. Find:
PRODUCT_LOCALES += nodpi
Click to expand...
Click to collapse
3. Add in after that line:
PRODUCT_LOCALES += hdpi
Click to expand...
Click to collapse
4. Save and Exit: Ctrl+X
5. Run make again:
make Gallery3D
Click to expand...
Click to collapse
If you did everything correctly, and have compiled before, the compiler should write this at the beginning:
*** Build configuration changed: "generic-eng-{mdpi,nodpi}" -> "generic-eng-{mdpi,nodpi,hdpi}"
*** Forcing "make installclean"...
*** Done with the cleaning, now starting the real build.
Click to expand...
Click to collapse
It works now. Hope this helps the others.
arctu said:
Thanks Wysie. That helps!
To those facing the same problem here are the exact steps I took (using terminal and nano):
1. Open/Edit build/core/product_config.mk:
2. Find:
3. Add in after that line:
4. Save and Exit: Ctrl+X
5. Run make again:
If you did everything correctly, and have compiled before, the compiler should write this at the beginning:
It works now. Hope this helps the others.
Click to expand...
Click to collapse
cheers, helped me out
after quick grep to confirm I used sed
Code:
sed s/PRODUCT_LOCALES\ \+\=\ nodpi/PRODUCT_LOCALES\ \+\=\ hdpi/ build/core/product_config.mk -i

[Q] [dev's please]Help needed in porting rom

Hey guyz having a doubt,
If i try to port a rom of a single camera smartphone to a dual camera phone
what are the changes to be made to the files???
is it relared to modules or kernel changes??
Also tell what are the files needed to be replaced from base to port??
i tried replacing the libs and i personally think some issue with boot.img if so tell me what are the changes to be made to init.rc of the boot.img??
thx in advance !!!
This is the logcat when i tried opening camera
Logcat :
E/CameraClient(111): Invalid setDisplayOrientation degrees=40
E/AndroidRuntime(1593): FATAL EXCEPTION: Camera Handler Thread
E/AndroidRuntime(1593): java.lang.RuntimeException: set display orientation failed
E/AndroidRuntime(1593): at android.hardware.Camera.setDisplayOrientation(Native Method)
E/AndroidRuntime(1593): at com.mediatek.camera.AndroidCamera.setDisplayOrientation(AndroidCamera.java:111)
E/AndroidRuntime(1593): at com.android.camera.CameraManager$CameraHandler.handleMessage(CameraManager.java:199)
E/AndroidRuntime(1593): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(1593): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(1593): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AppErrorDialog(489): Failed to get ILowStorageHandle instance
Main culprit :
E/IspHal(111): [init]Err( 461):mpMcuDrv->init() fail

[Q] XSola Jelly Bean Greek language Keyboard FC

Hello people. I would like some advice on my problem.
Currently using JB 4.2.1 Ultralight 3.6 ROM along with Experimental V12 Kernel.
Although the keyboard works perfectly otherwise, once I choose Greek language along with the English one,
I get constant FCs. The keyboard won't even open.
I provide the logcat of the error for troubleshooting purposes.
Thanks in advance for all the replies! :good:
Code:
[ 03-11 06:59:19.297 5392: 5392 D/TextInput::Requirement ]
xt9-engine-database-id = 2130968817
[ 03-11 06:59:19.297 5392: 5392 E/AndroidRuntime ]
FATAL EXCEPTION: main
java.lang.RuntimeException: result:10
at com.sonyericsson.textinput.uxp.model.xt9.XT9Engine.XT9Engine_setActiveLanguage(Native Method)
at com.sonyericsson.textinput.uxp.model.xt9.XT9Engine.setLanguage(XT9Engine.java:482)
at com.sonyericsson.textinput.uxp.model.xt9.XT9Engine.initOptional(XT9Engine.java:644)
at com.sonyericsson.collaboration.ObjectBinder.init(ObjectBinder.java:448)
at com.sonyericsson.textinput.uxp.glue.InputMethodServiceGlue.bind(InputMethodServiceGlue.java:445)
at com.sonyericsson.textinput.uxp.glue.InputMethodServiceGlue.onStartInputView(InputMethodServiceGlue.java:393)
at android.inputmethodservice.InputMethodService.showWindowInner(InputMethodService.java:1420)
at android.inputmethodservice.InputMethodService.showWindow(InputMethodService.java:1378)
at android.inputmethodservice.InputMethodService$InputMethodImpl.showSoftInput(InputMethodService.java:422)
at android.inputmethodservice.IInputMethodWrapper.executeMessage(IInputMethodWrapper.java:184)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4744)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
I can provide a more extensive logcat if needed but I think that's the main problem described above.
anyone? :3
Turns out the dictionary lib for the greek language was missing. so I just placed it under /usr/xt9. I hope this helps someone in case they have the same problem.

SuperSU Crash - Is this normal?

Howdy! I've gotten TWRP installed and working, and have tried to flash SuperSU. All seemed fine until the app crashed! Since I haven't been able to set up the permissions yet, it still denies all the su requests. Here's the logcat:
java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.chainfire.supersu/eu.chainfire.supersu.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5422)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I'm running this on a 6.0.1 Zenwatch 2, and have already tried the 2.40 version of SuperSU. Any ideas?

Question Official miui camera app

I've installed Lineage OS on the Mi MIX 4 and I cannot be happier after getting rid of MIUI, but now I'm left without a proper camera app. I installed GCAM but not everything works at the moment.
I would like to try to install the official MIUI camera app and see if by any chance it works, but I forgot to extract the apk before flashing Lineage OS.
Can someone who has MIUI installed upload the apk in this thread, or know where I can get it? For example using an extractor like this one:
Apk Extractor - Apps on Google Play
Extracts installed applications on your device and places them on your SD card.
play.google.com
Thanks a lot!
You can find the Xiaomi Camera apk on apkmirror.
Let us know if this works!
Aleksanderbjorn said:
You can find the Xiaomi Camera apk on apkmirror.
Let us know if this works!
Click to expand...
Click to collapse
Thanks for the suggestion! Unfortunately, it crashes on launch (I installed this one).
Stacktrace:
Spoiler: Stacktrace
Code:
2022-03-17 08:03:05.314 31800-31800/? D/MiCameraAlgo: init: E
2022-03-17 08:03:05.314 31800-31800/? D/MiCameraAlgo: init: application file path to algorithm lib: /data/user/0/com.android.camera/files
2022-03-17 08:03:05.314 31800-31800/? E/MiCamAlgoInterfaceJNI: start loading camera_algoup_jni.xiaomi
2022-03-17 08:03:05.316 31800-31800/? E/MiCamAlgoInterfaceJNI: can not load library:camera_algoup_jni.xiaomi : java.lang.UnsatisfiedLinkError: dlopen failed: library "libcamera_algoup_jni.xiaomi.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at com.xiaomi.engine.MiCamAlgoInterfaceJNI.<clinit>(MiCamAlgoInterfaceJNI.java:3)
at com.xiaomi.engine.MiCamAlgoInterfaceJNI.init(Native Method)
at com.xiaomi.engine.MiCameraAlgo.init(MiCameraAlgo.java:4)
at com.android.camera.LocalParallelService$LocalBinder.initMiviEngine(LocalParallelService.java:4)
at com.android.camera.LocalParallelService$LocalBinder.<init>(LocalParallelService.java:9)
at com.android.camera.LocalParallelService.onCreate(LocalParallelService.java:5)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4186)
at android.app.ActivityThread.access$1500(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2022-03-17 08:03:05.316 31800-31800/? E/.android.camer: No implementation found for int com.xiaomi.engine.MiCamAlgoInterfaceJNI.init(java.lang.String) (tried Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init and Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init__Ljava_lang_String_2)
2022-03-17 08:03:05.316 31800-31800/? D/AndroidRuntime: Shutting down VM
2022-03-17 08:03:05.316 813-31855/? E/CamX: [ERROR][SENSOR ] camximagesensordata.cpp:1635 GetI2CCmdSizeForEarlySetting() EarlySettingFunc total size = 536
2022-03-17 08:03:05.316 31800-31800/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.camera, PID: 31800
java.lang.UnsatisfiedLinkError: No implementation found for int com.xiaomi.engine.MiCamAlgoInterfaceJNI.init(java.lang.String) (tried Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init and Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init__Ljava_lang_String_2)
at com.xiaomi.engine.MiCamAlgoInterfaceJNI.init(Native Method)
at com.xiaomi.engine.MiCameraAlgo.init(MiCameraAlgo.java:4)
at com.android.camera.LocalParallelService$LocalBinder.initMiviEngine(LocalParallelService.java:4)
at com.android.camera.LocalParallelService$LocalBinder.<init>(LocalParallelService.java:9)
at com.android.camera.LocalParallelService.onCreate(LocalParallelService.java:5)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4186)
at android.app.ActivityThread.access$1500(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2022-03-17 08:03:05.317 31800-31800/? E/CAM_CameraFCHandler: Camera FC, @Module = 163 And @CameraId = 0
2022-03-17 08:03:05.317 31800-31800/? E/CAM_MqsHelper: [K_PROCESS]: Error occur the reason is that CameraApp Mode:Photo[163] CameraId:0 Error:Java Crash
2022-03-17 08:03:05.318 31800-31800/? D/CAM_AfterSales: aftersales record not enable in this device
2022-03-17 08:03:05.318 31800-31800/? E/CAM_CameraFCHandler: Camera FC, msg=No implementation found for int com.xiaomi.engine.MiCamAlgoInterfaceJNI.init(java.lang.String) (tried Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init and Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init__Ljava_lang_String_2)
java.lang.UnsatisfiedLinkError: No implementation found for int com.xiaomi.engine.MiCamAlgoInterfaceJNI.init(java.lang.String) (tried Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init and Java_com_xiaomi_engine_MiCamAlgoInterfaceJNI_init__Ljava_lang_String_2)
at com.xiaomi.engine.MiCamAlgoInterfaceJNI.init(Native Method)
at com.xiaomi.engine.MiCameraAlgo.init(MiCameraAlgo.java:4)
at com.android.camera.LocalParallelService$LocalBinder.initMiviEngine(LocalParallelService.java:4)
at com.android.camera.LocalParallelService$LocalBinder.<init>(LocalParallelService.java:9)
at com.android.camera.LocalParallelService.onCreate(LocalParallelService.java:5)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4186)
at android.app.ActivityThread.access$1500(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Looks like the apk only works on MIUI... Try ANXCamera, must be installed through Magisk or TWRP.
Aleksanderbjorn said:
Looks like the apk only works on MIUI... Try ANXCamera, must be installed through Magisk or TWRP.
Click to expand...
Click to collapse
Nice suggestion, thanks again.
I've tried the different builds for Android 11 via TWRP and all of them hang during installation, the phone is also not yet listed as officially supported.
If I manage to make it work somehow I will post it in this thread (also if I find any other good alternative).
At the moment only GCAM works, but not fully.
xatok said:
Nice suggestion, thanks again.
I've tried the different builds for Android 11 via TWRP and all of them hang during installation, the phone is also not yet listed as officially supported.
If I manage to make it work somehow I will post it in this thread (also if I find any other good alternative).
At the moment only GCAM works, but not fully.
Click to expand...
Click to collapse
I have also tried with multiple ANXCamera combinations - none work :/ It installs OK but the camera view is black

Categories

Resources