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."
  • Nexus 7 WiFi or LTE?

    3
    0 Votes
    3 Posts
    510 Views
    D
    I have UT running on N7 gsm "deb". It's clunky to install, but it runs ok. If you try and get stuck, let me know. However, I don't have a sim card for it, so I can't try gsm/lte
  • Loss of network

    6
    0 Votes
    6 Posts
    552 Views
    G
    Finally i reinstall the OS yesterday evening with the 16.04 . It works well :). Thanks for your advice
  • complete Linux system for chroot inside the 16.04-OTA5

    2
    1 Votes
    2 Posts
    373 Views
    dobeyD
    You can get the UBports rootfs from http://cdimage.ubports.com/rootfs/ I think.
  • OTA5 MeizuMX4 Bluetooth regression

    1
    0 Votes
    1 Posts
    343 Views
    No one has replied
  • Is OTA-5 released?

    9
    0 Votes
    9 Posts
    964 Views
    D
    @guru UBUNTU TOUCH v4 ** IS ** OTA 5 : I updated last night OTA 3 STABLE /OTA 5 STABLE on a BQ 4.5. But I had to desinstall some vivid app which were on the phone yet and didn't work. For the equivalent xenial of vivid apps, they were updated. I noticed that vivid WALLPAPERS app works well on the xenial phone ! And download wallpapers is possible.
  • Notes app stopped working after update to version 0.6.3

    crashes notes reminder
    2
    0 Votes
    2 Posts
    516 Views
    P
    @pierref This issue has been fixed in my case by updating my system from OTA-4 to OTA-5.
  • System crash (16.04)

    Moved
    2
    0 Votes
    2 Posts
    437 Views
    advocatuxA
    Moved this post to Support.
  • Nexus 5 - Convergence / External Display and Libertine apps

    3
    2 Votes
    3 Posts
    404 Views
    advocatuxA
    @touchyfeely yes, you have Fluffychat and uMatriks in the OpenStore. I'm using the latest Fluffychat version for testing, not the one in the Openstore now. If you want to give it a try https://janian.de/index.php/s/bpxF889ZP2oeYCZ it works great
  • Nexus 5 - keep losing WiFi since OTA 5 update.

    12
    1 Votes
    12 Posts
    2k Views
    LakotaubpL
    Then all that can really be suggested is to check the github bug reports and see if one exists. If so add to or confirm it, if not create one and others can then help by confirming it or not. Bug reports mean things are logged and fixed. Please just make sure that one doesn't already exist.
  • Anbox updates?

    4
    0 Votes
    4 Posts
    730 Views
    mymikeM
    @mihael then ask there and don't start a new topic
  • Keyboard Layouts for terminal-app in 16.04-OTA5

    1
    1 Votes
    1 Posts
    236 Views
    No one has replied
  • OTA5-RC camera issue N5

    5
    0 Votes
    5 Posts
    691 Views
    D
    I've noticed an apparent camera problem with my Nexus 4 running OTA 5. This surprised me as the camera issue was meant to be fixed in OTA 5. My problem was that photos taken by the rear camera were black. This puzzled me because the camera was working well enough to compose the photo. Further investigation revealed that the issue did not occur if the flash was turned off. I concluded that the problem might be caused by light from the flash being ducted to the lens via the flexible silicone gel phone protector. This had a generous cut-out for the lens/flash. To test my theory, I removed the gel protector and this completely cured the problem.
  • Dekko and Dekko2 for 16.04-OTA5

    3
    0 Votes
    3 Posts
    401 Views
    G
    I have in my daily driver E4.5 four mail accounts of different servers, all are of the typr IMAP+SMTP, and I just wanted to copy over via SCP all that config. In addition, the question of Dekko2 about the config of the account: Google....IMAP, POP, SMTP is a bit misleading and clumsy. All my accounts are IMAP for downstrean and SMTP for upstream, and not or
  • Flashing from an Ubuntu live system

    8
    0 Votes
    8 Posts
    1k Views
    G
    I flashed with the tool 16.04 into my BQ E4.5. Two observations: Against what is shown in the video, I was not asked to press any buttons on the device. After detecting the device correctly as BQ E4.5 and already downloaded some parts, it raised an error, something "like device not detected"; luckily I marked "ignore" and it seems that OTA-15 is installed fine.
  • Morph Browser / Adobe flash

    1
    0 Votes
    1 Posts
    379 Views
    No one has replied
  • Earphone/mic jack on OPO

    Moved
    6
    0 Votes
    6 Posts
    887 Views
    U
    @Lakotaubp thanks for the tip as I was not aware this app was out there. However, it did not work for me this time.
  • UBPorts Installer and stock unlocked Nexus 5 - can't install

    26
    0 Votes
    26 Posts
    4k Views
    advocatuxA
    @touchyfeely someone [*] got to run an old version of Firefox in a 15.04 Libertine container, but it seems there's an upstream bug for Firefox in armhf still if you want to do it in a 16.04 Libertine container. [*] Maybe @UniSuperBox?
  • Sailbook and Facebook Basic Back button changed functionality

    5
    0 Votes
    5 Posts
    622 Views
    halucigeniaH
    I have the same issue using facebook in the morph browser, I just cannot keep track of where I was in my feed when clicking on a post to read it. It must just be a new facebook "feature".
  • OPO hotspot mode

    Moved
    5
    0 Votes
    5 Posts
    897 Views
    U
    I to have always found turning the hotspot on for my OPO a pain. Most of the time it can take up to 7 plus attempts from the settings. I hardly ever can get it to activate via the notifications bar. With the latest releases it dors seem to be getting better but still not perfect by a long shot.
  • This topic is deleted!

    3
    0 Votes
    3 Posts
    54 Views