Page 5 of 5

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 08 Sep 2017, 23:57
by DevilsReject78
crackedlogic wrote:
09 Jun 2017, 12:39
Is anyone having problems downloading this? It won't let me download
Telling me corrupt any other place to get this

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 14 Sep 2017, 16:26
by DevilsReject78
Telling me corrupt file.. anyone help

Darklo wrote:
08 Feb 2015, 19:58
TL/DR version:
FreeFlight 2.4.10 app modified with controller support and hover lock toggle, plus several fixes.

Get the APK here: viewtopic.php?f=75&t=8262&p=81189#p81188

(updated 13th April 2017)

The only reason Parrot keeps selling ARD 2.0 at this late stage in its lifecycle is because it fills the price gap between the Bebop and Rolling Spider.
It should be pretty obvious that there aren't going to be any more updates, neither firmware nor an app.
Director Mode on Android has been "coming soon" for what, 16 months now? At this point it should be rather "not coming, ever", and the FreeFlight app is now more or less in abandonware territory. But even though there are a number of excellent alternatives, if it could be improved, it could offer a lot of value.

So I thought it would be a good idea for the community to take over the development of the FreeFlight app and fix some of the longstanding bugs and introduce a couple of new features. Thanks to the amazing tools — smali and apktool — we're now able to freely modify the app and do (almost) anything. Editing smali code is very different from normal Java programming, and is a lot like assembly — you deal with registers instead of variables and control flow is affected by goto's and if-zero or if-not-zero jumps. But you can learn a lot about internal workings of Dalvik VM, and I actually had a lot of fun breaking the app apart and modifying it to my liking.
  • One feature that is an absolute must is hardware controller support (see controller mapping below). As it turns out, FreeFlight fully supports game controllers, as long as it runs on Nvidia Shield. There is literally a function isNvidiaShield() that is called every time a joystick or button event is processed:

    Code: Select all

        private boolean isNvidiaShield() {
            return Build.MODEL.equals("SHIELD") ? true : false;
    As you probably guessed, if your device doesn't happen to be Shield, joystick movements and button presses are simply ignored. Well, that is simply ridiculous and our device choices should not be limited by Parrot's exclusive partnerships.
    Fortunately, it's also ridiculously easy to patch. The easy way, of course, would be to write "return true", but that wouldn't be very interesting. Better solution is to detect whether controller is plugged in when app is launched. Even better is to watch for hardware changes at runtime and modify the return value when controller is connected.
    As two added bonuses, you get a different splash screen if you start the app with controller; the touch screen controls react to controller presence and disappear as necessary (it's only a transparency change, so it's still possible to fly using touchscreen with controller connected).
  • Even if you have a Shield, you've probably noticed that joystick deadzone is very large (0.3 out of 1). If you push the stick slightly, nothing happens. If you push more, the drone suddenly lurches forward. As a result, controlling the drone becomes more difficult than it should be.
    Again, this is easy to patch. In this version hardcoded deadzone is removed, and the code relies on the value provided by Android. In addition, joystick response curves are now non-linear, improving precision at low speeds.
  • Another issue that also affects Shield owners is that the left stick is disabled in accelerometer mode (when you press and hold the shoulder button). This is correct if pitch/roll stick is on the left, but in left-handed mode this prevents you from controlling yaw and altitude, so this artificial limitation is also patched out.
  • Unlike touchscreen controls, where you can keep the finger on the roll/pitch button as the drone flies level, there is no equivalent for hardware controller. Well, here is a first: FreeFlight app with hover lock toggle! Click the pitch/roll thumbstick (left or right, depending on your settings) and the drone will no longer overcorrect as you release the stick, instead it will continue to glide smoothly. Click the stick again to turn hover lock back on. You'll see a brief message "Hover ON" (or "OFF"), so it's easy to tell which mode is active.

Here is a complete list of changes:
  1. increased max zoom in map downloader from 16x to 19x
  2. reduced joystick dead zone from 0.3 to 0.075
  3. increased param:video:codec_fps from 25 to 30 and param:video:max_bitrate from 1500 to 4000
  4. keep gas/yaw stick active in accelerometer mode (when shoulder button is pressed, in left-handed mode)
  5. added listener to detect controller presence and toggle controller mode (isNvidiaShield()) at runtime
  6. restored data collection opt-out setting
  7. added hover toggle to pitch/roll thumb stick
New in 20150312 version:
  1. fixed blurry photos in the photo/video viewer
  2. improvements to no hover mode
  3. fixed controller not working after being disconnected and reconnected again
  4. better handling of left-handed mode
  5. despaghettification of joystick code
  6. nonlinear joystick response curves
  7. removed hardcoded joystick deadzone, now the code uses only the value provided by Android
  8. added combined yaw toggle to gas/yaw thumb stick
  9. fixed restarting of when exiting the app using back button

Controller mapping:
Since the Shield controller uses standard gamepad layout, every compatible controller should work. I tested with a Wikipad.
nvidia-shield-mapping copy.jpg

Please note that if you use "left-handed mode" (equivalent to RC Mode 2), both sticks and shoulder buttons are swapped. In that case, L1 (left shoulder) switches cameras and R1 (right shoulder) enables accelerometer. The easier way to think is that whatever stick you use to pitch/roll your drone, the shoulder button on the same side switches accelerometer control.
Triggers are unaffected, LT is video and RT is photo.

You may notice in the above image that Parrot labeled the X button as a "secret feature" in their original blog post. Well, the Shield owners have discovered that the button does in fact nothing. And now after decompiling the code, I can conclusively say that there is indeed no secret feature.
Although it's a small thing, Parrot lied to the customers. The good thing is that we can implement whatever we like, so I invite everyone to vote what the secret feature should be!

Patch notes:
As I don't have access to Parrot's private key, the APK is signed with the key from official SDK. As a result, instead of replacing the official app with patched version, you'll have to uninstall the official app first.

If you want to patch the APK yourself and make sure that I didn't bundle any malware, you can. The attached zip contains the shell script that does decompilation, patching, rebuilding and signing the APK. You should place the original named com.parrot.freeflight.apk in the same folder.

  • Linux or OS X (Windows users will need to get patch.exe from diffutils and translate the shell script to a .bat file)
  • Oracle JDK (JRE won't work)
  • apktool 2.0.0rc4
  • zipalign tool from Android SDK (not strictly necessary, but recommended by Google)

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 14 Sep 2017, 16:28
by DevilsReject78
Saying file corrput cant instakl

AR.Tommy wrote:
13 Apr 2017, 08:42
Someone from the german board sent me the patched file. I'm attaching it to this post. Hope it helps.

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 21 Oct 2017, 21:06
by KyokushinPL
Is that version supports GPS flight controller?

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 07 Jan 2018, 08:15
by cmdtro11
got it to install but it does nothing new that the non-patched version does, it does not accept BT controller inputs, meaning that i can’t control it via moga or xbox controller.

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 22 Feb 2018, 16:47
by Metal721
Need some help with this. Can someone please post up a link or PM me where to get this app. The link dose not work.

Thanks in advance.

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 02 Dec 2018, 19:44
by switchblade
Me too please. I also would like to try this modified version.

Also with the official FreeFlight app, what dose the Nvidia Max Tilt setting on the last page of Settings do? What is the recommended setting?

thank you

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 18 Apr 2019, 01:50
by g011um
Old thread I know, but I thought I'd jump in here with an update.

I have a Pixel 2 XL connected to a newer Xbox One controller via Bluetooth, and with that modified 2.4.10 APK I was successfully able to fly my ar.drone 2. Elevation drifted up and down a bit, but my battery was very low, so that could have been it. It's also the first time I've had it outside, so perhaps that's also normal when flying out in the elements. I'm charging the battery again for longer test flight.

This thing has sat in my basement for a couple of years, mostly unused, because I don't like the tilt controls or the joypad mode of the screen. Super pumped to have this working with a controller!

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 19 May 2019, 18:21
by ludofr
Thank you for this modified APK. I can finally use a gamepad to drive my AR Drone 2 Elite Edition. It's easier and more fun. One question : I have a gamepad Ipega PG-9099, is there a touch for the flip?

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 11 Jul 2019, 14:19
by Maartenjun
My ar drone has one broken metal thingy making it useless to fly. That's why I want to build it into an airplane which can be used with two motors. The problem is that the app will show errors so that I can't start flying. Also the gyroscope should be calibrated.
Does anyone know how to override these errors?

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 28 Jul 2019, 10:04
by mendel129
Works flawless on AR.Drone 2.0, sony mobile and ps4 controller! Thanks! :D

Re: Modified FreeFlight 2.4.10 APK with game controller support

Posted: 06 Dec 2019, 14:03
by pawcza
Hi there,
Any chance to make it work with the Parrot Flypad?