WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void requestPermissionAndExecute( | |
| final String permission, | |
| final int requestCode, | |
| final Runnable granted, | |
| final Runnable denied | |
| ) | |
| { | |
| grantedActions.put(requestCode, granted); | |
| deniedActions.put(requestCode, denied); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // floating menu on long click | |
| callback = new AcCallback(); | |
| textView1.setOnLongClickListener(new View.OnLongClickListener() { | |
| @Override | |
| public boolean onLongClick(View v) { | |
| if (actionMode != null) { | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <activity android:name=".MainActivity"> | |
| <intent-filter> | |
| <action android:name="android.intent.action.MAIN"/> | |
| <category android:name="android.intent.category.LAUNCHER"/> | |
| </intent-filter> | |
| <intent-filter android:autoVerify="true"> | |
| <action android:name="android.intent.action.VIEW"/> | |
| <category android:name="android.intent.category.DEFAULT"/> | |
| <category android:name="android.intent.category.BROWSABLE"/> | |
| <data android:host="jollydroid.ru" android:scheme="http"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <application | |
| android:allowBackup="true" | |
| android:fullBackupContent="@xml/mybackupscheme" | |
| ....... | |
| android:backupAgent=".MyBackupAgent" | |
| > | |
| ....... | |
| </application> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******************************************************************************* | |
| * Origin: https://github.com/alt236/Wifi-Key-Recovery---Android/blob/master/src/aws/apps/wifiKeyRecovery/util/ExecTerminal.java | |
| * | |
| * Copyright 2011 Alexandros Schillings | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( | |
| connectivityManager.getActiveNetworkInfo() != null && | |
| connectivityManager.getActiveNetworkInfo().isConnected() && | |
| (!powerManager.isDeviceIdleMode() || | |
| powerManager.isIgnoringBatteryOptimizations())) | |
| { | |
| // do something | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HelloWorld |
WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.
