There was 1 thing that made me feel uncomfortable about this mod...
in the freeflight6 app code, if auto country is false, it skips indoor/outdoor setting... and I don't know exactly what that setting means..
(I only see indoor/outdoor channel settings and map settings in the app codes, but I don't know if there are some other codes in the drone or the controller...)
Java:
protected void onConnected() {
if (GroundSdkConfig.get().shouldAutoSelectWifiCountry()) {
sendDetectedCountry();
if (this.mReverseGeocoder != null) {
this.mReverseGeocoder.monitorWith(this.mReverseGeocoderMonitor);
}
this.mWifiAccessPoint.country().updateAvailableCodes(Collections.singleton(this.mCountryCode));
if (this.mEnvironment == Environment.INDOOR) {
this.mAccessPointBackend.setEnvironment(Environment.OUTDOOR);
}
this.mWifiAccessPoint.environment().updateAvailableValues(EnumSet.of(Environment.OUTDOOR));
}
this.mWifiAccessPoint.publish();
this.mWifiScanner.publish();
}
so I tried another way of modification, and it seems successful.
Original Code was,
Java:
private void sendDetectedCountry() {
if (this.mReverseGeocoder != null && this.mReverseGeocoder.getAddress() != null) {
String countryCode = this.mReverseGeocoder.getAddress().getCountryCode();
if (countryCode != null && !countryCode.equals(this.mCountryCode)) {
this.mAccessPointBackend.setCountry(countryCode);
}
}
}
and modified code, after decompile, is,
Java:
private void sendDetectedCountry() {
if (this.mReverseGeocoder != null && this.mReverseGeocoder.getAddress() != null) {
Address address = this.mReverseGeocoder.getAddress();
String str = "US";
if (str != null && !str.equals(this.mCountryCode)) {
this.mAccessPointBackend.setCountry(str);
}
}
}
I modified 2 lines of smali codes, and changed countryCode value from reversegeocoder.getaddress.getcountrycode to "US"
I tested in my home and it seems it works. I see 36~48 channels.
Since this is modifying the source code which is very dangerous way, I will test for a couple of weeks and upload if everything works ok.
This modification won't ask you to do the initial setup using fakeGPS.