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."
  • Migrate data from device to device

    34
    0 Votes
    34 Posts
    10k Views
    T
    @thepeter just to add that if /data doesn't contain system-data and user-data (better said it is just empty) thing that might help is on phone side mounting it by: mount /data that should help (thanks to people in telegram group for quick help)
  • POCO X3 NFC (surya) fimware version

    Solved
    13
    0 Votes
    13 Posts
    2k Views
    K
    @eheintzmann Yes now it works. Is ubuntu tocuh 20.04 not yet available for the poco x3 nfc?
  • OTA25 - BQ E4.5 does not boot

    Unsolved
    17
    0 Votes
    17 Posts
    1k Views
    A
    @Flohack maybe I did not explain it clearly. My device is now booting properly without any fix. I do not need to reinstall it. I thought it may be an interesting information to those who are still struggling with the boot isuue. Thank you anyway.
  • Flashing a oneplus 3 fails at 47%

    Unsolved
    4
    1
    0 Votes
    4 Posts
    380 Views
    MrT10001M
    @poVoq It is the data partition that needs to be EXT4.... Edit to my previous post, apologies for not noticing, but you have sideloaded it successfully. 47% is usually correct for a sideload and it states the transfer is successful with the last line stating "Totala xfer: 1.00x"
  • Volla phone stuck on logo after OS update

    Solved volla phone 22 boot os upgrade
    10
    0 Votes
    10 Posts
    755 Views
    A
    @treebeard : Thanks for sharing the reason! Hopefully it will help others to prevent this experience.
  • Attemting to Port to Google Pixel 6 Pro (codname Raven)

    Unsolved
    1
    1 Votes
    1 Posts
    250 Views
    No one has replied
  • Pi-hole possible in UT?

    Unsolved
    10
    0 Votes
    10 Posts
    746 Views
    arubislanderA
    @trev As @Moem has so succinctly remarked, indeed it is! If you had succeeded in running Pi Hole on your device, you would have then have to proceed to set your device as your network's DNS server, which would mean that you would have no DNS, and consequently in practice no internet, if your device was offline for any reason at all. In short, I don't think running pi-hole on it would have been a very good idea.
  • App Store Language Problem

    Unsolved
    4
    0 Votes
    4 Posts
    267 Views
    A
    @nasyek : I don't see a recent bug report. Something must've gone wrong. I do see that someone else opened a bug report here: https://gitlab.com/theopenstore/openstore-meta/-/issues/339 However, it is closed. You can re-open it.
  • nextcloud

    Unsolved
    8
    0 Votes
    8 Posts
    511 Views
    A
    In case it helps for narrowing down the issue, it works for me on 16.04/xenial on a BQ E4.5.
  • WIFI connection to eduroam

    Unsolved
    8
    0 Votes
    8 Posts
    550 Views
    A
    In case it helps narrow down the issue, it works for me on 16.04/xenial on a BQ E4.5.
  • Export notes from phone

    export notes
    8
    0 Votes
    8 Posts
    1k Views
    A
    If you: don't sync notes but store them on your device ; and want to backup your notes to restore later on a fresh install of Ubuntu Touch (where you chose to wipe all): In 16.04, notes are stored here: .local/share/com.ubuntu.reminders/@local In 20.04, notes are stored here: .local/share/notes.ubports/@local You can use File Manager app to create a backup without need for terminal: Open the app and next to Restricted Access click Unlock and enter password; Go to the location above; Copy the @local folder by sliding it to the left and then click the copy icon; Paste it somewhere in your Documents folder (from the menu, top corner) Attach your phone to your PC and copy the backup folder to your PC. Once you've got the got a fresh install with Notes app: Follow the above steps in reverse and replace the newly created @local folder with your backup folder. (I know the OP asked this question long ago, but this answer might still help someone with same issue).
  • Migrate Dekko Dekko2 mail to 20.04 Focal

    Unsolved dekko2 focal fossa dekko 2
    9
    0 Votes
    9 Posts
    680 Views
    A
    @arubislander : Thanks for your advice! However, I did upgrade to 20.04 now with a clean install (wipe). Hence, this late reply. I just couldn't wait to try I still have to adjust some things (one of them is Dekko backup and config looks as if restored, it won't send/receive) but I hope and think I will be able to sort it out and it will be workable for me. [edit: Dekko is working after fresh installation and config of the app. I haven't put back config and mails.]
  • UBports bricked my Xiaomi Redmi 9A?

    Solved
    6
    0 Votes
    6 Posts
    2k Views
    S
    SOLVED! Steps: i) Follow the instructions in the links bellow to use the bypass tool (python script). You will need to press the up an down buttons so that Windows can detect the device. After running the bypass python script I obtained this and the device was shut down. [image: 1681669823966-screenshot-2023-04-16-155845.png] ii) I did NOT turn on the device. Then I use the ROM file (fastboot) provided here https://xiaomistockrom.com/xiaomi-redmi-9a and the Mediatek SP Flash tool with this instructions to flash to the device https://xiaomistockrom.com/xiaomi-redmi-9a
  • When comes Ubuntu Touch 20.04 to the BQ Aquaris E4.5 Ubuntu Edition?

    Unsolved
    3
    0 Votes
    3 Posts
    313 Views
    MoemM
    @anonymoustly said in When comes Ubuntu Touch 20.04 to the BQ Aquaris E4.5 Ubuntu Edition?: will the Windows installer work on Windows 8.1 x64? You will probably have better results if you boot the machine from a USB stick containing Ubuntu or Linux Mint, and install the UBports installer on that.
  • OTA 25 - call history and SMS db gone

    Unsolved
    18
    0 Votes
    18 Posts
    951 Views
    lduboeufL
    @mihael said in OTA 25 - call history and SMS db gone: @lduboeuf I deleted the first (oldest) 10000 records from voice_events and then restarted the phone and now I have again calls and texts history. interesting, so we have an issue when voice history is getting too big. That is why i've done a way to clean them in the UI meanwhile. But we could launch a clean process each time we reboot the phone to avoid that
  • SIM card locked for calls but unlocked for cellular data?

    Unsolved
    5
    0 Votes
    5 Posts
    360 Views
    LakotaubpL
    @ringprince https://github.com/the-modem-distro/pinephone_modem_sdk Modem update stuff niot had time to try myself yet.
  • Notch hack for affected devices

    Moved Solved
    6
    0 Votes
    6 Posts
    699 Views
    Z
    And there is also this very interesting proposal present https://gitlab.com/ubports/development/core/packaging/ayatana-indicators/ayatana-indicator-display/-/issues/2#note_1231292424 so hopefully one day it will get into the images by default.
  • OTA-25 devices going to sleep...

    Unsolved
    2
    0 Votes
    2 Posts
    240 Views
    KenedaK
    @MrT10001 OTA-25 makes my MX4 harder and harder to boot.
  • Remote Management of Ubuntu Touch Devices

    Moved
    5
    0 Votes
    5 Posts
    595 Views
    S
    @lduboeuf I tried it, but its only showing a black screen for me.
  • Problem with Onion Surf

    Unsolved
    8
    0 Votes
    8 Posts
    249 Views
    E
    @MrT10001 Then understand, problem with application if same in other devices, i'm using Onion Browser working good. Thank you for help.