]>
git.zerfleddert.de Git - ms2-fixes/blob - MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java
2f9804cda64cdd463a55a1259dc21a7d106140f9
1 package de
.rmdir
.ms2debounce
;
3 import java
.io
.InputStream
;
4 import java
.io
.OutputStream
;
7 import android
.content
.Context
;
9 public class DebounceModuleHelper
13 public DebounceModuleHelper(Context context
) {
17 public void loadModule() {
21 Process insmod
= Runtime
.getRuntime().exec(new String
[]{"su","-c","/system/bin/insmod /system/lib/modules/debounce.ko"});
23 } catch (Exception e
) {}
26 public boolean isLoaded() {
30 private synchronized void extractModule() {
31 File debounce_ko
= new File(ctx
.getFilesDir() + "/debounce.ko");
33 if (debounce_ko
.exists()) {
38 InputStream apk
= ctx
.getAssets().open("debounce.ko");
39 OutputStream mod
= ctx
.openFileOutput("debounce.ko", 0);
43 } catch (Exception e
) {}