Termux-packages: Calling /system/bin/am does not work on Android 8? Affects termux-setup-storage and termux-reload-settings

Created on 25 Sep 2017  路  5Comments  路  Source: termux/termux-packages

I rooted my pixel c device with android 8.0. Just in case it has anything to do. I also went to app permissions and gave storage permissions to termux, still the same error when running termux-setup-storage:

Exception occurred while executing:
java.lang.IllegalArgumentException: Calling application did not provide package name
at com.android.server.am.ActivityManagerService.isInstantApp(ActivityManagerService.java:18547)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:18972)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19703)
at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:614)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:154)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:14889)
at android.os.Binder.shellCommand(Binder.java:573)
at android.os.Binder.onTransact(Binder.java:473)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4256)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2935)
at android.os.Binder.execTransact(Binder.java:674)

Let me know if you need any other information, I wish I could help more but my Java and android development skills are null.

bug report help wanted

Most helpful comment

This is now finally fixed by the termux-am package (which every new user will have preinstalled, and every existing user will get when they update with pkg up)!

All 5 comments

@urielarg try touch /sdcard/file If you don't get any output, that means you have write access to /sdcard Also what is your architecture? You can use termux-info to find out.

It seems that calling am, the activity manager command as the Termux user does not work at all in Android 8 - see https://github.com/termux/termux-api/issues/105.

This affects the termux-reload-settings and termux-setup-storage`.

In the meantime see this workaround at termux/termux-app#449.

This is now finally fixed by the termux-am package (which every new user will have preinstalled, and every existing user will get when they update with pkg up)!

@fornwall Thanks a million for this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

roycebank picture roycebank  路  3Comments

Zuccace picture Zuccace  路  3Comments

newmania picture newmania  路  3Comments

tigran123 picture tigran123  路  3Comments

bbtdev picture bbtdev  路  3Comments