Skip to content

Commit

Permalink
放宽API限制
Browse files Browse the repository at this point in the history
  • Loading branch information
w2016561536 committed Aug 20, 2021
1 parent 1bc118e commit 02b1900
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {

defaultConfig {
applicationId "com.example.vcam"
minSdk 21
minSdk 16
targetSdk 28
versionCode 1
versionName "1.0"
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:value="安卓虚拟摄像头" />
<meta-data
android:name="xposedminversion"
android:value="54" />
android:value="51" />
</application>

</manifest>
10 changes: 3 additions & 7 deletions app/src/main/java/com/example/vcam/HookMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public class HookMain implements IXposedHookLoadPackage {

public static Camera data_camera;
public static byte[] data_buffer;
public static MediaPlayer data_mediaplayer;
public static ImageReader data_imagereader;
public static int mhight;
public static int mwidth;

Expand All @@ -59,7 +57,6 @@ public class HookMain implements IXposedHookLoadPackage {

public Handler mHandler;

public static Image aimage;
public static int repeat_count;


Expand Down Expand Up @@ -130,6 +127,7 @@ public void onPrepared(MediaPlayer mp) {


XposedHelpers.findAndHookMethod("android.hardware.camera2.CaptureRequest.Builder" ,lpparam.classLoader, "addTarget",android.view.Surface.class, new XC_MethodHook() {
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@SuppressLint("SdCardPath")
@Override
protected void beforeHookedMethod(MethodHookParam param){
Expand All @@ -141,8 +139,6 @@ protected void beforeHookedMethod(MethodHookParam param){
}

HookMain.c2_builder = (CaptureRequest.Builder) param.thisObject;
XposedBridge.log("啊棒啊棒啊" + HookMain.c2_builder.toString());

HookMain.c2_ori_Surf = (Surface) param.args[0];

if (HookMain.c2_virt_st == null){
Expand Down Expand Up @@ -238,7 +234,7 @@ protected void beforeHookedMethod(MethodHookParam paramd) throws Throwable {
XposedBridge.log(eee.toString());
}
}else {
XposedBridge.log("初始化");
//XposedBridge.log("初始化");
repeat_count = 100;
HookMain.data_camera = (android.hardware.Camera) paramd.args[1];
byte[] bt = (byte[])paramd.args[0];
Expand All @@ -250,7 +246,7 @@ protected void beforeHookedMethod(MethodHookParam paramd) throws Throwable {
}
mwidth = data_camera.getParameters().getPreviewSize().width;
mhight = data_camera.getParameters().getPreviewSize().height;
XposedBridge.log("初始化:宽:" +String.valueOf(mwidth)+"高:"+String.valueOf(mhight));
XposedBridge.log("预览回调初始化:宽:" +String.valueOf(mwidth)+"高:"+String.valueOf(mhight));
/*if (data_imagereader!=null){
data_imagereader = null;
}
Expand Down

0 comments on commit 02b1900

Please sign in to comment.