Update Android port

* java/debug.sh (is_root): Port to android versions which don't
support `chmod +x'.
* src/android.c (android_content_name_p): Disable before API
level 19.
This commit is contained in:
Po Lu 2023-03-09 14:50:32 +08:00
parent dcc3c63c6e
commit 682a6542cd
2 changed files with 7 additions and 1 deletions

View file

@ -284,7 +284,7 @@ else
if (adb -s $device shell ls /system/bin | grep -G tee); then
# Copy it to the user directory.
adb -s $device shell "$gdbserver_cat"
adb -s $device shell "run-as $package chmod +x gdbserver"
adb -s $device shell "run-as $package chmod 777 gdbserver"
gdbserver_cmd="./gdbserver"
else
# Hopefully this is an old version of Android which allows

View file

@ -994,6 +994,12 @@ android_get_asset_name (const char *filename)
static bool
android_content_name_p (const char *filename)
{
/* Content URIs aren't supported before Android 4.4, so return
false. */
if (android_api_level < 19)
return false;
return (!strcmp (filename, "/content")
|| !strncmp (filename, "/content/",
sizeof "/content/" - 1));