Subcategories

  • This section is specifically useful for new contributors on the project

    7 Topics
    1 Posts
    DiogoD
    This Category is for those starting to contribute for the UBports Project and Community. By contributing, we mean doing things like: coding quality assurance (testing, bug reporting and validation, etc...) translations app development and maintenance writing and validating technical documentation and user manuals UBports social media and marqueting etc... If you want to contribute in these ways or others and have questions about it, like how to get started, where can you find information, please leave your questions in this category and we will try to answer them the best we can.
  • Discuss and solve problems with other users

    90 Topics
    645 Posts
    developerbaymanD
    @bearbobs sorry for the late reply its been busy with work...did you have to host the emulationstation?....because not sure how to host from within a clickable.....Iv seen the project before but have not really done anything with it....if it runs totally client side its do able....but if it needs hosting I don't think it can be done....the nes I'm working on is a heavily modded JavaScript emulator runs totally client side i added touch support fixed up the audio and added a lot of mapper support.....one big issue is the webview out of the box is....well lacking...if you load mario you will see black squares around the clouds and other sprites...not the emulator but the webview....
  • 133 Topics
    934 Posts
    developerbaymanD
    @captainfunk try this #!/bin/bash # # Usage: # To install and set up: ./waydroid_shared_folder.sh --install # To perform mount only: ./waydroid_shared_folder.sh --mount (used by cron) # To perform chown only: ./waydroid_shared_folder.sh --chown (used by cron) # To uninstall: ./waydroid_shared_folder.sh --uninstall # To display help: ./waydroid_shared_folder.sh --help # # --- Configuration --- # Define the paths for the shared folders. # ~/shared is the folder on your Ubuntu Touch host that you will use. SHARED_DIR_HOST="$HOME/shared" # ~/.local/share/waydroid/data/media/0/shared is the corresponding folder inside Waydroid. SHARED_DIR_WAYDROID="$HOME/.local/share/waydroid/data/media/0/shared" # The primary user on Ubuntu Touch. USER_PHABLET="phablet" # The name of this script, used for cron job identification. SCRIPT_NAME=$(basename "$0") # The absolute path to this script, essential for cron to execute it correctly. SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)/$SCRIPT_NAME" # --- Functions --- # Function for logging messages to stdout with a timestamp. log() { echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" } # Function to create the necessary shared directories if they don't exist. create_directories() { log "Creating shared directories..." # Create the host shared directory. mkdir -p "$SHARED_DIR_HOST" # Create the Waydroid internal shared directory path. mkdir -p "$SHARED_DIR_WAYDROID" if [ $? -eq 0 ]; then log "Directories created successfully." else log "Error creating directories. Please check permissions or disk space. Exiting." exit 1 fi } # Function to perform the bind mount operation. perform_bind_mount() { log "Attempting to bind mount '$SHARED_DIR_HOST' to '$SHARED_DIR_WAYDROID'..." # Check if the Waydroid shared folder is already mounted to avoid errors. if mountpoint -q "$SHARED_DIR_WAYDROID"; then log "Folder '$SHARED_DIR_WAYDROID' is already mounted. Skipping bind mount." else # Use sudo to perform the bind mount, linking the host folder to the Waydroid folder. sudo mount --bind "$SHARED_DIR_HOST" "$SHARED_DIR_WAYDROID" if [ $? -eq 0 ]; then log "Bind mount successful." # Immediately set initial permissions after a successful mount. set_folder_permissions else log "Error: Bind mount failed. This could be due to incorrect paths, Waydroid not running, or insufficient sudo permissions." log "Ensure Waydroid is running and '$SHARED_DIR_WAYDROID' exists inside its 'data/media/0' structure." exit 1 fi fi } # Function to unmount the shared folder. unmount_folder() { log "Attempting to unmount '$SHARED_DIR_WAYDROID'..." # Check if the folder is currently mounted before attempting to unmount. if mountpoint -q "$SHARED_DIR_WAYDROID"; then # Use sudo to unmount the folder. sudo umount "$SHARED_DIR_WAYDROID" if [ $? -eq 0 ]; then log "Unmount successful." else log "Error unmounting folder. This may happen if files inside are in use." log "You might need to manually unmount or reboot if it persists." exit 1 fi else log "Folder '$SHARED_DIR_WAYDROID' is not mounted. Skipping unmount." fi } # Function to set the ownership of the shared folder and its contents. set_folder_permissions() { log "Setting permissions for '$SHARED_DIR_WAYDROID' to '$USER_PHABLET:$USER_PHABLET'..." # Use sudo and the -R (recursive) flag to ensure all files and subdirectories # within the mounted shared folder are owned by the 'phablet' user. # This directly addresses the issue of Waydroid changing ownership. sudo chown -R "$USER_PHABLET":"$USER_PHABLET" "$SHARED_DIR_WAYDROID" if [ $? -eq 0 ]; then log "Permissions set successfully." else log "Error setting permissions. Check sudo permissions or ensure the path '$SHARED_DIR_WAYDROID' is valid." exit 1 fi } # Function to add cron jobs for persistence and continuous permission management. add_cron_jobs() { log "Adding cron jobs for persistence and continuous permission management..." # Get current crontab, add new entries, sort, remove duplicates, then set new crontab. # @reboot: Executes the script with '--mount' option every time the device reboots. # * * * * *: Executes the script with '--chown' option every minute to correct permissions. (crontab -l 2>/dev/null; \ echo "@reboot /bin/bash \"$SCRIPT_PATH\" --mount"; \ echo "* * * * * /bin/bash \"$SCRIPT_PATH\" --chown" \ ) | sort | uniq | crontab - if [ $? -eq 0 ]; then log "Cron jobs added successfully." log "They will run from this script's current location: $SCRIPT_PATH" log "IMPORTANT: Do NOT move or rename this script after installation, or the cron jobs will fail." log "You can verify the cron jobs by running: crontab -l" else log "Error adding cron jobs. This could be a cron service issue." exit 1 fi } # Function to remove cron jobs added by this script. remove_cron_jobs() { log "Removing cron jobs related to this script..." # List current cron jobs, filter out lines containing this script's path, and set the new crontab. crontab -l 2>/dev/null | grep -v "$SCRIPT_PATH" | crontab - if [ $? -eq 0 ]; then log "Cron jobs removed successfully. You can verify by running: crontab -l" else log "Error removing cron jobs. You may need to manually edit your crontab (crontab -e)." exit 1 fi } # Function to display the help message. display_help() { echo "Usage: $SCRIPT_NAME [OPTION]" echo "" echo "This script automates setting up and managing a shared folder between Ubuntu Touch and Waydroid." echo "" echo "Options:" echo " --install Performs initial setup: creates directories, mounts the folder," echo " sets initial permissions, and adds cron jobs for persistence and" echo " continuous permission handling. Run this command once to set up." echo "" echo " --mount Performs only the bind mount operation and sets initial permissions." echo " This option is primarily used by the '@reboot' cron job for persistence." echo "" echo " --chown Recursively sets permissions for the shared folder and its contents" echo " to 'phablet:phablet'. This option is used by the periodic cron job" echo " to automatically correct permissions changed by Waydroid." echo "" echo " --uninstall Removes the cron jobs added by this script and unmounts the shared folder." echo " This cleans up the setup." echo "" echo " --help Display this help message." echo "" echo "Important Notes:" echo " - This script assumes you are running it as the 'phablet' user on Ubuntu Touch." echo " - It relies on 'sudo' for mount and chown commands. The 'phablet' user typically has" echo " passwordless sudo access configured by default on Ubuntu Touch." echo " - After running '--install', a reboot is recommended to ensure the @reboot cron job fires." echo " - Do not move or rename this script after installation, as the cron jobs rely on its path." echo " - While '/etc/fstab' is a common Linux method for persistence, it's generally not recommended" echo " for user-level modifications on Ubuntu Touch due to its read-only root filesystem and OTA updates." echo " Using user-specific cron jobs provides a safer and more robust solution here." } # --- Main Logic --- # Check if the script is being run as root. It should be run as the regular user (phablet). if [[ $EUID -eq 0 ]]; then log "Error: This script should NOT be run directly with 'sudo'." log "Please run it as the '$USER_PHABLET' user (e.g., just './$SCRIPT_NAME --install')." log "The script will use 'sudo' internally where necessary." exit 1 fi # Check for essential commands required by the script. if ! command -v crontab &> /dev/null; then log "Error: 'crontab' command not found. Please ensure cron is installed and available." exit 1 fi if ! command -v mountpoint &> /dev/null; then log "Error: 'mountpoint' command not found. Please ensure it's installed (usually part of 'util-linux')." exit 1 fi # Process command-line arguments. case "$1" in --install) log "Initiating installation process..." create_directories # Create the required host and Waydroid directories. perform_bind_mount # Perform the initial bind mount. add_cron_jobs # Set up cron jobs for persistence and auto-chown. log "Installation complete. Please reboot your Ubuntu Touch device for all changes to take full effect." log "The shared folder will now be persistent across reboots, and permissions will be automatically corrected." ;; --mount) log "Executing mount operation (likely from @reboot cron job)..." create_directories # Ensure directories exist (in case they were deleted). perform_bind_mount # Perform the bind mount. ;; --chown) log "Executing chown operation (likely from periodic cron job)..." # Only attempt chown if the target directory exists and is mounted. if [ -d "$SHARED_DIR_WAYDROID" ] && mountpoint -q "$SHARED_DIR_WAYDROID"; then set_folder_permissions # Correct the permissions recursively. else log "Shared Waydroid directory '$SHARED_DIR_WAYDROID' not found or not mounted. Skipping chown for now." log "This might happen if Waydroid is not running or if the mount failed." fi ;; --uninstall) log "Initiating uninstallation process..." remove_cron_jobs # Remove the cron jobs. unmount_folder # Unmount the shared folder. log "Uninstallation complete. You may manually remove the '$SHARED_DIR_HOST' directory if no longer needed." ;; --help) display_help # Show the help message. ;; *) log "Invalid option: '$1'" display_help exit 1 ;; esac log "Script execution finished."
  • showing only half storage on meizu pro 5

    meizu pro 5
    3
    0 Votes
    3 Posts
    580 Views
    toddvargT
    ha-ha, your right, i mixed it up with the oneplus 3T I have. I have the 64 GB, so everything is OK. Slightly wobbly start on this forum, but I will do better
  • 0 Votes
    6 Posts
    886 Views
    L
    I'm having similar problems in my Nexus 5 running 16.04rc - I tried using a different charger - the one from my Huawei p9 (checked that it had same output voltage) - and now it seems to be better.
  • BUG IN 16.04 NOTIFICATIONS

    10
    0 Votes
    10 Posts
    789 Views
    arubislanderA
    @domubpkm said in BUG IN 16.04 NOTIFICATIONS: So what i said is always valid for my phones.. To be corroborated I can corroborate this bug on my M10 FHD tablet on 16.04/devel
  • This topic is deleted!

    8
    0 Votes
    8 Posts
    100 Views
  • [solved] Mx4 - Installer blocked at "waiting for recovery mode"

    40
    0 Votes
    40 Posts
    8k Views
    advocatuxA
    @halucigenia ah, I see
  • Install on MX4 without USB

    6
    0 Votes
    6 Posts
    778 Views
    halucigeniaH
    FYI I have been here before - See https://forums.ubports.com/post/4741 I just thought that this thread might have something that I have not yet tried.
  • Document viewer for Xenial?

    4
    0 Votes
    4 Posts
    473 Views
    advocatuxA
    @stefano sure, can you PM your Telegram or Matrix handle?
  • 0 Votes
    10 Posts
    7k Views
    H
    @themoose007 can you please tell which version of the installer you were using?
  • how i can install ubuntu programs

    terminal apt-get
    10
    0 Votes
    10 Posts
    1k Views
    advocatuxA
    @ali461 you're welcome!
  • How to launch GUI apps from CLI?

    5
    0 Votes
    5 Posts
    660 Views
    nikalonN
    @alan_g said in How to launch GUI apps from CLI?: @nikalon you have to "trick" Unity8 into allowing the application to connect. I have not tried it recently, but something like this... https://lists.ubuntu.com/archives/mir-devel/2015-September/001267.html Yes! That works, thank you! For anyone who wants the answer you have to append the paremeter --desktop_file_hint=unity8 or -- --desktop_file_hint=unity8 to a regular binary you want to open. This is the syntax: ./application -- --desktop_file_hint=unity8 Unfortunately the game crashes because of some OpenGL problem that I don't know how to solve yet: library "/vendor/lib/egl/libGLESv2S3D_adreno.so" not found ----- Initializing OpenGL ----- Initializing OpenGL subsystem Using 8 color bits, 24 depth, 8 stencil display shutting down: Unable to initialize OpenGL (glAccum) idRenderSystem::Shutdown() Shutting down OpenGL subsystem Sys_Error: Unable to initialize OpenGL (glAccum) shutdown terminal support But that's an unrelated question that I should ask elsewhere.
  • August 15 16.04-RC updates scrapps BQ Aquarius M10

    7
    0 Votes
    7 Posts
    735 Views
    advocatuxA
    @bq10_user can you try putting your device in bootloader mode and adding --bootstrap parameter to the command you're already using?
  • Update dev 136

    1
    0 Votes
    1 Posts
    264 Views
    No one has replied
  • August 15 devel channel update renders your device unable

    32
    0 Votes
    32 Posts
    6k Views
    LakotaubpL
    Nexus5 also ok on 532
  • Meizu Pro 6

    Moved
    4
    0 Votes
    4 Posts
    723 Views
    M
    @alexander Xda forum has info on how they unlocked the bootloader for pro5. Maybe there is more info on there. Also it depends on your comfort level.
  • UT audiocast distorted on M10 HD tablet

    10
    0 Votes
    10 Posts
    1k Views
    D
    Today I tried to listen to the latest Wayne and Joe audiocast using my M10 vivid tablet. Again the audio was distorted by a terrible vibrato. I then tried listening via the UT browser on the tablet. Still the distortion persisted. I then tried listening via firefox on my netbook and the audio was fine. Do other UT M10 tablet users also have this problem? Someone previously suggested that this may be an android audio driver problem. BTW, I don't have this problem with ogg, mp3, mp4, youtube, etc. If it is an android audio driver issue, is it likely to be updated in the future?
  • WifiTransfer not connecting to Ubuntu 18.04 LTS

    22
    0 Votes
    22 Posts
    5k Views
    Pulsar33P
    @dtarrant : Yesss ! Happy for you Best regards Pulsar33
  • Cannot install ubuntu touch on BQ M10 ubuntu edition

    75
    0 Votes
    75 Posts
    25k Views
    advocatuxA
    @ziggutas you can follow the ongoing effort to compile Dekko2 for xenial here https://forums.ubports.com/topic/1477/dekko2-developer-community-thread/25 and here https://gitlab.com/dekkoproject/dekko/issues/ P.S. I'm using webmail until Dekko2 is ready
  • Bug report

    3
    0 Votes
    3 Posts
    469 Views
    arubislanderA
    @markalexa What this means for you, if you really don't want to go back to Android, and the camera function is important to you, is to "downgrade" back to 15.04 until OTA-5 comes out.
  • HTC M7

    Moved
    4
    0 Votes
    4 Posts
    862 Views
    advocatuxA
    @ayenack you're welcome. The necessary first step to port UT is to port it to Halium, and there's some WIP on some Motorola models as you can see here https://github.com/Halium/projectmanagement/issues?utf8=✓&q=is%3Aissue+is%3Aopen+motorola but if you want a UT device now, yes it's better to buy a supported device.
  • 16.04 Devel on BQ E5 HD - Issues in Telegram and Dekko2

    7
    0 Votes
    7 Posts
    2k Views
    N
    Telegram latest version works fine on 16.04 RC. Also check below procedure for Dekko. I found this out after googling... https://gitlab.com/doniks/dekko/tags/0.1.6-alpha0