devicefarmer / minicap Goto Github PK
View Code? Open in Web Editor NEWThis project forked from openstf/minicap
Stream real-time screen capture data out of Android devices.
License: Other
This project forked from openstf/minicap
Stream real-time screen capture data out of Android devices.
License: Other
Hi,
We are facing this issue in Xiaomi MIUI 11 and MIUI 12 too. As per my understanding It's not related with Android Version but related with Xiaomi MIUI Version. Previously it was coming in MIUI 11 but not it's there in 12 too.
I tried to downgrade my xiaomi device from MIUI 11 to MIUI 10 then its started working.
Below is the old reference
(openstf#169)
(#2)
Previously It was coming in LG Got Resolved by @pcrepieux but Same binaries which is working fine for LG devices those are not working in Xiaomi.
In Xiaomi It coming as a black screen.
Device Details:-
[ro.product.model]: [Mi 10]
[ro.build.version.incremental]: [V12.0.2.0.QJBINXM]
[ro.build.version.release]: [10]
[ro.build.version.sdk]: [29]
[ro.build.version.security_patch]: [2020-07-01]
[ro.com.google.gmsversion]: [10_202005]
[ro.miui.ui.version.code]: [10]
[ro.miui.ui.version.name]: [V12]
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:240) Creating SurfaceComposerClient
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:243) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:254) Creating virtual display
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:260) Creating buffer queue
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:263) Setting buffer options
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:267) Creating CPU consumer
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:271) Creating frame waiter
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:275) Publishing virtual display
Vector<> have different types (this=0x7fd1f95480, rhs=0x73e7b4e030)
aborted
What is the issue or idea you have?
I am testing Android 15 Beta 1 on STF, but minicap seems to be crashed on launch.
From logcat, it says java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
, guessing certain internal API is removed from Android used inside minicap.
I found that related issue at scrcpy, with a commit to remove usage of same internal API.
I am not familiar with minicap and internal API, could anybody fix this issue?
Here are logs of logcat:
04-15 13:43:36.437 13748 13748 E SurfaceControl: SurfaceControl error
04-15 13:43:36.437 13748 13748 E SurfaceControl: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
04-15 13:43:36.437 13748 13748 E SurfaceControl: at java.lang.Class.getMethod(Class.java:2950)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at java.lang.Class.getMethod(Class.java:2450)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at io.devicefarmer.minicap.utils.SurfaceControl.createDisplay(SurfaceControl.kt:93)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:87)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:106)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at io.devicefarmer.minicap.provider.SurfaceProvider.onConnection(SurfaceProvider.kt:75)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at io.devicefarmer.minicap.SimpleServer.start(SimpleServer.kt:41)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at io.devicefarmer.minicap.Main$Companion.main(Main.kt:87)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at io.devicefarmer.minicap.Main.main(Unknown Source:2)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
04-15 13:43:36.437 13748 13748 E SurfaceControl: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
04-15 13:43:36.437 13748 13748 D AndroidRuntime: Shutting down VM
04-15 13:43:36.438 13748 13748 E AndroidRuntime: FATAL EXCEPTION: main
04-15 13:43:36.438 13748 13748 E AndroidRuntime: PID: 13748
04-15 13:43:36.438 13748 13748 E AndroidRuntime: java.lang.Error: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.utils.SurfaceControl.createDisplay(SurfaceControl.kt:100)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:87)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:106)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.provider.SurfaceProvider.onConnection(SurfaceProvider.kt:75)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.SimpleServer.start(SimpleServer.kt:41)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.Main$Companion.main(Main.kt:87)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.Main.main(Unknown Source:2)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at java.lang.Class.getMethod(Class.java:2950)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at java.lang.Class.getMethod(Class.java:2450)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at io.devicefarmer.minicap.utils.SurfaceControl.createDisplay(SurfaceControl.kt:93)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: ... 8 more
04-15 13:43:36.438 13748 13748 E AndroidRuntime: Error reporting crash
04-15 13:43:36.438 13748 13748 E AndroidRuntime: java.lang.RuntimeException: Bad file descriptor
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.os.BinderProxy.transactNative(Native Method)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.os.BinderProxy.transact(BinderProxy.java:586)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.os.IServiceManager$Stub$Proxy.checkService(IServiceManager.java:441)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.os.ServiceManagerProxy.getService(ServiceManagerNative.java:63)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.os.ServiceManager.rawGetService(ServiceManager.java:428)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.os.ServiceManager.getService(ServiceManager.java:175)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.app.ActivityManager$3.create(ActivityManager.java:5497)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.app.ActivityManager$3.create(ActivityManager.java:5494)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.util.Singleton.get(Singleton.java:44)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at android.app.ActivityManager.getService(ActivityManager.java:5485)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException(RuntimeInit.java:170)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1071)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1066)
04-15 13:43:36.438 13748 13748 E AndroidRuntime: at java.lang.Thread.dispatchUncaughtException(Thread.java:2306)
Have you tried STF?
Of course yes.
$ adb shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -P 1440x2560@1440x2560/0 -t
PID: 2479
INFO: Using projection 1440x2560@1440x2560/0
INFO: (external/MY_minicap/src/minicap_28.cpp:241) Creating SurfaceComposerClient
INFO: (external/MY_minicap/src/minicap_28.cpp:244) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/src/minicap_28.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_28.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_28.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_28.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_28.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_28.cpp:276) Publishing virtual display
Vector<> have different types (this=0x7fc7d7f700, rhs=0x7fc7d7f820)
Aborted
I alse have this problem, but there is no problem at beginning, after some days it happened, the devices is XIAOMI MI_8 Android 9 (sdk 28)
What is the issue or idea you have?
Have you tried STF?
@pcrepieux I have tried new approach which you have provided Experimental ([#12)] on Google Pixel 3XL (#12) which is not working. I know it's in beta version but still I gave it a try and getting below stats
1:- adb shell CLASSPATH=/data/local/tmp/minicap-0.1-debug.apk app_process /system/bin io.devicefarmer.minicap.Main
PID: 6057
Listening on minicap
createDisplay
Killed (getting only Killed nothing else not much data to debug)
2:- node app.js
Listening on port 9002
Got a client
chunk(length=24)
banner { version: 1,
length: 24,
pid: 6057,
realWidth: 1440,
realHeight: 3040,
virtualWidth: 1440,
virtualHeight: 3040,
orientation: 0,
quirks: 2 }
Lost a client
Got a client
What is the issue or idea you have?
Have you tried STF?
Can you write a detailed document on how to compile minicap-shared? tks
I try to run minicap in android 12 . but not find minicap.so.
Periodically (once every 3 runs) the minicap stops working on the Samsung Galaxy S4 (GT-I9500, API level 17).
The service starts, but closes after a couple of seconds.
The log contains only the following information:
INFO: Using projection 1080x1920@1080x1920/0
INFO: (external/MY_minicap/src/minicap_17.cpp:239) Creating SurfaceComposerClient
INFO: (external/MY_minicap/src/minicap_17.cpp:242) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/src/minicap_17.cpp:249) Creating virtual display
INFO: (external/MY_minicap/src/minicap_17.cpp:255) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_17.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_17.cpp:267) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_17.cpp:271) Publishing virtual display
INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 6268932 bytes for JPG encoder
INFO: (external/MY_minicap/src/minicap_17.cpp:286) Destroying virtual display
Also, other services not related to the minicap stop working.
At such moments, the logcat contains a lot of the following messages:
D/SensorHubManager( 3815): onGetSensorHubDataLocked: library = 1, 1, 15, 17
D/Sensorhubs( 3543): readContextData: 1, 1, 15, 17
D/SensorHubManager( 3815): onGetSensorHubDataLocked: library = 1, 1, 15, 17
D/Sensorhubs( 3543): readContextData: 1, 1, 15, 17
D/SensorHubManager( 3815): onGetSensorHubDataLocked: library = 1, 1, 15, 17
D/Sensorhubs( 3543): readContextData: 1, 1, 15, 17
Such issues do not arise without running the minicap service on this device.
Have you encountered such issues on the GT-I9500?
How can this be fixed?
What is the issue or idea you have?
I want to use -d to change the screen with displayId, but it didn't change
Have you tried STF?
I use STF, and i just want to change screen with displayId,
there is also anthor issue,but no more answer under it.
please, any body help?
hello,In Java I take a screenshot of the device with the following adb command, and when I convert the stream to an image, I get an incorrect image, the code looks like this:
String command = String.format("adb shell CLASSPATH=/data/local/tmp/minicap-devel/minicap-debug.apk app_process /system/bin io.devicefarmer.minicap.Main -P %s@%s/0 -s", screenSize, screenSize);
ProcessBuilder processBuilder = new ProcessBuilder(command.split(" "));
Process process = processBuilder.start();
InputStream inputStream = process.getInputStream();
BufferedInputStream bis = new BufferedInputStream(inputStream);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = bis.read(buffer)) != -1) {
byteArrayOutputStream.write(buffer, 0, bytesRead);
}
byte[] imageBytes = byteArrayOutputStream.toByteArray();
InputStream byteArrayInputStream = new ByteArrayInputStream(imageBytes);
BufferedImage bufferedImage = ImageIO.read(byteArrayInputStream);
if (bufferedImage == null) {
throw new IOException("Failed to decode image from input stream.");
}
File outFile = new File(savePath);
ImageIO.write(bufferedImage, "jpg", outFile);
However, when I modify the source code of the minicap-debug.apk, the Screenshot Output sent to the screenshot stream is changed here to look like this:
class ScreenshotOutput(private val output: PrintStream) : DisplayOutput() {
override fun send() {
val writer = PrintWriter(output)
writer.use {
val encodedImage: String = Base64.encodeToString(imageBuffer.toByteArray(), Base64.DEFAULT)
it.write(encodedImage)
it.flush()
}
}
}
On the java side, the screenshot stream is decoded in Base 64 and then converted to obtain the correct image,java changed here to look like this:
String command = String.format("adb shell CLASSPATH=/data/local/tmp/minicap-devel/minicap-debug.apk app_process /system/bin io.devicefarmer.minicap.Main -P %s@%s/0 -s", screenSize, screenSize);
ProcessBuilder processBuilder = new ProcessBuilder(command.split(" "));
Process process = processBuilder.start();
InputStream inputStream = process.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
StringBuilder stringBuilder = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
stringBuilder.append(line);
}
reader.close();
// Decode the Base64 string to byte array
byte[] imageBytes = Base64.getDecoder().decode(stringBuilder.toString());
// Convert byte array to BufferedImage
InputStream byteArrayInputStream = new ByteArrayInputStream(imageBytes);
BufferedImage bufferedImage = ImageIO.read(byteArrayInputStream);
if (bufferedImage == null) {
throw new IOException("Failed to decode image from input stream.");
}
// Write the BufferedImage to file
File outFile = new File(savePath);
ImageIO.write(bufferedImage, "jpg", outFile);
The image I get after the modification is very correct, I want to know how to parse the image correctly when not using Base 64, thank you
I saw #40
I try to use minicap-debug.apk, but the screenshot interval is unstable in different scenarios and the screenshot interval is very long minicap-debug.apk doesn't meet my requirements,So I still need the screenshot of minicap. so for Android sdk 33。Can you help me
What is the issue or idea you have?
When running the minicap binary on android 12 beta, we get the following error:
CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient23getPhysicalDisplayTokenEm" referenced by "/data/local/tmp/minicap.so"
I had a look into the libgui.so library and the signature of the function is now the following:
android::SurfaceComposerClient::getPhysicalDisplayToken(android::PhysicalDisplayId)
The current minicap_30.cpp is using a int32_t
instead of the PhysicalDisplayId
type.
Have you tried STF?
-- NEVERMIND, i will open and post with my other account (this is my test account)
@pcrepieux
I need minicap31.so for armv8_64 as I am using vnc. I have intergrated vnc with android-31 arm64-v8a
your current apk approach is not suitalble for me can you provide me android-31 arm64-v8a.so
I will integrate your apk approach later but right now I need minicap.so for android 12 support
Observations
1 .Playing DRM protected content in Android 10 throws green video panel and continue stream
2.Whereas,In Android 11 the stream get stucks.
Suspect :
Minicap.so file for different SDK and different processor set.
Issue Reproduced Environment :
Device : real time pixel 4a
Process set : arm64-v8a
Os: Android 11
Stream in Android 11 should be rendered as similar to other Android versions without getting stuck.
I want png format
1、I use iphone version is 14.0.1
i rebuild minicap project to android 11,i use docker ro run some server in pc, the phone information is below:
{ serial: '510ac8d4',
platform: 'Android',
manufacturer: 'XIAOMI',
operator: ',**联通',
model: 'Mi 10',
version: '11',
abi: 'arm64-v8a',
sdk: '30',
product: 'umi',
cpuPlatform: 'kona',
openGLESVersion: '3.2',
marketName: 'MI 10',
display:
{ id: 0,
width: 1080,
height: 2340,
xdpi: 386.3659973144531,
ydpi: 386.70098876953125,
fps: 90,
density: 2.75,
rotation: 0,
secure: true,
size: 6.665616096147213,
url: 'ws://10.0.20.158:7428' },
phone: { network: 'UNKNOWN' }
i put some data in stf-device-db, ex:
"Mi_10": {
"cpu": {
"cores": 8,
"freq": "2.84",
"name": "Qualcomm Technologies, Inc SM8250"
},
"date": "2020-05-01T15:00:00.000Z",
"display": {
"h": 2340,
"s": 6.67,
"w": 1080
},
"maker": {
"name": "XIAOMI"
},
"memory": {
"ram": 8192,
"rom": 262144
},
"name": {
"id": "Mi 10",
"long": "Mi 10"
},
"os": {
"type": "android",
"ver": "11"
}
}
the binary minicap tips:
2021-03-03T03:44:35.526Z INF/device:plugins:screen:stream 177 [510ac8d4] Setting frame producer projection to 843x843
2021-03-03T03:44:35.527Z INF/device:plugins:screen:stream 177 [510ac8d4] Requesting frame producer to start
2021-03-03T03:44:35.527Z INF/device:plugins:screen:stream 177 [510ac8d4] Launching screen service
2021-03-03T03:44:35.551Z INF/device:plugins:screen:stream 177 [510ac8d4] minicap says: "PID: 28302"
2021-03-03T03:44:35.551Z INF/device:plugins:screen:stream 177 [510ac8d4] minicap says: "INFO: Using projection 1080x2340@389x843/0"
2021-03-03T03:44:35.552Z WRN/device:plugins:screen:stream 177 [510ac8d4] Shell keeping minicap running ended unexpectedly
2021-03-03T03:44:35.553Z INF/device:plugins:screen:stream 177 [510ac8d4] Connecting to minicap service
2021-03-03T03:44:35.630Z INF/device:plugins:connect 177 [510ac8d4] Listening on port 7413
2021-03-03T03:44:35.631Z IMP/device:plugins:connect 177 [510ac8d4] Remote Connect Started for device "510ac8d4" at "10.0.20.158:7413"
2021-03-03T03:44:37.075Z INF/device:plugins:screen:stream 177 [510ac8d4] Disconnecting from minicap service
2021-03-03T03:44:37.076Z INF/device:plugins:screen:stream 177 [510ac8d4] Stopping minicap service
2021-03-03T03:44:37.077Z FTL/device:plugins:screen:stream 177 [510ac8d4] Frame producer had an error FailError: Failure: 'closed'
so i wnat to debug minicap, do you help me what to do next? thanks.
I'm setting up stf on a mac.
Screenshot is not possible after executing stf.
After downloading minicap, follow the guide
$ git submodule init
$ git submodule update
$ Library/Android/sdk/ndk/25.2.9519653/build/ndk-build
was performed,
$ ./run.sh autosize -t
When you enter the command
**'+ experimental/gradlew -p experimental assembleDebug
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
Where:
Settings file '/Users/device/Desktop/grip-stf/minicap/experimental/settings.gradle'
What went wrong:
Could not compile settings file '/Users/device/Desktop/grip-stf/minicap/experimental/settings.gradle'.
startup failed:
General error during semantic analysis: Unsupported class file major version 65'**
It's android 13, does rooting need to be done?
stf doctor is
'2024-01-05T08:32:12.122Z INF/cli:doctor 14729 [] OS Arch: arm64
2024-01-05T08:32:12.123Z INF/cli:doctor 14729 [] OS Platform: darwin
2024-01-05T08:32:12.124Z INF/cli:doctor 14729 [] OS Platform: 23.2.0
2024-01-05T08:32:12.124Z INF/cli:doctor 14729 [] Using Node 20.10.0
2024-01-05T08:32:12.129Z INF/cli:doctor 14729 [] Using ZeroMQ 4.2.2
2024-01-05T08:32:12.136Z INF/cli:doctor 14729 [] Using GraphicsMagick 1.3.42
2024-01-05T08:32:12.140Z INF/cli:doctor 14729 [] Using ProtoBuf 3.20.3
2024-01-05T08:32:12.140Z INF/cli:doctor 14729 [] Using RethinkDB 2.4.4
2024-01-05T08:32:12.142Z INF/cli:doctor 14729 [*] Using ADB 1.0.41'
I run minicap-33 on some devices and prompt "Segmentation fault". Is there any solution?
What is the issue or idea you have?
I launch the kotlin version of minicap on an Android 29 AVD (rooted) via this command :
CLASSPATH=/data/local/tmp/minicap/minicap-kotlin2.apk /system/bin/app_process /system/bin io.devicefarmer.minicap.Main -Q 60 -P 800x1280@800x1280/0
...but I get following error:
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at android.os.Environment.getExternalStorageState(Environment.java:1026)
at ch.qos.logback.core.android.AndroidContextUtil.getMountedExternalStorageDirectoryPath(Unknown Source:0)
at ch.qos.logback.core.android.AndroidContextUtil.setupProperties(Unknown Source:14)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(Unknown Source:12)
at org.slf4j.impl.StaticLoggerBinder.init(Unknown Source:7)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(Unknown Source:20)
at org.slf4j.impl.StaticLoggerBinder.getSingleton(Unknown Source:0)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at io.devicefarmer.minicap.provider.BaseProvider.<clinit>(BaseProvider.kt:44)
at io.devicefarmer.minicap.Main$Companion.main(Main.kt:62)
at io.devicefarmer.minicap.Main.main(Unknown Source:2)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:338)
PID: 7862
INFO: 800x1280@800x1280/0
Have you tried STF?
Have not tried it in STF.
It seems minicap is started anyway, but this error is breaking my toolchain... Any ideas of what's going on?
What is the issue or idea you have?
Have you tried STF?
Using latest JNI update
I am still unable to get secured screens(for example, changing pin code)
This behavior is only happening on Android 12 devices
I have Google Pixel 14 device. I am using STF. I faced issue in enrolling this device on STF but it was resolved once I updated the APK.
Post that, the screen of this device was not getting fetched due to errors in minicap as given in #54
I followed the fix in repeato-qa fork and built the project via ndk-build
as given in readme. have explained it in this comment.
if .so files are no more supported for newer android SDKs, can anyone please guide me with how to build minicap apk?
Unable to connect to Pixel 4XL device. See the command and error output below:
Command:
adb -s 99121FFBA0069C shell CLASSPATH=/data/local/tmp/minicap/minicap-0.8.apk /data/local/tmp/minicap/minicap /system/bin io.devicefarmer.minicap.Main -Q 60 -P 1440x3040@1440x3040/0
What is the issue?
minicap: applet not found
VERSION_CODE: 3
VERSION_NAME: 0.8
Device Information:
Device: Pixel 4XL
Resolution: 1440x3040
Adnroid Version: 11
Hello!
Does minicap support Android 11 devices?
In Read.me says that Android 9 is the highest version, but with my Android 10 devices the minicap works.
Will the minicap build from Master branch works with Android 11 devices?
not connecting to stf pixel 3 android 12?
updated pixel 3 to android 12 and it stopped working with stf.
What could be the problem?
logs:
Feb 22 16:21:13 stf-1 stf[1352]: 2022-02-22T13:21:13.995Z INF/device:resources:service 13041 [G6NPCV03579485D] Installing STFService
Feb 22 16:21:14 stf-1 stf[1352]: 2022-02-22T13:21:14.909Z FTL/device 13041 [G6NPCV03579485D] Setup had an error PrematureEOFError: Premature end of stream, needed 1 more bytes
Feb 22 16:21:14 stf-1 stf[1352]: at Socket.<anonymous> (/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/adbkit/lib/adb/parser.js:118:32)
Feb 22 16:21:14 stf-1 stf[1352]: at emitNone (events.js:111:20)
Feb 22 16:21:14 stf-1 stf[1352]: at Socket.emit (events.js:208:7)
Feb 22 16:21:14 stf-1 stf[1352]: at endReadableNT (_stream_readable.js:1064:12)
Feb 22 16:21:14 stf-1 stf[1352]: at _combinedTickCallback (internal/process/next_tick.js:138:11)
Feb 22 16:21:14 stf-1 stf[1352]: at process._tickCallback (internal/process/next_tick.js:180:9)
Feb 22 16:21:14 stf-1 stf[1352]: 2022-02-22T13:21:14.910Z FTL/util:lifecycle 13041 [G6NPCV03579485D] Shutting down due to fatal error
I have working project (for Android Q(10) and up) that captures internal audio as well as device screen on android, i dont know the current STF provides streaming internal audio from connected android device to browser app, but i hopefully think that it can be implemented i think
also as far as i read from minicap readme, it says it will be changed with more upstream solution(directly capture android screen via MediaProjection APIs)
socket streaming in android works flawlessly too as you know(based on pure java api)
i can work on this if its worthwhile what do you think, what are the future plans?
Only portrait mode is properly managed at the moment.
As reported in DeviceFarmer/STFService.apk#37 users who need to have a landscape orientation when using the apk get a badly resized screen. This is also true with STF.
i need minicap.so for android sdk 32.
how can i get that file?
plz let me know where is the file(minicap.so)....
i need minicap.so for android sdk 33.
how can i get that file?
How can I access a stream from device that is connected via wifi not by USB cable?
What is the issue or idea you have?
stf is not working on Android 11 which requires minicap.so file
Have you tried STF?
Yes. It is not working
May I know, how we can build the so file using AOSP code. Do I need to follow exactly this minicap-shared or is there any other simple way
Right now android-r-beta-2 is available
openstf#208
In Android 10, If we play DRM-protected video content(Netflix), Minicap will throw a green layer in a video player region and the stream continues without stuck.
In Android 11, If we play DRM-protected video content(Netflix), Minicap will crash the stream and stuck with a static frame. Until we restart the minicap server, It remains stuck.
Expected Output: Android 11 behavior should be the same as Android 10
Device: Pixel 4a
Android Version: 11
SDK: 30
Since I am having issues with some devices and the default minicap implementation, I tried minicap-kotlin on an Android 8 device, and couldn't get it working.
Running CLASSPATH=/data/local/tmp/minicap/minicap-kotlin.apk /system/bin/app_process io.devicefarmer.minicap.Main -Q 60 -P 1080x1920@1080x1920/0
just results in an "Aborted" message.
Is there some minimum version requirement?
What is the issue or idea you have?
I'm trying to adapt minicap on Android U. At present, I have successfully compiled, but the following error is reported in the actual application.
b'CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZTVN7android13LayerMetadataE" referenced by "/data/local/tmp/minicap.so"...\r\n'
I don't have a clue how to solve this problem, can anyone provide some help
Have you tried STF?
Minicap.so in folder x86_64 arch has "i386" instead of x86_64
To verify:
Downloaded minicap.so from android-31/x86_64
ran:
objdump -f "minicap.so"| grep ^architecture
Got result:
architecture: i386
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.