Skip to content

Commit

Permalink
1.3
Browse files Browse the repository at this point in the history
- Added instructions on how to use the script with ADB wireless pair on Android 11
- Background service will now restore the global override setting after a reboot
- App list no longer shows DarQ as an option
  • Loading branch information
KieronQuinn committed Oct 11, 2020
1 parent c423aad commit f07d0a3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
19 changes: 19 additions & 0 deletions ADB Script/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ You can find the latest script to run from a Windows, Linux or Mac computer on t
Note: On Linux and Mac, `adb` is not included. If you do not have it installed, the script will link you to a guide to do so.
4.) Make sure the script runs correctly. If it shows an error, it may advise you on what to do. If you find an error that isn't handled correctly, please screenshot while using the -v (verbose) switch and post it on the XDA thread

## Running wirelessly (Android 11+ only):

On Windows:
1.) Open a command prompt in the directory with the script in it
2.) Go to Settings > System > Advanced > Developer options, enable Wireless debugging and open it. Select "Pair device with pairing code"
3.) Run "tools\adb pair <ip:pair port from settings dialog>" and enter the PIN when prompted. The pairing dialog will close after connection
4.) Run "tools\adb connect <ip:port from settings>"
5.) Run the batch script. The service will now be run.
You will need to follow these steps every time the device reboots, as usual

On Mac/Linux:
Make sure your ADB is up to date before doing this. It will not work on an older ADB version than 30.
1.) Open a command prompt in the directory with the script in it
2.) Go to Settings > System > Advanced > Developer options, enable Wireless debugging and open it. Select "Pair device with pairing code"
3.) Run "adb pair <ip:pair port from settings dialog>" and enter the PIN when prompted. The pairing dialog will close after connection
4.) Run "adb connect <ip:port from settings>"
5.) Run the bash script. The service will now be run.
You will need to follow these steps every time the device reboots, as usual

## Note:
As well as if your device is rebooted, the script will need to be re-run if DarQ is force stopped for whatever reason, including if the system kills the background code. This includes toggling the accessibility service (which force stops the app in the process).

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ dependencies {
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"

//Xposed
provided 'de.robv.android.xposed:api:82'
compileOnly 'de.robv.android.xposed:api:82'
}

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import android.widget.PopupMenu
import androidx.core.widget.addTextChangedListener
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import com.kieronquinn.app.darq.BuildConfig
import com.kieronquinn.app.darq.R
import com.kieronquinn.app.darq.activities.MainActivity
import com.kieronquinn.app.darq.adapters.AppsAdapter
Expand Down Expand Up @@ -133,7 +134,7 @@ class AppsFragment : Fragment() {
uiScope.launch {
withContext(Dispatchers.IO) {
val appList = apps.filter {
(!it.isSystemApp || showSystemApps) && (searchString == null || it.appName.toString().toLowerCase(Locale.getDefault()).contains(searchString.toLowerCase(Locale.getDefault())))
(!it.isSystemApp || showSystemApps) && (searchString == null || it.appName.toString().toLowerCase(Locale.getDefault()).contains(searchString.toLowerCase(Locale.getDefault()))) && it.packageName != BuildConfig.APPLICATION_ID
}
withContext(Dispatchers.Main){
callback?.invoke(appList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class DarqBackgroundService : AccessibilityService() {
refreshEnabledApps("")
refreshToggles()
getAlarmTimes()
if(isForceDarkTheme){
enableForceDark()
}
}

private fun getAlarmTimes() {
Expand Down

0 comments on commit f07d0a3

Please sign in to comment.