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."
  • 0 Votes
    2 Posts
    277 Views
    LakotaubpL
    @jamc You could also ask your question on our Telegram install group here https://t.me/WelcomePlus I know some of them have experience with macs etc.
  • oneplus one (bacon) issues: updates, wifi, text/txt/sms/mms, & phone calls

    Moved
    13
    0 Votes
    13 Posts
    2k Views
    M
    I have problems with the wifi on a different phone, a Pro5, since I purchased it and never understood why but I always thought this phone wasn't a lucky one. I'm on 16.04 Devel but it doesn't work regardless of the channel, and on the Vivid image as well. The wifi is working when I reinstate the credentials every time, but it doesn't automatically show up at every reboot, as the Access Point credentials didn't exist before. I read @Flohack reporting about a MAC number problem, so I tried to investigate to see what happens on the phone at reboot. After rebooting, I checked the var/log/syslog and I found a MAC verify failed kernel error. @Osndok, by the chance do you have the same error? Could it be related to the fact that the wifi doesn't work? If of any interest, I provide part of the syslog HERE. Matteo
  • How to setup crossbuilder in Ubuntu 18.10?

    Moved
    2
    0 Votes
    2 Posts
    418 Views
    LakotaubpL
    @marc_aurel Just moved you : ) You question is better suited to here. Hope you get sorted quickly.
  • no wifi on hammerhead (OTA-6, 16.04/20181126)

    7
    0 Votes
    7 Posts
    693 Views
    T
    In case somebody might have similar issue and settings: I found rndis as solution for any useable inet access at least. Docu here: http://docs.ubports.com/en/latest/userguide/advanceduse/reverse-tethering.html I had to set link up and give address manually. But jippie, it works. (WiFi stopped working. Was not able to get it working again.) I got inet connection on the phone, but it seems to not use this connection for "fetching channels" - wheel's turning, no traffic seen via tcpdump on the rndis interface of the pc. Still: Some image/packages to download would still be great.
  • Installation alternatives for unsupported phone

    2
    0 Votes
    2 Posts
    2k Views
    advocatuxA
    @drosera_capensis the only option is to try to port that device to Halium, and then try to port it to UT.
  • Aquarius 4.5 how to delete Browser Next

    8
    0 Votes
    8 Posts
    663 Views
    J
    Just in case. My OS is now Ubuntu 16.04 (2018-W50). I could not locate Next anymore, so if it left something to the system then they will stay. Still, that is a small price to pay for convenience.
  • Trying to understand how developers are performing their work

    2
    0 Votes
    2 Posts
    473 Views
    R
    Hello Everyone, While I may appear to be new, I have longed for UT for several years. I just purchased an N5 in excellent virtually unused condition. However, I have concerns. I read here the battery has life has improved in xenial. However, my real need is to understand how developers are performing their work. By this, I suspect a debugger is involved. What are the tools involved in this game? From my perspective, the N5 is certainly suitable to get me in the development game. Older hardware does not bother me. I currently have a 2013 LG Optimus G Pro in perfect condition, I do not tread on my phones, that I would love to begin porting with Halium. However, it makes much more sense for these idealogical goals, or myths to be discussed in the framework of hardware, system architecture, etc., rather than, "I would like to know if my device can be ported." What can you tell me? I am here to learn and to have fun!
  • 0 Votes
    5 Posts
    751 Views
    C
    @dobey said in How can a webapp run in sandbox when using Morph browser to display its content?: It does not destroy the profile on exit, no. Why would you want such a behavior? Just to prevent blowing up the webapp profile too much... As a pure reading app, in my eyes there is no need to store any data on the phone. Neither cookies nor anything else (e.g. accepted privacy confirmations).
  • bq Aquaris 4.5 Ubuntu Touch (vivid/ubuntu 15.04) is not upgrading.

    12
    0 Votes
    12 Posts
    1k Views
    ?
    @root-ruud You've prompted me to look at the dialer app in more detail! If you swipe up from the bottom edge, it gives you a lot of details about calls: date and duration, incoming/outgoing and to whom, etc.
  • Meizu MX5 Pro Ubuntu edition Bootloop'ed

    2
    0 Votes
    2 Posts
    416 Views
    S
    @sz If you meant PRO5 , read here those links, should help you. If you meant MX5 , this device was never supported, so no such a thing as UT on it. The most likely your problem is ,,too small cache partition,, (Meizu Pro 5 ) https://forums.ubports.com/topic/665/meizu-pro-5-without-any-os https://forums.ubports.com/topic/1610/meizu-pro-5-16-04-stable-backup-for-restoring-with-twrp https://forums.ubports.com/topic/1252/problems-flashing-ubports-on-meizu-pro-5-android-international-edition http://sturmflut.github.io/
  • OTA-6 update not available anymore

    9
    0 Votes
    9 Posts
    1k Views
    R
    Same as @Michael for me. So everything's ok now.
  • [wifi] how to fix wrong regdom?

    5
    1 Votes
    5 Posts
    493 Views
    F
    Found a related bug report: Hammerhead: Some Wifi networks don't appear #714.
  • Wake up CPU cores

    1
    1 Votes
    1 Posts
    270 Views
    No one has replied
  • Battery replacement concerns!

    4
    1
    0 Votes
    4 Posts
    732 Views
    ?
    Yes, I also expect that it is far more likely that a defective battery is to blame, plus the batteries should have protection circuitry built-in anyways. Based so far on what I have read (There is some BAD information out there!), there is some handling of this information by Android, so I will figure it out before I reattempt. The Android batterystats.bin information is surviving the flash into UT somehow, because the battery life is in the ballpark of being similar between an Android and UT system. Or maybe it isn't being preserved and it is part of the reason everyone complains about battery life? It would be interesting to hear a battery replacement success story. A possible solution would be to replace the battery and perform a few discharge cycles under Android before reflashing as it is a very infrequent event. Anyway, I have put the original battery back in, and everything is running smoothly now. I plan on reattempting this in the near future, but I will try to buy a more expensive knock-off this time.
  • 0 Votes
    3 Posts
    520 Views
    myiiM
    GSettings values: $ gsettings list-recursively com.ubuntu.touch.sound com.ubuntu.touch.sound incoming-call-sound '/usr/share/sounds/ubuntu/ringtones/Ubuntu.ogg' com.ubuntu.touch.sound incoming-message-sound '/usr/share/sounds/ubuntu/notifications/Rhodes.ogg' com.ubuntu.touch.sound silent-mode false
  • Keep alive disabled by default ?

    Moved
    5
    0 Votes
    5 Posts
    836 Views
    dobeyD
    The value you see from /proc/ is the default value, and it is 7200 seconds. Setting it to a much lower value would not solve whatever issue it is you're having. More than likely, the router (or DHCP server rather) is renewing the IP lease, which is probably resulting in a new IP address or other disruption to any active connections. Or there is some other problem.
  • [solved] Is there a StackExchange-app available for Ubuntu Touch?

    Moved
    2
    0 Votes
    2 Posts
    332 Views
    mymikeM
    @custello just search for it on open-store.io, but there isn't one I think. anyway, you can easlily make a webapp using webapp creator on Ubuntu Touch for that website
  • Morph Browser debugging?

    Moved
    1
    1 Votes
    1 Posts
    271 Views
    No one has replied
  • Panasonic JT-b1

    Moved
    6
    0 Votes
    6 Posts
    741 Views
    R
    @advocatux Would it be possible to upgrade my Kernel?
  • 0 Votes
    6 Posts
    614 Views
    advocatuxA
    @ubuntoutou that warning message means or that you have installed in your device a non-xenial app (i.e. a vivid one) or that you have installed an app non-published-yet in the OpenStore (the latter is a pretty common scenario when beta-testing apps straight from the developers repos).