Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

MrRob0-X/Nethunter_audio-archived

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Audio Streaming Script for NetHunter

This script enables seamless audio streaming over TCP using PulseAudio on NetHunter devices. The recent updates provide a more robust, user-friendly experience with new features that enhance error handling, feedback, and overall usability.

Features

  • Automatic PulseAudio Management: The script automatically starts PulseAudio if it’s not running, with feedback to the user.
  • Audio Quality Enhancement: Configures the audio stream to 100% volume and ensures the sink is unmuted for optimal streaming.
  • Improved Module Management:
    • Prevents redundant module loading and suppresses unnecessary error messages.
    • Provides real-time feedback on the status of audio streaming through a status command.
  • User Feedback and Color-Coded Output:
    • Red: Indicates errors, such as failure to start or stop the stream.
    • Green: Confirms successful stops.
    • Blue: Shows successful starts.
    • Yellow: Displays warnings or information, e.g., when PulseAudio is already running.
  • Configurable Parameters: Users can modify IP address, port, audio rate, and format directly in the script for custom streaming setups.

Prerequisites

  • NetHunter: Ensure you have NetHunter installed on your device.
  • PulseAudio: This script requires PulseAudio. Install it if you haven’t already:
    sudo apt-get install pulseaudio

Installation

  1. Clone the repository or download the script directly:

    git clone https://github.com/MrRob0-X/Nethunter_audio.git
    cd NetHunter-Audio

    or

    wget https://github.com/MrRob0-X/Nethunter_audio/raw/refs/heads/main/audio
  2. Move the script into /usr/bin for easy access:

    mv audio /usr/bin && chmod +x /usr/bin/audio
  3. Download the simple protocol player app: link

Usage

Configure the Sound Stream App with the Following Values

Image

Start Streaming

To start streaming audio, run:

audio start

This command will start a TCP stream on the configured port, broadcasting audio from your NetHunter device.

Stop Streaming

To stop the audio stream, use:

audio stop

Check Streaming Status

To check if audio streaming is active, use:

audio status

This command provides real-time feedback on whether the streaming module is currently active.

Help

If you need help with the commands, use:

audio

This will display usage instructions.

Script Details

The script contains functions to manage audio streaming effectively:

  • start_pulseaudio: Starts PulseAudio if it’s not already running.
  • set_sound_quality: Sets the volume to 100% and ensures the sink is unmuted.
  • start_stream: Loads the TCP module for audio streaming.
  • stop_stream: Unloads the TCP module and stops PulseAudio.
  • check_stream_status: Provides the current status of audio streaming.

Troubleshooting

  • PulseAudio Errors: Ensure PulseAudio is correctly installed and configured.
  • Port Conflicts: If the default port is already in use, modify it in the script configuration section or free up the port.

Credits

Original reference: how-to-stream-my-gnu-linux-audio-output-to-android-devices-over-wi-fi.


License

This project is open-source and available under the GPL-3.0 license. See the LICENSE file for more details.

About

A script to start sound session on nethunter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages