NullPointerException: Attept to invoke virtual method 'android.content.pm.PackageManager' on a null object
This says nothing about the problem. In fact, https://github.com/termux/termux-app/blob/master/app/src/main/java/com/termux/app/RunCommandService.java doesn't use
android.content.pm.PackageManager at all.
Permissions request wasn't in the right place. My bad, it works fine, thanks for the refference!
Fixing may require
MANAGE_EXTERNAL_STORAGEpermission - not tested currently.
Note on storage @xeffyr The description corresponds only partially to my experience. The reference to Android 11 can refer to the OS of the device/emulator or targetSdk=30 from termux, includes Android 10 or a combination thereof. With targetSdk=28 I didn't have a problem with writing and deleting on any OS and no real difference between internal memory and sdcard was found.
That changes fundamentally with targetSdk=29! Apart from the now meaningless setup-storage dialog, termux can only manage
~/../../* data. With the appropriate files app I can exchange/duplicate data with termux on my devices, termux is then mostly too big with 3-5Gb and very randomly what happens on the extern/internal-storage
This restriction is more severe than the Exec restriction, which can be bypassed with proot-exec. Has there been any progress with
/home/builder/termux-packages/.termux-builder/_cache/android-r21d-api-24-v3/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: cannot find -lpthread clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:32: microsocks] Error 1
File to patch: Skip this patch? [y] 2 out of 2 hunks ignored