deltazefiro / Amarok-Hider

Hide your private files and apps with a single click.
https://deltazefiro.github.io/Amarok-doc/en-US/
Apache License 2.0
1.34k stars 46 forks source link

[FeatureRequest] Trigger hide by a shell command #152

Closed LimerBoy closed 1 month ago

LimerBoy commented 1 month ago

Feature Description / 功能描述 There is an application github.com/leohearts/AlternativeUnlockXposed that allows you to run commands when you enter a decoy password.

It would be great if you could trigger hiding applications by executing a shell command.

deltazefiro commented 1 month ago

Try this:

adb shell am broadcast -a deltazero.amarok.HIDE -n ${PKG_NAME}/.receivers.ActionReceiver

where ${PKG_NAME} is the application ID of Amarok, deltazero.amarok.foss for the F-Droid version, and deltazero.amarok for the AppCenter version.

LimerBoy commented 1 month ago

Try this:

adb shell am broadcast -a deltazero.amarok.HIDE -n ${PKG_NAME}/.receivers.ActionReceiver

where ${PKG_NAME} is the application ID of Amarok, deltazero.amarok.foss for the F-Droid version, and deltazero.amarok for the AppCenter version.

tried commands wth both ids using root shell, but didn't worked

Broadcasting: Intent { act=deltazero.amarok.HIDE flg=0x400000 cmp=deltazero.amarok.foss/.receivers.ActionReceiver } Broadcast completed: result=0

deltazefiro commented 1 month ago

tried commands wth both ids using root shell, but didn't worked

Perhaps you are not using the latest version of Amarok? There was a change in intent API in v0.8.7a2. Please check if you are using v0.8.7a2 or newer. See docs.

LimerBoy commented 1 month ago

I'm using v0.8.7b1 (latest from fdroid)

deltazefiro commented 1 month ago

Could you please fill out the bug report template to help reproduce it?

tried commands wth both ids using root shell

I'm also interested in how you issued the adb command. Did you run the command on the device itself with a root shell? If so, how did you get the adb client?


Describe the bug / 问题描述 A clear and concise description of what the bug is. 请清晰地描述您遇到的异常。

To Reproduce / 复现步骤 Steps to reproduce the behavior / 复现异常的步骤:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior / 预期行为 A clear and concise description of what you expected to happen. 描述您认为正常情况下应该发生什么。

Screenshots / 截图 If applicable, add screenshots to help explain your problem. (可选)问题复现时候的截图或录屏。

Basic Information (please complete the following information) / 请填写以下信息:

Additional context / 其他信息 Add any other context about the problem here. 在这里输入其他有关此异常的信息。


LimerBoy commented 1 month ago

Android 13 Amarok v0.8.7b1 App hide mode: Shizuku(sui) also tried with root mode. Hides from Amarok UI but not from shell broadcast.

i sent both am broadcast -a deltazero.amarok.HIDE -n deltazero.amarok.foss/.receivers.ActionReceiver and am broadcast -a deltazero.amarok.HIDE -n deltazero.amarok/.receivers.ActionReceiver

from rooted Termux and $HELL emulators, and received Broadcast completed: result=0

app is not disguised as calendar, i tested with both.

Also did all from pc with adb. image

i also installed v0.8.7a2 but all the same

deltazefiro commented 1 month ago

Oh my, I omitted the package name in the command :fearful: It will only work on the AppCenter version. This one should work for the foss version.

adb shell am broadcast -a deltazero.amarok.HIDE -n deltazero.amarok.foss/deltazero.amarok.receivers.ActionReceiver
LimerBoy commented 1 month ago

Yes, it worked, thanks!