Hi,
I enabled CRT Animation by this awesome guide.I know little bit about smali editing so i tried to make a toggle for it and did some changes ( basically just set up constant harsh_killer as checkbox preference and an interface to toggle it in secsettings and added jump condition in ScreenBrightnessAnimator ).But it is giving me following error in logcat
Code:
W/dalvikvm( 2152): VFY: tried to get class from non-ref register v7 (type=17)
W/dalvikvm( 2152): VFY: rejecting opcode 0x6e at 0x008d
W/dalvikvm( 2152): VFY: rejected Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;.animateInternal (IZI)V
W/dalvikvm( 2152): Verifier rejected class Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;
W/dalvikvm( 2152): threadid=14: thread exiting with uncaught exception (group=0x40fc72a0)
E/android.os.Debug( 2152): [email protected] > dumpstate -k -t -z -d -o /data/log/dumpstate_sys_error
E/AndroidRuntime( 2152): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread
E/AndroidRuntime( 2152): java.lang.VerifyError: com/android/server/PowerManagerService$ScreenBrightnessAnimator
E/AndroidRuntime( 2152): at com.android.server.PowerManagerService.init(PowerManagerService.java:867)
E/AndroidRuntime( 2152): at com.android.server.ServerThread.run(SystemServer.java:270)
Here is my PowerManagerService$ScreenBrightnessAnimator.smali
and full logcat and PowerManagerService.smali and PowerManagerService$ScreenBrightnessAnimator.smali are at d-h.st/6zD
I would also like to inform you that CRT animation was working before and i also checked that toggle part of settings was working.I checked it by printing value in logcat.
I also came to this thread where the OP used similiar logic.
Related
I'm trying to make the sample camera application on Nexus One.
Until now, the programming is not commercial and only test program.
I referenced the source code of android 1.5 platform.
The test code that I made is working well on the other android 1.5 phone.
But the code is not working on Nexus One.
I checked the log of Nexus One.
If I press shutter button, surfaceChanged(...) is called on the android 1.5 phone.
However, surfaceDestroyed(...) is called on Nexus One.
I don't why suraceDestroyed(...) is called.
If anybody has information about this problem, please let me know that.
Thanks in advance.
Hi,
I believe that there's a great change between 1.5 and 2.1 APIs. Rarely apps made for 1.5 are compatible with 2.1. Though, I'm definitely not at expert at this. Why not code a check to use which method depending on the version of the phone?
Ok.....Maybe, there is a great difference between 1.5 and 2.0.
However, I think that there is only little difference for camera application.
Maybe, you agree that the example code of android sdk 2.0 would work well on Nexus One.
But the CameraPreview.java doesn't work on Nuxus.
CameraPreview.java Example(Anroid SDK 2.0) not working......
I'm trying to program my camera application on Nexus One,
But the example code of android sdk 2.0 isn't working.
The example source is the CamraPreview.java.
Maybe, the preview size is the problem but I don't know how to fix the problem.
I include the log of CameraView.java on Nexus One.
If anybody has the information about this problem, please let me know that.
Thanks in advance.
========> The log of CameraPreview.java on Nexus One
E/QualcommCameraHardware( 52): Invalid preview size requested: 533x295
I/QualcommCameraHardware( 52): Set zoom=0
D/AndroidRuntime( 2551): Shutting down VM
W/dalvikvm( 2551): threadid=3: thread exiting with uncaught exception (group=0x4001b180)
E/AndroidRuntime( 2551): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2551): java.lang.RuntimeException: setParameters failed
E/AndroidRuntime( 2551): at android.hardware.Camera.native_setParameters(Native Method)
E/AndroidRuntime( 2551): at android.hardware.Camera.setParameters(Camera.java:619)
E/AndroidRuntime( 2551): at com.example.android.apis.graphics.Preview.surfaceChanged(CameraPreview.java:90)
E/AndroidRuntime( 2551): at android.view.SurfaceView.updateWindow(SurfaceView.java:460)
E/AndroidRuntime( 2551): at android.view.SurfaceView.dispatchDraw(SurfaceView.java:287)
E/AndroidRuntime( 2551): at android.view.ViewGroup.drawChild(ViewGroup.java:1529)
E/AndroidRuntime( 2551): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
E/AndroidRuntime( 2551): at android.view.View.draw(View.java:6538)
E/AndroidRuntime( 2551): at android.widget.FrameLayout.draw(FrameLayout.java:352)
E/AndroidRuntime( 2551): at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
E/AndroidRuntime( 2551): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
E/AndroidRuntime( 2551): at android.view.View.draw(View.java:6538)
E/AndroidRuntime( 2551): at android.widget.FrameLayout.draw(FrameLayout.java:352)
E/AndroidRuntime( 2551): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1830)
E/AndroidRuntime( 2551): at android.view.ViewRoot.draw(ViewRoot.java:1349)
E/AndroidRuntime( 2551): at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)
E/AndroidRuntime( 2551): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
E/AndroidRuntime( 2551): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2551): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2551): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 2551): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2551): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 2551): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 2551): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 2551): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 74): Sending signal. PID: 2551 SIG: 3
I/dalvikvm( 2551): threadid=7: reacting to signal 3
I/dalvikvm( 2551): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 2551): Sending signal. PID: 2551 SIG: 9
E/JavaBinder( 74): !!! FAILED BINDER TRANSACTION !!!
Can you please post all your logs here and don't create new thread for each problem you have.
Thanks.
blue0sky said:
E/QualcommCameraHardware( 52): Invalid preview size requested: 533x295
...
E/AndroidRuntime( 2551): at com.example.android.apis.graphics.Preview.surfaceChanged(CameraPreview.java:90)
Click to expand...
Click to collapse
You're right, it's the preview size. http://developer.android.com/reference/android/hardware/Camera.Parameters.html states:
Different devices may have different camera capabilities, such as picture size or flash modes. The application should query the camera capabilities before setting parameters.
Click to expand...
Click to collapse
You want to use
Code:
public List<Camera.Size> getSupportedPreviewSizes ()
to get a list of supported sizes and use one of those, instead of hardcoding the values.
this is logcat from installing Titanium Backup for example:
Code:
W/ActivityManager( 328): No content provider found for: null
W/dalvikvm( 328): threadid=12: thread exiting with uncaught exception (group=0x2aac8578)
E/PackageManager( 328): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 328): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 328): java.lang.NullPointerException
E/AndroidRuntime( 328): at com.android.server.PackageManagerService$FileInstallArgs.c
reateCopyFile(PackageManagerService.java:5011)
E/AndroidRuntime( 328): at com.android.server.PackageManagerService$FileInstallArgs.c
opyApk(PackageManagerService.java:5019)
E/AndroidRuntime( 328): at com.android.server.PackageManagerService$InstallParams.han
dleStartCopy(PackageManagerService.java:4815)
E/AndroidRuntime( 328): at com.android.server.PackageManagerService$HandlerParams.sta
rtCopy(PackageManagerService.java:4666)
E/AndroidRuntime( 328): at com.android.server.PackageManagerService$PackageHandler.do
HandleMessage(PackageManagerService.java:496)
E/AndroidRuntime( 328): at com.android.server.PackageManagerService$PackageHandler.ha
ndleMessage(PackageManagerService.java:441)
E/AndroidRuntime( 328): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 328): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 328): at android.os.HandlerThread.run(HandlerThread.java:60)
cleaning dalvik cache didn't help... i was deleting a few system apps, maby thats a problem's reason? Which app if yes?
did you solve the problem? I've the same one!
So I have this problem.. whenever I try to copy something in an app, that app force closes. This happens in all apps. Any solution other than just doing a factory reset?
Sent from my GT-I9300 using xda app-developers app
this is mentioned in another thread somewhere, sorry I'm not sure where. Try a bit of searching because I think they mentioned a fix.
I have this problem days ago..the only solution i have is to reset it..
Sent from my GT-I9300 using xda app-developers app
Log output
Example log output when trying to copy a message in the Messaging (SMS) app.
Code:
D/Mms/MessageOptions( 6372): mLaunchApp = 0
V/Mms/MessageOptions( 6372): copyToClipboard(),len=24
D/AndroidRuntime( 6372): Shutting down VM
W/dalvikvm( 6372): threadid=1: thread exiting with uncaught exception (group=0x40c771f8)
E/AndroidRuntime( 6372): FATAL EXCEPTION: main
E/AndroidRuntime( 6372): java.lang.NullPointerException
E/AndroidRuntime( 6372): at android.content.ClipboardManager.setPrimaryClip(ClipboardManager.java:146)
E/AndroidRuntime( 6372): at android.content.ClipboardManager.setText(ClipboardManager.java:260)
E/AndroidRuntime( 6372): at com.android.mms.ui.MessageOptions.copyToClipboard(MessageOptions.java:961)
E/AndroidRuntime( 6372): at com.android.mms.ui.ComposeMenu$MsgListMenuClickListener.onMenuItemClick(ComposeMenu.java:257)
E/AndroidRuntime( 6372): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:144)
E/AndroidRuntime( 6372): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
E/AndroidRuntime( 6372): at com.android.internal.view.menu.MenuDialogHelper.onClick(MenuDialogHelper.java:186)
E/AndroidRuntime( 6372): at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:936)
E/AndroidRuntime( 6372): at android.widget.AdapterView.performItemClick(AdapterView.java:292)
E/AndroidRuntime( 6372): at android.widget.AbsListView.performItemClick(AbsListView.java:1366)
E/AndroidRuntime( 6372): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2995)
E/AndroidRuntime( 6372): at android.widget.AbsListView$1.run(AbsListView.java:3790)
E/AndroidRuntime( 6372): at android.os.Handler.handleCallback(Handler.java:605)
E/AndroidRuntime( 6372): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 6372): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 6372): at android.app.ActivityThread.main(ActivityThread.java:4514)
E/AndroidRuntime( 6372): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6372): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 6372): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
E/AndroidRuntime( 6372): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
E/AndroidRuntime( 6372): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 2112): Force finishing activity com.android.mms/.ui.ConversationComposer
E/android.os.Debug( 2112): [email protected] > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
I/dumpstate( 6441): begin
---------- Post added at 09:32 AM ---------- Previous post was at 09:27 AM ----------
These are the other two threads I found mentioning the same problem (Mods: any chance to merge these threads with this one?). So far the only solution found seems to be a device reset.
http://forum.xda-developers.com/showthread.php?t=1729535
http://forum.xda-developers.com/showthread.php?t=1706707
The factory reset solved my problem.
After deodexing my ROM (successfuly) with android kitchen and manually applying the changes I attempted to perform this modification
http://forum.xda-developers.com/showthread.php?t=1587136
That resulted in a bootloop even though I do have the arabic .so file in it's supposed place.
I've tried to ln -s libs to lib from what I saw in some search results but nothing.
My android version is 2.3.6 and bak/smali commands were issued with -a 10 to support proper API level
Here's my logcat:
Code:
D/dalvikvm( 261): creating instr width table
I/dalvikvm( 261): Could not find method android.graphics.Canvas.native_drawText, referenced from method android.graphic
s.Canvas.drawText
W/dalvikvm( 261): VFY: unable to resolve virtual method 9864: Landroid/graphics/Canvas;.native_drawText (Ljava/lang/Str
ing;FFLandroid/graphics/Paint;)V
D/dalvikvm( 261): VFY: replacing opcode 0x6e at 0x0004
D/dalvikvm( 261): VFY: dead code 0x0007-0007 in Landroid/graphics/Canvas;.drawText (Ljava/lang/String;FFLandroid/graphi
cs/Paint;)V
W/dalvikvm( 261): Unable to register: not native: Landroid/graphics/Canvas;.drawText:(Ljava/lang/String;FFLandroid/grap
hics/Paint;)V
E/JNIHelp ( 261): RegisterNatives failed for 'android/graphics/Canvas'
E/AndroidRuntime( 261): Unable to register all android natives
Thanks upfront for anybody who helps
got it to work, was a code error ;p
Hi,
I've been trying to implement a toggle for my Galaxy Ace II X (running ICS 4.0.4). I wish for the toggle to allow the enabling of the "config_unplugTurnsOnScreen" boolean. I used this DIFF guide for reference (yes, I DID sort through the several mods in the DIFF guide) because I previously had success with the CRT animation toggle on that same page. (I substituted a lot of the AOSP lockscreen code for Unplug Screen On code) Instead of referencing to /system/framework/services.jar/smali/com/android/server/PowerManagerService$BrightnessState.smali, I referenced to the PowerManagerService$BatteryReceiver.smali in the same directory (because it is the only smali I could find that mentioned "mUnplugTurnsOnScreen"). I first modded the services.jar, and I used $3100 for the access (I compared the access used for the CRT animation with the rest of the services.jar and I got found a common factor, so I searched for the factor in my services.jar and I found the access I was looking for). It booted fine, no problems at all. Then I modded the SecSettings.apk. I thought I did a pretty good job with it. Pushed it to my device. When I opened the Display Settings and clicked on the toggle, Settings FCed. Same happened with the CRT animation toggle that I had previously implemented. Logcats revealed this:
E/AndroidRuntime( 2805): FATAL EXCEPTION: main
E/AndroidRuntime( 2805): java.lang.NoSuchFieldError: com.android.settings.DisplaySettings.mUnplugScreenOn
E/AndroidRuntime( 2805): at com.android.settings.DisplaySettings.onPreferenceTreeClick(DisplaySettings.java:773)
E/AndroidRuntime( 2805): at android.preference.Preference.performClick(Preference.java:949)
E/AndroidRuntime( 2805): at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:202)
E/AndroidRuntime( 2805): at android.widget.AdapterView.performItemClick(AdapterView.java:292)
E/AndroidRuntime( 2805): at android.widget.AbsListView.performItemClick(AbsListView.java:1394)
E/AndroidRuntime( 2805): at android.widget.AbsListView$PerformClick.run(AbsListView.java:3024)
E/AndroidRuntime( 2805): at android.widget.AbsListView$1.run(AbsListView.java:3830)
E/AndroidRuntime( 2805): at android.os.Handler.handleCallback(Handler.java:605)
E/AndroidRuntime( 2805): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2805): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2805): at android.app.ActivityThread.main(ActivityThread.java:4517)
E/AndroidRuntime( 2805): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2805): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2805): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
E/AndroidRuntime( 2805): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
E/AndroidRuntime( 2805): at dalvik.system.NativeStart.main(Native Method)
E/android.os.Debug( 1523): [email protected] > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
Click to expand...
Click to collapse
I don't know what to do. I tried modifying all the code related to mUnplugScreenOn, but I'm dumbfounded. Somebody please help me out here. Or at least, lead me in the right direction. Though, I would prefer the first choice. Anyways, here are my SecSettings.apk and services.jar decompiled and zipped up. They might be a bit messy because I have numerous mods applied to them. This is my first real mod I've tried doing without any other guides or threads related to it. I would really appreciate the help. I think if I could knock down this mod, I discover a whole new realm of modding.