├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle.kts ├── mavlink │ ├── .gitignore │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── geehe │ │ │ └── mavlink │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── mavlink.cpp │ │ │ ├── mavlink.h │ │ │ └── mavlink │ │ │ │ ├── ASLUAV │ │ │ │ ├── ASLUAV.h │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_asl_obctrl.h │ │ │ │ ├── mavlink_msg_aslctrl_data.h │ │ │ │ ├── mavlink_msg_aslctrl_debug.h │ │ │ │ ├── mavlink_msg_asluav_status.h │ │ │ │ ├── mavlink_msg_command_int_stamped.h │ │ │ │ ├── mavlink_msg_command_long_stamped.h │ │ │ │ ├── mavlink_msg_ekf_ext.h │ │ │ │ ├── mavlink_msg_fw_soaring_data.h │ │ │ │ ├── mavlink_msg_gsm_link_status.h │ │ │ │ ├── mavlink_msg_sens_atmos.h │ │ │ │ ├── mavlink_msg_sens_batmon.h │ │ │ │ ├── mavlink_msg_sens_mppt.h │ │ │ │ ├── mavlink_msg_sens_power.h │ │ │ │ ├── mavlink_msg_sens_power_board.h │ │ │ │ ├── mavlink_msg_sensorpod_status.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── ardupilotmega │ │ │ │ ├── ardupilotmega.h │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_adap_tuning.h │ │ │ │ ├── mavlink_msg_ahrs.h │ │ │ │ ├── mavlink_msg_ahrs2.h │ │ │ │ ├── mavlink_msg_ahrs3.h │ │ │ │ ├── mavlink_msg_airspeed_autocal.h │ │ │ │ ├── mavlink_msg_aoa_ssa.h │ │ │ │ ├── mavlink_msg_ap_adc.h │ │ │ │ ├── mavlink_msg_autopilot_version_request.h │ │ │ │ ├── mavlink_msg_battery2.h │ │ │ │ ├── mavlink_msg_camera_feedback.h │ │ │ │ ├── mavlink_msg_camera_status.h │ │ │ │ ├── mavlink_msg_compassmot_status.h │ │ │ │ ├── mavlink_msg_data16.h │ │ │ │ ├── mavlink_msg_data32.h │ │ │ │ ├── mavlink_msg_data64.h │ │ │ │ ├── mavlink_msg_data96.h │ │ │ │ ├── mavlink_msg_deepstall.h │ │ │ │ ├── mavlink_msg_device_op_read.h │ │ │ │ ├── mavlink_msg_device_op_read_reply.h │ │ │ │ ├── mavlink_msg_device_op_write.h │ │ │ │ ├── mavlink_msg_device_op_write_reply.h │ │ │ │ ├── mavlink_msg_digicam_configure.h │ │ │ │ ├── mavlink_msg_digicam_control.h │ │ │ │ ├── mavlink_msg_ekf_status_report.h │ │ │ │ ├── mavlink_msg_esc_telemetry_1_to_4.h │ │ │ │ ├── mavlink_msg_esc_telemetry_5_to_8.h │ │ │ │ ├── mavlink_msg_esc_telemetry_9_to_12.h │ │ │ │ ├── mavlink_msg_fence_fetch_point.h │ │ │ │ ├── mavlink_msg_fence_point.h │ │ │ │ ├── mavlink_msg_fence_status.h │ │ │ │ ├── mavlink_msg_gimbal_control.h │ │ │ │ ├── mavlink_msg_gimbal_report.h │ │ │ │ ├── mavlink_msg_gimbal_torque_cmd_report.h │ │ │ │ ├── mavlink_msg_gopro_get_request.h │ │ │ │ ├── mavlink_msg_gopro_get_response.h │ │ │ │ ├── mavlink_msg_gopro_heartbeat.h │ │ │ │ ├── mavlink_msg_gopro_set_request.h │ │ │ │ ├── mavlink_msg_gopro_set_response.h │ │ │ │ ├── mavlink_msg_hwstatus.h │ │ │ │ ├── mavlink_msg_led_control.h │ │ │ │ ├── mavlink_msg_limits_status.h │ │ │ │ ├── mavlink_msg_mag_cal_progress.h │ │ │ │ ├── mavlink_msg_mag_cal_report.h │ │ │ │ ├── mavlink_msg_meminfo.h │ │ │ │ ├── mavlink_msg_mount_configure.h │ │ │ │ ├── mavlink_msg_mount_control.h │ │ │ │ ├── mavlink_msg_mount_status.h │ │ │ │ ├── mavlink_msg_pid_tuning.h │ │ │ │ ├── mavlink_msg_radio.h │ │ │ │ ├── mavlink_msg_rally_fetch_point.h │ │ │ │ ├── mavlink_msg_rally_point.h │ │ │ │ ├── mavlink_msg_rangefinder.h │ │ │ │ ├── mavlink_msg_remote_log_block_status.h │ │ │ │ ├── mavlink_msg_remote_log_data_block.h │ │ │ │ ├── mavlink_msg_rpm.h │ │ │ │ ├── mavlink_msg_sensor_offsets.h │ │ │ │ ├── mavlink_msg_set_mag_offsets.h │ │ │ │ ├── mavlink_msg_simstate.h │ │ │ │ ├── mavlink_msg_vision_position_delta.h │ │ │ │ ├── mavlink_msg_wind.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── autoquad │ │ │ │ ├── autoquad.h │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_aq_esc_telemetry.h │ │ │ │ ├── mavlink_msg_aq_telemetry_f.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── checksum.h │ │ │ │ ├── common │ │ │ │ ├── common.h │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_actuator_control_target.h │ │ │ │ ├── mavlink_msg_actuator_output_status.h │ │ │ │ ├── mavlink_msg_adsb_vehicle.h │ │ │ │ ├── mavlink_msg_ais_vessel.h │ │ │ │ ├── mavlink_msg_altitude.h │ │ │ │ ├── mavlink_msg_att_pos_mocap.h │ │ │ │ ├── mavlink_msg_attitude.h │ │ │ │ ├── mavlink_msg_attitude_quaternion.h │ │ │ │ ├── mavlink_msg_attitude_quaternion_cov.h │ │ │ │ ├── mavlink_msg_attitude_target.h │ │ │ │ ├── mavlink_msg_auth_key.h │ │ │ │ ├── mavlink_msg_autopilot_state_for_gimbal_device.h │ │ │ │ ├── mavlink_msg_autopilot_version.h │ │ │ │ ├── mavlink_msg_battery_status.h │ │ │ │ ├── mavlink_msg_button_change.h │ │ │ │ ├── mavlink_msg_camera_capture_status.h │ │ │ │ ├── mavlink_msg_camera_fov_status.h │ │ │ │ ├── mavlink_msg_camera_image_captured.h │ │ │ │ ├── mavlink_msg_camera_information.h │ │ │ │ ├── mavlink_msg_camera_settings.h │ │ │ │ ├── mavlink_msg_camera_tracking_geo_status.h │ │ │ │ ├── mavlink_msg_camera_tracking_image_status.h │ │ │ │ ├── mavlink_msg_camera_trigger.h │ │ │ │ ├── mavlink_msg_can_filter_modify.h │ │ │ │ ├── mavlink_msg_can_frame.h │ │ │ │ ├── mavlink_msg_canfd_frame.h │ │ │ │ ├── mavlink_msg_cellular_config.h │ │ │ │ ├── mavlink_msg_cellular_status.h │ │ │ │ ├── mavlink_msg_change_operator_control.h │ │ │ │ ├── mavlink_msg_change_operator_control_ack.h │ │ │ │ ├── mavlink_msg_collision.h │ │ │ │ ├── mavlink_msg_command_ack.h │ │ │ │ ├── mavlink_msg_command_cancel.h │ │ │ │ ├── mavlink_msg_command_int.h │ │ │ │ ├── mavlink_msg_command_long.h │ │ │ │ ├── mavlink_msg_component_information.h │ │ │ │ ├── mavlink_msg_component_metadata.h │ │ │ │ ├── mavlink_msg_control_system_state.h │ │ │ │ ├── mavlink_msg_current_event_sequence.h │ │ │ │ ├── mavlink_msg_data_stream.h │ │ │ │ ├── mavlink_msg_data_transmission_handshake.h │ │ │ │ ├── mavlink_msg_debug.h │ │ │ │ ├── mavlink_msg_debug_float_array.h │ │ │ │ ├── mavlink_msg_debug_vect.h │ │ │ │ ├── mavlink_msg_distance_sensor.h │ │ │ │ ├── mavlink_msg_efi_status.h │ │ │ │ ├── mavlink_msg_encapsulated_data.h │ │ │ │ ├── mavlink_msg_esc_info.h │ │ │ │ ├── mavlink_msg_esc_status.h │ │ │ │ ├── mavlink_msg_estimator_status.h │ │ │ │ ├── mavlink_msg_event.h │ │ │ │ ├── mavlink_msg_extended_sys_state.h │ │ │ │ ├── mavlink_msg_fence_status.h │ │ │ │ ├── mavlink_msg_file_transfer_protocol.h │ │ │ │ ├── mavlink_msg_flight_information.h │ │ │ │ ├── mavlink_msg_follow_target.h │ │ │ │ ├── mavlink_msg_generator_status.h │ │ │ │ ├── mavlink_msg_gimbal_device_attitude_status.h │ │ │ │ ├── mavlink_msg_gimbal_device_information.h │ │ │ │ ├── mavlink_msg_gimbal_device_set_attitude.h │ │ │ │ ├── mavlink_msg_gimbal_manager_information.h │ │ │ │ ├── mavlink_msg_gimbal_manager_set_attitude.h │ │ │ │ ├── mavlink_msg_gimbal_manager_set_manual_control.h │ │ │ │ ├── mavlink_msg_gimbal_manager_set_pitchyaw.h │ │ │ │ ├── mavlink_msg_gimbal_manager_status.h │ │ │ │ ├── mavlink_msg_global_position_int.h │ │ │ │ ├── mavlink_msg_global_position_int_cov.h │ │ │ │ ├── mavlink_msg_global_vision_position_estimate.h │ │ │ │ ├── mavlink_msg_gps2_raw.h │ │ │ │ ├── mavlink_msg_gps2_rtk.h │ │ │ │ ├── mavlink_msg_gps_global_origin.h │ │ │ │ ├── mavlink_msg_gps_inject_data.h │ │ │ │ ├── mavlink_msg_gps_input.h │ │ │ │ ├── mavlink_msg_gps_raw_int.h │ │ │ │ ├── mavlink_msg_gps_rtcm_data.h │ │ │ │ ├── mavlink_msg_gps_rtk.h │ │ │ │ ├── mavlink_msg_gps_status.h │ │ │ │ ├── mavlink_msg_heartbeat.h │ │ │ │ ├── mavlink_msg_high_latency.h │ │ │ │ ├── mavlink_msg_high_latency2.h │ │ │ │ ├── mavlink_msg_highres_imu.h │ │ │ │ ├── mavlink_msg_hil_actuator_controls.h │ │ │ │ ├── mavlink_msg_hil_controls.h │ │ │ │ ├── mavlink_msg_hil_gps.h │ │ │ │ ├── mavlink_msg_hil_optical_flow.h │ │ │ │ ├── mavlink_msg_hil_rc_inputs_raw.h │ │ │ │ ├── mavlink_msg_hil_sensor.h │ │ │ │ ├── mavlink_msg_hil_state.h │ │ │ │ ├── mavlink_msg_hil_state_quaternion.h │ │ │ │ ├── mavlink_msg_home_position.h │ │ │ │ ├── mavlink_msg_hygrometer_sensor.h │ │ │ │ ├── mavlink_msg_isbd_link_status.h │ │ │ │ ├── mavlink_msg_landing_target.h │ │ │ │ ├── mavlink_msg_link_node_status.h │ │ │ │ ├── mavlink_msg_local_position_ned.h │ │ │ │ ├── mavlink_msg_local_position_ned_cov.h │ │ │ │ ├── mavlink_msg_local_position_ned_system_global_offset.h │ │ │ │ ├── mavlink_msg_log_data.h │ │ │ │ ├── mavlink_msg_log_entry.h │ │ │ │ ├── mavlink_msg_log_erase.h │ │ │ │ ├── mavlink_msg_log_request_data.h │ │ │ │ ├── mavlink_msg_log_request_end.h │ │ │ │ ├── mavlink_msg_log_request_list.h │ │ │ │ ├── mavlink_msg_logging_ack.h │ │ │ │ ├── mavlink_msg_logging_data.h │ │ │ │ ├── mavlink_msg_logging_data_acked.h │ │ │ │ ├── mavlink_msg_mag_cal_report.h │ │ │ │ ├── mavlink_msg_manual_control.h │ │ │ │ ├── mavlink_msg_manual_setpoint.h │ │ │ │ ├── mavlink_msg_memory_vect.h │ │ │ │ ├── mavlink_msg_message_interval.h │ │ │ │ ├── mavlink_msg_mission_ack.h │ │ │ │ ├── mavlink_msg_mission_clear_all.h │ │ │ │ ├── mavlink_msg_mission_count.h │ │ │ │ ├── mavlink_msg_mission_current.h │ │ │ │ ├── mavlink_msg_mission_item.h │ │ │ │ ├── mavlink_msg_mission_item_int.h │ │ │ │ ├── mavlink_msg_mission_item_reached.h │ │ │ │ ├── mavlink_msg_mission_request.h │ │ │ │ ├── mavlink_msg_mission_request_int.h │ │ │ │ ├── mavlink_msg_mission_request_list.h │ │ │ │ ├── mavlink_msg_mission_request_partial_list.h │ │ │ │ ├── mavlink_msg_mission_set_current.h │ │ │ │ ├── mavlink_msg_mission_write_partial_list.h │ │ │ │ ├── mavlink_msg_mount_orientation.h │ │ │ │ ├── mavlink_msg_named_value_float.h │ │ │ │ ├── mavlink_msg_named_value_int.h │ │ │ │ ├── mavlink_msg_nav_controller_output.h │ │ │ │ ├── mavlink_msg_obstacle_distance.h │ │ │ │ ├── mavlink_msg_odometry.h │ │ │ │ ├── mavlink_msg_onboard_computer_status.h │ │ │ │ ├── mavlink_msg_open_drone_id_arm_status.h │ │ │ │ ├── mavlink_msg_open_drone_id_authentication.h │ │ │ │ ├── mavlink_msg_open_drone_id_basic_id.h │ │ │ │ ├── mavlink_msg_open_drone_id_location.h │ │ │ │ ├── mavlink_msg_open_drone_id_message_pack.h │ │ │ │ ├── mavlink_msg_open_drone_id_operator_id.h │ │ │ │ ├── mavlink_msg_open_drone_id_self_id.h │ │ │ │ ├── mavlink_msg_open_drone_id_system.h │ │ │ │ ├── mavlink_msg_open_drone_id_system_update.h │ │ │ │ ├── mavlink_msg_optical_flow.h │ │ │ │ ├── mavlink_msg_optical_flow_rad.h │ │ │ │ ├── mavlink_msg_orbit_execution_status.h │ │ │ │ ├── mavlink_msg_param_ext_ack.h │ │ │ │ ├── mavlink_msg_param_ext_request_list.h │ │ │ │ ├── mavlink_msg_param_ext_request_read.h │ │ │ │ ├── mavlink_msg_param_ext_set.h │ │ │ │ ├── mavlink_msg_param_ext_value.h │ │ │ │ ├── mavlink_msg_param_map_rc.h │ │ │ │ ├── mavlink_msg_param_request_list.h │ │ │ │ ├── mavlink_msg_param_request_read.h │ │ │ │ ├── mavlink_msg_param_set.h │ │ │ │ ├── mavlink_msg_param_value.h │ │ │ │ ├── mavlink_msg_ping.h │ │ │ │ ├── mavlink_msg_play_tune.h │ │ │ │ ├── mavlink_msg_play_tune_v2.h │ │ │ │ ├── mavlink_msg_position_target_global_int.h │ │ │ │ ├── mavlink_msg_position_target_local_ned.h │ │ │ │ ├── mavlink_msg_power_status.h │ │ │ │ ├── mavlink_msg_protocol_version.h │ │ │ │ ├── mavlink_msg_radio_status.h │ │ │ │ ├── mavlink_msg_raw_imu.h │ │ │ │ ├── mavlink_msg_raw_pressure.h │ │ │ │ ├── mavlink_msg_raw_rpm.h │ │ │ │ ├── mavlink_msg_rc_channels.h │ │ │ │ ├── mavlink_msg_rc_channels_override.h │ │ │ │ ├── mavlink_msg_rc_channels_raw.h │ │ │ │ ├── mavlink_msg_rc_channels_scaled.h │ │ │ │ ├── mavlink_msg_request_data_stream.h │ │ │ │ ├── mavlink_msg_request_event.h │ │ │ │ ├── mavlink_msg_resource_request.h │ │ │ │ ├── mavlink_msg_response_event_error.h │ │ │ │ ├── mavlink_msg_safety_allowed_area.h │ │ │ │ ├── mavlink_msg_safety_set_allowed_area.h │ │ │ │ ├── mavlink_msg_scaled_imu.h │ │ │ │ ├── mavlink_msg_scaled_imu2.h │ │ │ │ ├── mavlink_msg_scaled_imu3.h │ │ │ │ ├── mavlink_msg_scaled_pressure.h │ │ │ │ ├── mavlink_msg_scaled_pressure2.h │ │ │ │ ├── mavlink_msg_scaled_pressure3.h │ │ │ │ ├── mavlink_msg_serial_control.h │ │ │ │ ├── mavlink_msg_servo_output_raw.h │ │ │ │ ├── mavlink_msg_set_actuator_control_target.h │ │ │ │ ├── mavlink_msg_set_attitude_target.h │ │ │ │ ├── mavlink_msg_set_gps_global_origin.h │ │ │ │ ├── mavlink_msg_set_home_position.h │ │ │ │ ├── mavlink_msg_set_mode.h │ │ │ │ ├── mavlink_msg_set_position_target_global_int.h │ │ │ │ ├── mavlink_msg_set_position_target_local_ned.h │ │ │ │ ├── mavlink_msg_setup_signing.h │ │ │ │ ├── mavlink_msg_sim_state.h │ │ │ │ ├── mavlink_msg_smart_battery_info.h │ │ │ │ ├── mavlink_msg_statustext.h │ │ │ │ ├── mavlink_msg_statustext_long.h │ │ │ │ ├── mavlink_msg_storage_information.h │ │ │ │ ├── mavlink_msg_supported_tunes.h │ │ │ │ ├── mavlink_msg_sys_status.h │ │ │ │ ├── mavlink_msg_system_time.h │ │ │ │ ├── mavlink_msg_terrain_check.h │ │ │ │ ├── mavlink_msg_terrain_data.h │ │ │ │ ├── mavlink_msg_terrain_report.h │ │ │ │ ├── mavlink_msg_terrain_request.h │ │ │ │ ├── mavlink_msg_time_estimate_to_target.h │ │ │ │ ├── mavlink_msg_timesync.h │ │ │ │ ├── mavlink_msg_trajectory_representation_bezier.h │ │ │ │ ├── mavlink_msg_trajectory_representation_waypoints.h │ │ │ │ ├── mavlink_msg_tunnel.h │ │ │ │ ├── mavlink_msg_uavcan_node_info.h │ │ │ │ ├── mavlink_msg_uavcan_node_status.h │ │ │ │ ├── mavlink_msg_utm_global_position.h │ │ │ │ ├── mavlink_msg_v2_extension.h │ │ │ │ ├── mavlink_msg_vfr_hud.h │ │ │ │ ├── mavlink_msg_vibration.h │ │ │ │ ├── mavlink_msg_vicon_position_estimate.h │ │ │ │ ├── mavlink_msg_video_stream_information.h │ │ │ │ ├── mavlink_msg_video_stream_status.h │ │ │ │ ├── mavlink_msg_vision_position_estimate.h │ │ │ │ ├── mavlink_msg_vision_speed_estimate.h │ │ │ │ ├── mavlink_msg_wheel_distance.h │ │ │ │ ├── mavlink_msg_wifi_config_ap.h │ │ │ │ ├── mavlink_msg_winch_status.h │ │ │ │ ├── mavlink_msg_wind_cov.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── icarous │ │ │ │ ├── icarous.h │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_icarous_heartbeat.h │ │ │ │ ├── mavlink_msg_icarous_kinematic_bands.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── matrixpilot │ │ │ │ ├── matrixpilot.h │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_airspeeds.h │ │ │ │ ├── mavlink_msg_altitudes.h │ │ │ │ ├── mavlink_msg_flexifunction_buffer_function.h │ │ │ │ ├── mavlink_msg_flexifunction_buffer_function_ack.h │ │ │ │ ├── mavlink_msg_flexifunction_command.h │ │ │ │ ├── mavlink_msg_flexifunction_command_ack.h │ │ │ │ ├── mavlink_msg_flexifunction_directory.h │ │ │ │ ├── mavlink_msg_flexifunction_directory_ack.h │ │ │ │ ├── mavlink_msg_flexifunction_read_req.h │ │ │ │ ├── mavlink_msg_flexifunction_set.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f13.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f14.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f15.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f16.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f17.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f18.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f19.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f20.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f21.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f22.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f2_a.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f2_b.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f4.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f5.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f6.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f7.h │ │ │ │ ├── mavlink_msg_serial_udb_extra_f8.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── mavlink_conversions.h │ │ │ │ ├── mavlink_get_info.h │ │ │ │ ├── mavlink_helpers.h │ │ │ │ ├── mavlink_sha256.h │ │ │ │ ├── mavlink_types.h │ │ │ │ ├── minimal │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_heartbeat.h │ │ │ │ ├── mavlink_msg_protocol_version.h │ │ │ │ ├── minimal.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── protocol.h │ │ │ │ ├── slugs │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_boot.h │ │ │ │ ├── mavlink_msg_control_surface.h │ │ │ │ ├── mavlink_msg_cpu_load.h │ │ │ │ ├── mavlink_msg_ctrl_srfc_pt.h │ │ │ │ ├── mavlink_msg_data_log.h │ │ │ │ ├── mavlink_msg_diagnostic.h │ │ │ │ ├── mavlink_msg_gps_date_time.h │ │ │ │ ├── mavlink_msg_isr_location.h │ │ │ │ ├── mavlink_msg_mid_lvl_cmds.h │ │ │ │ ├── mavlink_msg_novatel_diag.h │ │ │ │ ├── mavlink_msg_ptz_status.h │ │ │ │ ├── mavlink_msg_sensor_bias.h │ │ │ │ ├── mavlink_msg_sensor_diag.h │ │ │ │ ├── mavlink_msg_slugs_camera_order.h │ │ │ │ ├── mavlink_msg_slugs_configuration_camera.h │ │ │ │ ├── mavlink_msg_slugs_mobile_location.h │ │ │ │ ├── mavlink_msg_slugs_navigation.h │ │ │ │ ├── mavlink_msg_status_gps.h │ │ │ │ ├── mavlink_msg_uav_status.h │ │ │ │ ├── mavlink_msg_volt_sensor.h │ │ │ │ ├── slugs.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── standard │ │ │ │ ├── mavlink.h │ │ │ │ ├── standard.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ ├── test │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_test_types.h │ │ │ │ ├── test.h │ │ │ │ ├── testsuite.h │ │ │ │ └── version.h │ │ │ │ └── uAvionix │ │ │ │ ├── mavlink.h │ │ │ │ ├── mavlink_msg_uavionix_adsb_out_cfg.h │ │ │ │ ├── mavlink_msg_uavionix_adsb_out_dynamic.h │ │ │ │ ├── mavlink_msg_uavionix_adsb_transceiver_health_report.h │ │ │ │ ├── testsuite.h │ │ │ │ ├── uAvionix.h │ │ │ │ └── version.h │ │ └── java │ │ │ └── com │ │ │ └── geehe │ │ │ └── mavlink │ │ │ ├── MavlinkData.java │ │ │ ├── MavlinkNative.java │ │ │ └── MavlinkUpdate.java │ │ └── test │ │ └── java │ │ └── com │ │ └── geehe │ │ └── mavlink │ │ └── ExampleUnitTest.java ├── proguard-rules.pro ├── src │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── geehe │ │ │ └── fpvue │ │ │ └── ExampleInstrumentedTest.java │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ │ └── gs.key │ │ ├── ic_launcher-playstore.png │ │ ├── java │ │ │ ├── com │ │ │ │ └── geehe │ │ │ │ │ └── fpvue │ │ │ │ │ ├── DeviceFilterXmlParser.java │ │ │ │ │ ├── SettingsChanged.java │ │ │ │ │ ├── UsbDeviceFilter.java │ │ │ │ │ ├── VideoActivity.java │ │ │ │ │ ├── WfbLinkManager.java │ │ │ │ │ └── osd │ │ │ │ │ ├── MovableLayout.java │ │ │ │ │ ├── OSDElement.java │ │ │ │ │ └── OSDManager.java │ │ │ └── me │ │ │ │ └── saket │ │ │ │ └── cascade │ │ │ │ └── CascadePopupMenuCheckable.kt │ │ └── res │ │ │ ├── drawable │ │ │ ├── air_speed.png │ │ │ ├── alt.png │ │ │ ├── amp.png │ │ │ ├── armed.png │ │ │ ├── baseline_battery_0_bar_24.xml │ │ │ ├── baseline_battery_1_bar_24.xml │ │ │ ├── baseline_battery_2_bar_24.xml │ │ │ ├── baseline_battery_3_bar_24.xml │ │ │ ├── baseline_battery_4_bar_24.xml │ │ │ ├── baseline_battery_5_bar_24.xml │ │ │ ├── baseline_battery_6_bar_24.xml │ │ │ ├── baseline_battery_charging_full_24.xml │ │ │ ├── baseline_battery_full_24.xml │ │ │ ├── baseline_fiber_manual_record_24.xml │ │ │ ├── baseline_import_export_24.xml │ │ │ ├── baseline_personal_video_24.xml │ │ │ ├── baseline_settings_24.xml │ │ │ ├── battery.png │ │ │ ├── celsius.png │ │ │ ├── circle.png │ │ │ ├── compass.png │ │ │ ├── cross_hair.png │ │ │ ├── dis.png │ │ │ ├── disarmed.png │ │ │ ├── fahrenheit.png │ │ │ ├── gnd_speed.png │ │ │ ├── home.png │ │ │ ├── home_dist.png │ │ │ ├── ic_launcher_background.xml │ │ │ ├── ic_launcher_foreground.xml │ │ │ ├── kmh.png │ │ │ ├── lat.png │ │ │ ├── link.png │ │ │ ├── lon.png │ │ │ ├── ms.png │ │ │ ├── navigation.png │ │ │ ├── navigation_rev.png │ │ │ ├── pitch.png │ │ │ ├── roll.png │ │ │ ├── rssi.png │ │ │ ├── sat1.png │ │ │ ├── sat2.png │ │ │ ├── timer.png │ │ │ └── wnd_speed.png │ │ │ ├── layout │ │ │ └── activity_video.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-anydpi │ │ │ └── icon.png │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_foreground.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_foreground.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_foreground.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_foreground.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_foreground.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── values-night │ │ │ └── themes.xml │ │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── ic_launcher_background.xml │ │ │ ├── strings.xml │ │ │ ├── styles.xml │ │ │ └── themes.xml │ │ │ └── xml │ │ │ ├── backup_rules.xml │ │ │ ├── data_extraction_rules.xml │ │ │ └── usb_device_filter.xml │ └── test │ │ └── java │ │ └── com │ │ └── geehe │ │ └── fpvue │ │ └── ExampleUnitTest.java ├── videonative │ ├── .gitignore │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── cpp │ │ ├── AndroidThreadPrioValues.hpp │ │ ├── CMakeLists.txt │ │ ├── NALU │ │ │ ├── H26X.hpp │ │ │ ├── KeyFrameFinder.hpp │ │ │ ├── NALU.hpp │ │ │ └── NALUnitType.hpp │ │ ├── UdpReceiver.cpp │ │ ├── UdpReceiver.h │ │ ├── VideoDecoder.cpp │ │ ├── VideoDecoder.h │ │ ├── VideoPlayer.cpp │ │ ├── VideoPlayer.h │ │ ├── helper │ │ │ ├── AndroidLogger.hpp │ │ │ ├── AndroidMediaFormatHelper.h │ │ │ ├── NDKArrayHelper.hpp │ │ │ ├── NDKHelper.hpp │ │ │ ├── NDKThreadHelper.hpp │ │ │ ├── StringHelper.hpp │ │ │ └── TimeHelper.hpp │ │ ├── minimp4.h │ │ ├── parser │ │ │ ├── H26XParser.cpp │ │ │ ├── H26XParser.h │ │ │ ├── ParseRTP.cpp │ │ │ ├── ParseRTP.h │ │ │ └── RTP.hpp │ │ └── time_util.h │ │ └── java │ │ └── com │ │ └── geehe │ │ └── videonative │ │ ├── AspectFrameLayout.java │ │ ├── DecodingInfo.java │ │ ├── ISurfaceTextureAvailable.java │ │ ├── IVideoParamsChanged.java │ │ └── VideoPlayer.java └── wfbngrtl8812 │ ├── .gitignore │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ └── main │ ├── cpp │ ├── CMakeLists.txt │ ├── RxFrame.cpp │ ├── RxFrame.h │ ├── WfbngLink.cpp │ ├── WfbngLink.hpp │ ├── include │ │ ├── libusb.h │ │ ├── pcap.h │ │ ├── pcap │ │ │ ├── bluetooth.h │ │ │ ├── bpf.h │ │ │ ├── can_socketcan.h │ │ │ ├── compiler-tests.h │ │ │ ├── dlt.h │ │ │ ├── funcattrs.h │ │ │ ├── ipnet.h │ │ │ ├── namedb.h │ │ │ ├── nflog.h │ │ │ ├── pcap-inttypes.h │ │ │ ├── sll.h │ │ │ ├── socket.h │ │ │ ├── usb.h │ │ │ └── vlan.h │ │ ├── sodium.h │ │ └── sodium │ │ │ ├── core.h │ │ │ ├── crypto_aead_aegis128l.h │ │ │ ├── crypto_aead_aegis256.h │ │ │ ├── crypto_aead_aes256gcm.h │ │ │ ├── crypto_aead_chacha20poly1305.h │ │ │ ├── crypto_aead_xchacha20poly1305.h │ │ │ ├── crypto_auth.h │ │ │ ├── crypto_auth_hmacsha256.h │ │ │ ├── crypto_auth_hmacsha512.h │ │ │ ├── crypto_auth_hmacsha512256.h │ │ │ ├── crypto_box.h │ │ │ ├── crypto_box_curve25519xchacha20poly1305.h │ │ │ ├── crypto_box_curve25519xsalsa20poly1305.h │ │ │ ├── crypto_core_ed25519.h │ │ │ ├── crypto_core_hchacha20.h │ │ │ ├── crypto_core_hsalsa20.h │ │ │ ├── crypto_core_ristretto255.h │ │ │ ├── crypto_core_salsa20.h │ │ │ ├── crypto_core_salsa2012.h │ │ │ ├── crypto_core_salsa208.h │ │ │ ├── crypto_generichash.h │ │ │ ├── crypto_generichash_blake2b.h │ │ │ ├── crypto_hash.h │ │ │ ├── crypto_hash_sha256.h │ │ │ ├── crypto_hash_sha512.h │ │ │ ├── crypto_kdf.h │ │ │ ├── crypto_kdf_blake2b.h │ │ │ ├── crypto_kdf_hkdf_sha256.h │ │ │ ├── crypto_kdf_hkdf_sha512.h │ │ │ ├── crypto_kx.h │ │ │ ├── crypto_onetimeauth.h │ │ │ ├── crypto_onetimeauth_poly1305.h │ │ │ ├── crypto_pwhash.h │ │ │ ├── crypto_pwhash_argon2i.h │ │ │ ├── crypto_pwhash_argon2id.h │ │ │ ├── crypto_pwhash_scryptsalsa208sha256.h │ │ │ ├── crypto_scalarmult.h │ │ │ ├── crypto_scalarmult_curve25519.h │ │ │ ├── crypto_scalarmult_ed25519.h │ │ │ ├── crypto_scalarmult_ristretto255.h │ │ │ ├── crypto_secretbox.h │ │ │ ├── crypto_secretbox_xchacha20poly1305.h │ │ │ ├── crypto_secretbox_xsalsa20poly1305.h │ │ │ ├── crypto_secretstream_xchacha20poly1305.h │ │ │ ├── crypto_shorthash.h │ │ │ ├── crypto_shorthash_siphash24.h │ │ │ ├── crypto_sign.h │ │ │ ├── crypto_sign_ed25519.h │ │ │ ├── crypto_sign_edwards25519sha512batch.h │ │ │ ├── crypto_stream.h │ │ │ ├── crypto_stream_chacha20.h │ │ │ ├── crypto_stream_salsa20.h │ │ │ ├── crypto_stream_salsa2012.h │ │ │ ├── crypto_stream_salsa208.h │ │ │ ├── crypto_stream_xchacha20.h │ │ │ ├── crypto_stream_xsalsa20.h │ │ │ ├── crypto_verify_16.h │ │ │ ├── crypto_verify_32.h │ │ │ ├── crypto_verify_64.h │ │ │ ├── export.h │ │ │ ├── randombytes.h │ │ │ ├── randombytes_internal_random.h │ │ │ ├── randombytes_sysrandom.h │ │ │ ├── runtime.h │ │ │ ├── utils.h │ │ │ └── version.h │ └── libs │ │ ├── arm64-v8a │ │ ├── libpcap.a │ │ ├── libsodium.so │ │ ├── libunrooted_android.so │ │ └── libusb1.0.so │ │ └── armeabi-v7a │ │ ├── libpcap.a │ │ ├── libpcap.so.1 │ │ ├── libsodium.so │ │ ├── libunrooted_android.so │ │ ├── libusb1.0.so │ │ ├── libusb1.0.so.1 │ │ └── libusb1.0.so.2 │ └── java │ └── com │ └── geehe │ └── wfbngrtl8812 │ ├── WfbNGStats.java │ ├── WfbNGStatsChanged.java │ └── WfbNgLink.java ├── build.gradle.kts ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle.kts /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .idea/deploymentTargetDropDown.xml 11 | .DS_Store 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | .cxx 16 | local.properties 17 | /.idea 18 | .idea 19 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "app/wfbngrtl8812/src/main/cpp/devourer"] 2 | path = app/wfbngrtl8812/src/main/cpp/devourer 3 | url = https://github.com/gehee/devourer.git 4 | branch = android-compat 5 | 6 | [submodule "app/wfbngrtl8812/src/main/cpp/wfb-ng"] 7 | path = app/wfbngrtl8812/src/main/cpp/wfb-ng 8 | url = https://github.com/svpcom/wfb-ng.git 9 | branch = master 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FPVue_android 2 | 3 | > [!IMPORTANT] 4 | > August 2024: Unfortunately, this repository is now in an unmaintained state. 5 | > I don't have the time to maitain it like I would like to and there was not enough interest from external developers to contribute to it. 6 | > Feel free to fork it and take over but for now it will stay as is. 7 | 8 | FPVue Android is an app packaging multiple pieces together to decode an H264/H265 video feed broadcast by wfb-ng over the air. 9 | 10 | - [devourer](https://github.com/openipc/devourer): userspace rtl8812au driver initially created by [buldo](https://github.com/buldo) and converted to C by [josephnef](https://github.com/josephnef) . 11 | - [LiveVideo10ms](https://github.com/Consti10/LiveVideo10ms): excellent video decoder from [Consti10](https://github.com/Consti10) converted into a module. 12 | - [wfb-ng](https://github.com/svpcom/wfb-ng): library allowing the broadcast of the video feed over the air. 13 | 14 | The wfb-ng [gs.key](https://github.com/gehee/FPVue_android/raw/main/app/src/main/assets/gs.key) is embedded in the app. 15 | The settings menu allows selecting a different key from your phone. 16 | 17 | Supported rtl8812au wifi adapter are listed [here](https://github.com/gehee/FPVue_android/blob/main/app/src/main/res/xml/usb_device_filter.xml). 18 | Feel free to send pull requests to add new supported wifi adapters hardware IDs. 19 | 20 | Now support saving a dvr of the video feed to `Files/Internal Storage/Movies/` 21 | 22 | 23 | 24 | ## Compatibility 25 | 26 | - arm64-v8a, armeabi-v7a android devices (including Meta Quest 2/3, non vr mode) 27 | 28 | ## Build 29 | 30 | ``` 31 | git clone https://github.com/gehee/FPVue_android.git 32 | cd FPVue_android 33 | git submodule init 34 | git submodule update 35 | ``` 36 | 37 | The project can then be opened in android studio and built from there. 38 | 39 | 40 | ## Installation instructions 41 | 42 | 1. Download apk from https://github.com/gehee/FPVue_android/releases. 43 | 2. Run `adb install FPVue_android_0.14.1.apk` from the command line. 44 | 3. Download [gs.key](https://github.com/gehee/FPVue_android/raw/main/app/src/main/assets/gs.key), rename it to drone.key and copy it on the air side, or select a local gs.key file from your phone in the app settings. 45 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidApplication) 3 | id("org.jetbrains.kotlin.android") 4 | } 5 | 6 | android { 7 | namespace = "com.geehe.fpvue" 8 | compileSdk = 34 9 | 10 | defaultConfig { 11 | applicationId = "com.geehe.fpvue" 12 | minSdk = 26 13 | targetSdk = 34 14 | versionCode = 1 15 | versionName = "1.0" 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | } 19 | 20 | buildTypes { 21 | release { 22 | isMinifyEnabled = false 23 | proguardFiles( 24 | getDefaultProguardFile("proguard-android-optimize.txt"), 25 | "proguard-rules.pro" 26 | ) 27 | ndk { 28 | abiFilters.add("arm64-v8a") 29 | abiFilters.add("armeabi-v7a") 30 | } 31 | } 32 | debug { 33 | ndk { 34 | abiFilters.add("arm64-v8a") 35 | abiFilters.add("armeabi-v7a") 36 | } 37 | } 38 | } 39 | compileOptions { 40 | sourceCompatibility = JavaVersion.VERSION_1_8 41 | targetCompatibility = JavaVersion.VERSION_1_8 42 | } 43 | buildFeatures { 44 | viewBinding = true 45 | } 46 | kotlinOptions { 47 | jvmTarget = "1.8" 48 | } 49 | } 50 | 51 | 52 | dependencies { 53 | 54 | implementation(libs.appcompat) 55 | implementation(libs.material) 56 | implementation(project(":app:wfbngrtl8812")) 57 | implementation(project(":app:mavlink")) 58 | implementation("androidx.core:core-ktx:1.13.0") 59 | implementation("com.github.Philjay:mpandroidchart:3.1.0") 60 | 61 | testImplementation(libs.junit) 62 | androidTestImplementation(libs.ext.junit) 63 | androidTestImplementation(libs.espresso.core) 64 | 65 | implementation(libs.me.saket.cascade.cascade) 66 | implementation(libs.cascade.compose) 67 | 68 | implementation(project(":app:videonative")) 69 | } -------------------------------------------------------------------------------- /app/mavlink/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/mavlink/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidLibrary) 3 | } 4 | 5 | android { 6 | namespace = "com.geehe.mavlink" 7 | compileSdk = 34 8 | 9 | defaultConfig { 10 | minSdk = 26 11 | 12 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 13 | consumerProguardFiles("consumer-rules.pro") 14 | externalNativeBuild { 15 | cmake { 16 | cppFlags("-std=c++17") 17 | } 18 | } 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles( 25 | getDefaultProguardFile("proguard-android-optimize.txt"), 26 | "proguard-rules.pro" 27 | ) 28 | } 29 | } 30 | externalNativeBuild { 31 | cmake { 32 | path("src/main/cpp/CMakeLists.txt") 33 | version = "3.22.1" 34 | } 35 | } 36 | compileOptions { 37 | sourceCompatibility = JavaVersion.VERSION_1_8 38 | targetCompatibility = JavaVersion.VERSION_1_8 39 | } 40 | } 41 | 42 | dependencies { 43 | 44 | implementation(libs.appcompat) 45 | implementation(libs.material) 46 | testImplementation(libs.junit) 47 | androidTestImplementation(libs.ext.junit) 48 | androidTestImplementation(libs.espresso.core) 49 | } -------------------------------------------------------------------------------- /app/mavlink/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/mavlink/consumer-rules.pro -------------------------------------------------------------------------------- /app/mavlink/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/mavlink/src/androidTest/java/com/geehe/mavlink/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.geehe.mavlink; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.geehe.mavlink.test", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /app/mavlink/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # For more information about using CMake with Android Studio, read the 2 | # documentation: https://d.android.com/studio/projects/add-native-code.html. 3 | # For more examples on how to use CMake, see https://github.com/android/ndk-samples. 4 | 5 | # Sets the minimum CMake version required for this project. 6 | cmake_minimum_required(VERSION 3.22.1) 7 | 8 | # Declares the project name. The project name can be accessed via ${ PROJECT_NAME}, 9 | # Since this is the top level CMakeLists.txt, the project name is also accessible 10 | # with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level 11 | # build script scope). 12 | project("mavlink") 13 | 14 | # Creates and names a library, sets it as either STATIC 15 | # or SHARED, and provides the relative paths to its source code. 16 | # You can define multiple libraries, and CMake builds them for you. 17 | # Gradle automatically packages shared libraries with your APK. 18 | # 19 | # In this top level CMakeLists.txt, ${CMAKE_PROJECT_NAME} is used to define 20 | # the target library name; in the sub-module's CMakeLists.txt, ${PROJECT_NAME} 21 | # is preferred for the same purpose. 22 | # 23 | # In order to load a library into your app from Java/Kotlin, you must call 24 | # System.loadLibrary() and pass the name of the library defined here; 25 | # for GameActivity/NativeActivity derived applications, the same library name must be 26 | # used in the AndroidManifest.xml file. 27 | add_library(${CMAKE_PROJECT_NAME} SHARED 28 | # List C/C++ source files with relative paths to this CMakeLists.txt. 29 | mavlink.cpp) 30 | 31 | # Specifies libraries CMake should link to your target library. You 32 | # can link libraries from various origins, such as libraries defined in this 33 | # build script, prebuilt third-party libraries, or Android system libraries. 34 | target_link_libraries(${CMAKE_PROJECT_NAME} 35 | # List libraries link to the target library 36 | android 37 | log) -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/ASLUAV/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from ASLUAV.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "ASLUAV.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/ASLUAV/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from ASLUAV.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/ardupilotmega/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from ardupilotmega.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "ardupilotmega.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/ardupilotmega/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from ardupilotmega.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/autoquad/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from autoquad.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "autoquad.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/autoquad/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from autoquad.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/checksum.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(MAVLINK_USE_CXX_NAMESPACE) 4 | namespace mavlink { 5 | #elif defined(__cplusplus) 6 | extern "C" { 7 | #endif 8 | 9 | // Visual Studio versions before 2010 don't have stdint.h, so we just error out. 10 | #if (defined _MSC_VER) && (_MSC_VER < 1600) 11 | #error "The C-MAVLink implementation requires Visual Studio 2010 or greater" 12 | #endif 13 | 14 | #include 15 | 16 | /** 17 | * 18 | * CALCULATE THE CHECKSUM 19 | * 20 | */ 21 | 22 | #define X25_INIT_CRC 0xffff 23 | #define X25_VALIDATE_CRC 0xf0b8 24 | 25 | #ifndef HAVE_CRC_ACCUMULATE 26 | /** 27 | * @brief Accumulate the X.25 CRC by adding one char at a time. 28 | * 29 | * The checksum function adds the hash of one char at a time to the 30 | * 16 bit checksum (uint16_t). 31 | * 32 | * @param data new char to hash 33 | * @param crcAccum the already accumulated checksum 34 | **/ 35 | static inline void crc_accumulate(uint8_t data, uint16_t *crcAccum) 36 | { 37 | /*Accumulate one byte of data into the CRC*/ 38 | uint8_t tmp; 39 | 40 | tmp = data ^ (uint8_t)(*crcAccum &0xff); 41 | tmp ^= (tmp<<4); 42 | *crcAccum = (*crcAccum>>8) ^ (tmp<<8) ^ (tmp <<3) ^ (tmp>>4); 43 | } 44 | #endif 45 | 46 | 47 | /** 48 | * @brief Initiliaze the buffer for the X.25 CRC 49 | * 50 | * @param crcAccum the 16 bit X.25 CRC 51 | */ 52 | static inline void crc_init(uint16_t* crcAccum) 53 | { 54 | *crcAccum = X25_INIT_CRC; 55 | } 56 | 57 | 58 | /** 59 | * @brief Calculates the X.25 checksum on a byte buffer 60 | * 61 | * @param pBuffer buffer containing the byte array to hash 62 | * @param length length of the byte array 63 | * @return the checksum over the buffer bytes 64 | **/ 65 | static inline uint16_t crc_calculate(const uint8_t* pBuffer, uint16_t length) 66 | { 67 | uint16_t crcTmp; 68 | crc_init(&crcTmp); 69 | while (length--) { 70 | crc_accumulate(*pBuffer++, &crcTmp); 71 | } 72 | return crcTmp; 73 | } 74 | 75 | 76 | /** 77 | * @brief Accumulate the X.25 CRC by adding an array of bytes 78 | * 79 | * The checksum function adds the hash of one char at a time to the 80 | * 16 bit checksum (uint16_t). 81 | * 82 | * @param data new bytes to hash 83 | * @param crcAccum the already accumulated checksum 84 | **/ 85 | static inline void crc_accumulate_buffer(uint16_t *crcAccum, const char *pBuffer, uint16_t length) 86 | { 87 | const uint8_t *p = (const uint8_t *)pBuffer; 88 | while (length--) { 89 | crc_accumulate(*p++, crcAccum); 90 | } 91 | } 92 | 93 | #if defined(MAVLINK_USE_CXX_NAMESPACE) || defined(__cplusplus) 94 | } 95 | #endif 96 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/common/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from common.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 1 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "common.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/common/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from common.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/icarous/icarous.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol generated from icarous.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_ICAROUS_H 7 | #define MAVLINK_ICAROUS_H 8 | 9 | #ifndef MAVLINK_H 10 | #error Wrong include order: MAVLINK_ICAROUS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. 11 | #endif 12 | 13 | #undef MAVLINK_THIS_XML_IDX 14 | #define MAVLINK_THIS_XML_IDX 3 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | // MESSAGE LENGTHS AND CRCS 21 | 22 | #ifndef MAVLINK_MESSAGE_LENGTHS 23 | #define MAVLINK_MESSAGE_LENGTHS {} 24 | #endif 25 | 26 | #ifndef MAVLINK_MESSAGE_CRCS 27 | #define MAVLINK_MESSAGE_CRCS {{42000, 227, 1, 0, 0, 0}, {42001, 239, 46, 0, 0, 0}} 28 | #endif 29 | 30 | #include "../protocol.h" 31 | 32 | #define MAVLINK_ENABLED_ICAROUS 33 | 34 | // ENUM DEFINITIONS 35 | 36 | 37 | /** @brief */ 38 | #ifndef HAVE_ENUM_ICAROUS_TRACK_BAND_TYPES 39 | #define HAVE_ENUM_ICAROUS_TRACK_BAND_TYPES 40 | typedef enum ICAROUS_TRACK_BAND_TYPES 41 | { 42 | ICAROUS_TRACK_BAND_TYPE_NONE=0, /* | */ 43 | ICAROUS_TRACK_BAND_TYPE_NEAR=1, /* | */ 44 | ICAROUS_TRACK_BAND_TYPE_RECOVERY=2, /* | */ 45 | ICAROUS_TRACK_BAND_TYPES_ENUM_END=3, /* | */ 46 | } ICAROUS_TRACK_BAND_TYPES; 47 | #endif 48 | 49 | /** @brief */ 50 | #ifndef HAVE_ENUM_ICAROUS_FMS_STATE 51 | #define HAVE_ENUM_ICAROUS_FMS_STATE 52 | typedef enum ICAROUS_FMS_STATE 53 | { 54 | ICAROUS_FMS_STATE_IDLE=0, /* | */ 55 | ICAROUS_FMS_STATE_TAKEOFF=1, /* | */ 56 | ICAROUS_FMS_STATE_CLIMB=2, /* | */ 57 | ICAROUS_FMS_STATE_CRUISE=3, /* | */ 58 | ICAROUS_FMS_STATE_APPROACH=4, /* | */ 59 | ICAROUS_FMS_STATE_LAND=5, /* | */ 60 | ICAROUS_FMS_STATE_ENUM_END=6, /* | */ 61 | } ICAROUS_FMS_STATE; 62 | #endif 63 | 64 | // MAVLINK VERSION 65 | 66 | #ifndef MAVLINK_VERSION 67 | #define MAVLINK_VERSION 2 68 | #endif 69 | 70 | #if (MAVLINK_VERSION == 0) 71 | #undef MAVLINK_VERSION 72 | #define MAVLINK_VERSION 2 73 | #endif 74 | 75 | // MESSAGE DEFINITIONS 76 | #include "./mavlink_msg_icarous_heartbeat.h" 77 | #include "./mavlink_msg_icarous_kinematic_bands.h" 78 | 79 | // base include 80 | 81 | 82 | #undef MAVLINK_THIS_XML_IDX 83 | #define MAVLINK_THIS_XML_IDX 3 84 | 85 | #if MAVLINK_THIS_XML_IDX == MAVLINK_PRIMARY_XML_IDX 86 | # define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS} 87 | # define MAVLINK_MESSAGE_NAMES {{ "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }} 88 | # if MAVLINK_COMMAND_24BIT 89 | # include "../mavlink_get_info.h" 90 | # endif 91 | #endif 92 | 93 | #ifdef __cplusplus 94 | } 95 | #endif // __cplusplus 96 | #endif // MAVLINK_ICAROUS_H 97 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/icarous/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from icarous.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 3 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "icarous.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/icarous/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from icarous.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/matrixpilot/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from matrixpilot.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "matrixpilot.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/matrixpilot/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from matrixpilot.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/mavlink_get_info.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef MAVLINK_USE_MESSAGE_INFO 4 | #define MAVLINK_HAVE_GET_MESSAGE_INFO 5 | 6 | /* 7 | return the message_info struct for a message 8 | */ 9 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info_by_id(uint32_t msgid) 10 | { 11 | static const mavlink_message_info_t mavlink_message_info[] = MAVLINK_MESSAGE_INFO; 12 | /* 13 | use a bisection search to find the right entry. A perfect hash may be better 14 | Note that this assumes the table is sorted with primary key msgid 15 | */ 16 | uint32_t low=0, high=sizeof(mavlink_message_info)/sizeof(mavlink_message_info[0]); 17 | while (low < high) { 18 | uint32_t mid = (low+1+high)/2; 19 | if (msgid < mavlink_message_info[mid].msgid) { 20 | high = mid-1; 21 | continue; 22 | } 23 | if (msgid > mavlink_message_info[mid].msgid) { 24 | low = mid; 25 | continue; 26 | } 27 | low = mid; 28 | break; 29 | } 30 | if (mavlink_message_info[low].msgid == msgid) { 31 | return &mavlink_message_info[low]; 32 | } 33 | return NULL; 34 | } 35 | 36 | /* 37 | return the message_info struct for a message 38 | */ 39 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info(const mavlink_message_t *msg) 40 | { 41 | return mavlink_get_message_info_by_id(msg->msgid); 42 | } 43 | 44 | /* 45 | return the message_info struct for a message 46 | */ 47 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info_by_name(const char *name) 48 | { 49 | static const struct { const char *name; uint32_t msgid; } mavlink_message_names[] = MAVLINK_MESSAGE_NAMES; 50 | /* 51 | use a bisection search to find the right entry. A perfect hash may be better 52 | Note that this assumes the table is sorted with primary key name 53 | */ 54 | uint32_t low=0, high=sizeof(mavlink_message_names)/sizeof(mavlink_message_names[0]); 55 | while (low < high) { 56 | uint32_t mid = (low+1+high)/2; 57 | int cmp = strcmp(mavlink_message_names[mid].name, name); 58 | if (cmp == 0) { 59 | return mavlink_get_message_info_by_id(mavlink_message_names[mid].msgid); 60 | } 61 | if (cmp > 0) { 62 | high = mid-1; 63 | } else { 64 | low = mid; 65 | } 66 | } 67 | return NULL; 68 | } 69 | #endif // MAVLINK_USE_MESSAGE_INFO 70 | 71 | 72 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/mavlink_sha256.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/mavlink/src/main/cpp/mavlink/mavlink_sha256.h -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/minimal/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from minimal.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "minimal.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/minimal/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from minimal.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/slugs/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from slugs.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "slugs.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/slugs/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from slugs.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/standard/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from standard.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "standard.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/standard/testsuite.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol testsuite generated from standard.xml 3 | * @see http://qgroundcontrol.org/mavlink/ 4 | */ 5 | #pragma once 6 | #ifndef STANDARD_TESTSUITE_H 7 | #define STANDARD_TESTSUITE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #ifndef MAVLINK_TEST_ALL 14 | #define MAVLINK_TEST_ALL 15 | static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg); 16 | static void mavlink_test_standard(uint8_t, uint8_t, mavlink_message_t *last_msg); 17 | 18 | static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) 19 | { 20 | mavlink_test_common(system_id, component_id, last_msg); 21 | mavlink_test_standard(system_id, component_id, last_msg); 22 | } 23 | #endif 24 | 25 | #include "../common/testsuite.h" 26 | 27 | 28 | 29 | static void mavlink_test_standard(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) 30 | { 31 | 32 | } 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif // __cplusplus 37 | #endif // STANDARD_TESTSUITE_H 38 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/standard/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from standard.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/test/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from test.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 0 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "test.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/test/test.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol generated from test.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_TEST_H 7 | #define MAVLINK_TEST_H 8 | 9 | #ifndef MAVLINK_H 10 | #error Wrong include order: MAVLINK_TEST.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. 11 | #endif 12 | 13 | #undef MAVLINK_THIS_XML_IDX 14 | #define MAVLINK_THIS_XML_IDX 0 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | // MESSAGE LENGTHS AND CRCS 21 | 22 | #ifndef MAVLINK_MESSAGE_LENGTHS 23 | #define MAVLINK_MESSAGE_LENGTHS {} 24 | #endif 25 | 26 | #ifndef MAVLINK_MESSAGE_CRCS 27 | #define MAVLINK_MESSAGE_CRCS {{0, 103, 179, 0, 0, 0}} 28 | #endif 29 | 30 | #include "../protocol.h" 31 | 32 | #define MAVLINK_ENABLED_TEST 33 | 34 | // ENUM DEFINITIONS 35 | 36 | 37 | 38 | // MAVLINK VERSION 39 | 40 | #ifndef MAVLINK_VERSION 41 | #define MAVLINK_VERSION 3 42 | #endif 43 | 44 | #if (MAVLINK_VERSION == 0) 45 | #undef MAVLINK_VERSION 46 | #define MAVLINK_VERSION 3 47 | #endif 48 | 49 | // MESSAGE DEFINITIONS 50 | #include "./mavlink_msg_test_types.h" 51 | 52 | // base include 53 | 54 | 55 | #undef MAVLINK_THIS_XML_IDX 56 | #define MAVLINK_THIS_XML_IDX 0 57 | 58 | #if MAVLINK_THIS_XML_IDX == MAVLINK_PRIMARY_XML_IDX 59 | # define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_TEST_TYPES} 60 | # define MAVLINK_MESSAGE_NAMES {{ "TEST_TYPES", 0 }} 61 | # if MAVLINK_COMMAND_24BIT 62 | # include "../mavlink_get_info.h" 63 | # endif 64 | #endif 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif // __cplusplus 69 | #endif // MAVLINK_TEST_H 70 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/test/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from test.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/uAvionix/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from uAvionix.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_IDX 2 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "uAvionix.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /app/mavlink/src/main/cpp/mavlink/uAvionix/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from uAvionix.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /app/mavlink/src/main/java/com/geehe/mavlink/MavlinkNative.java: -------------------------------------------------------------------------------- 1 | package com.geehe.mavlink; 2 | 3 | import android.content.Context; 4 | 5 | public class MavlinkNative { 6 | 7 | // Used to load the 'mavlink' library on application startup. 8 | static { 9 | System.loadLibrary("mavlink"); 10 | } 11 | 12 | public static native void nativeStart(Context context); 13 | public static native void nativeStop(Context context); 14 | 15 | // TODO: Use message queue from cpp for performance# 16 | // This initiates a 'call back' for the IVideoParams 17 | public static native void nativeCallBack(T t); 18 | } -------------------------------------------------------------------------------- /app/mavlink/src/main/java/com/geehe/mavlink/MavlinkUpdate.java: -------------------------------------------------------------------------------- 1 | package com.geehe.mavlink; 2 | 3 | public interface MavlinkUpdate{ 4 | void onNewMavlinkData(final MavlinkData data); 5 | } -------------------------------------------------------------------------------- /app/mavlink/src/test/java/com/geehe/mavlink/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.geehe.mavlink; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/geehe/fpvue/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.geehe.fpvue; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.geehe.fpvue", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /app/src/main/assets/gs.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/assets/gs.key -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/geehe/fpvue/DeviceFilterXmlParser.java: -------------------------------------------------------------------------------- 1 | package com.geehe.fpvue; 2 | 3 | import android.content.Context; 4 | import android.content.res.XmlResourceParser; 5 | 6 | import org.xmlpull.v1.XmlPullParser; 7 | import org.xmlpull.v1.XmlPullParserException; 8 | import org.xmlpull.v1.XmlPullParserFactory; 9 | 10 | import java.io.IOException; 11 | import java.io.InputStream; 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | public class DeviceFilterXmlParser { 16 | 17 | public static List parseXml(Context context, int resourceId) throws XmlPullParserException, IOException { 18 | List devices = new ArrayList<>(); 19 | XmlResourceParser parser = context.getResources().getXml(resourceId); 20 | 21 | int eventType = parser.getEventType(); 22 | while (eventType != XmlResourceParser.END_DOCUMENT) { 23 | if (eventType == XmlResourceParser.START_TAG) { 24 | String tag = parser.getName(); 25 | if (tag.equals("usb-device")) { 26 | String vendorIdString = parser.getAttributeValue(null, "vendor-id"); 27 | String productIdString = parser.getAttributeValue(null, "product-id"); 28 | 29 | int vendorId = Integer.parseInt(vendorIdString, 10); 30 | int productId = Integer.parseInt(productIdString, 10); 31 | 32 | UsbDeviceFilter device = new UsbDeviceFilter(vendorId, productId); 33 | devices.add(device); 34 | } 35 | } 36 | eventType = parser.next(); 37 | } 38 | return devices; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/geehe/fpvue/SettingsChanged.java: -------------------------------------------------------------------------------- 1 | package com.geehe.fpvue; 2 | 3 | public interface SettingsChanged { 4 | void onChannelSettingChanged(final int channel); 5 | void onCodecSettingChanged(final String codec); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/geehe/fpvue/UsbDeviceFilter.java: -------------------------------------------------------------------------------- 1 | package com.geehe.fpvue; 2 | 3 | public class UsbDeviceFilter { 4 | public int venderId; 5 | public int productId; 6 | 7 | public UsbDeviceFilter(int vid, int pid) { 8 | venderId = vid; 9 | productId = pid; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/geehe/fpvue/osd/MovableLayout.java: -------------------------------------------------------------------------------- 1 | package com.geehe.fpvue.osd; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.graphics.Point; 6 | import android.util.AttributeSet; 7 | import android.util.Log; 8 | import android.view.WindowManager; 9 | import android.view.Display; 10 | import android.view.MotionEvent; 11 | import android.widget.LinearLayout; 12 | 13 | public class MovableLayout extends LinearLayout { 14 | private float dX, dY; 15 | private SharedPreferences preferences; 16 | private boolean isMovable = false; 17 | private float defaultX,defaultY; 18 | 19 | private String prefName; 20 | 21 | public MovableLayout(Context context) { 22 | super(context); 23 | init(context); 24 | } 25 | 26 | public MovableLayout(Context context, AttributeSet attrs) { 27 | super(context, attrs); 28 | init(context); 29 | } 30 | 31 | public MovableLayout(Context context, AttributeSet attrs, int defStyleAttr) { 32 | super(context, attrs, defStyleAttr); 33 | init(context); 34 | } 35 | 36 | private void init(Context context) { 37 | preferences = context.getSharedPreferences("movable_layout_prefs", Context.MODE_PRIVATE); 38 | 39 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); 40 | Display display = windowManager.getDefaultDisplay(); 41 | Point displaySize = new Point(); 42 | display.getRealSize(displaySize); 43 | 44 | defaultX = (float) displaySize.x / 2 - ((float)displaySize.y/8); 45 | defaultY = (float) displaySize.y / 2 - ((float)displaySize.y/4); 46 | } 47 | 48 | @Override 49 | public boolean onTouchEvent(MotionEvent event) { 50 | if(!isMovable) return false; 51 | 52 | switch (event.getAction()) { 53 | case MotionEvent.ACTION_DOWN: 54 | dX = this.getX() - event.getRawX(); 55 | dY = this.getY() - event.getRawY(); 56 | break; 57 | case MotionEvent.ACTION_MOVE: 58 | this.animate() 59 | .x(event.getRawX() + dX) 60 | .y(event.getRawY() + dY) 61 | .setDuration(0) 62 | .start(); 63 | break; 64 | case MotionEvent.ACTION_UP: 65 | savePosition(); 66 | break; 67 | default: 68 | return false; 69 | } 70 | return true; 71 | } 72 | 73 | private void savePosition() { 74 | SharedPreferences.Editor editor = preferences.edit(); 75 | editor.putFloat(prefName + "_x", getX()); 76 | editor.putFloat(prefName + "_y", getY()); 77 | editor.apply(); 78 | } 79 | 80 | public void restorePosition(String prefName_) { 81 | prefName=prefName_; 82 | float x = preferences.getFloat(prefName + "_x", defaultX); 83 | float y = preferences.getFloat(prefName + "_y", defaultY); 84 | setX(x); 85 | setY(y); 86 | } 87 | 88 | public void setMovable(boolean movable) { 89 | isMovable = movable; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/com/geehe/fpvue/osd/OSDElement.java: -------------------------------------------------------------------------------- 1 | package com.geehe.fpvue.osd; 2 | 3 | import android.content.Context; 4 | 5 | public class OSDElement{ 6 | public String name; 7 | public MovableLayout layout; 8 | 9 | public OSDElement(String n, MovableLayout l) { 10 | name = n; 11 | layout = l; 12 | } 13 | 14 | public String prefName() { 15 | return String.format("%d",name.hashCode()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/air_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/air_speed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/alt.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/amp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/amp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/armed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/armed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_0_bar_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_1_bar_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_2_bar_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_3_bar_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_4_bar_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_5_bar_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_6_bar_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_charging_full_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_full_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_fiber_manual_record_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_import_export_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_personal_video_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_settings_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/battery.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/celsius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/celsius.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/circle.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/compass.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/cross_hair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/cross_hair.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/dis.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/disarmed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/disarmed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/fahrenheit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/fahrenheit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/gnd_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/gnd_speed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/home_dist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/home_dist.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/kmh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/kmh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/lat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/lat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/link.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/lon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/lon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/ms.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/navigation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/navigation_rev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/navigation_rev.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/pitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/pitch.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/roll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/roll.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/rssi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/rssi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/sat1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sat2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/sat2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/timer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/wnd_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/wnd_speed.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-anydpi/icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2F2F2F 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FPVue 0.19 3 | 4 | h265 5 | h264 6 | 7 | 8 | 1 9 | 2 10 | 3 11 | 4 12 | 5 13 | 6 14 | 7 15 | 8 16 | 9 17 | 10 18 | 11 19 | 12 20 | 13 21 | 32 22 | 36 23 | 40 24 | 44 25 | 48 26 | 52 27 | 56 28 | 60 29 | 64 30 | 68 31 | 96 32 | 100 33 | 104 34 | 108 35 | 112 36 | 116 37 | 120 38 | 124 39 | 128 40 | 132 41 | 136 42 | 140 43 | 144 44 | 149 45 | 153 46 | 157 47 | 161 48 | 169 49 | 173 50 | 177 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/xml/usb_device_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/com/geehe/fpvue/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.geehe.fpvue; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/videonative/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/videonative/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.android.build.api.dsl.Packaging 2 | 3 | plugins { 4 | alias(libs.plugins.androidLibrary) 5 | } 6 | 7 | 8 | 9 | android { 10 | namespace = "com.geehe.videonative" 11 | compileSdk = 34 12 | 13 | defaultConfig { 14 | minSdk = 26 15 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 16 | consumerProguardFiles("consumer-rules.pro") 17 | ndk { 18 | debugSymbolLevel = "FULL" 19 | } 20 | // externalNativeBuild { 21 | // cmake { 22 | // cppFlags "-std=c++17" 23 | // arguments "-DANDROID_STL=c++_shared" 24 | // } 25 | // } 26 | 27 | } 28 | 29 | buildTypes { 30 | release { 31 | isMinifyEnabled = false 32 | proguardFiles( 33 | getDefaultProguardFile("proguard-android-optimize.txt"), 34 | "proguard-rules.pro" 35 | ) 36 | } 37 | } 38 | externalNativeBuild { 39 | cmake { 40 | path("src/main/cpp/CMakeLists.txt") 41 | version = "3.22.1" 42 | } 43 | } 44 | compileOptions { 45 | sourceCompatibility = JavaVersion.VERSION_1_8 46 | targetCompatibility = JavaVersion.VERSION_1_8 47 | } 48 | } 49 | 50 | dependencies { 51 | implementation(libs.appcompat) 52 | implementation(libs.material) 53 | implementation(libs.constraintlayout) 54 | 55 | testImplementation(libs.junit) 56 | androidTestImplementation(libs.ext.junit) 57 | 58 | androidTestImplementation(libs.espresso.core) 59 | } -------------------------------------------------------------------------------- /app/videonative/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/videonative/consumer-rules.pro -------------------------------------------------------------------------------- /app/videonative/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 3.6) 3 | 4 | project("VideoNative") 5 | 6 | add_library(${CMAKE_PROJECT_NAME} SHARED 7 | parser/H26XParser.cpp 8 | parser/ParseRTP.cpp 9 | UdpReceiver.cpp 10 | VideoDecoder.cpp 11 | VideoPlayer.cpp) 12 | 13 | 14 | target_link_libraries(${CMAKE_PROJECT_NAME} 15 | # List libraries link to the target library 16 | android 17 | mediandk 18 | log) 19 | 20 | set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 20) 21 | target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -fno-omit-frame-pointer) -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/NALU/KeyFrameFinder.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by geier on 07/02/2020. 3 | // 4 | 5 | #ifndef FPVUE_KEYFRAMEFINDER_HPP 6 | #define FPVUE_KEYFRAMEFINDER_HPP 7 | 8 | #include "NALU.hpp" 9 | #include 10 | #include "../helper/AndroidLogger.hpp" 11 | #include 12 | 13 | // Takes a continuous stream of NALUs and save SPS / PPS data 14 | // For later use 15 | class KeyFrameFinder{ 16 | private: 17 | std::unique_ptr SPS=nullptr; 18 | std::unique_ptr PPS=nullptr; 19 | // VPS are only used in H265 20 | std::unique_ptr VPS=nullptr; 21 | public: 22 | bool saveIfKeyFrame(const NALU &nalu){ 23 | if(nalu.getSize()<=0)return false; 24 | if(nalu.isSPS()){ 25 | SPS=std::make_unique(nalu); 26 | //MLOGD<<"SPS found"; 27 | //MLOGD<(nalu); 31 | //MLOGD<<"PPS found"; 32 | return true; 33 | }else if(nalu.IS_H265_PACKET && nalu.isVPS()){ 34 | VPS=std::make_unique(nalu); 35 | //MLOGD<<"VPS found"; 36 | return true; 37 | } 38 | //qDebug()<<"not a keyframe"<<(int)nalu.getDataWithoutPrefix()[0]; 39 | return false; 40 | } 41 | // H264 needs sps and pps 42 | // H265 needs sps,pps and vps 43 | bool allKeyFramesAvailable(const bool IS_H265=false){ 44 | if(IS_H265){ 45 | return SPS != nullptr && PPS != nullptr && VPS!=nullptr; 46 | } 47 | return SPS != nullptr && PPS != nullptr; 48 | } 49 | //SPS 50 | const NALU& getCSD0()const{ 51 | assert(SPS); 52 | return SPS->get_nal(); 53 | } 54 | const NALU& getCSD1()const{ 55 | assert(PPS); 56 | return PPS->get_nal(); 57 | } 58 | const NALU& getVPS()const{ 59 | assert(VPS); 60 | return VPS->get_nal(); 61 | } 62 | static void appendNaluData(std::vector& buff,const NALU& nalu){ 63 | buff.insert(buff.begin(),nalu.getData(),nalu.getData()+nalu.getSize()); 64 | } 65 | void reset(){ 66 | SPS=nullptr; 67 | PPS=nullptr; 68 | VPS=nullptr; 69 | } 70 | }; 71 | 72 | #endif //FPVUE_KEYFRAMEFINDER_HPP 73 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/UdpReceiver.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by gaeta on 2024-04-01. 3 | // 4 | 5 | #ifndef FPVUE_UDPRECEIVER_H 6 | #define FPVUE_UDPRECEIVER_H 7 | 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | //Starts a new thread that continuously checks for new data on UDP port 18 | 19 | class UDPReceiver { 20 | public: 21 | typedef std::function DATA_CALLBACK; 22 | typedef std::function SOURCE_IP_CALLBACK; 23 | public: 24 | /** 25 | * @param javaVm used to set thread priority (attach and then detach) for android, 26 | nullptr when priority doesn't matter/not using android 27 | * @param port : The port to listen on 28 | * @param CPUPriority: The priority the receiver thread will run with if javaVm!=nullptr 29 | * @param onDataReceivedCallback: called every time new data is received 30 | * @param WANTED_RCVBUF_SIZE: The buffer allocated by the OS might not be sufficient to buffer incoming data when receiving at a high data rate 31 | * If @param WANTED_RCVBUF_SIZE is bigger than the size allocated by the OS a bigger buffer is requested, but it is not 32 | * guaranteed that the size is actually increased. Use 0 to leave the buffer size untouched 33 | */ 34 | UDPReceiver(JavaVM* javaVm,int port,std::string name,int CPUPriority,DATA_CALLBACK onDataReceivedCallback,size_t WANTED_RCVBUF_SIZE=0); 35 | /** 36 | * Register a callback that is called once and contains the IP address of the first received packet's sender 37 | */ 38 | void registerOnSourceIPFound(SOURCE_IP_CALLBACK onSourceIP1); 39 | /** 40 | * Start receiver thread,which opens UDP port 41 | */ 42 | void startReceiving(); 43 | /** 44 | * Stop and join receiver thread, which closes port 45 | */ 46 | void stopReceiving(); 47 | //Get function(s) for private member variables 48 | long getNReceivedBytes()const; 49 | std::string getSourceIPAddress()const; 50 | int getPort()const; 51 | private: 52 | void receiveFromUDPLoop(); 53 | const DATA_CALLBACK onDataReceivedCallback=nullptr; 54 | SOURCE_IP_CALLBACK onSourceIP= nullptr; 55 | const int mPort; 56 | const int mCPUPriority; 57 | // Hmm.... 58 | const size_t WANTED_RCVBUF_SIZE; 59 | const std::string mName; 60 | ///We need this reference to stop the receiving thread 61 | int mSocket=0; 62 | std::string senderIP="0.0.0.0"; 63 | std::atomic receiving=false; 64 | std::atomic nReceivedBytes=0; 65 | std::unique_ptr mUDPReceiverThread; 66 | //https://en.wikipedia.org/wiki/User_Datagram_Protocol 67 | //65,507 bytes (65,535 − 8 byte UDP header − 20 byte IP header). 68 | static constexpr const size_t UDP_PACKET_MAX_SIZE=65507; 69 | JavaVM* javaVm; 70 | }; 71 | 72 | #endif //FPVUE_UDPRECEIVER_H 73 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/VideoPlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Constantin on 1/9/2019. 3 | // 4 | 5 | #ifndef FPV_VR_VIDEOPLAYERN_H 6 | #define FPV_VR_VIDEOPLAYERN_H 7 | 8 | #include 9 | #include "VideoDecoder.h" 10 | #include "UdpReceiver.h" 11 | #include "parser/H26XParser.h" 12 | #include "minimp4.h" 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include "time_util.h" 18 | 19 | class VideoPlayer{ 20 | 21 | public: 22 | VideoPlayer(JNIEnv * env, jobject context); 23 | enum VIDEO_DATA_TYPE{RTP_H264,RAW_H264,RTP_H265,RAW_H265}; 24 | void onNewVideoData(const uint8_t* data,const std::size_t data_length,const VIDEO_DATA_TYPE videoDataType); 25 | /* 26 | * Set the surface the decoder can be configured with. When @param surface==nullptr 27 | * It is guaranteed that the surface is not used by the decoder anymore when this call returns 28 | */ 29 | void setVideoSurface(JNIEnv* env, jobject surface); 30 | /* 31 | * Start the receiver and ground recorder if enabled 32 | */ 33 | void start(JNIEnv *env,jobject androidContext, jstring codec); 34 | /** 35 | * Stop the receiver and ground recorder if enabled 36 | */ 37 | void stop(JNIEnv *env,jobject androidContext); 38 | /* 39 | * Returns a string with the current configuration for debugging 40 | */ 41 | std::string getInfoString()const; 42 | 43 | void startDvr(JNIEnv *env,jint fd, jint fmp4_enabled); 44 | void stopDvr(); 45 | 46 | bool isRecording() { 47 | return (get_time_ms() - last_dvr_write) <= 500; 48 | } 49 | 50 | private: 51 | void onNewNALU(const NALU& nalu); 52 | //Assumptions: Max bitrate: 40 MBit/s, Max time to buffer: 100ms 53 | //5 MB should be plenty ! 54 | static constexpr const size_t WANTED_UDP_RCVBUF_SIZE=1024*1024*5; 55 | // Retrieve settings from shared preferences 56 | enum SOURCE_TYPE_OPTIONS{UDP,FILE,ASSETS,VIA_FFMPEG_URL,EXTERNAL}; 57 | const std::string GROUND_RECORDING_DIRECTORY; 58 | JavaVM* javaVm=nullptr; 59 | H26XParser mParser; 60 | 61 | // DVR attributes 62 | int dvr_fd; 63 | std::queue naluQueue; 64 | std::mutex mtx; 65 | std::condition_variable cv; 66 | bool stopFlag = false; 67 | std::thread processingThread; 68 | int dvr_mp4_fragmentation = 0; 69 | uint64_t last_dvr_write = 0; 70 | 71 | void enqueueNALU(const NALU& nalu) { 72 | { 73 | std::lock_guard lock(mtx); 74 | naluQueue.push(nalu); 75 | } 76 | cv.notify_one(); 77 | } 78 | 79 | void startProcessing() { 80 | stopFlag = false; 81 | processingThread = std::thread(&VideoPlayer::processQueue, this); 82 | } 83 | 84 | void stopProcessing() { 85 | { 86 | std::lock_guard lock(mtx); 87 | stopFlag = true; 88 | } 89 | cv.notify_all(); 90 | if (processingThread.joinable()) { 91 | processingThread.join(); 92 | } 93 | } 94 | 95 | void processQueue(); 96 | 97 | public: 98 | VideoDecoder videoDecoder; 99 | std::unique_ptr mUDPReceiver; 100 | long nNALUsAtLastCall=0; 101 | 102 | public: 103 | DecodingInfo latestDecodingInfo{}; 104 | std::atomic latestDecodingInfoChanged=false; 105 | VideoRatio latestVideoRatio{}; 106 | std::atomic latestVideoRatioChanged=false; 107 | 108 | bool lastFrameWasAUD=false; 109 | }; 110 | 111 | #endif //FPV_VR_VIDEOPLAYERN_H 112 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/helper/AndroidMediaFormatHelper.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FPVUE_ANDROIDMEDIAFORMATHELPER_H 3 | #define FPVUE_ANDROIDMEDIAFORMATHELPER_H 4 | 5 | #include "../NALU/KeyFrameFinder.hpp" 6 | #include 7 | 8 | // Some of these params are only supported on the latest Android versions 9 | // However,writing them has no negative affect on devices with older Android versions 10 | // Note that for example the low-latency key cannot fix any issues like the 'VUI' issue 11 | void writeAndroidPerformanceParams(AMediaFormat* format){ 12 | // I think: KEY_LOW_LATENCY is for decoder. But it doesn't really make a difference anyways 13 | static const auto PARAMETER_KEY_LOW_LATENCY="low-latency"; 14 | AMediaFormat_setInt32(format,PARAMETER_KEY_LOW_LATENCY,1); 15 | // Lower values mean higher priority 16 | // Works on pixel 3 (look at output format description) 17 | static const auto AMEDIAFORMAT_KEY_PRIORITY="priority"; 18 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_PRIORITY,0); 19 | // set operating rate ? - doesn't make a difference 20 | //static const auto AMEDIAFORMAT_KEY_OPERATING_RATE="operating-rate"; 21 | //AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_OPERATING_RATE,60); 22 | // 23 | //AMEDIAFORMAT_KEY_LOW_LATENCY; 24 | //AMEDIAFORMAT_KEY_LATENCY; 25 | //AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_LATENCY,0); 26 | //AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_OPERATING_RATE,0); 27 | } 28 | 29 | static void h264_configureAMediaFormat(KeyFrameFinder& kff,AMediaFormat* format){ 30 | const auto sps=kff.getCSD0(); 31 | const auto pps=kff.getCSD1(); 32 | const auto videoWH= sps.getVideoWidthHeightSPS(); 33 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_WIDTH,videoWH[0]); 34 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_HEIGHT,videoWH[1]); 35 | AMediaFormat_setBuffer(format,"csd-0",sps.getData(),(size_t)sps.getSize()); 36 | AMediaFormat_setBuffer(format,"csd-1",pps.getData(),(size_t)pps.getSize()); 37 | MLOGD<<"Video WH:"< buff={}; 47 | const auto sps=kff.getCSD0(); 48 | const auto pps=kff.getCSD1(); 49 | const auto vps=kff.getVPS(); 50 | buff.reserve(sps.getSize() + pps.getSize() + vps.getSize()); 51 | KeyFrameFinder::appendNaluData(buff, vps); 52 | KeyFrameFinder::appendNaluData(buff, sps); 53 | KeyFrameFinder::appendNaluData(buff, pps); 54 | const auto videoWH= sps.getVideoWidthHeightSPS(); 55 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_WIDTH,videoWH[0]); 56 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_HEIGHT,videoWH[1]); 57 | AMediaFormat_setBuffer(format,"csd-0",buff.data(),buff.size()); 58 | MLOGD<<"Video WH:"< 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | H26XParser::H26XParser(NALU_DATA_CALLBACK onNewNALU): 12 | onNewNALU(std::move(onNewNALU)), 13 | mDecodeRTP(std::bind(&H26XParser::onNewNaluDataExtracted, this, std::placeholders::_1,std::placeholders::_2,std::placeholders::_3)){ 14 | } 15 | 16 | void H26XParser::reset(){ 17 | mDecodeRTP.reset(); 18 | nParsedNALUs=0; 19 | nParsedKonfigurationFrames=0; 20 | } 21 | 22 | void H26XParser::parse_raw_h264_stream(const uint8_t *data, const size_t data_length) { 23 | //mParseRAW.parseData(data,data_length); 24 | } 25 | 26 | void H26XParser::parse_raw_h265_stream(const uint8_t *data, const size_t data_length) { 27 | //mParseRAW.parseData(data,data_length,true); 28 | } 29 | 30 | void H26XParser::parse_rtp_h264_stream(const uint8_t *rtp_data, const size_t data_length) { 31 | mDecodeRTP.parseRTPH264toNALU(rtp_data, data_length); 32 | } 33 | 34 | void H26XParser::parse_rtp_h265_stream(const uint8_t *rtp_data, const size_t data_length) { 35 | IS_H265=true; 36 | mDecodeRTP.parseRTPH265toNALU(rtp_data, data_length); 37 | } 38 | 39 | void H26XParser::onNewNaluDataExtracted(const std::chrono::steady_clock::time_point creation_time, 40 | const uint8_t *nalu_data, const int nalu_data_size) { 41 | NALU nalu(nalu_data, nalu_data_size, IS_H265, creation_time); 42 | newNaluExtracted(nalu); 43 | } 44 | 45 | void H26XParser::newNaluExtracted(const NALU& nalu) { 46 | if(onNewNALU!= nullptr){ 47 | onNewNALU(nalu); 48 | } 49 | nParsedNALUs++; 50 | const bool sps_or_pps=nalu.isSPS() || nalu.isPPS(); 51 | if(sps_or_pps){ 52 | nParsedKonfigurationFrames++; 53 | } 54 | } 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/parser/H26XParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Constantin on 24.01.2018. 3 | // 4 | 5 | #ifndef FPV_VR_PARSE2H264RAW_H 6 | #define FPV_VR_PARSE2H264RAW_H 7 | 8 | #include 9 | #include 10 | 11 | /** 12 | * Input: 13 | * 1) rtp packets (h264/h265) 14 | * 2) raw packets (h264/h265) 15 | * Output: 16 | * NAL units in the onNewNalu callback, one after another 17 | */ 18 | // 19 | 20 | #include "../NALU/NALU.hpp" 21 | 22 | #include "ParseRTP.h" 23 | 24 | // 25 | #include 26 | #include 27 | 28 | 29 | class H26XParser { 30 | public: 31 | H26XParser(NALU_DATA_CALLBACK onNewNALU); 32 | void parse_raw_h264_stream(const uint8_t* data,const size_t data_length); 33 | void parse_raw_h265_stream(const uint8_t* data,const size_t data_length); 34 | void parse_rtp_h264_stream(const uint8_t* rtp_data,const size_t data_len); 35 | void parse_rtp_h265_stream(const uint8_t* rtp_data,const size_t data_len); 36 | void reset(); 37 | public: 38 | long nParsedNALUs=0; 39 | long nParsedKonfigurationFrames=0; 40 | //For live video set to -1 (no fps limitation), else additional latency will be generated 41 | void setLimitFPS(int maxFPS); 42 | private: 43 | void newNaluExtracted(const NALU& nalu); 44 | void onNewNaluDataExtracted(const std::chrono::steady_clock::time_point creation_time,const uint8_t* nalu_data,const int nalu_data_size); 45 | const NALU_DATA_CALLBACK onNewNALU; 46 | std::chrono::steady_clock::time_point lastFrameLimitFPS=std::chrono::steady_clock::now(); 47 | std::chrono::steady_clock::time_point lastTimeOnNewNALUCalled=std::chrono::steady_clock::now(); 48 | 49 | RTPDecoder mDecodeRTP; 50 | 51 | int maxFPS=0; 52 | bool IS_H265=false; 53 | //First time a NALU was succesfully decoded 54 | //std::chrono::steady_clock::time_point timeFirstNALUArrived=std::chrono::steady_clock::time_point(0); 55 | }; 56 | 57 | #endif //FPV_VR_PARSE2H264RAW_H 58 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/time_util.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by gaeta on 2024-06-20. 3 | // 4 | 5 | #ifndef FPVUE_TIME_UTIL_H 6 | #define FPVUE_TIME_UTIL_H 7 | 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | /** 14 | * @return milliseconds 15 | */ 16 | uint64_t get_time_ms() { 17 | struct timespec spec; 18 | if (clock_gettime(1, &spec) == -1) { /* 1 is CLOCK_MONOTONIC */ 19 | abort(); 20 | } 21 | return spec.tv_sec * 1000 + spec.tv_nsec / 1e6; 22 | } 23 | 24 | #endif //FPVUE_TIME_UTIL_H 25 | -------------------------------------------------------------------------------- /app/videonative/src/main/java/com/geehe/videonative/DecodingInfo.java: -------------------------------------------------------------------------------- 1 | package com.geehe.videonative; 2 | 3 | 4 | import java.util.LinkedHashMap; 5 | import java.util.Map; 6 | 7 | @SuppressWarnings("WeakerAccess") 8 | public class DecodingInfo { 9 | public final float currentFPS; 10 | public final float currentKiloBitsPerSecond; 11 | public final float avgParsingTime_ms; 12 | public final float avgWaitForInputBTime_ms; 13 | public final float avgHWDecodingTime_ms; //time the hw decoder was holding on to frames. Not the full decoding time ! 14 | public final float avgTotalDecodingTime_ms; 15 | public final int nNALU; 16 | public final int nNALUSFeeded; 17 | public final int nDecodedFrames; 18 | 19 | public DecodingInfo(){ 20 | currentFPS=0; 21 | currentKiloBitsPerSecond=0; 22 | avgParsingTime_ms=0; 23 | avgWaitForInputBTime_ms=0; 24 | avgHWDecodingTime_ms=0; 25 | nNALU=0; 26 | nNALUSFeeded=0; 27 | avgTotalDecodingTime_ms =0; 28 | nDecodedFrames=0; 29 | } 30 | 31 | public DecodingInfo(float currentFPS, float currentKiloBitsPerSecond,float avgParsingTime_ms,float avgWaitForInputBTime_ms,float avgHWDecodingTime_ms, 32 | int nNALU,int nNALUSFeeded,int nDecodedFrames){ 33 | this.currentFPS=currentFPS; 34 | this.currentKiloBitsPerSecond=currentKiloBitsPerSecond; 35 | this.avgParsingTime_ms=avgParsingTime_ms; 36 | this.avgWaitForInputBTime_ms=avgWaitForInputBTime_ms; 37 | this.avgHWDecodingTime_ms =avgHWDecodingTime_ms; 38 | this.avgTotalDecodingTime_ms =avgParsingTime_ms+avgWaitForInputBTime_ms+avgHWDecodingTime_ms; 39 | this.nNALU=nNALU; 40 | this.nNALUSFeeded=nNALUSFeeded; 41 | this.nDecodedFrames=nDecodedFrames; 42 | } 43 | 44 | public LinkedHashMap toMap(){ 45 | LinkedHashMap decodingInfo = new LinkedHashMap<>(); 46 | decodingInfo.put("avgTotalDecodingTime_ms", avgTotalDecodingTime_ms); 47 | decodingInfo.put("avgParsingTime_ms",avgParsingTime_ms); 48 | decodingInfo.put("avgWaitForInputBTime_ms",avgWaitForInputBTime_ms); 49 | decodingInfo.put("avgHWDecodingTime_ms", avgHWDecodingTime_ms); 50 | decodingInfo.put("currentFPS",currentFPS); 51 | decodingInfo.put("currentKiloBitsPerSecond",currentKiloBitsPerSecond); 52 | decodingInfo.put("nNALU",nNALU); 53 | decodingInfo.put("nNALUSFeeded",nNALUSFeeded); 54 | decodingInfo.put("nDecodedFrames",nDecodedFrames); 55 | return decodingInfo; 56 | } 57 | 58 | public String toString(final boolean newline){ 59 | final StringBuilder builder=new StringBuilder(); 60 | builder.append( "Decoding info:\n"); 61 | final Map map=toMap(); 62 | for(final String key:map.keySet()){ 63 | //Either float or int, toString available 64 | final Object value=map.get(key); 65 | builder.append(key).append(":").append(value); 66 | if(newline)builder.append("\n"); 67 | } 68 | return builder.toString(); 69 | } 70 | 71 | @Override 72 | public String toString() { 73 | return toString(false); 74 | } 75 | } -------------------------------------------------------------------------------- /app/videonative/src/main/java/com/geehe/videonative/ISurfaceTextureAvailable.java: -------------------------------------------------------------------------------- 1 | package com.geehe.videonative; 2 | 3 | import android.graphics.SurfaceTexture; 4 | import android.view.Surface; 5 | 6 | public interface ISurfaceTextureAvailable{ 7 | // Called when the SurfaceTexture (and Surface) was created on the OpenGL Thread 8 | // However, the callback is run on the UI Thread to ease synchronization 9 | void surfaceTextureCreated(final SurfaceTexture surfaceTexture, final Surface surface); 10 | // Called when the SurfaceTexture (and Surface) are about to be deleted. After this call 11 | // returns, both SurfaceTexture and Surface are invalid and must not be used anymore 12 | void surfaceTextureDestroyed(); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /app/videonative/src/main/java/com/geehe/videonative/IVideoParamsChanged.java: -------------------------------------------------------------------------------- 1 | package com.geehe.videonative; 2 | 3 | // Also called by native code 4 | public interface IVideoParamsChanged{ 5 | void onVideoRatioChanged(int videoW, int videoH); 6 | void onDecodingInfoChanged(final DecodingInfo decodingInfo); 7 | } -------------------------------------------------------------------------------- /app/wfbngrtl8812/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/wfbngrtl8812/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidLibrary) 3 | } 4 | 5 | android { 6 | namespace = "com.geehe.wfbngrtl8812" 7 | compileSdk = 34 8 | 9 | defaultConfig { 10 | minSdk = 26 11 | 12 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 13 | consumerProguardFiles("consumer-rules.pro") 14 | // externalNativeBuild { 15 | // cmake { 16 | // cppFlags("-std=c++20") // or whichever version you prefer 17 | // } 18 | // } 19 | // // Set APP_STL to c++_static 20 | // externalNativeBuild { 21 | // cmake { 22 | // arguments("-DANDROID_STL=c++_static") 23 | // } 24 | // } 25 | } 26 | 27 | buildTypes { 28 | release { 29 | isMinifyEnabled = false 30 | proguardFiles( 31 | getDefaultProguardFile("proguard-android-optimize.txt"), 32 | "proguard-rules.pro" 33 | ) 34 | ndk { 35 | abiFilters.add("arm64-v8a") 36 | abiFilters.add("armeabi-v7a") 37 | } 38 | } 39 | debug{ 40 | ndk { 41 | abiFilters.add("arm64-v8a") 42 | abiFilters.add("armeabi-v7a") 43 | } 44 | } 45 | } 46 | externalNativeBuild { 47 | cmake { 48 | path("src/main/cpp/CMakeLists.txt") 49 | version = "3.22.1" 50 | } 51 | } 52 | compileOptions { 53 | sourceCompatibility = JavaVersion.VERSION_1_8 54 | targetCompatibility = JavaVersion.VERSION_1_8 55 | } 56 | } 57 | 58 | dependencies { 59 | 60 | implementation(libs.appcompat) 61 | implementation(libs.material) 62 | testImplementation(libs.junit) 63 | androidTestImplementation(libs.ext.junit) 64 | androidTestImplementation(libs.espresso.core) 65 | } -------------------------------------------------------------------------------- /app/wfbngrtl8812/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/consumer-rules.pro -------------------------------------------------------------------------------- /app/wfbngrtl8812/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 3.22.1) 3 | 4 | project("WfbngRtl8812") 5 | 6 | include_directories(include) 7 | 8 | add_library(wfb-ng STATIC 9 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/fec.c 10 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/fec.h 11 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/ieee80211_radiotap.h 12 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/radiotap.c 13 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/rx.cpp 14 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/rx.hpp 15 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/wifibroadcast.hpp 16 | ${CMAKE_SOURCE_DIR}/wfb-ng/src/wifibroadcast.cpp) 17 | set_target_properties(wfb-ng PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/wfb-ng) 18 | target_include_directories(wfb-ng PUBLIC ${CMAKE_SOURCE_DIR}/wfb-ng) 19 | target_compile_definitions(wfb-ng PRIVATE __WFB_RX_SHARED_LIBRARY__) 20 | 21 | add_library(devourer STATIC 22 | ${CMAKE_SOURCE_DIR}/devourer/hal/Hal8812PhyReg.h 23 | ${CMAKE_SOURCE_DIR}/devourer/hal/Hal8812PwrSeq.c 24 | ${CMAKE_SOURCE_DIR}/devourer/hal/Hal8812PwrSeq.h 25 | ${CMAKE_SOURCE_DIR}/devourer/hal/basic_types.h 26 | ${CMAKE_SOURCE_DIR}/devourer/hal/hal8812a_fw.c 27 | ${CMAKE_SOURCE_DIR}/devourer/hal/hal8812a_fw.h 28 | ${CMAKE_SOURCE_DIR}/devourer/hal/hal_com_reg.h 29 | ${CMAKE_SOURCE_DIR}/devourer/hal/rtl8812a_hal.h 30 | ${CMAKE_SOURCE_DIR}/devourer/hal/rtl8812a_recv.h 31 | ${CMAKE_SOURCE_DIR}/devourer/hal/rtl8812a_spec.h 32 | 33 | ${CMAKE_SOURCE_DIR}/devourer/src/EepromManager.cpp 34 | ${CMAKE_SOURCE_DIR}/devourer/src/EepromManager.h 35 | ${CMAKE_SOURCE_DIR}/devourer/src/Firmware.h 36 | ${CMAKE_SOURCE_DIR}/devourer/src/FirmwareManager.cpp 37 | ${CMAKE_SOURCE_DIR}/devourer/src/FirmwareManager.h 38 | ${CMAKE_SOURCE_DIR}/devourer/src/FrameParser.cpp 39 | ${CMAKE_SOURCE_DIR}/devourer/src/FrameParser.h 40 | ${CMAKE_SOURCE_DIR}/devourer/src/HalModule.cpp 41 | ${CMAKE_SOURCE_DIR}/devourer/src/HalModule.h 42 | ${CMAKE_SOURCE_DIR}/devourer/src/ParsedRadioPacket.cpp 43 | ${CMAKE_SOURCE_DIR}/devourer/src/RadioManagementModule.cpp 44 | ${CMAKE_SOURCE_DIR}/devourer/src/RadioManagementModule.h 45 | ${CMAKE_SOURCE_DIR}/devourer/src/Rtl8812aDevice.cpp 46 | ${CMAKE_SOURCE_DIR}/devourer/src/Rtl8812aDevice.h 47 | ${CMAKE_SOURCE_DIR}/devourer/src/RtlUsbAdapter.cpp 48 | ${CMAKE_SOURCE_DIR}/devourer/src/RtlUsbAdapter.h 49 | ${CMAKE_SOURCE_DIR}/devourer/src/SelectedChannel.h 50 | ${CMAKE_SOURCE_DIR}/devourer/src/WiFiDriver.cpp 51 | ${CMAKE_SOURCE_DIR}/devourer/src/WiFiDriver.h 52 | ${CMAKE_SOURCE_DIR}/devourer/src/registry_priv.h) 53 | set_target_properties(devourer PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/devourer) 54 | target_include_directories(devourer PUBLIC ${CMAKE_SOURCE_DIR}/devourer) 55 | target_include_directories(devourer PUBLIC ${CMAKE_SOURCE_DIR}/devourer/hal) 56 | set_property(TARGET devourer PROPERTY CXX_STANDARD 20) 57 | 58 | # WFB-NG RTL8812 library 59 | add_library(${CMAKE_PROJECT_NAME} SHARED 60 | RxFrame.h 61 | RxFrame.cpp 62 | WfbngLink.cpp) 63 | 64 | target_link_libraries(${CMAKE_PROJECT_NAME} 65 | devourer 66 | wfb-ng 67 | android 68 | log 69 | ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libusb1.0.so 70 | ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libsodium.so 71 | ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libpcap.a ) 72 | 73 | set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 20) 74 | target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -fno-omit-frame-pointer) -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/RxFrame.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by gaeta on 2024-03-31. 3 | // 4 | 5 | #include "RxFrame.h" 6 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/WfbngLink.hpp: -------------------------------------------------------------------------------- 1 | #ifndef FPV_VR_WFBNG_LINK_H 2 | #define FPV_VR_WFBNG_LINK_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "wfb-ng/src/rx.hpp" 8 | #include "devourer/src/WiFiDriver.h" 9 | 10 | class WfbngLink{ 11 | public: 12 | WfbngLink(JNIEnv * env, jobject context); 13 | int run(JNIEnv *env,jobject androidContext, jint wifiChannel, jint fd); 14 | void initAgg(); 15 | void stop(JNIEnv *env,jobject androidContext, jint fd); 16 | 17 | std::mutex agg_mutex; 18 | std::unique_ptr video_aggregator; 19 | std::unique_ptr mavlink_aggregator; 20 | 21 | private: 22 | const char *keyPath = "/data/user/0/com.geehe.fpvue/files/gs.key"; 23 | std::unique_ptr wifi_driver; 24 | uint32_t video_channel_id_be; 25 | uint32_t mavlink_channel_id_be; 26 | std::map> rtl_devices; 27 | 28 | }; 29 | 30 | #endif //FPV_VR_WFBNG_LINK_H 31 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/pcap/bluetooth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Paolo Abeni (Italy) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote 15 | * products derived from this software without specific prior written 16 | * permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * bluetooth data struct 31 | * By Paolo Abeni 32 | */ 33 | 34 | #ifndef lib_pcap_bluetooth_h 35 | #define lib_pcap_bluetooth_h 36 | 37 | #include 38 | 39 | /* 40 | * Header prepended libpcap to each bluetooth h4 frame, 41 | * fields are in network byte order 42 | */ 43 | typedef struct _pcap_bluetooth_h4_header { 44 | uint32_t direction; /* if first bit is set direction is incoming */ 45 | } pcap_bluetooth_h4_header; 46 | 47 | /* 48 | * Header prepended libpcap to each bluetooth linux monitor frame, 49 | * fields are in network byte order 50 | */ 51 | typedef struct _pcap_bluetooth_linux_monitor_header { 52 | uint16_t adapter_id; 53 | uint16_t opcode; 54 | } pcap_bluetooth_linux_monitor_header; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/pcap/ipnet.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * This code is derived from the Stanford/CMU enet packet filter, 6 | * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 | * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 | * Berkeley Laboratory. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 3. All advertising materials mentioning features or use of this software 19 | * must display the following acknowledgement: 20 | * This product includes software developed by the University of 21 | * California, Berkeley and its contributors. 22 | * 4. Neither the name of the University nor the names of its contributors 23 | * may be used to endorse or promote products derived from this software 24 | * without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 | * SUCH DAMAGE. 37 | */ 38 | 39 | #define IPH_AF_INET 2 /* Matches Solaris's AF_INET */ 40 | #define IPH_AF_INET6 26 /* Matches Solaris's AF_INET6 */ 41 | 42 | #define IPNET_OUTBOUND 1 43 | #define IPNET_INBOUND 2 44 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/pcap/vlan.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by the University of 16 | * California, Berkeley and its contributors. 17 | * 4. Neither the name of the University nor the names of its contributors 18 | * may be used to endorse or promote products derived from this software 19 | * without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | */ 33 | 34 | #ifndef lib_pcap_vlan_h 35 | #define lib_pcap_vlan_h 36 | 37 | #include 38 | 39 | struct vlan_tag { 40 | uint16_t vlan_tpid; /* ETH_P_8021Q */ 41 | uint16_t vlan_tci; /* VLAN TCI */ 42 | }; 43 | 44 | #define VLAN_TAG_LEN 4 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_H 3 | #define sodium_H 4 | 5 | #include "sodium/version.h" 6 | 7 | #include "sodium/core.h" 8 | #include "sodium/crypto_aead_aegis128l.h" 9 | #include "sodium/crypto_aead_aegis256.h" 10 | #include "sodium/crypto_aead_aes256gcm.h" 11 | #include "sodium/crypto_aead_chacha20poly1305.h" 12 | #include "sodium/crypto_aead_xchacha20poly1305.h" 13 | #include "sodium/crypto_auth.h" 14 | #include "sodium/crypto_auth_hmacsha256.h" 15 | #include "sodium/crypto_auth_hmacsha512.h" 16 | #include "sodium/crypto_auth_hmacsha512256.h" 17 | #include "sodium/crypto_box.h" 18 | #include "sodium/crypto_box_curve25519xsalsa20poly1305.h" 19 | #include "sodium/crypto_core_hchacha20.h" 20 | #include "sodium/crypto_core_hsalsa20.h" 21 | #include "sodium/crypto_core_salsa20.h" 22 | #include "sodium/crypto_core_salsa2012.h" 23 | #include "sodium/crypto_core_salsa208.h" 24 | #include "sodium/crypto_generichash.h" 25 | #include "sodium/crypto_generichash_blake2b.h" 26 | #include "sodium/crypto_hash.h" 27 | #include "sodium/crypto_hash_sha256.h" 28 | #include "sodium/crypto_hash_sha512.h" 29 | #include "sodium/crypto_kdf.h" 30 | #include "sodium/crypto_kdf_hkdf_sha256.h" 31 | #include "sodium/crypto_kdf_hkdf_sha512.h" 32 | #include "sodium/crypto_kdf_blake2b.h" 33 | #include "sodium/crypto_kdf_hkdf_sha256.h" 34 | #include "sodium/crypto_kdf_hkdf_sha512.h" 35 | #include "sodium/crypto_kx.h" 36 | #include "sodium/crypto_onetimeauth.h" 37 | #include "sodium/crypto_onetimeauth_poly1305.h" 38 | #include "sodium/crypto_pwhash.h" 39 | #include "sodium/crypto_pwhash_argon2i.h" 40 | #include "sodium/crypto_scalarmult.h" 41 | #include "sodium/crypto_scalarmult_curve25519.h" 42 | #include "sodium/crypto_secretbox.h" 43 | #include "sodium/crypto_secretbox_xsalsa20poly1305.h" 44 | #include "sodium/crypto_secretstream_xchacha20poly1305.h" 45 | #include "sodium/crypto_shorthash.h" 46 | #include "sodium/crypto_shorthash_siphash24.h" 47 | #include "sodium/crypto_sign.h" 48 | #include "sodium/crypto_sign_ed25519.h" 49 | #include "sodium/crypto_stream.h" 50 | #include "sodium/crypto_stream_chacha20.h" 51 | #include "sodium/crypto_stream_salsa20.h" 52 | #include "sodium/crypto_stream_xsalsa20.h" 53 | #include "sodium/crypto_verify_16.h" 54 | #include "sodium/crypto_verify_32.h" 55 | #include "sodium/crypto_verify_64.h" 56 | #include "sodium/randombytes.h" 57 | #include "sodium/randombytes_internal_random.h" 58 | #include "sodium/randombytes_sysrandom.h" 59 | #include "sodium/runtime.h" 60 | #include "sodium/utils.h" 61 | 62 | #ifndef SODIUM_LIBRARY_MINIMAL 63 | #include "sodium/crypto_box_curve25519xchacha20poly1305.h" 64 | #include "sodium/crypto_core_ed25519.h" 65 | #include "sodium/crypto_core_ristretto255.h" 66 | #include "sodium/crypto_pwhash_scryptsalsa208sha256.h" 67 | #include "sodium/crypto_scalarmult_ed25519.h" 68 | #include "sodium/crypto_scalarmult_ristretto255.h" 69 | #include "sodium/crypto_secretbox_xchacha20poly1305.h" 70 | #include "sodium/crypto_stream_salsa2012.h" 71 | #include "sodium/crypto_stream_salsa208.h" 72 | #include "sodium/crypto_stream_xchacha20.h" 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/core.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_core_H 3 | #define sodium_core_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT 12 | int sodium_init(void) 13 | __attribute__ ((warn_unused_result)); 14 | 15 | /* ---- */ 16 | 17 | SODIUM_EXPORT 18 | int sodium_set_misuse_handler(void (*handler)(void)); 19 | 20 | SODIUM_EXPORT 21 | void sodium_misuse(void) 22 | __attribute__ ((noreturn)); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_H 2 | #define crypto_auth_H 3 | 4 | #include 5 | 6 | #include "crypto_auth_hmacsha512256.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_auth_bytes(void); 19 | 20 | #define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_auth_keybytes(void); 23 | 24 | #define crypto_auth_PRIMITIVE "hmacsha512256" 25 | SODIUM_EXPORT 26 | const char *crypto_auth_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_auth(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k) 31 | __attribute__ ((nonnull(1, 4))); 32 | 33 | SODIUM_EXPORT 34 | int crypto_auth_verify(const unsigned char *h, const unsigned char *in, 35 | unsigned long long inlen, const unsigned char *k) 36 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 37 | 38 | SODIUM_EXPORT 39 | void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES]) 40 | __attribute__ ((nonnull)); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth_hmacsha256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_hmacsha256_H 2 | #define crypto_auth_hmacsha256_H 3 | 4 | #include 5 | #include "crypto_hash_sha256.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_auth_hmacsha256_BYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_auth_hmacsha256_bytes(void); 18 | 19 | #define crypto_auth_hmacsha256_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_auth_hmacsha256_keybytes(void); 22 | 23 | SODIUM_EXPORT 24 | int crypto_auth_hmacsha256(unsigned char *out, 25 | const unsigned char *in, 26 | unsigned long long inlen, 27 | const unsigned char *k) __attribute__ ((nonnull(1, 4))); 28 | 29 | SODIUM_EXPORT 30 | int crypto_auth_hmacsha256_verify(const unsigned char *h, 31 | const unsigned char *in, 32 | unsigned long long inlen, 33 | const unsigned char *k) 34 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 35 | 36 | /* ------------------------------------------------------------------------- */ 37 | 38 | typedef struct crypto_auth_hmacsha256_state { 39 | crypto_hash_sha256_state ictx; 40 | crypto_hash_sha256_state octx; 41 | } crypto_auth_hmacsha256_state; 42 | 43 | SODIUM_EXPORT 44 | size_t crypto_auth_hmacsha256_statebytes(void); 45 | 46 | SODIUM_EXPORT 47 | int crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state, 48 | const unsigned char *key, 49 | size_t keylen) __attribute__ ((nonnull)); 50 | 51 | SODIUM_EXPORT 52 | int crypto_auth_hmacsha256_update(crypto_auth_hmacsha256_state *state, 53 | const unsigned char *in, 54 | unsigned long long inlen) 55 | __attribute__ ((nonnull(1))); 56 | 57 | SODIUM_EXPORT 58 | int crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *state, 59 | unsigned char *out) __attribute__ ((nonnull)); 60 | 61 | 62 | SODIUM_EXPORT 63 | void crypto_auth_hmacsha256_keygen(unsigned char k[crypto_auth_hmacsha256_KEYBYTES]) 64 | __attribute__ ((nonnull)); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth_hmacsha512.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_hmacsha512_H 2 | #define crypto_auth_hmacsha512_H 3 | 4 | #include 5 | #include "crypto_hash_sha512.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_auth_hmacsha512_BYTES 64U 16 | SODIUM_EXPORT 17 | size_t crypto_auth_hmacsha512_bytes(void); 18 | 19 | #define crypto_auth_hmacsha512_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_auth_hmacsha512_keybytes(void); 22 | 23 | SODIUM_EXPORT 24 | int crypto_auth_hmacsha512(unsigned char *out, 25 | const unsigned char *in, 26 | unsigned long long inlen, 27 | const unsigned char *k) __attribute__ ((nonnull(1, 4))); 28 | 29 | SODIUM_EXPORT 30 | int crypto_auth_hmacsha512_verify(const unsigned char *h, 31 | const unsigned char *in, 32 | unsigned long long inlen, 33 | const unsigned char *k) 34 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 35 | 36 | /* ------------------------------------------------------------------------- */ 37 | 38 | typedef struct crypto_auth_hmacsha512_state { 39 | crypto_hash_sha512_state ictx; 40 | crypto_hash_sha512_state octx; 41 | } crypto_auth_hmacsha512_state; 42 | 43 | SODIUM_EXPORT 44 | size_t crypto_auth_hmacsha512_statebytes(void); 45 | 46 | SODIUM_EXPORT 47 | int crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *state, 48 | const unsigned char *key, 49 | size_t keylen) __attribute__ ((nonnull)); 50 | 51 | SODIUM_EXPORT 52 | int crypto_auth_hmacsha512_update(crypto_auth_hmacsha512_state *state, 53 | const unsigned char *in, 54 | unsigned long long inlen) __attribute__ ((nonnull(1))); 55 | 56 | SODIUM_EXPORT 57 | int crypto_auth_hmacsha512_final(crypto_auth_hmacsha512_state *state, 58 | unsigned char *out) __attribute__ ((nonnull)); 59 | 60 | SODIUM_EXPORT 61 | void crypto_auth_hmacsha512_keygen(unsigned char k[crypto_auth_hmacsha512_KEYBYTES]) 62 | __attribute__ ((nonnull)); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth_hmacsha512256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_hmacsha512256_H 2 | #define crypto_auth_hmacsha512256_H 3 | 4 | #include 5 | #include "crypto_auth_hmacsha512.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_auth_hmacsha512256_BYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_auth_hmacsha512256_bytes(void); 18 | 19 | #define crypto_auth_hmacsha512256_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_auth_hmacsha512256_keybytes(void); 22 | 23 | SODIUM_EXPORT 24 | int crypto_auth_hmacsha512256(unsigned char *out, 25 | const unsigned char *in, 26 | unsigned long long inlen, 27 | const unsigned char *k) __attribute__ ((nonnull(1, 4))); 28 | 29 | SODIUM_EXPORT 30 | int crypto_auth_hmacsha512256_verify(const unsigned char *h, 31 | const unsigned char *in, 32 | unsigned long long inlen, 33 | const unsigned char *k) 34 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 35 | 36 | /* ------------------------------------------------------------------------- */ 37 | 38 | typedef crypto_auth_hmacsha512_state crypto_auth_hmacsha512256_state; 39 | 40 | SODIUM_EXPORT 41 | size_t crypto_auth_hmacsha512256_statebytes(void); 42 | 43 | SODIUM_EXPORT 44 | int crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *state, 45 | const unsigned char *key, 46 | size_t keylen) __attribute__ ((nonnull)); 47 | 48 | SODIUM_EXPORT 49 | int crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *state, 50 | const unsigned char *in, 51 | unsigned long long inlen) __attribute__ ((nonnull(1))); 52 | 53 | SODIUM_EXPORT 54 | int crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *state, 55 | unsigned char *out) __attribute__ ((nonnull)); 56 | 57 | SODIUM_EXPORT 58 | void crypto_auth_hmacsha512256_keygen(unsigned char k[crypto_auth_hmacsha512256_KEYBYTES]) 59 | __attribute__ ((nonnull)); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_ed25519.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_ed25519_H 2 | #define crypto_core_ed25519_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_ed25519_BYTES 32 12 | SODIUM_EXPORT 13 | size_t crypto_core_ed25519_bytes(void); 14 | 15 | #define crypto_core_ed25519_UNIFORMBYTES 32 16 | SODIUM_EXPORT 17 | size_t crypto_core_ed25519_uniformbytes(void); 18 | 19 | #define crypto_core_ed25519_HASHBYTES 64 20 | SODIUM_EXPORT 21 | size_t crypto_core_ed25519_hashbytes(void); 22 | 23 | #define crypto_core_ed25519_SCALARBYTES 32 24 | SODIUM_EXPORT 25 | size_t crypto_core_ed25519_scalarbytes(void); 26 | 27 | #define crypto_core_ed25519_NONREDUCEDSCALARBYTES 64 28 | SODIUM_EXPORT 29 | size_t crypto_core_ed25519_nonreducedscalarbytes(void); 30 | 31 | SODIUM_EXPORT 32 | int crypto_core_ed25519_is_valid_point(const unsigned char *p) 33 | __attribute__ ((nonnull)); 34 | 35 | SODIUM_EXPORT 36 | int crypto_core_ed25519_add(unsigned char *r, 37 | const unsigned char *p, const unsigned char *q) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_core_ed25519_sub(unsigned char *r, 42 | const unsigned char *p, const unsigned char *q) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_core_ed25519_from_uniform(unsigned char *p, const unsigned char *r) 47 | __attribute__ ((nonnull)); 48 | 49 | SODIUM_EXPORT 50 | int crypto_core_ed25519_from_hash(unsigned char *p, const unsigned char *h) 51 | __attribute__ ((nonnull)) __attribute__ ((deprecated)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_core_ed25519_random(unsigned char *p) 55 | __attribute__ ((nonnull)); 56 | 57 | SODIUM_EXPORT 58 | void crypto_core_ed25519_scalar_random(unsigned char *r) 59 | __attribute__ ((nonnull)); 60 | 61 | SODIUM_EXPORT 62 | int crypto_core_ed25519_scalar_invert(unsigned char *recip, const unsigned char *s) 63 | __attribute__ ((nonnull)); 64 | 65 | SODIUM_EXPORT 66 | void crypto_core_ed25519_scalar_negate(unsigned char *neg, const unsigned char *s) 67 | __attribute__ ((nonnull)); 68 | 69 | SODIUM_EXPORT 70 | void crypto_core_ed25519_scalar_complement(unsigned char *comp, const unsigned char *s) 71 | __attribute__ ((nonnull)); 72 | 73 | SODIUM_EXPORT 74 | void crypto_core_ed25519_scalar_add(unsigned char *z, const unsigned char *x, 75 | const unsigned char *y) 76 | __attribute__ ((nonnull)); 77 | 78 | SODIUM_EXPORT 79 | void crypto_core_ed25519_scalar_sub(unsigned char *z, const unsigned char *x, 80 | const unsigned char *y) 81 | __attribute__ ((nonnull)); 82 | 83 | SODIUM_EXPORT 84 | void crypto_core_ed25519_scalar_mul(unsigned char *z, const unsigned char *x, 85 | const unsigned char *y) 86 | __attribute__ ((nonnull)); 87 | 88 | /* 89 | * The interval `s` is sampled from should be at least 317 bits to ensure almost 90 | * uniformity of `r` over `L`. 91 | */ 92 | SODIUM_EXPORT 93 | void crypto_core_ed25519_scalar_reduce(unsigned char *r, const unsigned char *s) 94 | __attribute__ ((nonnull)); 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_hchacha20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hchacha20_H 2 | #define crypto_core_hchacha20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hchacha20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hchacha20_outputbytes(void); 14 | 15 | #define crypto_core_hchacha20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hchacha20_inputbytes(void); 18 | 19 | #define crypto_core_hchacha20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hchacha20_keybytes(void); 22 | 23 | #define crypto_core_hchacha20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hchacha20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hchacha20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_hsalsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hsalsa20_H 2 | #define crypto_core_hsalsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hsalsa20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hsalsa20_outputbytes(void); 14 | 15 | #define crypto_core_hsalsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hsalsa20_inputbytes(void); 18 | 19 | #define crypto_core_hsalsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hsalsa20_keybytes(void); 22 | 23 | #define crypto_core_hsalsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hsalsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hsalsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_ristretto255.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_ristretto255_H 2 | #define crypto_core_ristretto255_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_ristretto255_BYTES 32 12 | SODIUM_EXPORT 13 | size_t crypto_core_ristretto255_bytes(void); 14 | 15 | #define crypto_core_ristretto255_HASHBYTES 64 16 | SODIUM_EXPORT 17 | size_t crypto_core_ristretto255_hashbytes(void); 18 | 19 | #define crypto_core_ristretto255_SCALARBYTES 32 20 | SODIUM_EXPORT 21 | size_t crypto_core_ristretto255_scalarbytes(void); 22 | 23 | #define crypto_core_ristretto255_NONREDUCEDSCALARBYTES 64 24 | SODIUM_EXPORT 25 | size_t crypto_core_ristretto255_nonreducedscalarbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_ristretto255_is_valid_point(const unsigned char *p) 29 | __attribute__ ((nonnull)); 30 | 31 | SODIUM_EXPORT 32 | int crypto_core_ristretto255_add(unsigned char *r, 33 | const unsigned char *p, const unsigned char *q) 34 | __attribute__ ((nonnull)); 35 | 36 | SODIUM_EXPORT 37 | int crypto_core_ristretto255_sub(unsigned char *r, 38 | const unsigned char *p, const unsigned char *q) 39 | __attribute__ ((nonnull)); 40 | 41 | SODIUM_EXPORT 42 | int crypto_core_ristretto255_from_hash(unsigned char *p, 43 | const unsigned char *r) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | void crypto_core_ristretto255_random(unsigned char *p) 48 | __attribute__ ((nonnull)); 49 | 50 | SODIUM_EXPORT 51 | void crypto_core_ristretto255_scalar_random(unsigned char *r) 52 | __attribute__ ((nonnull)); 53 | 54 | SODIUM_EXPORT 55 | int crypto_core_ristretto255_scalar_invert(unsigned char *recip, 56 | const unsigned char *s) 57 | __attribute__ ((nonnull)); 58 | 59 | SODIUM_EXPORT 60 | void crypto_core_ristretto255_scalar_negate(unsigned char *neg, 61 | const unsigned char *s) 62 | __attribute__ ((nonnull)); 63 | 64 | SODIUM_EXPORT 65 | void crypto_core_ristretto255_scalar_complement(unsigned char *comp, 66 | const unsigned char *s) 67 | __attribute__ ((nonnull)); 68 | 69 | SODIUM_EXPORT 70 | void crypto_core_ristretto255_scalar_add(unsigned char *z, 71 | const unsigned char *x, 72 | const unsigned char *y) 73 | __attribute__ ((nonnull)); 74 | 75 | SODIUM_EXPORT 76 | void crypto_core_ristretto255_scalar_sub(unsigned char *z, 77 | const unsigned char *x, 78 | const unsigned char *y) 79 | __attribute__ ((nonnull)); 80 | 81 | SODIUM_EXPORT 82 | void crypto_core_ristretto255_scalar_mul(unsigned char *z, 83 | const unsigned char *x, 84 | const unsigned char *y) 85 | __attribute__ ((nonnull)); 86 | 87 | /* 88 | * The interval `s` is sampled from should be at least 317 bits to ensure almost 89 | * uniformity of `r` over `L`. 90 | */ 91 | SODIUM_EXPORT 92 | void crypto_core_ristretto255_scalar_reduce(unsigned char *r, 93 | const unsigned char *s) 94 | __attribute__ ((nonnull)); 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_salsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa20_H 2 | #define crypto_core_salsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa20_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa20_outputbytes(void); 14 | 15 | #define crypto_core_salsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa20_inputbytes(void); 18 | 19 | #define crypto_core_salsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa20_keybytes(void); 22 | 23 | #define crypto_core_salsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa2012_H 2 | #define crypto_core_salsa2012_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa2012_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa2012_outputbytes(void); 14 | 15 | #define crypto_core_salsa2012_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa2012_inputbytes(void); 18 | 19 | #define crypto_core_salsa2012_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa2012_keybytes(void); 22 | 23 | #define crypto_core_salsa2012_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa2012_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa2012(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa208_H 2 | #define crypto_core_salsa208_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa208_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa208_outputbytes(void) 14 | __attribute__ ((deprecated)); 15 | 16 | #define crypto_core_salsa208_INPUTBYTES 16U 17 | SODIUM_EXPORT 18 | size_t crypto_core_salsa208_inputbytes(void) 19 | __attribute__ ((deprecated)); 20 | 21 | #define crypto_core_salsa208_KEYBYTES 32U 22 | SODIUM_EXPORT 23 | size_t crypto_core_salsa208_keybytes(void) 24 | __attribute__ ((deprecated)); 25 | 26 | #define crypto_core_salsa208_CONSTBYTES 16U 27 | SODIUM_EXPORT 28 | size_t crypto_core_salsa208_constbytes(void) 29 | __attribute__ ((deprecated)); 30 | 31 | SODIUM_EXPORT 32 | int crypto_core_salsa208(unsigned char *out, const unsigned char *in, 33 | const unsigned char *k, const unsigned char *c) 34 | __attribute__ ((nonnull(1, 2, 3))); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_generichash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_generichash_H 2 | #define crypto_generichash_H 3 | 4 | #include 5 | 6 | #include "crypto_generichash_blake2b.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_generichash_BYTES_MIN crypto_generichash_blake2b_BYTES_MIN 17 | SODIUM_EXPORT 18 | size_t crypto_generichash_bytes_min(void); 19 | 20 | #define crypto_generichash_BYTES_MAX crypto_generichash_blake2b_BYTES_MAX 21 | SODIUM_EXPORT 22 | size_t crypto_generichash_bytes_max(void); 23 | 24 | #define crypto_generichash_BYTES crypto_generichash_blake2b_BYTES 25 | SODIUM_EXPORT 26 | size_t crypto_generichash_bytes(void); 27 | 28 | #define crypto_generichash_KEYBYTES_MIN crypto_generichash_blake2b_KEYBYTES_MIN 29 | SODIUM_EXPORT 30 | size_t crypto_generichash_keybytes_min(void); 31 | 32 | #define crypto_generichash_KEYBYTES_MAX crypto_generichash_blake2b_KEYBYTES_MAX 33 | SODIUM_EXPORT 34 | size_t crypto_generichash_keybytes_max(void); 35 | 36 | #define crypto_generichash_KEYBYTES crypto_generichash_blake2b_KEYBYTES 37 | SODIUM_EXPORT 38 | size_t crypto_generichash_keybytes(void); 39 | 40 | #define crypto_generichash_PRIMITIVE "blake2b" 41 | SODIUM_EXPORT 42 | const char *crypto_generichash_primitive(void); 43 | 44 | /* 45 | * Important when writing bindings for other programming languages: 46 | * the state address should be 64-bytes aligned. 47 | */ 48 | typedef crypto_generichash_blake2b_state crypto_generichash_state; 49 | 50 | SODIUM_EXPORT 51 | size_t crypto_generichash_statebytes(void); 52 | 53 | SODIUM_EXPORT 54 | int crypto_generichash(unsigned char *out, size_t outlen, 55 | const unsigned char *in, unsigned long long inlen, 56 | const unsigned char *key, size_t keylen) 57 | __attribute__ ((nonnull(1))); 58 | 59 | SODIUM_EXPORT 60 | int crypto_generichash_init(crypto_generichash_state *state, 61 | const unsigned char *key, 62 | const size_t keylen, const size_t outlen) 63 | __attribute__ ((nonnull(1))); 64 | 65 | SODIUM_EXPORT 66 | int crypto_generichash_update(crypto_generichash_state *state, 67 | const unsigned char *in, 68 | unsigned long long inlen) 69 | __attribute__ ((nonnull(1))); 70 | 71 | SODIUM_EXPORT 72 | int crypto_generichash_final(crypto_generichash_state *state, 73 | unsigned char *out, const size_t outlen) 74 | __attribute__ ((nonnull)); 75 | 76 | SODIUM_EXPORT 77 | void crypto_generichash_keygen(unsigned char k[crypto_generichash_KEYBYTES]) 78 | __attribute__ ((nonnull)); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_hash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_H 2 | #define crypto_hash_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA512 for interoperability, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA512, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | 13 | #include "crypto_hash_sha512.h" 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_hash_BYTES crypto_hash_sha512_BYTES 24 | SODIUM_EXPORT 25 | size_t crypto_hash_bytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_hash(unsigned char *out, const unsigned char *in, 29 | unsigned long long inlen) __attribute__ ((nonnull(1))); 30 | 31 | #define crypto_hash_PRIMITIVE "sha512" 32 | SODIUM_EXPORT 33 | const char *crypto_hash_primitive(void) 34 | __attribute__ ((warn_unused_result)); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_hash_sha256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_sha256_H 2 | #define crypto_hash_sha256_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA256 for interoperability, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA256, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "export.h" 16 | 17 | #ifdef __cplusplus 18 | # ifdef __GNUC__ 19 | # pragma GCC diagnostic ignored "-Wlong-long" 20 | # endif 21 | extern "C" { 22 | #endif 23 | 24 | typedef struct crypto_hash_sha256_state { 25 | uint32_t state[8]; 26 | uint64_t count; 27 | uint8_t buf[64]; 28 | } crypto_hash_sha256_state; 29 | 30 | SODIUM_EXPORT 31 | size_t crypto_hash_sha256_statebytes(void); 32 | 33 | #define crypto_hash_sha256_BYTES 32U 34 | SODIUM_EXPORT 35 | size_t crypto_hash_sha256_bytes(void); 36 | 37 | SODIUM_EXPORT 38 | int crypto_hash_sha256(unsigned char *out, const unsigned char *in, 39 | unsigned long long inlen) __attribute__ ((nonnull(1))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_hash_sha256_init(crypto_hash_sha256_state *state) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_hash_sha256_update(crypto_hash_sha256_state *state, 47 | const unsigned char *in, 48 | unsigned long long inlen) 49 | __attribute__ ((nonnull(1))); 50 | 51 | SODIUM_EXPORT 52 | int crypto_hash_sha256_final(crypto_hash_sha256_state *state, 53 | unsigned char *out) 54 | __attribute__ ((nonnull)); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_hash_sha512.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_sha512_H 2 | #define crypto_hash_sha512_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA512 for interoperability, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA512, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "export.h" 16 | 17 | #ifdef __cplusplus 18 | # ifdef __GNUC__ 19 | # pragma GCC diagnostic ignored "-Wlong-long" 20 | # endif 21 | extern "C" { 22 | #endif 23 | 24 | typedef struct crypto_hash_sha512_state { 25 | uint64_t state[8]; 26 | uint64_t count[2]; 27 | uint8_t buf[128]; 28 | } crypto_hash_sha512_state; 29 | 30 | SODIUM_EXPORT 31 | size_t crypto_hash_sha512_statebytes(void); 32 | 33 | #define crypto_hash_sha512_BYTES 64U 34 | SODIUM_EXPORT 35 | size_t crypto_hash_sha512_bytes(void); 36 | 37 | SODIUM_EXPORT 38 | int crypto_hash_sha512(unsigned char *out, const unsigned char *in, 39 | unsigned long long inlen) __attribute__ ((nonnull(1))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_hash_sha512_init(crypto_hash_sha512_state *state) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_hash_sha512_update(crypto_hash_sha512_state *state, 47 | const unsigned char *in, 48 | unsigned long long inlen) 49 | __attribute__ ((nonnull(1))); 50 | 51 | SODIUM_EXPORT 52 | int crypto_hash_sha512_final(crypto_hash_sha512_state *state, 53 | unsigned char *out) 54 | __attribute__ ((nonnull)); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_H 2 | #define crypto_kdf_H 3 | 4 | #include 5 | #include 6 | 7 | #include "crypto_kdf_blake2b.h" 8 | #include "export.h" 9 | 10 | #ifdef __cplusplus 11 | # ifdef __GNUC__ 12 | # pragma GCC diagnostic ignored "-Wlong-long" 13 | # endif 14 | extern "C" { 15 | #endif 16 | 17 | #define crypto_kdf_BYTES_MIN crypto_kdf_blake2b_BYTES_MIN 18 | SODIUM_EXPORT 19 | size_t crypto_kdf_bytes_min(void); 20 | 21 | #define crypto_kdf_BYTES_MAX crypto_kdf_blake2b_BYTES_MAX 22 | SODIUM_EXPORT 23 | size_t crypto_kdf_bytes_max(void); 24 | 25 | #define crypto_kdf_CONTEXTBYTES crypto_kdf_blake2b_CONTEXTBYTES 26 | SODIUM_EXPORT 27 | size_t crypto_kdf_contextbytes(void); 28 | 29 | #define crypto_kdf_KEYBYTES crypto_kdf_blake2b_KEYBYTES 30 | SODIUM_EXPORT 31 | size_t crypto_kdf_keybytes(void); 32 | 33 | #define crypto_kdf_PRIMITIVE "blake2b" 34 | SODIUM_EXPORT 35 | const char *crypto_kdf_primitive(void) 36 | __attribute__ ((warn_unused_result)); 37 | 38 | SODIUM_EXPORT 39 | int crypto_kdf_derive_from_key(unsigned char *subkey, size_t subkey_len, 40 | uint64_t subkey_id, 41 | const char ctx[crypto_kdf_CONTEXTBYTES], 42 | const unsigned char key[crypto_kdf_KEYBYTES]) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | void crypto_kdf_keygen(unsigned char k[crypto_kdf_KEYBYTES]) 47 | __attribute__ ((nonnull)); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf_blake2b.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_blake2b_H 2 | #define crypto_kdf_blake2b_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "export.h" 9 | 10 | #ifdef __cplusplus 11 | # ifdef __GNUC__ 12 | # pragma GCC diagnostic ignored "-Wlong-long" 13 | # endif 14 | extern "C" { 15 | #endif 16 | 17 | #define crypto_kdf_blake2b_BYTES_MIN 16 18 | SODIUM_EXPORT 19 | size_t crypto_kdf_blake2b_bytes_min(void); 20 | 21 | #define crypto_kdf_blake2b_BYTES_MAX 64 22 | SODIUM_EXPORT 23 | size_t crypto_kdf_blake2b_bytes_max(void); 24 | 25 | #define crypto_kdf_blake2b_CONTEXTBYTES 8 26 | SODIUM_EXPORT 27 | size_t crypto_kdf_blake2b_contextbytes(void); 28 | 29 | #define crypto_kdf_blake2b_KEYBYTES 32 30 | SODIUM_EXPORT 31 | size_t crypto_kdf_blake2b_keybytes(void); 32 | 33 | SODIUM_EXPORT 34 | int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len, 35 | uint64_t subkey_id, 36 | const char ctx[crypto_kdf_blake2b_CONTEXTBYTES], 37 | const unsigned char key[crypto_kdf_blake2b_KEYBYTES]) 38 | __attribute__ ((nonnull)); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf_hkdf_sha256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_hkdf_sha256_H 2 | #define crypto_kdf_hkdf_sha256_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "crypto_kdf.h" 9 | #include "crypto_auth_hmacsha256.h" 10 | #include "export.h" 11 | 12 | #ifdef __cplusplus 13 | # ifdef __GNUC__ 14 | # pragma GCC diagnostic ignored "-Wlong-long" 15 | # endif 16 | extern "C" { 17 | #endif 18 | 19 | #define crypto_kdf_hkdf_sha256_KEYBYTES crypto_auth_hmacsha256_BYTES 20 | SODIUM_EXPORT 21 | size_t crypto_kdf_hkdf_sha256_keybytes(void); 22 | 23 | #define crypto_kdf_hkdf_sha256_BYTES_MIN 0U 24 | SODIUM_EXPORT 25 | size_t crypto_kdf_hkdf_sha256_bytes_min(void); 26 | 27 | #define crypto_kdf_hkdf_sha256_BYTES_MAX (0xff * crypto_auth_hmacsha256_BYTES) 28 | SODIUM_EXPORT 29 | size_t crypto_kdf_hkdf_sha256_bytes_max(void); 30 | 31 | SODIUM_EXPORT 32 | int crypto_kdf_hkdf_sha256_extract(unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES], 33 | const unsigned char *salt, size_t salt_len, 34 | const unsigned char *ikm, size_t ikm_len) 35 | __attribute__ ((nonnull(4))); 36 | 37 | SODIUM_EXPORT 38 | void crypto_kdf_hkdf_sha256_keygen(unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES]); 39 | 40 | SODIUM_EXPORT 41 | int crypto_kdf_hkdf_sha256_expand(unsigned char *out, size_t out_len, 42 | const char *ctx, size_t ctx_len, 43 | const unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES]) 44 | __attribute__ ((nonnull(1))); 45 | 46 | /* ------------------------------------------------------------------------- */ 47 | 48 | typedef struct crypto_kdf_hkdf_sha256_state { 49 | crypto_auth_hmacsha256_state st; 50 | } crypto_kdf_hkdf_sha256_state; 51 | 52 | SODIUM_EXPORT 53 | size_t crypto_kdf_hkdf_sha256_statebytes(void); 54 | 55 | SODIUM_EXPORT 56 | int crypto_kdf_hkdf_sha256_extract_init(crypto_kdf_hkdf_sha256_state *state, 57 | const unsigned char *salt, size_t salt_len) 58 | __attribute__ ((nonnull(1))); 59 | 60 | SODIUM_EXPORT 61 | int crypto_kdf_hkdf_sha256_extract_update(crypto_kdf_hkdf_sha256_state *state, 62 | const unsigned char *ikm, size_t ikm_len) 63 | __attribute__ ((nonnull)); 64 | 65 | SODIUM_EXPORT 66 | int crypto_kdf_hkdf_sha256_extract_final(crypto_kdf_hkdf_sha256_state *state, 67 | unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES]) 68 | __attribute__ ((nonnull)); 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf_hkdf_sha512.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_hkdf_sha512_H 2 | #define crypto_kdf_hkdf_sha512_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "crypto_kdf.h" 9 | #include "crypto_auth_hmacsha512.h" 10 | #include "export.h" 11 | 12 | #ifdef __cplusplus 13 | # ifdef __GNUC__ 14 | # pragma GCC diagnostic ignored "-Wlong-long" 15 | # endif 16 | extern "C" { 17 | #endif 18 | 19 | #define crypto_kdf_hkdf_sha512_KEYBYTES crypto_auth_hmacsha512_BYTES 20 | SODIUM_EXPORT 21 | size_t crypto_kdf_hkdf_sha512_keybytes(void); 22 | 23 | #define crypto_kdf_hkdf_sha512_BYTES_MIN 0U 24 | SODIUM_EXPORT 25 | size_t crypto_kdf_hkdf_sha512_bytes_min(void); 26 | 27 | #define crypto_kdf_hkdf_sha512_BYTES_MAX (0xff * crypto_auth_hmacsha512_BYTES) 28 | SODIUM_EXPORT 29 | size_t crypto_kdf_hkdf_sha512_bytes_max(void); 30 | 31 | SODIUM_EXPORT 32 | int crypto_kdf_hkdf_sha512_extract(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES], 33 | const unsigned char *salt, size_t salt_len, 34 | const unsigned char *ikm, size_t ikm_len) 35 | __attribute__ ((nonnull(1))); 36 | 37 | SODIUM_EXPORT 38 | void crypto_kdf_hkdf_sha512_keygen(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES]) 39 | __attribute__ ((nonnull)); 40 | 41 | SODIUM_EXPORT 42 | int crypto_kdf_hkdf_sha512_expand(unsigned char *out, size_t out_len, 43 | const char *ctx, size_t ctx_len, 44 | const unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES]) 45 | __attribute__ ((nonnull(1))); 46 | 47 | /* ------------------------------------------------------------------------- */ 48 | 49 | typedef struct crypto_kdf_hkdf_sha512_state { 50 | crypto_auth_hmacsha512_state st; 51 | } crypto_kdf_hkdf_sha512_state; 52 | 53 | SODIUM_EXPORT 54 | size_t crypto_kdf_hkdf_sha512_statebytes(void); 55 | 56 | SODIUM_EXPORT 57 | int crypto_kdf_hkdf_sha512_extract_init(crypto_kdf_hkdf_sha512_state *state, 58 | const unsigned char *salt, size_t salt_len) 59 | __attribute__ ((nonnull(1))); 60 | 61 | SODIUM_EXPORT 62 | int crypto_kdf_hkdf_sha512_extract_update(crypto_kdf_hkdf_sha512_state *state, 63 | const unsigned char *ikm, size_t ikm_len) 64 | __attribute__ ((nonnull)); 65 | 66 | SODIUM_EXPORT 67 | int crypto_kdf_hkdf_sha512_extract_final(crypto_kdf_hkdf_sha512_state *state, 68 | unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES]) 69 | __attribute__ ((nonnull)); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kx.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kx_H 2 | #define crypto_kx_H 3 | 4 | #include 5 | 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_kx_PUBLICKEYBYTES 32 16 | SODIUM_EXPORT 17 | size_t crypto_kx_publickeybytes(void); 18 | 19 | #define crypto_kx_SECRETKEYBYTES 32 20 | SODIUM_EXPORT 21 | size_t crypto_kx_secretkeybytes(void); 22 | 23 | #define crypto_kx_SEEDBYTES 32 24 | SODIUM_EXPORT 25 | size_t crypto_kx_seedbytes(void); 26 | 27 | #define crypto_kx_SESSIONKEYBYTES 32 28 | SODIUM_EXPORT 29 | size_t crypto_kx_sessionkeybytes(void); 30 | 31 | #define crypto_kx_PRIMITIVE "x25519blake2b" 32 | SODIUM_EXPORT 33 | const char *crypto_kx_primitive(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_kx_seed_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES], 37 | unsigned char sk[crypto_kx_SECRETKEYBYTES], 38 | const unsigned char seed[crypto_kx_SEEDBYTES]) 39 | __attribute__ ((nonnull)); 40 | 41 | SODIUM_EXPORT 42 | int crypto_kx_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES], 43 | unsigned char sk[crypto_kx_SECRETKEYBYTES]) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_kx_client_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES], 48 | unsigned char tx[crypto_kx_SESSIONKEYBYTES], 49 | const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES], 50 | const unsigned char client_sk[crypto_kx_SECRETKEYBYTES], 51 | const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES]) 52 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 4, 5))); 53 | 54 | SODIUM_EXPORT 55 | int crypto_kx_server_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES], 56 | unsigned char tx[crypto_kx_SESSIONKEYBYTES], 57 | const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES], 58 | const unsigned char server_sk[crypto_kx_SECRETKEYBYTES], 59 | const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES]) 60 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 4, 5))); 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_onetimeauth.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_onetimeauth_H 2 | #define crypto_onetimeauth_H 3 | 4 | #include 5 | 6 | #include "crypto_onetimeauth_poly1305.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | typedef crypto_onetimeauth_poly1305_state crypto_onetimeauth_state; 17 | 18 | SODIUM_EXPORT 19 | size_t crypto_onetimeauth_statebytes(void); 20 | 21 | #define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES 22 | SODIUM_EXPORT 23 | size_t crypto_onetimeauth_bytes(void); 24 | 25 | #define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES 26 | SODIUM_EXPORT 27 | size_t crypto_onetimeauth_keybytes(void); 28 | 29 | #define crypto_onetimeauth_PRIMITIVE "poly1305" 30 | SODIUM_EXPORT 31 | const char *crypto_onetimeauth_primitive(void); 32 | 33 | SODIUM_EXPORT 34 | int crypto_onetimeauth(unsigned char *out, const unsigned char *in, 35 | unsigned long long inlen, const unsigned char *k) 36 | __attribute__ ((nonnull(1, 4))); 37 | 38 | SODIUM_EXPORT 39 | int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in, 40 | unsigned long long inlen, const unsigned char *k) 41 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 42 | 43 | SODIUM_EXPORT 44 | int crypto_onetimeauth_init(crypto_onetimeauth_state *state, 45 | const unsigned char *key) __attribute__ ((nonnull)); 46 | 47 | SODIUM_EXPORT 48 | int crypto_onetimeauth_update(crypto_onetimeauth_state *state, 49 | const unsigned char *in, 50 | unsigned long long inlen) 51 | __attribute__ ((nonnull(1))); 52 | 53 | SODIUM_EXPORT 54 | int crypto_onetimeauth_final(crypto_onetimeauth_state *state, 55 | unsigned char *out) __attribute__ ((nonnull)); 56 | 57 | SODIUM_EXPORT 58 | void crypto_onetimeauth_keygen(unsigned char k[crypto_onetimeauth_KEYBYTES]) 59 | __attribute__ ((nonnull)); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_onetimeauth_poly1305.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_onetimeauth_poly1305_H 2 | #define crypto_onetimeauth_poly1305_H 3 | 4 | #ifdef __cplusplus 5 | # ifdef __GNUC__ 6 | # pragma GCC diagnostic ignored "-Wlong-long" 7 | # endif 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | #include "export.h" 18 | 19 | typedef struct CRYPTO_ALIGN(16) crypto_onetimeauth_poly1305_state { 20 | unsigned char opaque[256]; 21 | } crypto_onetimeauth_poly1305_state; 22 | 23 | SODIUM_EXPORT 24 | size_t crypto_onetimeauth_poly1305_statebytes(void); 25 | 26 | #define crypto_onetimeauth_poly1305_BYTES 16U 27 | SODIUM_EXPORT 28 | size_t crypto_onetimeauth_poly1305_bytes(void); 29 | 30 | #define crypto_onetimeauth_poly1305_KEYBYTES 32U 31 | SODIUM_EXPORT 32 | size_t crypto_onetimeauth_poly1305_keybytes(void); 33 | 34 | SODIUM_EXPORT 35 | int crypto_onetimeauth_poly1305(unsigned char *out, 36 | const unsigned char *in, 37 | unsigned long long inlen, 38 | const unsigned char *k) 39 | __attribute__ ((nonnull(1, 4))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_onetimeauth_poly1305_verify(const unsigned char *h, 43 | const unsigned char *in, 44 | unsigned long long inlen, 45 | const unsigned char *k) 46 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 47 | 48 | SODIUM_EXPORT 49 | int crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state, 50 | const unsigned char *key) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | int crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *state, 55 | const unsigned char *in, 56 | unsigned long long inlen) 57 | __attribute__ ((nonnull(1))); 58 | 59 | SODIUM_EXPORT 60 | int crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state, 61 | unsigned char *out) 62 | __attribute__ ((nonnull)); 63 | 64 | SODIUM_EXPORT 65 | void crypto_onetimeauth_poly1305_keygen(unsigned char k[crypto_onetimeauth_poly1305_KEYBYTES]) 66 | __attribute__ ((nonnull)); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_H 2 | #define crypto_scalarmult_H 3 | 4 | #include 5 | 6 | #include "crypto_scalarmult_curve25519.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_bytes(void); 16 | 17 | #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_scalarbytes(void); 20 | 21 | #define crypto_scalarmult_PRIMITIVE "curve25519" 22 | SODIUM_EXPORT 23 | const char *crypto_scalarmult_primitive(void); 24 | 25 | SODIUM_EXPORT 26 | int crypto_scalarmult_base(unsigned char *q, const unsigned char *n) 27 | __attribute__ ((nonnull)); 28 | 29 | /* 30 | * NOTE: Do not use the result of this function directly for key exchange. 31 | * 32 | * Hash the result with the public keys in order to compute a shared 33 | * secret key: H(q || client_pk || server_pk) 34 | * 35 | * Or unless this is not an option, use the crypto_kx() API instead. 36 | */ 37 | SODIUM_EXPORT 38 | int crypto_scalarmult(unsigned char *q, const unsigned char *n, 39 | const unsigned char *p) 40 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult_curve25519.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_curve25519_H 2 | #define crypto_scalarmult_curve25519_H 3 | 4 | #include 5 | 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #define crypto_scalarmult_curve25519_BYTES 32U 13 | SODIUM_EXPORT 14 | size_t crypto_scalarmult_curve25519_bytes(void); 15 | 16 | #define crypto_scalarmult_curve25519_SCALARBYTES 32U 17 | SODIUM_EXPORT 18 | size_t crypto_scalarmult_curve25519_scalarbytes(void); 19 | 20 | /* 21 | * NOTE: Do not use the result of this function directly for key exchange. 22 | * 23 | * Hash the result with the public keys in order to compute a shared 24 | * secret key: H(q || client_pk || server_pk) 25 | * 26 | * Or unless this is not an option, use the crypto_kx() API instead. 27 | */ 28 | SODIUM_EXPORT 29 | int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n, 30 | const unsigned char *p) 31 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 32 | 33 | SODIUM_EXPORT 34 | int crypto_scalarmult_curve25519_base(unsigned char *q, 35 | const unsigned char *n) 36 | __attribute__ ((nonnull)); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult_ed25519.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef crypto_scalarmult_ed25519_H 3 | #define crypto_scalarmult_ed25519_H 4 | 5 | #include 6 | 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_ed25519_BYTES 32U 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_ed25519_bytes(void); 16 | 17 | #define crypto_scalarmult_ed25519_SCALARBYTES 32U 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_ed25519_scalarbytes(void); 20 | 21 | /* 22 | * NOTE: Do not use the result of this function directly for key exchange. 23 | * 24 | * Hash the result with the public keys in order to compute a shared 25 | * secret key: H(q || client_pk || server_pk) 26 | * 27 | * Or unless this is not an option, use the crypto_kx() API instead. 28 | */ 29 | SODIUM_EXPORT 30 | int crypto_scalarmult_ed25519(unsigned char *q, const unsigned char *n, 31 | const unsigned char *p) 32 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 33 | 34 | SODIUM_EXPORT 35 | int crypto_scalarmult_ed25519_noclamp(unsigned char *q, const unsigned char *n, 36 | const unsigned char *p) 37 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 38 | 39 | SODIUM_EXPORT 40 | int crypto_scalarmult_ed25519_base(unsigned char *q, const unsigned char *n) 41 | __attribute__ ((nonnull)); 42 | 43 | SODIUM_EXPORT 44 | int crypto_scalarmult_ed25519_base_noclamp(unsigned char *q, const unsigned char *n) 45 | __attribute__ ((nonnull)); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult_ristretto255.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef crypto_scalarmult_ristretto255_H 3 | #define crypto_scalarmult_ristretto255_H 4 | 5 | #include 6 | 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_ristretto255_BYTES 32U 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_ristretto255_bytes(void); 16 | 17 | #define crypto_scalarmult_ristretto255_SCALARBYTES 32U 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_ristretto255_scalarbytes(void); 20 | 21 | /* 22 | * NOTE: Do not use the result of this function directly for key exchange. 23 | * 24 | * Hash the result with the public keys in order to compute a shared 25 | * secret key: H(q || client_pk || server_pk) 26 | * 27 | * Or unless this is not an option, use the crypto_kx() API instead. 28 | */ 29 | SODIUM_EXPORT 30 | int crypto_scalarmult_ristretto255(unsigned char *q, const unsigned char *n, 31 | const unsigned char *p) 32 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 33 | 34 | SODIUM_EXPORT 35 | int crypto_scalarmult_ristretto255_base(unsigned char *q, 36 | const unsigned char *n) 37 | __attribute__ ((nonnull)); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_secretbox_xchacha20poly1305.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_secretbox_xchacha20poly1305_H 2 | #define crypto_secretbox_xchacha20poly1305_H 3 | 4 | #include 5 | #include "crypto_stream_xchacha20.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_secretbox_xchacha20poly1305_KEYBYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_secretbox_xchacha20poly1305_keybytes(void); 18 | 19 | #define crypto_secretbox_xchacha20poly1305_NONCEBYTES 24U 20 | SODIUM_EXPORT 21 | size_t crypto_secretbox_xchacha20poly1305_noncebytes(void); 22 | 23 | #define crypto_secretbox_xchacha20poly1305_MACBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_secretbox_xchacha20poly1305_macbytes(void); 26 | 27 | #define crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX \ 28 | (crypto_stream_xchacha20_MESSAGEBYTES_MAX - crypto_secretbox_xchacha20poly1305_MACBYTES) 29 | SODIUM_EXPORT 30 | size_t crypto_secretbox_xchacha20poly1305_messagebytes_max(void); 31 | 32 | SODIUM_EXPORT 33 | int crypto_secretbox_xchacha20poly1305_easy(unsigned char *c, 34 | const unsigned char *m, 35 | unsigned long long mlen, 36 | const unsigned char *n, 37 | const unsigned char *k) 38 | __attribute__ ((nonnull(1, 4, 5))); 39 | 40 | SODIUM_EXPORT 41 | int crypto_secretbox_xchacha20poly1305_open_easy(unsigned char *m, 42 | const unsigned char *c, 43 | unsigned long long clen, 44 | const unsigned char *n, 45 | const unsigned char *k) 46 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5))); 47 | 48 | SODIUM_EXPORT 49 | int crypto_secretbox_xchacha20poly1305_detached(unsigned char *c, 50 | unsigned char *mac, 51 | const unsigned char *m, 52 | unsigned long long mlen, 53 | const unsigned char *n, 54 | const unsigned char *k) 55 | __attribute__ ((nonnull(1, 2, 5, 6))); 56 | 57 | SODIUM_EXPORT 58 | int crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *m, 59 | const unsigned char *c, 60 | const unsigned char *mac, 61 | unsigned long long clen, 62 | const unsigned char *n, 63 | const unsigned char *k) 64 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6))); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_secretbox_xsalsa20poly1305.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_secretbox_xsalsa20poly1305_H 2 | #define crypto_secretbox_xsalsa20poly1305_H 3 | 4 | #include 5 | #include "crypto_stream_xsalsa20.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_secretbox_xsalsa20poly1305_KEYBYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_secretbox_xsalsa20poly1305_keybytes(void); 18 | 19 | #define crypto_secretbox_xsalsa20poly1305_NONCEBYTES 24U 20 | SODIUM_EXPORT 21 | size_t crypto_secretbox_xsalsa20poly1305_noncebytes(void); 22 | 23 | #define crypto_secretbox_xsalsa20poly1305_MACBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_secretbox_xsalsa20poly1305_macbytes(void); 26 | 27 | /* Only for the libsodium API - The NaCl compatibility API would require BOXZEROBYTES extra bytes */ 28 | #define crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX \ 29 | (crypto_stream_xsalsa20_MESSAGEBYTES_MAX - crypto_secretbox_xsalsa20poly1305_MACBYTES) 30 | SODIUM_EXPORT 31 | size_t crypto_secretbox_xsalsa20poly1305_messagebytes_max(void); 32 | 33 | SODIUM_EXPORT 34 | int crypto_secretbox_xsalsa20poly1305(unsigned char *c, 35 | const unsigned char *m, 36 | unsigned long long mlen, 37 | const unsigned char *n, 38 | const unsigned char *k) 39 | __attribute__ ((nonnull(1, 4, 5))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_secretbox_xsalsa20poly1305_open(unsigned char *m, 43 | const unsigned char *c, 44 | unsigned long long clen, 45 | const unsigned char *n, 46 | const unsigned char *k) 47 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5))); 48 | 49 | SODIUM_EXPORT 50 | void crypto_secretbox_xsalsa20poly1305_keygen(unsigned char k[crypto_secretbox_xsalsa20poly1305_KEYBYTES]) 51 | __attribute__ ((nonnull)); 52 | 53 | /* -- NaCl compatibility interface ; Requires padding -- */ 54 | 55 | #define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16U 56 | SODIUM_EXPORT 57 | size_t crypto_secretbox_xsalsa20poly1305_boxzerobytes(void); 58 | 59 | #define crypto_secretbox_xsalsa20poly1305_ZEROBYTES \ 60 | (crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES + \ 61 | crypto_secretbox_xsalsa20poly1305_MACBYTES) 62 | SODIUM_EXPORT 63 | size_t crypto_secretbox_xsalsa20poly1305_zerobytes(void); 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_shorthash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_H 2 | #define crypto_shorthash_H 3 | 4 | #include 5 | 6 | #include "crypto_shorthash_siphash24.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_shorthash_bytes(void); 19 | 20 | #define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_shorthash_keybytes(void); 23 | 24 | #define crypto_shorthash_PRIMITIVE "siphash24" 25 | SODIUM_EXPORT 26 | const char *crypto_shorthash_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_shorthash(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k) 31 | __attribute__ ((nonnull(1, 4))); 32 | 33 | SODIUM_EXPORT 34 | void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES]) 35 | __attribute__ ((nonnull)); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_shorthash_siphash24.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_siphash24_H 2 | #define crypto_shorthash_siphash24_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | # ifdef __GNUC__ 9 | # pragma GCC diagnostic ignored "-Wlong-long" 10 | # endif 11 | extern "C" { 12 | #endif 13 | 14 | /* -- 64-bit output -- */ 15 | 16 | #define crypto_shorthash_siphash24_BYTES 8U 17 | SODIUM_EXPORT 18 | size_t crypto_shorthash_siphash24_bytes(void); 19 | 20 | #define crypto_shorthash_siphash24_KEYBYTES 16U 21 | SODIUM_EXPORT 22 | size_t crypto_shorthash_siphash24_keybytes(void); 23 | 24 | SODIUM_EXPORT 25 | int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in, 26 | unsigned long long inlen, const unsigned char *k) 27 | __attribute__ ((nonnull(1, 4))); 28 | 29 | #ifndef SODIUM_LIBRARY_MINIMAL 30 | /* -- 128-bit output -- */ 31 | 32 | #define crypto_shorthash_siphashx24_BYTES 16U 33 | SODIUM_EXPORT 34 | size_t crypto_shorthash_siphashx24_bytes(void); 35 | 36 | #define crypto_shorthash_siphashx24_KEYBYTES 16U 37 | SODIUM_EXPORT 38 | size_t crypto_shorthash_siphashx24_keybytes(void); 39 | 40 | SODIUM_EXPORT 41 | int crypto_shorthash_siphashx24(unsigned char *out, const unsigned char *in, 42 | unsigned long long inlen, const unsigned char *k) 43 | __attribute__ ((nonnull(1, 4))); 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_sign_edwards25519sha512batch.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_sign_edwards25519sha512batch_H 2 | #define crypto_sign_edwards25519sha512batch_H 3 | 4 | /* 5 | * WARNING: This construction was a prototype, which should not be used 6 | * any more in new projects. 7 | * 8 | * crypto_sign_edwards25519sha512batch is provided for applications 9 | * initially built with NaCl, but as recommended by the author of this 10 | * construction, new applications should use ed25519 instead. 11 | * 12 | * In Sodium, you should use the high-level crypto_sign_*() functions instead. 13 | */ 14 | 15 | #include 16 | #include "export.h" 17 | 18 | #ifdef __cplusplus 19 | # ifdef __GNUC__ 20 | # pragma GCC diagnostic ignored "-Wlong-long" 21 | # endif 22 | extern "C" { 23 | #endif 24 | 25 | #define crypto_sign_edwards25519sha512batch_BYTES 64U 26 | #define crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES 32U 27 | #define crypto_sign_edwards25519sha512batch_SECRETKEYBYTES (32U + 32U) 28 | #define crypto_sign_edwards25519sha512batch_MESSAGEBYTES_MAX (SODIUM_SIZE_MAX - crypto_sign_edwards25519sha512batch_BYTES) 29 | 30 | SODIUM_EXPORT 31 | int crypto_sign_edwards25519sha512batch(unsigned char *sm, 32 | unsigned long long *smlen_p, 33 | const unsigned char *m, 34 | unsigned long long mlen, 35 | const unsigned char *sk) 36 | __attribute__ ((deprecated)) __attribute__ ((nonnull(1, 5))); 37 | 38 | SODIUM_EXPORT 39 | int crypto_sign_edwards25519sha512batch_open(unsigned char *m, 40 | unsigned long long *mlen_p, 41 | const unsigned char *sm, 42 | unsigned long long smlen, 43 | const unsigned char *pk) 44 | __attribute__ ((deprecated)) __attribute__ ((nonnull(3, 5))); 45 | 46 | SODIUM_EXPORT 47 | int crypto_sign_edwards25519sha512batch_keypair(unsigned char *pk, 48 | unsigned char *sk) 49 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_H 2 | #define crypto_stream_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | 14 | #include "crypto_stream_xsalsa20.h" 15 | #include "export.h" 16 | 17 | #ifdef __cplusplus 18 | # ifdef __GNUC__ 19 | # pragma GCC diagnostic ignored "-Wlong-long" 20 | # endif 21 | extern "C" { 22 | #endif 23 | 24 | #define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES 25 | SODIUM_EXPORT 26 | size_t crypto_stream_keybytes(void); 27 | 28 | #define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES 29 | SODIUM_EXPORT 30 | size_t crypto_stream_noncebytes(void); 31 | 32 | #define crypto_stream_MESSAGEBYTES_MAX crypto_stream_xsalsa20_MESSAGEBYTES_MAX 33 | SODIUM_EXPORT 34 | size_t crypto_stream_messagebytes_max(void); 35 | 36 | #define crypto_stream_PRIMITIVE "xsalsa20" 37 | SODIUM_EXPORT 38 | const char *crypto_stream_primitive(void); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream(unsigned char *c, unsigned long long clen, 42 | const unsigned char *n, const unsigned char *k) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_stream_xor(unsigned char *c, const unsigned char *m, 47 | unsigned long long mlen, const unsigned char *n, 48 | const unsigned char *k) 49 | __attribute__ ((nonnull)); 50 | 51 | SODIUM_EXPORT 52 | void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES]) 53 | __attribute__ ((nonnull)); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_salsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa20_H 2 | #define crypto_stream_salsa20_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_stream_salsa20_KEYBYTES 32U 24 | SODIUM_EXPORT 25 | size_t crypto_stream_salsa20_keybytes(void); 26 | 27 | #define crypto_stream_salsa20_NONCEBYTES 8U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_salsa20_noncebytes(void); 30 | 31 | #define crypto_stream_salsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 32 | SODIUM_EXPORT 33 | size_t crypto_stream_salsa20_messagebytes_max(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_stream_salsa20(unsigned char *c, unsigned long long clen, 37 | const unsigned char *n, const unsigned char *k) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream_salsa20_xor(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_stream_salsa20_xor_ic(unsigned char *c, const unsigned char *m, 48 | unsigned long long mlen, 49 | const unsigned char *n, uint64_t ic, 50 | const unsigned char *k) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_stream_salsa20_keygen(unsigned char k[crypto_stream_salsa20_KEYBYTES]) 55 | __attribute__ ((nonnull)); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa2012_H 2 | #define crypto_stream_salsa2012_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa2012_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa2012_keybytes(void); 25 | 26 | #define crypto_stream_salsa2012_NONCEBYTES 8U 27 | SODIUM_EXPORT 28 | size_t crypto_stream_salsa2012_noncebytes(void); 29 | 30 | #define crypto_stream_salsa2012_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 31 | SODIUM_EXPORT 32 | size_t crypto_stream_salsa2012_messagebytes_max(void); 33 | 34 | SODIUM_EXPORT 35 | int crypto_stream_salsa2012(unsigned char *c, unsigned long long clen, 36 | const unsigned char *n, const unsigned char *k) 37 | __attribute__ ((nonnull)); 38 | 39 | SODIUM_EXPORT 40 | int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m, 41 | unsigned long long mlen, const unsigned char *n, 42 | const unsigned char *k) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | void crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES]) 47 | __attribute__ ((nonnull)); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa208_H 2 | #define crypto_stream_salsa208_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa208_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa208_keybytes(void) 25 | __attribute__ ((deprecated)); 26 | 27 | #define crypto_stream_salsa208_NONCEBYTES 8U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_salsa208_noncebytes(void) 30 | __attribute__ ((deprecated)); 31 | 32 | #define crypto_stream_salsa208_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 33 | SODIUM_EXPORT 34 | size_t crypto_stream_salsa208_messagebytes_max(void) 35 | __attribute__ ((deprecated)); 36 | 37 | SODIUM_EXPORT 38 | int crypto_stream_salsa208(unsigned char *c, unsigned long long clen, 39 | const unsigned char *n, const unsigned char *k) 40 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 41 | 42 | SODIUM_EXPORT 43 | int crypto_stream_salsa208_xor(unsigned char *c, const unsigned char *m, 44 | unsigned long long mlen, const unsigned char *n, 45 | const unsigned char *k) 46 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 47 | 48 | SODIUM_EXPORT 49 | void crypto_stream_salsa208_keygen(unsigned char k[crypto_stream_salsa208_KEYBYTES]) 50 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_xchacha20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_xchacha20_H 2 | #define crypto_stream_xchacha20_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_stream_xchacha20_KEYBYTES 32U 24 | SODIUM_EXPORT 25 | size_t crypto_stream_xchacha20_keybytes(void); 26 | 27 | #define crypto_stream_xchacha20_NONCEBYTES 24U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_xchacha20_noncebytes(void); 30 | 31 | #define crypto_stream_xchacha20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 32 | SODIUM_EXPORT 33 | size_t crypto_stream_xchacha20_messagebytes_max(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_stream_xchacha20(unsigned char *c, unsigned long long clen, 37 | const unsigned char *n, const unsigned char *k) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream_xchacha20_xor(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_stream_xchacha20_xor_ic(unsigned char *c, const unsigned char *m, 48 | unsigned long long mlen, 49 | const unsigned char *n, uint64_t ic, 50 | const unsigned char *k) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_stream_xchacha20_keygen(unsigned char k[crypto_stream_xchacha20_KEYBYTES]) 55 | __attribute__ ((nonnull)); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_xsalsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_xsalsa20_H 2 | #define crypto_stream_xsalsa20_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_stream_xsalsa20_KEYBYTES 32U 24 | SODIUM_EXPORT 25 | size_t crypto_stream_xsalsa20_keybytes(void); 26 | 27 | #define crypto_stream_xsalsa20_NONCEBYTES 24U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_xsalsa20_noncebytes(void); 30 | 31 | #define crypto_stream_xsalsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 32 | SODIUM_EXPORT 33 | size_t crypto_stream_xsalsa20_messagebytes_max(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_stream_xsalsa20(unsigned char *c, unsigned long long clen, 37 | const unsigned char *n, const unsigned char *k) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream_xsalsa20_xor(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_stream_xsalsa20_xor_ic(unsigned char *c, const unsigned char *m, 48 | unsigned long long mlen, 49 | const unsigned char *n, uint64_t ic, 50 | const unsigned char *k) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_stream_xsalsa20_keygen(unsigned char k[crypto_stream_xsalsa20_KEYBYTES]) 55 | __attribute__ ((nonnull)); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_verify_16.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_16_H 2 | #define crypto_verify_16_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_16_BYTES 16U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_16_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_16(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_verify_32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_32_H 2 | #define crypto_verify_32_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_32_BYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_32_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_32(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_verify_64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_64_H 2 | #define crypto_verify_64_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_64_BYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_64_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_64(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_export_H 3 | #define sodium_export_H 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #if !defined(__clang__) && !defined(__GNUC__) 10 | # ifdef __attribute__ 11 | # undef __attribute__ 12 | # endif 13 | # define __attribute__(a) 14 | #endif 15 | 16 | #ifdef SODIUM_STATIC 17 | # define SODIUM_EXPORT 18 | # define SODIUM_EXPORT_WEAK 19 | #else 20 | # if defined(_MSC_VER) 21 | # ifdef SODIUM_DLL_EXPORT 22 | # define SODIUM_EXPORT __declspec(dllexport) 23 | # else 24 | # define SODIUM_EXPORT __declspec(dllimport) 25 | # endif 26 | # else 27 | # if defined(__SUNPRO_C) 28 | # ifndef __GNU_C__ 29 | # define SODIUM_EXPORT __attribute__ (visibility(__global)) 30 | # else 31 | # define SODIUM_EXPORT __attribute__ __global 32 | # endif 33 | # elif defined(_MSG_VER) 34 | # define SODIUM_EXPORT extern __declspec(dllexport) 35 | # else 36 | # define SODIUM_EXPORT __attribute__ ((visibility ("default"))) 37 | # endif 38 | # endif 39 | # if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS) 40 | # define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak)) 41 | # else 42 | # define SODIUM_EXPORT_WEAK SODIUM_EXPORT 43 | # endif 44 | #endif 45 | 46 | #ifndef CRYPTO_ALIGN 47 | # if defined(__INTEL_COMPILER) || defined(_MSC_VER) 48 | # define CRYPTO_ALIGN(x) __declspec(align(x)) 49 | # else 50 | # define CRYPTO_ALIGN(x) __attribute__ ((aligned(x))) 51 | # endif 52 | #endif 53 | 54 | #define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B)) 55 | #define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX) 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/randombytes.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_H 3 | #define randombytes_H 4 | 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "export.h" 11 | 12 | #ifdef __cplusplus 13 | # ifdef __GNUC__ 14 | # pragma GCC diagnostic ignored "-Wlong-long" 15 | # endif 16 | extern "C" { 17 | #endif 18 | 19 | typedef struct randombytes_implementation { 20 | const char *(*implementation_name)(void); /* required */ 21 | uint32_t (*random)(void); /* required */ 22 | void (*stir)(void); /* optional */ 23 | uint32_t (*uniform)(const uint32_t upper_bound); /* optional, a default implementation will be used if NULL */ 24 | void (*buf)(void * const buf, const size_t size); /* required */ 25 | int (*close)(void); /* optional */ 26 | } randombytes_implementation; 27 | 28 | #define randombytes_BYTES_MAX SODIUM_MIN(SODIUM_SIZE_MAX, 0xffffffffUL) 29 | 30 | #define randombytes_SEEDBYTES 32U 31 | SODIUM_EXPORT 32 | size_t randombytes_seedbytes(void); 33 | 34 | SODIUM_EXPORT 35 | void randombytes_buf(void * const buf, const size_t size) 36 | __attribute__ ((nonnull)); 37 | 38 | SODIUM_EXPORT 39 | void randombytes_buf_deterministic(void * const buf, const size_t size, 40 | const unsigned char seed[randombytes_SEEDBYTES]) 41 | __attribute__ ((nonnull)); 42 | 43 | SODIUM_EXPORT 44 | uint32_t randombytes_random(void); 45 | 46 | SODIUM_EXPORT 47 | uint32_t randombytes_uniform(const uint32_t upper_bound); 48 | 49 | SODIUM_EXPORT 50 | void randombytes_stir(void); 51 | 52 | SODIUM_EXPORT 53 | int randombytes_close(void); 54 | 55 | SODIUM_EXPORT 56 | int randombytes_set_implementation(const randombytes_implementation *impl) 57 | __attribute__ ((nonnull)); 58 | 59 | SODIUM_EXPORT 60 | const char *randombytes_implementation_name(void); 61 | 62 | /* -- NaCl compatibility interface -- */ 63 | 64 | SODIUM_EXPORT 65 | void randombytes(unsigned char * const buf, const unsigned long long buf_len) 66 | __attribute__ ((nonnull)); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/randombytes_internal_random.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_internal_random_H 3 | #define randombytes_internal_random_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_internal_implementation; 14 | 15 | /* Backwards compatibility with libsodium < 1.0.18 */ 16 | #define randombytes_salsa20_implementation randombytes_internal_implementation 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/randombytes_sysrandom.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_sysrandom_H 3 | #define randombytes_sysrandom_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_sysrandom_implementation; 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/runtime.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_runtime_H 3 | #define sodium_runtime_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT_WEAK 12 | int sodium_runtime_has_neon(void); 13 | 14 | SODIUM_EXPORT_WEAK 15 | int sodium_runtime_has_armcrypto(void); 16 | 17 | SODIUM_EXPORT_WEAK 18 | int sodium_runtime_has_sse2(void); 19 | 20 | SODIUM_EXPORT_WEAK 21 | int sodium_runtime_has_sse3(void); 22 | 23 | SODIUM_EXPORT_WEAK 24 | int sodium_runtime_has_ssse3(void); 25 | 26 | SODIUM_EXPORT_WEAK 27 | int sodium_runtime_has_sse41(void); 28 | 29 | SODIUM_EXPORT_WEAK 30 | int sodium_runtime_has_avx(void); 31 | 32 | SODIUM_EXPORT_WEAK 33 | int sodium_runtime_has_avx2(void); 34 | 35 | SODIUM_EXPORT_WEAK 36 | int sodium_runtime_has_avx512f(void); 37 | 38 | SODIUM_EXPORT_WEAK 39 | int sodium_runtime_has_pclmul(void); 40 | 41 | SODIUM_EXPORT_WEAK 42 | int sodium_runtime_has_aesni(void); 43 | 44 | SODIUM_EXPORT_WEAK 45 | int sodium_runtime_has_rdrand(void); 46 | 47 | /* ------------------------------------------------------------------------- */ 48 | 49 | int _sodium_runtime_get_cpu_features(void); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/version.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_version_H 3 | #define sodium_version_H 4 | 5 | #include "export.h" 6 | 7 | #define SODIUM_VERSION_STRING "1.0.19" 8 | 9 | #define SODIUM_LIBRARY_VERSION_MAJOR 26 10 | #define SODIUM_LIBRARY_VERSION_MINOR 1 11 | 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | SODIUM_EXPORT 18 | const char *sodium_version_string(void); 19 | 20 | SODIUM_EXPORT 21 | int sodium_library_version_major(void); 22 | 23 | SODIUM_EXPORT 24 | int sodium_library_version_minor(void); 25 | 26 | SODIUM_EXPORT 27 | int sodium_library_minimal(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libpcap.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libpcap.a -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libsodium.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libsodium.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libunrooted_android.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libunrooted_android.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libusb1.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libusb1.0.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.a -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.so.1 -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libsodium.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libsodium.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libunrooted_android.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libunrooted_android.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.1 -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.2 -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/java/com/geehe/wfbngrtl8812/WfbNGStats.java: -------------------------------------------------------------------------------- 1 | package com.geehe.wfbngrtl8812; 2 | 3 | public class WfbNGStats { 4 | public final int count_p_all; 5 | public final int count_p_dec_err; 6 | public final int count_p_dec_ok; 7 | public final int count_p_fec_recovered; 8 | public final int count_p_lost; 9 | public final int count_p_bad; 10 | public final int count_p_override; 11 | public final int count_p_outgoing; 12 | 13 | public WfbNGStats(int cntPall, int cntDecErr, int cntDecOk, int cntFecRec, int cntLost, int cntBad, int cntOverride, int cntOutgoing) { 14 | count_p_all = cntPall; 15 | count_p_dec_err = cntDecErr; 16 | count_p_dec_ok = cntDecOk; 17 | count_p_fec_recovered = cntFecRec; 18 | count_p_lost = cntLost; 19 | count_p_bad = cntBad; 20 | count_p_override = cntOverride; 21 | count_p_outgoing = cntOutgoing; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/java/com/geehe/wfbngrtl8812/WfbNGStatsChanged.java: -------------------------------------------------------------------------------- 1 | package com.geehe.wfbngrtl8812; 2 | 3 | public interface WfbNGStatsChanged{ 4 | void onWfbNgStatsChanged(final WfbNGStats data); 5 | } 6 | 7 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | alias(libs.plugins.androidApplication) apply false 4 | alias(libs.plugins.androidLibrary) apply false 5 | id("org.jetbrains.kotlin.android") version "2.0.0-RC3" apply false 6 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. For more details, visit 12 | # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Enables namespacing of each library's R class so that its R class includes only the 19 | # resources declared in the library itself and none from the library's dependencies, 20 | # thereby reducing the size of the R class for that library 21 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | agp = "8.3.1" 3 | junit = "4.13.2" 4 | junitVersion = "1.1.5" 5 | espressoCore = "3.5.1" 6 | appcompat = "1.6.1" 7 | material = "1.11.0" 8 | constraintlayout = "2.1.4" 9 | meCascadeVersion = "2.3.0" 10 | mpandroidchart = "v3.1.0" 11 | 12 | [libraries] 13 | cascade-compose = { module = "me.saket.cascade:cascade-compose", version.ref = "meCascadeVersion" } 14 | junit = { group = "junit", name = "junit", version.ref = "junit" } 15 | ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } 16 | espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } 17 | appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } 18 | material = { group = "com.google.android.material", name = "material", version.ref = "material" } 19 | constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 20 | me-saket-cascade-cascade = { module = "me.saket.cascade:cascade", version.ref = "meCascadeVersion" } 21 | mpAndroidChart = { module = "com.github.PhilJay:MPAndroidChart", version.ref = "mpandroidchart" } 22 | 23 | [plugins] 24 | androidApplication = { id = "com.android.application", version.ref = "agp" } 25 | androidLibrary = { id = "com.android.library", version.ref = "agp" } 26 | 27 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Apr 01 09:15:16 EDT 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google { 4 | content { 5 | includeGroupByRegex("com\\.android.*") 6 | includeGroupByRegex("com\\.google.*") 7 | includeGroupByRegex("androidx.*") 8 | } 9 | } 10 | mavenCentral() 11 | gradlePluginPortal() 12 | } 13 | } 14 | 15 | dependencyResolutionManagement { 16 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 17 | repositories { 18 | google() 19 | mavenCentral() 20 | maven("https://jitpack.io") 21 | } 22 | } 23 | 24 | rootProject.name = "FPVue" 25 | include(":app") 26 | include(":app:videonative") 27 | include(":app:wfbngrtl8812") 28 | include(":app:mavlink") 29 | --------------------------------------------------------------------------------