forked from KieronQuinn/AmbientMusicMod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a new compatibility checker that checks if getModelState() is supported. This isn't 100% perfect so a bypass is also available - Tweaked sound trigger injection to include an XML line that's required for some devices - Fixed track list not loading for some people - Hopefully fixed log dump zips - Newly built modules will now also keep a copy of your original sound trigger XML. This change allows for comparison in the log dumps, and may help updates in the future. - Removed a load of unused logging
- Loading branch information
1 parent
b49095b
commit 09fdf12
Showing
50 changed files
with
802 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Built application files | ||
*.apk | ||
app/*/*.apk | ||
*.ap_ | ||
*.aab | ||
|
||
|
This file contains 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
This file contains 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
10 changes: 10 additions & 0 deletions
10
app/src/main/aidl/com/kieronquinn/app/ambientmusicmod/IRootService.aidl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// IRootService.aidl | ||
package com.kieronquinn.app.ambientmusicmod; | ||
|
||
import android.os.ParcelUuid; | ||
|
||
interface IRootService { | ||
|
||
int getModelState(in ParcelUuid uuid); | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
id=AmbientMusicTest | ||
id=AmbientMusicMod | ||
name=Ambient Music Mod | ||
version=1.0 | ||
versionCode=1 | ||
version=%MODULEVERSION% | ||
versionCode=%MODULEVERSIONCODE% | ||
author=Kieron Quinn / Quinny899 | ||
description=Port of Pixel Ambient Music to other devices. You MUST use the Xposed module AS WELL as this module for it to work. | ||
description=Port of Pixel Ambient Music to other, compatible devices. You MUST enable the Xposed module AS WELL as this module for it to work. |
Binary file added
BIN
+10.3 MB
...t/system/product/priv-app/com.google.intelligence.sense/com.google.intelligence.sense.apk
Binary file not shown.
This file contains 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
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/kieronquinn/app/ambientmusicmod/app/service/AmbientRootService.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.kieronquinn.app.ambientmusicmod.app.service | ||
|
||
import android.annotation.SuppressLint | ||
import android.content.Intent | ||
import android.os.IBinder | ||
import android.os.ParcelUuid | ||
import com.kieronquinn.app.ambientmusicmod.IRootService | ||
import com.kieronquinn.app.ambientmusicmod.xposed.wrappers.SoundTriggerManager | ||
import com.topjohnwu.superuser.ipc.RootService | ||
|
||
/** | ||
* Root Service (using libsu RootService) that calls getModelState() on Sound Trigger with the Ambient model UUID | ||
* The UUID actually doesn't matter here, what we're interested in is the response from the system. | ||
* 0 -> OK, model is loaded | ||
* -38 -> "Crash", getModelState is not natively supported (probably Sound Trigger 2.1), but will start working with the Xposed module | ||
* Any other unknown states (See SoundTriggerManager.isResponseOk()) are also OK, anything else that is known is a fail. | ||
* The most common fail response is -MAX_INT, which indicates the method call failed gracefully and getModelState is NOT supported. | ||
*/ | ||
class AmbientRootService: RootService() { | ||
|
||
private val rootBinder = object: IRootService.Stub() { | ||
|
||
@SuppressLint("WrongConstant") | ||
override fun getModelState(uuid: ParcelUuid): Int { | ||
val soundTrigger = SoundTriggerManager(getSystemService("soundtrigger"), classLoader) | ||
return soundTrigger.getModelState(uuid.uuid) | ||
} | ||
|
||
} | ||
|
||
override fun onBind(intent: Intent): IBinder { | ||
return rootBinder | ||
} | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.