[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7586":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},7586,"android","meganz\u002Fandroid","meganz","MEGA Android App","",null,"Kotlin",1843,407,240,120,0,1,10,3,20.83,"Other",false,"master",true,[5,26,27,28,29,30,31],"android-studio","end-to-end-encryption","java","kotlin","mega","privacy","2026-06-12 02:01:41","# MEGA Android Client\n\nA fully-featured client to access your Cloud Storage provided by MEGA.\n\nThis document provides step-by-step instructions to build the application on Linux and MacOS using Android Studio.\n\n## 1. Setup Development Environment\n\nInstall the following prerequisites:\n\n- [Android Studio](https:\u002F\u002Fdeveloper.android.com\u002Fstudio)\n- [Android SDK Tools](https:\u002F\u002Fdeveloper.android.com\u002Fstudio#Other)\n- [Android NDK](https:\u002F\u002Fdeveloper.android.com\u002Fndk\u002Fdownloads)\n- JDK 21\n\n## 2. Get the Source Code\n\nClone the repository with all submodules:\n\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002Fmeganz\u002Fandroid.git\n```\n\n## 3. NDK Configuration\n\n### 3.1 Linux\n\n1. Install [Android NDK r27b](https:\u002F\u002Fdl.google.com\u002Fandroid\u002Frepository\u002Fandroid-ndk-r27b-linux.zip) (latest version tested: NDK r27b, version number: 27.1.12297006).\n\n2. Export the `NDK_ROOT` environment variable or create a symbolic link at `${HOME}\u002Fandroid-ndk` pointing to your Android NDK installation path:\n\n```bash\nexport NDK_ROOT=\u002Fpath\u002Fto\u002Fndk\nln -s \u002Fpath\u002Fto\u002Fndk ${HOME}\u002Fandroid-ndk\n```\n\n### 3.2 MacOS\n\n1. Install NDK r27b using Android Studio by following [these instructions](https:\u002F\u002Fdeveloper.android.com\u002Fstudio\u002Fprojects\u002Finstall-ndk#specific-version). Pay attention to the bottom-right `Show Package Details` checkbox to display available versions. Latest version tested: NDK r27b, version number: 27.1.12297006.\n\n2. Export the `NDK_ROOT` environment variable or create a symbolic link at `${HOME}\u002Fandroid-ndk` pointing to your Android NDK installation path:\n\n```bash\nexport NDK_ROOT=\"\u002FUsers\u002F${USER}\u002FLibrary\u002FAndroid\u002Fsdk\u002Fndk\u002F27.1.12297006\"\nln -s \u002Fpath\u002Fto\u002Fndk ${HOME}\u002Fandroid-ndk\n```\n\n## 4. ANDROID_HOME Configuration\n\n### 4.1 Linux\n\nExport the `ANDROID_HOME` environment variable or create a symbolic link at `${HOME}\u002Fandroid-sdk` pointing to your Android SDK installation path:\n\n```bash\nexport ANDROID_HOME=\u002Fpath\u002Fto\u002Fsdk\nln -s \u002Fpath\u002Fto\u002Fsdk ${HOME}\u002Fandroid-sdk\n```\n\n### 4.2 MacOS\n\nExport the `ANDROID_HOME` environment variable or create a symbolic link at `${HOME}\u002Fandroid-sdk` pointing to your Android SDK installation path:\n\n```bash\nexport ANDROID_HOME=\"\u002FUsers\u002F${USER}\u002FLibrary\u002FAndroid\u002Fsdk\u002F\"\nln -s \u002Fpath\u002Fto\u002Fsdk ${HOME}\u002Fandroid-sdk\n```\n\n## 5. JAVA_HOME Configuration\n\n### 5.1 Linux\n\nExport the `JAVA_HOME` environment variable or create a symbolic link at `${HOME}\u002Fandroid-java` pointing to your Java installation path.\n\nYou can find the Java path in Android Studio at `Preferences > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK (default)`.\n\n```bash\nexport JAVA_HOME=\u002Fpath\u002Fto\u002Fjdk\nln -s \u002Fpath\u002Fto\u002Fjdk ${HOME}\u002Fandroid-java\n```\n\n### 5.2 MacOS\n\nExport the `JAVA_HOME` environment variable or create a symbolic link at `${HOME}\u002Fandroid-java` pointing to your Java installation path.\n\nYou can find the Java path in Android Studio at `Preferences > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK (default)`.\n\nDefault MacOS path:\n\n```bash\nexport JAVA_HOME=\"\u002FApplications\u002FAndroid Studio.app\u002FContents\u002Fjre\u002FContents\u002FHome\"\nln -s \u002Fpath\u002Fto\u002Fjdk ${HOME}\u002Fandroid-java\n```\n\n## 6. Build SDK\n\n### 6.1 For Linux Users\n\n#### 6.1.1 Install Build Tool Dependencies\n\n```bash\nsudo apt install python3-pkg-resources libglib2.0-dev libgtk-3-dev libasound2-dev libpulse-dev\n```\n\n#### 6.1.2 Set Up VCPKG\n\nClone the VCPKG repository next to the Android repository folder. If you already have a local VCPKG clone, you can skip this step and use your existing VCPKG installation.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvcpkg\nexport VCPKG_ROOT=path\u002Fto\u002Fyour\u002Fvcpkg\u002Ffolder\n```\n\n#### 6.1.3 Build SDK\n\nBuild the SDK by running `.\u002Fcmake.sh` from `sdk\u002Fsrc\u002Fmain\u002Fjni\u002F`.\n\n**IMPORTANT:** Verify that the build process completes successfully. It should finish with the **Task finished OK** message. If it doesn't, modify the `LOG_FILE` variable in `cmake.sh` from `\u002Fdev\u002Fstdout` to a text file and run `.\u002Fcmake.sh` again to view the build errors.\n\n### 6.2 For Apple Silicon MacOS Users\n\n> **⚠️ Deprecation Notice**\n>\n> This build process is **obsolete**, **no longer maintained**, and **not supported**.\n>\n> It is kept **only for Apple Silicon (ARM64) MacOS users**, because the **current SDK CMake-based build flow does not support Apple Silicon MacOS**.\n>\n> **Last verified on:** 2025-12-18\n\n#### 6.2.1 Download WebRTC Files\n\n1. Download the WebRTC files from: https:\u002F\u002Fmega.nz\u002Ffile\u002FN2k2XRaA#bS9iudrjiULmMaGbBKErsYosELbnU22b8Zj213Ti1nE\n2. Uncompress the archive and place the `webrtc` folder in `sdk\u002Fsrc\u002Fmain\u002Fjni\u002Fmegachat\u002F`.\n\n**Note:** The WebRTC download link may change over time. Please verify it matches the one specified in `build.sh`.\n\n#### 6.2.2 Prerequisites for Running the Build Script\n\nBefore running the SDK build script, install the required dependencies via Homebrew:\n\n```bash\nbrew install bash gnu-sed gnu-tar autoconf automake cmake coreutils libtool swig wget xz python3\n```\n\nThen reboot MacOS to ensure the newly installed bash (v5.x) overrides the default v3.x in PATH.\n\nEdit your PATH environment variable (ensure GNU paths are set up before `$PATH):\n\n- **For Intel chip**, add the following lines to `~\u002F.zshrc`:\n\n```bash\nexport PATH=\"\u002Fusr\u002Flocal\u002Fopt\u002Fgnu-tar\u002Flibexec\u002Fgnubin:$PATH\"\nexport PATH=\"\u002Fusr\u002Flocal\u002Fopt\u002Fgnu-sed\u002Flibexec\u002Fgnubin:$PATH\"\n```\n\n- **For Apple Silicon**, add the following lines to `~\u002F.zshrc`:\n\n```bash\nexport PATH=\"\u002Fopt\u002Fhomebrew\u002Fopt\u002Fgnu-tar\u002Flibexec\u002Fgnubin:$PATH\"\nexport PATH=\"\u002Fopt\u002Fhomebrew\u002Fopt\u002Fgnu-sed\u002Flibexec\u002Fgnubin:$PATH\"\nln -s \u002Fopt\u002Fhomebrew\u002Fbin\u002Fpython3 \u002Fopt\u002Fhomebrew\u002Fbin\u002Fpython\n```\n\nThen install CMake version 3.22.1 in `Android Studio > Tools > SDK Manager > SDK Tools > CMake`.\n\nYou must check the `Show Package Details` checkbox to display this specific version. After installation, add the following line to `~\u002F.zshrc`:\n\n```bash\nexport PATH=\"\u002FUsers\u002F${USER}\u002FLibrary\u002FAndroid\u002Fsdk\u002Fcmake\u002F3.22.1\u002Fbin:$PATH\"\n```\n\n#### 6.2.3 Running the Build Script\n\nBuild the SDK by running `.\u002Fbuild.sh all` from `sdk\u002Fsrc\u002Fmain\u002Fjni\u002F`. You can also run `.\u002Fbuild.sh clean` to clean the previous configuration.\n\n**IMPORTANT:** Verify that the build process completes successfully. It should finish with the **Task finished OK** message. If it doesn't, modify the `LOG_FILE` variable in `build.sh` from `\u002Fdev\u002Fnull` to a text file and run `.\u002Fbuild.sh all` again to view the build errors.\n\nIf you encounter an error (seen in the log file) due to licenses not being accepted, you can read and accept the licenses using the sdkmanager command-line tool:\n\n```bash\n\u002Fpath-to-cmdline-tools\u002Fbin\u002Fsdkmanager --sdk_root=$ANDROID_HOME --licenses\n```\n\n## 7. Build and Run Android App\n\n### 7.1 Disable Pre-built SDK\n\n1. Open `buildSrc\u002Fsrc\u002Fmain\u002Fkotlin\u002Fmega\u002Fprivacy\u002Fandroid\u002Fbuild\u002FUtil.kt` and change the `shouldUsePrebuiltSdk()` method to:\n\n```kotlin\nfun shouldUsePrebuiltSdk(): Boolean = false\n\u002F\u002F        System.getenv(\"USE_PREBUILT_SDK\")?.let { it != \"false\" } ?: true\n```\n\n2. Open `settings.gradle.kts` and change the `shouldUsePrebuiltSdk()` method to:\n\n```kotlin\nfun shouldUsePrebuiltSdk(): Boolean = false\n\u002F\u002F        System.getenv(\"USE_PREBUILT_SDK\")?.let { it != \"false\" } ?: true\n```\n\n### 7.2 Build Mobile Analytics Library Locally\n\n**Note:** You need to occasionally redo this section to ensure the latest analytics library is used.\n\n1. Download and build the [Mobile Analytics](https:\u002F\u002Fgithub.com\u002Fmeganz\u002Fmobile-analytics) source code:\n\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002Fmeganz\u002Fmobile-analytics.git\ncd mobile-analytics\ngit checkout main\n.\u002Fgradlew --no-daemon assembleRelease\n```\n\n2. Copy the following generated libraries to the root of the MEGA codebase:\n   - `shared\u002Fbuild\u002Foutputs\u002Faar\u002Fshared-release.aar`\n   - `analytics-core\u002Fbuild\u002Foutputs\u002Faar\u002Fanalytics-core-release.aar`\n   - `analytics-annotations\u002Fbuild\u002Foutputs\u002Faar\u002Fanalytics-annotations-release.aar`\n\n3. Modify MEGA code to depend on local AAR files:\n   - Search for `implementation(lib.mega.analytics)` throughout the project and replace all occurrences with the code below. Note: You may need to add `..` to the path if the `build.gradle.kts` is in a subproject.\n\n```kotlin\n\u002F\u002F    implementation(lib.mega.analytics)\nimplementation(files(\"..\u002Fshared-release.aar\"))\nimplementation(files(\"..\u002Fanalytics-core-release.aar\"))\nimplementation(files(\"..\u002Fanalytics-annotations-release.aar\"))\n```\n\n### 7.3 Disable Library Dependencies\n\n1. In the root `build.gradle.kts`, comment out the following code:\n\n```kotlin\nid(\"mega.android.release\")\n```\n\n2. In `settings.gradle.kts`, comment out the following code:\n\n```kotlin\nmaven {\n    url =\n        uri(\"${System.getenv(\"ARTIFACTORY_BASE_URL\")}\u002Fartifactory\u002Fmega-gradle\u002Fmegagradle\")\n}\n```\n\nand\n\n```kotlin\nresolutionStrategy {\n    eachPlugin {\n        if (requested.id.id == \"mega.android.release\") {\n            useModule(\"mega.privacy:megagradle:${requested.version}\")\n        }\n    }\n}\n```\n\n### 7.4 Use Public Dependencies\n\nIn `lib.versions.toml`, replace dependencies of **Telephoto** and **uCrop** with their publicly available versions from their official GitHub repositories.\n\n### 7.5 Firebase (GMS build only)\n\n1. Copy `app\u002Fsrc\u002Fgms\u002Fgoogle-services.json.example` to `app\u002Fsrc\u002Fgms\u002Fgoogle-services.json`\n2. Create a Firebase project and add Android apps for `mega.privacy.android.app` and `mega.privacy.android.app.qa`\n3. Replace the placeholder values in `google-services.json` with your project's config\n\n### 7.6 Run the Project\n\nOpen the project with Android Studio, let it build the project, and click **Run**.\n\n## Notice\n\nTo use the **geolocation feature**, you need a **Google Maps API key**.\n\nPlaceholder `google_maps_api.xml` files with an empty key are already included in the repository. To enable geolocation:\n\n1. Get an API key by following the directions here: https:\u002F\u002Fdevelopers.google.com\u002Fmaps\u002Fdocumentation\u002Fandroid\u002Fsignup\n\n2. Once you have your key (it starts with \"AIza\"), replace the empty `\"google_maps_key\"` string in one of these files:\n   - `app\u002Fsrc\u002Fdebug\u002Fres\u002Fvalues\u002Fgoogle_maps_api.xml`\n   - `app\u002Fsrc\u002Fqa\u002Fres\u002Fvalues\u002Fgoogle_maps_api.xml`\n   - `app\u002Fsrc\u002Frelease\u002Fres\u002Fvalues\u002Fgoogle_maps_api.xml`\n","MEGA Android 是一款功能全面的客户端应用，旨在让用户能够访问由 MEGA 提供的云存储服务。该项目使用 Kotlin 语言开发，支持端到端加密技术以确保用户数据的安全性和隐私性。其核心功能包括文件上传、下载、分享以及管理等，同时具备良好的用户界面设计和流畅的操作体验。适合需要在移动设备上安全地存储与管理个人或工作文件的场景，特别是对数据隐私有较高要求的用户群体。",2,"2026-06-11 03:13:09","top_language"]