In case I don't have time to modify or I sell or lose my Anafi, I will write down what I have done for modification here.
1. get apk
The best way to get an apk file is getting it from your device. There are many methods to do this. I use LG backup to get it.
or use apkmirror.com if you trust that site.
get the latest version(which you will modify) and the same version of original file of the latest modded version you can get.
also get the latest version of modded one here.
2. get apktool
Apktool - How to Install
ibotpeaches.github.io
From FF6 6.5.0 update, only apktool 2.4.0 version works
3. install jdk
www.oracle.com
You will need this for keytool, jarsigner, java
4. get jadx
jadx is a reverse engineering tool for android apps. It decompiles apk file directly and shows you the original source code(not perfectly tho)
5. check if wifi code is changed
Open 2 original apk files in jadx and see the difference.
A code that handles wifi signal mode is com\parrot\drone\groundsdk\arsdkengine\peripheral\anafi\wifi\AnafiWifiAccessPoint.class
Search sendDetectedCountry method in order to check if it is changed.
If it has not changed, you are good to go.
You can also check the groundSDK codes here
Parrot Ground SDK for Android. Contribute to Parrot-Developers/groundsdk-android development by creating an account on GitHub.
github.com
Parrot Ground SDK for Android. Contribute to Parrot-Developers/groundsdk-android development by creating an account on GitHub.
github.com
6. Decompile apk(.class or .dex -> smali)
Code:
java -jar apktool_2.4.0.jar -f d filename.apk -o destinationdirectory
7. Decompile older version of modded apk
Code:
java -jar apktool_2.4.0.jar -f d filename2.apk -o destinationdirectory2
8. modify smali code
open both smali files from
destinationdirectory\smali\com\parrot\drone\groundsdk\arsdkengine\peripheral\anafi\wifi\AnafiWifiAccessPoint.smali
destinationdirectory2\smali\com\parrot\drone\groundsdk\arsdkengine\peripheral\anafi\wifi\AnafiWifiAccessPoint.smali
copy and paste codes around line 170 to make those two codes are the same.
Original code
Code:
iget-object v0, p0, Lcom/parrot/drone/groundsdk/arsdkengine/peripheral/anafi/wifi/AnafiWifiAccessPoint;->mReverseGeocoder:Lcom/parrot/drone/groundsdk/internal/utility/ReverseGeocoderUtility;
invoke-interface {v0}, Lcom/parrot/drone/groundsdk/internal/utility/ReverseGeocoderUtility;->getAddress()Landroid/location/Address;
move-result-object v0
invoke-virtual {v0}, Landroid/location/Address;->getCountryCode()Ljava/lang/String;
move-result-object v0
=> String countryCode = mReverseGeocoder.getAddress().getCountryCode();
Modified code
Code:
iget-object v0, p0, Lcom/parrot/drone/groundsdk/arsdkengine/peripheral/anafi/wifi/AnafiWifiAccessPoint;->mReverseGeocoder:Lcom/parrot/drone/groundsdk/internal/utility/ReverseGeocoderUtility;
invoke-interface {v0}, Lcom/parrot/drone/groundsdk/internal/utility/ReverseGeocoderUtility;->getAddress()Landroid/location/Address;
move-result-object v0
=> Address address = ReverseGeocoderUtiliity mReverseGeocoder.getAddress()
const-string v0, "US"
=> Overwrite variable v0 to String Str = "US"
9. modify android.manifest
open android.manifest files in destinationdirectory and destinationdirectory2
Search google map api key from older version, and copy & paste to the new version(or you can make your own google map api key at cloud.google.com)
Search debuggable="true" and copy&paste(Optional)
10. compile your app
Code:
cd destinationdirectory
java -jar apktool_2.4.0.jar -f b -o ..\FF6_x.x.x.apk
11. make keystore and sign your app
Code:
keytool -genkey -v -keystore resign.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore resign.keystore FF6_x.x.x.apk alias_name
12. Review your app with jadx
open the modded app with jadx
and see the code is modified correctly
13. test your app
Install the app to your phone, and see if channel 36~48 are available, if there's no error, and if the map loads without problem.