feat: add Android APK with embedded I2P browser and torrent manager
- Add an Android app (org.mooni2p.browser) with an I2P WebView browser defaulting to insulaocculta.i2p, bookmarks, and a diagnostics dialog. - Run the router in a foreground service and add a Torrents & DHT tab backed by the router API (manager.html). - Handle magnet links and .torrent files from intents, the file picker, and .i2p downloads. - Add scripts/build_apk.py and a `just apk` target that builds arm64-v8a and x86_64 APKs. - Document the APK build and install steps in the README. - Include related bittorrent, router, streaming, and ntcp2_net updates.
This commit is contained in:
1 parent
fbe6818c4e
commit
7a1b4325f9
16 files changed
+3041
-78
No files matched your search
+10
-3
@@ -623,16 +623,23 @@ int32_t moon_i2p_net_mkdir_p(moonbit_bytes_t path_bytes, int32_t path_len) {
|
||||
char path[1024];
|
||||
memcpy(path, path_bytes, (size_t)path_len);
|
||||
path[path_len] = '\0';
|
||||
struct stat st;
|
||||
for (int32_t i = 1; i < path_len; i++) {
|
||||
if (path[i] == '/') {
|
||||
path[i] = '\0';
|
||||
if (mkdir(path, 0755) < 0 && errno != EEXIST) {
|
||||
net_set_error(strerror(errno));
|
||||
return -1;
|
||||
if (!(stat(path, &st) == 0 && S_ISDIR(st.st_mode))) {
|
||||
if (mkdir(path, 0755) < 0 &&
|
||||
errno != EEXIST && errno != EISDIR && errno != EACCES && errno != EROFS) {
|
||||
net_set_error(strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
path[i] = '/';
|
||||
}
|
||||
}
|
||||
if (stat(path, &st) == 0 && S_ISDIR(st.st_mode)) {
|
||||
return 0;
|
||||
}
|
||||
if (mkdir(path, 0755) < 0 && errno != EEXIST) {
|
||||
net_set_error(strerror(errno));
|
||||
return -1;
|
||||
|
||||
Reference in new issue
Block a user