Forum Discussion
hagenseifert
2 years agoExplorer
NameNotFoundException in UsbPermissionActivity when connecting to HID device via USB
Hello,
I work for a company that makes apps and peripherals for the Meta Quest. In particular, we have a device that communicates to the Meta Quest Pro via USB over a HID protocol. Yesterday, our Quest Pro installed a system update (51.0.0.182.268.465860992), which breaks the connectivity to our USB peripheral.
The problem seems to be in the UsbPermissionActivity, and the error and stack trace in LogCat are the following:
E/UsbPermissionActivity: unable to look up package name
android.content.pm.PackageManager$NameNotFoundException: com.Sensoryx.VRfreeStylusSigning
at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:452)
at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:441)
at com.oculus.os.vrusb.UsbPermissionActivity.onCreate(UsbPermissionActivity.java:74)
at android.app.Activity.performCreate(Activity.java:8057)
at android.app.Activity.performCreate(Activity.java:8037)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3711)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3887)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2276)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:214)
at android.os.Looper.loop(Looper.java:304)
at android.app.ActivityThread.main(ActivityThread.java:7911)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1010)
Some more info on how this used to work: We're running a Unity application with a Java library where we ask for permission to access the device with the following code:
PendingIntent mPermissionIntent = PendingIntent.getBroadcast(m_context, 0, new Intent(ACTION_USB_PERMISSION), PendingIntent.FLAG_IMMUTABLE);
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
m_broadcastReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
permissionRequestCallback(context, intent);
}
};
m_context.registerReceiver(m_broadcastReceiver, filter);
m_usbManager.requestPermission(usbDevice, mPermissionIntent);
My guess is that there is a problem regarding package visibility in the UsbPermissionActivity: https://developer.android.com/training/package-visibility
Is there a possibility that I can either circumvent the UsbPermissionActivity or talk about getting a fix for this bug to a developer at meta?
Best,
Hagen Seifert
3 Replies
- hagenseifertExplorer
One thing I just realized is that the Public Test Channel is NOT enabled on said Quest Pro, and it still automatically updated to Firmware 51, which is not officially released yet...
- AdHawkMatthewHonored Guest
Hi there,
I was in a similar boat (not part of PTC, got upgraded to v51, ran into USB issues). v53 seems to have addressed some fundamental issues with v51's USB permissions and handling, so you may want to join PTC temporarily if only to get v53 to see if that unblocks you (it unblocked us, but our USB needs may differ).
- hagenseifertExplorer
You are right, it works with v53. Thanks for the answer!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 3 years ago