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."
  • Possible to show date as format DD/MM/YY in native apps?

    Solved
    5
    0 Votes
    5 Posts
    456 Views
    OpolorkO
    I had the Display language = English (USA). I changed it to English (UK). Sorted!
  • Can I Have both for awhile?

    Moved lg stylo6
    9
    0 Votes
    9 Posts
    514 Views
    N
    @mrt10001 said in Can I Have both for awhile?: You still cannot do things on it such as Internet banking which these days you require for validation to access online accounts. You shouldn't do that anyway so no issue there! @totalsonic said in Can I Have both for awhile?: Nexus 4 is a poor option in my opinion as it is low powered relative to more current options, it is likely to have battery life issues due to its age, and it will not get continued UT support after the rebase to 20.04. The battery is not a issue at all thanks to these guys : https://www.polarcell.de/ Many Nexus 5 users have reported their batteries to be very reliable!
  • Rotation Lock icon disappeard after last OTA update

    Solved
    4
    1
    0 Votes
    4 Posts
    459 Views
    G
    I did a reboot and this went very strange: First it booted up to the screen where the small dots are counted through and then it did by its own a 2nd reboot. After this the rotation lock item was there again. All fine now.
  • SearX search engine for Morph, please

    8
    2 Votes
    8 Posts
    813 Views
    N
    @nocturn-adrift said in SearX search engine for Morph, please: I think it should be emphasized that this should be added into the GUI for sure. There has to be a better way to do this. The way Firefox does it should be applied to Morph too : Long Tap the Search Engine Input Box and you can add ANY Search Engine to your browser! But please fix the Tab Switching first, because it really lowers "the user friendlyness" of the browser! Just copy that from Firefox too!
  • how to purge Axolotl?

    Solved
    5
    0 Votes
    5 Posts
    487 Views
    N
    @keneda said in how to purge Axolotl?: Maybe some day UTTT tweaks will be part on system settings... (crossed fingers) The sooner the better! It's really weird not having all those Options and Settings in the OS itself...
  • not seeing updates?

    Unsolved
    23
    0 Votes
    23 Posts
    2k Views
    KenedaK
    @fizz said in not seeing updates?: And my system kept insisting on putting itself on the RC channel even after i put it on the Stable. It's a known issue/behavior. I did this on my device too when switching channel (from OTA-19 testing RC to stable channel, while it was not already there for my device, like if stable was an "empty" channel), even if i have no problem getting update (when it comes to me, and for OTA-21 i was today).
  • run server like linux with UT?

    Unsolved
    6
    0 Votes
    6 Posts
    537 Views
    KenedaK
    @emphrath said in run server like linux with UT?: There's also a thread on this forum about someone who managed to somehow link everything he installs to a writable conf file, making the changes effective even after an update, but it doesn't work with everything. Finally you have libertine containers, which may be the way to go. Yes, that's Crackle, by Fuseteam : https://forums.ubports.com/topic/6283/snap-crackle-and-pop-readwrite-rootfs-is-overrated?_=1641778296135
  • Camera app "Capture failed"

    Solved
    8
    0 Votes
    8 Posts
    581 Views
    _
    @moem I fix it ! unbelieable I I just reinstalled the camera-app via apt-get in a terminal sudo apt-get install camera-app Via the open-store doesn't work. I don't know why,and I don't care I'm SO happy to have my ubports phone back ! Thanks for the answers
  • Is lock screen supposed to have controls?

    Solved
    5
    0 Votes
    5 Posts
    541 Views
    T
    @messayisto On some halium 9 devices this probleme was solve since OTA 21 only, first week working for me too on this device.
  • Scrolling of the title : where to open the issue ?

    Solved
    5
    1
    2 Votes
    5 Posts
    322 Views
    D
    https://github.com/ubports/media-hub/issues/55
  • does the gpu accelerated browser work on nexus 5

    Moved
    5
    0 Votes
    5 Posts
    526 Views
    A
    @keneda https://forums.ubports.com/post/59437
  • No data with 5G mobile plan

    Solved
    7
    0 Votes
    7 Posts
    645 Views
    A
    Hey, i downlozd the last rc and now it worked !! So, i will closed it.
  • Anbox - apps have no internet

    23
    0 Votes
    23 Posts
    8k Views
    P
    thank you, on my phone waydroid helper make it unfunctionnal, but install waydroid this way works fine
  • anyone know how to install git

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    jezekJ
    @Amy Try reading this: https://forums.ubports.com/topic/6283/snap-crackle-and-pop-readwrite-rootfs-is-overrated
  • SD Card Redmi Note 9S not detected

    Unsolved
    3
    0 Votes
    3 Posts
    396 Views
    J
    @lakotaubp its 128 GB, formatted as fat32 (vfat). I haven't gotten the external drives manager to detect the card yet which is a shame. I made two little scripts and placed them in the home directory to mount and unmount the card under /media/phablet/<sdcardlabel>, then run them as needed in terminal (I don't know how to execute bash scripts by touch from file explorer). I also am unsure how to automatically run scripts as root at startup, but oh well. The sd card now shows up under file explorer (once the program is closed and opened again). The first: mount_sd.sh #!/bin/bash # run as superuser # Create mount location variable mntloc=/media/${SUDO_USER:-$(whoami)}/$(lsblk -I 179 -o LABEL | tail -n 1) # Make a mount folder, hopefully MAJOR id stays 179 mkdir -p $mntloc # Mount the sdcard! mount /dev/mmcblk0p1 $mntloc -o uid=32011 And the second: umount_sd.sh #!/bin/bash # run as superuser # Create mount location variable mntloc=/media/${SUDO_USER:-$(whoami)}/$(lsblk -I 179 -o LABEL | tail -n 1) # Unmount the sdcard! umount $mntloc Note that I'm assuming there is only one inserted sd card which is why I can use tail to get the label. Also, I assumed the MAJOR id is 179...I don't know if this will be static across other phones or even over time, but I found it with lsblk | grep mmc and copied the MAJ column.
  • Is it possible to block ads via hosts file on UT?

    Solved hosts ads block
    32
    1 Votes
    32 Posts
    5k Views
    L
    Happy new year
  • Xi red 9 browser issue and question

    Unsolved redmi 9 xiaomi morph ubuntu
    3
    0 Votes
    3 Posts
    446 Views
    N
    @jlneng9711 said in Xi red 9 browser issue and question: So basicaly, latest dev version. Opened morph and tried to download a amazing linux background .jpeg anyway. The browser shotdown when trying to download something... Not only for images... Lets say just the whole browser... I am not going to test anything Facebook related for you but I can help with the download issue so : Where is that amazing background located ?! I was thinking of excecuting a command like.. Wget You want to wget the jpeg file ? That shoud work! but then like ubunutu 20.04 and then overwritw the whole system... Anyone a idee of possibility? No idea what you are talking about... :$
  • How to create secret chat on TELEports

    Solved
    3
    0 Votes
    3 Posts
    288 Views
    P
    @arubislander thank you for your answer. I've tested and you're right, secret chats can only be created by the other side but they are working fine then. Thanks!
  • keyboard does not work

    Unsolved
    3
    0 Votes
    3 Posts
    298 Views
    LakotaubpL
    @pzrnqt1vrss That port s marked as inactive and very little info is avialable https://devices.ubuntu-touch.io/device/santoni/ so can only guess this has not been sorted yet. I would try to contact the porter for advice.
  • Xiaomi Redmi 4X boot loop

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    N
    @dwaret said in Xiaomi Redmi 4X boot loop: Now it's just stuck on the bootup screen the only thing I can access is fastboot I can't even get to recovery mode even if I used ADB to reboot into recovery it just stuck on the mi logo That's actually PERFECT! Fastboot means you can flash the Stock Xiaomi Android ROM and have a working phone again! Just use their official tool to do so : https://c.mi.com/in/miuidownload/detail?guide=2 But please make sure you flash the latest Stock Xiaomi Android ROM that's needed as the base version in order to be able to flash Ubuntu Touch afterwards!