sourab-sharma / TouchToRecord

Touch android camera surface view to record video using FFmpeg Recorder
297 stars 104 forks source link

Google Reject My App implement This Library With Reason: OpenSSL's Security Vulnerabilities . #23

Open DanhDue opened 8 years ago

DanhDue commented 8 years ago

I have implement this library for my app. But when I publish my app to Google Play, they reject it with reason:

This app uses software that contains security vulnerabilities for users. Below is the list of vulnerabilities and the corresponding APK versions that were detected in your recent submission. Please upgrade your app(s) as soon as possible and increment the version number of the upgraded APK.

Vulnerability: OpenSSL APK Version(s): 1

The vulnerabilities were fixed in OpenSSL versions beginning with 1.0.1h, 1.0.0m, and 0.9.8za. To confirm your OpenSSL version, you can do a grep via:

$ unzip -p YourApp.apk | strings | grep "OpenSSL"

You can find more information and next steps in this Google Help Center article.

I have researched around internet and found warning: OpenSSL using on curl library. Then, can you update OpenSSL and rebuild lib for me?

Please help me fix it!

Thank so much!

kieukhuongthinh commented 7 years ago

We've got the same issue, too. Are there anyone have a solution?

tunahanbayindir commented 7 years ago

Any solution?

kieukhuongthinh commented 7 years ago

I solved it by updating javacv to 1.2 and javacpp to 1.2.1.

tunahanbayindir commented 7 years ago

Can you exatcly explain how?

kieukhuongthinh commented 7 years ago

@tunahanbayindir : You can follow below links to update your javacv and javacpp:

tunahanbayindir commented 7 years ago

I followed and updated but it gives me fatal signal can't load library libavutil.so, do I need to do anything wih so files?

kieukhuongthinh commented 7 years ago

Did you update .so files in /[touchToRecordPath]/src/main/jniLibs/ ? And did you clean and rebuild project?

tunahanbayindir commented 7 years ago

Actually dont know how to update .so files, could you send me your .so files? tunahan@dodochallenger.com, that would be really helpful

kieukhuongthinh commented 7 years ago

You can download .so files at:

Unzip .zip file > extract .jar files (you can use .7zip to extract). You can find the solution on github forum of javacv or javacpp. I just did following their guides.

devendroid commented 7 years ago

I also struggling with this issue, @kieukhuongthinh I added updated version of javacv and javacpp in gradle as showing in above links, but my app still showing old verison of OpenSSL 1.0.2d 9 Jul 2015, I think i need to re build all .SO files, how i can do this ? @tunahanbayindir did you tried this, any luck ?

kieukhuongthinh commented 7 years ago

@tunahanbayindir , @devsideal : I'm sorry, I wanted to explain in more details before, but I was busy. Now I write a full tutorial (what I did) for you.

First, I use Android Studio. So, if you're using Eclipse, try to find your own way.

The cause of the issue is the libavformat.so file which is using OpenSSL 1.0.2d. We need to update it. But, just updating libavformat.so will cause crashing, so we need to update all relating lib (javacv and javacpp).

apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 23
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.properties'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.properties'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/1.2/javacpp-presets-1.2.pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/org.bytedeco.javacpp-presets-1.2.pom.xml'
    }
}

configurations {
    all*.exclude group: 'org.bytedeco', module: 'javacpp-presets'
}

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.android.support:support-v4:23.2.1'
    compile files('libs/opencv.jar') //1.2
    compile files('libs/javacv.jar') //1.2
    compile files('libs/javacpp.jar') //1.2.3
    compile files('libs/ffmpeg.jar') //1.2
}

Good luck.

devendroid commented 7 years ago

Thanks a lot @kieukhuongthinh for your explanation, It solved the issue.

1Dev11 commented 7 years ago

thanks @kieukhuongthinh it's help a lot

tunahanbayindir commented 7 years ago

anyone up? need urgent help

JustinTanCQ commented 7 years ago

Hi @kieukhuongthinh, after I tried your tutorial, I still got the same issue as @tunahanbayindir. Here is the error logs. Caused by: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at org.bytedeco.javacpp.Loader.load(Loader.java:474) at org.bytedeco.javacpp.Loader.load(Loader.java:419) at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1559) at com.sourab.videorecorder.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:182) at com.sourab.videorecorder.FFmpegRecorderActivity.initVideoRecorder(FFmpegRecorderActivity.java:404) at com.sourab.videorecorder.FFmpegRecorderActivity.access$1700(FFmpegRecorderActivity.java:68) at com.sourab.videorecorder.FFmpegRecorderActivity$2.doInBackground(FFmpegRecorderActivity.java:314) at com.sourab.videorecorder.FFmpegRecorderActivity$2.doInBackground(FFmpegRecorderActivity.java:308) at android.os.AsyncTask$2.call(AsyncTask.java:295)

But the OpenSSL problem was resolved. Now version of OpenSSL is 1.0.2h.

kieukhuongthinh commented 7 years ago

@JustinTanCQ : check link https://github.com/bytedeco/javacpp-presets/wiki/Issues-with-Build-Tools#gradle . If it's not working, remember cleaning project before building

JustinTanCQ commented 7 years ago

Thanks @kieukhuongthinh. I followed that instructions but still failed. I do clean before building, even uninstall app first. I unzip the apk and all the .so files are there. I'm testing on a 6.0.1 device, which is based on arm7 system.