• Stars
    star
    3,330
  • Rank 13,456 (Top 0.3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OpenMTP - Advanced Android File Transfer Application for macOS

OpenMTP | Android File Transfer for macOS

Introduction

Advanced Android File Transfer Application for macOS.

Transferring files between macOS and Android or any other MTP devices has always been a nightmare. There are a few File Transfer MTP apps which are available online but most of them are either too expensive or come with bad UI/UX. The official "Android File Transfer" app for macOS from Google comes with bugs, innumerable limitations, some of which include - not being able to transfer files larger than 4GB, frequent disconnections, unable to rename the folders or files on the android/MTP devices. Most of the other apps available online uses either WiFi or ADB protocol to transfer the files, which is an extremely time-consuming process.

Countless searches to find an app to solve these problems and failing to find one made me restless. So, I took the leap and decided to create an app for us that could help us have a smooth and hassle-free file transfer process from macOS to Android/MTP devices. Created with the objective of giving back to the community, we can all use this app for free in this lifetime.

Features

  • Safe, Transparent and Open-Source
  • Plug and Play via USB. No hassles, easy and instant connection.
  • Select between Internal Memory and SD Card
  • Transfer multiple files which are larger than 4GB
  • Dark mode
  • Drag-and-drop support
  • Split pane views for both Local Computer and Android device
  • Choose between Grid and List view.
  • Use Keyboard Shortcuts to navigate through your files.
  • No collection of personally identifiable information.

Kalam Kernel

OpenMTP 3.0 features a new MTP kernel and it was written from the scratch. It promises a file copy speed of 30 to 40 MB/s on low and mid range devices and 100 to 120 MB/s on higher end devices. The all new and powerful MTP kernel is named after Dr. A. P. J. Abdul Kalam

Do checkout the Go package which I've written to build Kalam Kernel: github.com/ganeshrvel/go-mtpx. Feel free to raise PRs.

System Requirements and Support

  • To support macOS version below Big Sur the Kalam kernel needs to be compiled on an older macOS machine everytime there is an update, which is practically very difficult
  • Only the latest 3 versions of macOS will receive the Kalam Kernel updates, which includes new device supports, fixes, stability improvements. macOS Big Sur (11.0) or above will receive the above said updates
  • We have now officially retired the support for Kalam Kernel on macOS 10.13 (OS X El High Sierra) and lower. Only the "Legacy" MTP mode will continue working on these outdated machines.
  • We will continue releasing the updates for both Intel and ARM64 machines

Installation

  # newer versions:
  brew install openmtp --cask
  # older versions:
  brew cask install openmtp

Screengrabs

OpenMTP File Explorer

OpenMTP File Transfer

Keyboard Shortcuts

Command Keyboard Shortcut
Delete backspace
New Folder command (⌘)+n
Copy command (⌘)+c
Copy to Queue command (⌘)+shift+c
Paste command (⌘)+v
Refresh command (⌘) +r
Folder Up command (⌘)+b
Select All command (⌘)+a
Rename command (⌘)+d
Switch Tab command(⌘)+1
Open enter
Navigate Left left
Navigate Right right
Navigate Up up
Navigate Down down
Select Multiple Items Forward (in Grid View) shift+left
Select Multiple Items Backward (in Grid View) shift+right
Select Multiple Items Forward (in List View) shift+up
Select Multiple Items Backward (in List View) shift+down
Select Multiple Items (with mouse) command (⌘)+click or shift+click

Building from Source

Requirements: Node.js v10, Git and Yarn package manager

Clone

$ git clone https://github.com/ganeshrvel/openmtp.git

$ cd openmtp

# install yarn
npm install -g yarn

# install sentry cli
npm -g i @sentry/cli
$ yarn

Run

A fresh clone might throw undefined state error. Run the following commands once to fix the issue.

# For Mac and Linux
$ UPGRADE_EXTENSIONS=1 npm run dev

# For Windows
$ set UPGRADE_EXTENSIONS=1 && npm run dev
# Development
$ yarn dev

# Pre-production
$ yarn start

Debugging a Packaged app

# On terminal run
$ "/path/to/OpenMTP.app/Contents/MacOS/OpenMTP" --remote-debugging-port=6363
  • Open a Chromium browser
  • Input "about://inpsect" into the URL bar
  • Add a new connection localhost:6363
  • Inpect OpenMTP @ port 6363

Publishing using CI/CD:

  • CodeMagic.io
    • Create a new App (Choose others -> Enter Electron)
    • Environment variables:
      • APPLEID: <Apple developer account username>
      • APPLE_APP_SPECIFIC_PASSWORD: <App-Specific Password>
        • Log into your Apple Account
        • Goto Sign-In and Security > App-Specific Passwords
        • Click on Generate Password..., enter a password label and click Create
        • Copy the displayed app-specific-password
      • SENTRY_URL: https://sentry.io/
      • SENTRY_ORG: <Sentry Organization Name>
      • SENTRY_PROJECT: <Sentry Project>
      • SENTRY_TOKEN_ID: <Sentry Auth Token>
        • Find it from here: Auth Tokens
        • Scopes: event:admin, event:read, member:read, org:read, project:read, project:releases, team:read
      • GITHUB_TOKEN: Personal access token
      • CSC_LINK:
        • Keychain -> Default Keychains menu in the left -> Login -> My Certificates
        • Search for Developer ID Application in the top search bar
        • Search for Developer ID Application in the top search bar
        • Expand Developer ID Application: <User Name> (XXXYYYZZZ)
        • See if the private key's name matches this: Mac Developer ID Application: <User Name>
          • Else rename the private key as (right click -> get info) Mac Developer ID Application: <User Name>
          • Close the window
        • Right Click on the private key -> Mac Developer ID Application: <User Name>
        • Export Mac Developer ID Application: <User Name>
        • File name: CERTIFICATE_PRIVATE_KEY.p12
        • Enter Password. This is the CSC_KEY_PASSWORD, note this down
        • Run (this step doesnt work if you are using fig or ohmyzsh, use raw terminal):
          • base64 -i CERTIFICATE_PRIVATE_KEY.p12 -o CERTIFICATE_PRIVATE_KEY.txt
        • Copy the whole content of the file CERTIFICATE_PRIVATE_KEY.txt
        • Paste the content as the value for the field CSC_LINK
      • CSC_KEY_PASSWORD is the password from the above step
      • CODEMAGIC_AUTH_TOKEN_ID: <CodeMagic API Token>
      • CODEMAGIC_INTEL_X64_WORKFLOW_ID_PROD: <Prod codeMagic workflow id>
        • Find the relevant workflow id from codemagic.yaml, (mostly macos-intel-x64-build-prod)
      • CODEMAGIC_INTEL_X64_WORKFLOW_ID_DEV: <Dev codeMagic workflow id>
        • Find the relevant workflow id from codemagic.yaml, (mostly macos-intel-x64-build-dev)
      • PUBLISH_PROD_REPOSITORY: <Repository to publish the production app>
      • PUBLISH_DEV_REPOSITORY: <Repository to publish the dev app>
      • CODEMAGIC_PUBLISH_PROJECT_ID: <Codemagic intel project id>
      • PUBLISH_EMAIL: Email address to receive the updates on publish
      • References:

Packaging (locally) and Publishing

Setup the code signing to build, package (locally) and publish the app.

App Notarization for macOS (skip this section for non macOS builds)

  • Rename sample.env file as .env
  • To update APPLEID and APPLE_APP_SPECIFIC_PASSWORD in .env file
  • Log into your Apple Account
  • Goto Sign-In and Security > App-Specific Passwords
  • Click on Generate Password..., enter a password label and click Create
  • Copy the displayed app-specific-password
  • Run
security add-generic-password -a "<apple-developer-account-username>" -w <app-specific-password> -s "APPLE_APP_SPECIFIC_PASSWORD"

Sentry

npm install -g @sentry/wizard
sentry-wizard --integration electron

# Upload Debug Information
# Everytime the electron.js version is upgraded run:
node sentry-symbols.js

sentry-cli login

Packaging Instructions: https://www.electron.build/code-signing

$ export GH_TOKEN="<github token>"
# For local platform
$ yarn package

# For multiple platforms
$ yarn package-all

Technical Features

  • Built using Electron v17 and React v18
  • Loadables, Dynamic Reducer Injection, Selectors for code splitting and performance optimization
  • Hot module reload (HMR) for instant feedback
  • Inbuilt error logging and profile/settings management
  • Industry standard state management
  • JSS, SASS/SCSS styling
  • Port assigned: 4642

Configurations

  • config/env/env.dev.js and config/env/env.prod.js contain the PORT number of the app.
  • config/dev-app-update.yml file holds the GitHub repo variables required by electron-updater.
  • config/google-analytics-key.js file contains the Google Analytics Tracking ID.
  • package.json build.publish object holds the values for publishing the packaged application.
  • app/constants folder contains all the constants required by the app.

Debugging

Debugging Guide

electron-react-boilerplate/electron-react-boilerplate#400

Dispatching redux actions from the main process

electron-react-boilerplate/electron-react-boilerplate#118

electron-react-boilerplate/electron-react-boilerplate#108

VM112:2 Uncaught TypeError: Cannot read property 'state' of undefined error

# For Mac and Linux
$ UPGRADE_EXTENSIONS=1 npm run dev

# For Windows
$ set UPGRADE_EXTENSIONS=1 && npm run dev

Troubleshooting

Your device is not recognized

node-mac-permissions throws Speech framework is not compatible with macOS < 10.15

  • On macOS <= 10.14.x (mojave) the yarn install will throw a npm-rebuild error
  • To "test" or "debug" the app on macOS mojave:
    • remove the node-mac-permissions dependency from package.json
    • Add the ignorePlugin line to default.plugins in the file webpack/config.base.js
      • new webpack.IgnorePlugin({ resourceRegExp: /^(node-mac-permissions)$/u }),
    • WARNING: DO NOT commit these changes to the upstream!!
  • The NODE_MAC_PERMISSIONS_MIN_OS constant defines the minimum os version that is required to show the macos usage access permission popup
  • For distribution make sure to build the app on a machine which is at least 10.15 (Catalina)

https://stackoverflow.com/questions/58358449/notarizing-electron-apps-throws-you-must-first-sign-the-relevant-contracts-on

The app goes blank while trying to connect a Samsung device

Notarizing Electron apps throws - “You must first sign the relevant contracts online. (1048)” error

https://stackoverflow.com/questions/58358449/notarizing-electron-apps-throws-you-must-first-sign-the-relevant-contracts-on

More repos

Credits

Contribute

If you are interested in fixing issues and contributing directly to the code base, please see the guidelines.

Support OpenMTP

Help me keep the app FREE and open for all.

Contacts

Please feel free to contact me at [email protected]

License

OpenMTP | Android File Transfer for macOS is released under MIT License.

Copyright © 2018-Present Ganesh Rathinavel

More Repositories

1

flutter_mobx_dio_boilerplate

Advanced and highly scalable boilerplate for building Flutter apps with MobX, Dio, GetIt, and AutoRoutes. Null safe and compatible with Flutter 2.0.
Dart
98
star
2

pub-scaff

A command-line utility for generating Dart and Flutter components from template files.
Dart
29
star
3

pub-rules

Rules - Powerful and feature-rich validation library for both Dart and Flutter.
Dart
26
star
4

go-mtpx

A high-level wrapper around the go-mtpfs library, forming the core of OpenMTP. It provides an MTP layer built on go-mtpfs and utilizes low-level system calls.
Go
25
star
5

npm-electron-root-path

Get the root path of an Electron Application
JavaScript
24
star
6

tutorial-electron-bundle-binaries

Bundle a precompiled binary or native file into an electron app.
17
star
7

electron-react-redux-advanced-boilerplate

Advanced and highly scalable boilerplate built with Electron, React, Redux, and Webpack, featuring Babel, HMR, Loadables, Dynamic Reducer Injection, Selectors, and Code Splitting.
JavaScript
11
star
8

npm-electron-is-packaged

Check if the Electron Application is packaged.
JavaScript
6
star
9

mtp-nodejs-port-native-addon

MTP Kernel for Node.js - Native addon
C
5
star
10

npm-electron-main-window

Get the main window of an Electron Application.
JavaScript
4
star
11

squash_archiver

Cross-platform archiver app for macOS, Windows, and Linux, featuring a Flutter UI and Go-based compression and decompression. Utilizes Flutter/Dart, Go, C, and FFI.
Dart
3
star
12

pub-data-channel

Data Channel is a Dart utility for routing exceptions and data in Dart and Flutter, providing a streamlined alternative to conventional try and catch blocks.
Dart
3
star
13

one-archiver

A pure Go implementation of an all-in-one archiver package, supporting formats like zip, tar (with Brotli, bz2, gzip, lz4, snappy, xz, and zstd compressions), and read-only rar. Features include encryption handling, directory listing, file extraction, progress reporting, and password verification.
Go
2
star
14

auth-apis

Sample nodejs authentication api
JavaScript
2
star
15

npm-nice-utils

A collection of useful utilities for the browser and node.js environments.
JavaScript
2
star
16

openmtp-testflight

OpenMTP Beta release test repository
2
star
17

quant-scrubbed

A blockchain auto-trading and sniping platform built in Rust, designed for precise token sniping at the first block of an IDO launch. Supports separate flows for buying, selling, and buy-and-dump strategies, with features like time limits, auto approvals, dynamic gas adjustments, and automated trade execution based on time or value thresholds.
Rust
1
star
18

php-form-validator

Advanced PHP Form Validator
PHP
1
star
19

php_session_crud

Add, Delete or Read an item from PHP session which is stored as an array.
PHP
1
star
20

unsplash_photoapp_ssr

A Node.js based app for searching through Unsplash Photos
JavaScript
1
star
21

tutorial-electron-afterpack-script

Electron Builder AfterPack configuration
1
star
22

useful-js-snippets

Some useful js codes
JavaScript
1
star
23

tutorial-electron-window-switching

Prevent duplicate window instance invoked by the main and renderer processes in an electron app
1
star
24

axios-isomorphic-routing

Advanced Router Controller for Vue.js, React.js & Node.js Isomorphic apps
JavaScript
1
star
25

tutorial-series-ganesh-rathinavel

Tutorial Series by Ganesh Rathinavel
1
star
26

github_release_stats

Fetch the latest download stats of your GitHub release
Rust
1
star