[WIP][PORT] MIUI CAMERA for more devices

Discussion in 'MIUI Mods' started by _polimorph_, Sep 10, 2013.

  1. _polimorph_

    Jul 15, 2012
    26
    4
    15
    Male
    Hi. I started porting the MIUICamera.apk (MIUIv5) to Samsung Galaxy S3 (AOSP based version of MIUIv5)...yes I know you're tempted to say it's not possible, but first let me tell you that someone (The Bownz user @xda) really made it for LG Nexus 4, so I reverse engineered his method and now I'm stuck with FC. Sadly he's not responding to pm's, so you're my last chance. There are some small framework modifications, adding and diffing from miui some smalis, Camera* tree, adding a library "libjni_mosaic.so" and of course adding the Camera.apk. So here's the log with the FC caused by a "number format exception":
    Code:
    09-03 22:47:13.219: E/AndroidRuntime(12956): FATAL EXCEPTION: Thread-185
    09-03 22:47:13.219: E/AndroidRuntime(12956): java.lang.NumberFormatException: Invalid int: "null"
    09-03 22:47:13.219: E/AndroidRuntime(12956): at java.lang.Integer.invalidInt(Integer.java:138)
    09-03 22:47:13.219: E/AndroidRuntime(12956): at java.lang.Integer.parseInt(Integer.java:355)
    09-03 22:47:13.219: E/AndroidRuntime(12956): at java.lang.Integer.parseInt(Integer.java:332)
    09-03 22:47:13.219: E/AndroidRuntime(12956): atandroid.hardware.Camera$Parameters.getInt(Camera.java)
    09-03 22:47:13.219: E/AndroidRuntime(12956):
    at android.hardware.Camera$Parameters.getMaxSaturation(Camera.java)
    09-03 22:47:13.219: E/AndroidRuntime(12956):
    at com.android.camera.Camera.qcomUpdateCameraParametersPreference(Camera.java:2579)
    09-03 22:47:13.219: E/AndroidRuntime(12956):
    at com.android.camera.Camera.updateCameraParametersPreference(Camera.java:2831)
    09-03 22:47:13.219: E/AndroidRuntime(12956):
    at com.android.camera.Camera.setCameraParameters(Camera.java:2884)
    09-03 22:47:13.219: E/AndroidRuntime(12956):
    at com.android.camera.Camera.access$900(Camera.java:89)
    09-03 22:47:13.219: E/AndroidRuntime(12956):
    at com.android.camera.Camera$CameraStartUpThread.run(Camera.java:329)
    09-03 22:47:13.219: W/ActivityManager(6504): Force finishing activity com.android.camera/.Camera 
    Full logcat: http://pastebin.com/dCfmudmf
    What clues does this error give?
    ps: I even managed to take a screenshot the second before FC.
     

    Attached Files:

  2. MameTozhio

    MameTozhioMembers

    Aug 7, 2013
    6
    0
    21
    Male
    Student
    Canada
    Framework.jar issue.
     
  3. _polimorph_

    Jul 15, 2012
    26
    4
    15
    Male
    Ok, that's where the work has been done, but what specifically in framework.jar? I'm interested in that "Invalid int" error, that I don't know what's about.
     
  4. esteway.619

    Apr 20, 2011
    68
    4
    18
    Any news on this?

    Sent from my Galaxy Nexus using Tapatalk now Free
     
  5. ivan99bai

    ivan99baiMembers

    Nov 11, 2013
    1
    0
    11
    Male
    how do i for installing this app??? the download is in .txt format...please help me!! the xiaomi camera is fantastic!!
     
  6. kakvicci

    kakvicciMembers

    Nov 3, 2012
    1
    0
    21
    Male
    Malang
  7. Zirias

    ZiriasMembers

    Nov 4, 2013
    54
    5
    18
    Male
    Software Developer
    Germany
    It's hard to say something about the CAUSE of the error without actually looking at the (smali) code. But at least, it's quite obvious that "null" is not a valid integer ;) Can't you find it in the android.hardware.Camera.Parameters class code? getMaxSaturation seems to return a null pointer (or, the string "null", not sure...), but is expected to return something getInt() can parse (whatever that would be, maybe a string representing a number? Got to check the code to find out).