nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.16k stars 65 forks source link

Cannot run 'am' #221

Open t184256 opened 1 year ago

t184256 commented 1 year ago

I'd like to port https://github.com/DDoSolitary/OkcAgent, but I'm pretty stuck on many fronts.

One is, I cannot run am even from the failsafe shell, let alone from with the regular prooted environment:

cmd: Failure calling service activity: Failed transaction (2147483646).

If resolved, it might open a way to something we've lacked for a long time: tighter integration with Android system.

Somewhat related: https://github.com/t184256/nix-on-droid/issues/3

t184256 commented 11 months ago

@ettom shows how do the same from nix-on-droid:

$ /android/system/bin/linker64 /android/system/bin/cmd activity
cmd: Failure calling service activity: Failed transaction (2147483646)
t184256 commented 11 months ago

Note to self: also consider replicating what termux does with their am.apk. With -b /etc/system/public.libraries.txt, termux's am.apk gives me:

CLASSPATH=from-termux-am.apk LD_PRELOAD=/system/lib64/libnativeloader_lazy.so /android/system/bin/linker64 /android/system/bin/app_process / com.termux.termuxam.Am broadcast -n org.ddsolitary.okcagent/.GpgProxyReceiver
...
Permission Denial: getIntentSender() from pid=..., uid=... (need uid=...) is not allowed to send as package com.termux

Could we be close?