子版面

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

    7 主題
    1 貼文
    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 主題
    645 貼文
    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 主題
    934 貼文
    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."
  • My phone starts twice

    7
    0 評價
    7 貼文
    558 瀏覽
    D
    For BQ E5 HD : Stable channel : simple boot. I tried the last RC channel (66) and it's party time ! I got dual and even triple boot ! On the other hand, the scrolling of the desk is not very fluid. Is that a known problem ?
  • Dekko2 lost or see as corrupted all its config

    2
    0 評價
    2 貼文
    172 瀏覽
    G
    Dekko2 is still called an experimental app. Sounds like a bug you should report on the repository.
  • ubuntu touch image error

    8
    0 評價
    8 貼文
    671 瀏覽
    J
    @Marathon2422 said in ubuntu touch image error: What to do when iam not getting a good wipe pleaase sir
  • I have an error registering

    3
    0 評價
    3 貼文
    281 瀏覽
    LakotaubpL
    @jezreel Both your last two post are related to each other and they are related to your first post here https://forums.ubports.com/topic/3930/ubuntu-touch-image-error Please can you keep everything to do with one issue in one place for reasons I have already mentioned in responding to your other post. It will not get answered any quick in fact it may take longer as there is no context. Could you please add both these issues to your first post and we can try and solve it with all the available info. You can then delete your other posts or we can do it for. Thanks for your understanding.
  • Please help with error code

    3
    0 評價
    3 貼文
    266 瀏覽
    LakotaubpL
    Please also don't post lots of related issues as separate posts. It just creates confussion for us, you and others trying to follow things. Could you please add the other one to this and we can keep it all together. You can use the three little dots to the left to edit your post. Thanks.
  • [Sorted] N5 won't reboot after update 2020/03/10

    8
    0 評價
    8 貼文
    282 瀏覽
    U
    Aplologies for the inconvenience caused. The issue was indeed a bad update causing the upgrader to clear a directory it should not have. See https://github.com/ubports/ubuntu-touch/issues/1395 If you are affected by this issue, it is now safe to reinstall Ubuntu Touch using the UBports Installer. You will not lose any data.
  • [FP2] No MMS notification when data are off

    2
    0 評價
    2 貼文
    266 瀏覽
    lduboeufL
    @natineo sadly it is an old known problem, and it seems that we didn't find any volonteer to dive into it This bug is logged here : https://github.com/ubports/ubuntu-touch/issues/239
  • Any news about m10hd "cooler" wifi-problem?

    24
    1 評價
    24 貼文
    5k 瀏覽
    hankschwieH
    Hi! Worked just fine, just one thing about it: in Step 7 you need cp /home/phablet/Downloads/nvram-by-skyneel.com/WIFI* . nvram-by-skyneel.com is missing in your path. Thanks a lot!
  • Help!, UB recovery, what opción select? Oneplus one

    12
    0 評價
    12 貼文
    1k 瀏覽
    LakotaubpL
    @gregb49 I had same issue on one of mine. Battery replacements are cheap enough and easy to do. Give it a go. Mine is fine now.
  • Ubuntu touch and xa2

    3
    0 評價
    3 貼文
    516 瀏覽
    M
    @markus228 said in Ubuntu touch and xa2: What happen Probably not much :man_factory_worker_light_skin_tone:
  • How to open a .txt file that I copy from PC to FP2 with UT? [Solved]

    14
    0 評價
    14 貼文
    1k 瀏覽
    OpolorkO
    I've made a note of the tedit paths and commands and may try it at a later date. Or anyone else can try and post here if they please. For now, I prefer the uText method as described in my post here: https://forums.ubports.com/topic/3902/how-to-open-a-txt-file-that-i-copy-from-pc-to-fp2-with-ut/12?_=1583692201634 Cheers, friends.
  • Nexus 5 - Review

    15
    0 評價
    15 貼文
    1k 瀏覽
    C
    Hi, I am still playing around with my N5 and I have tested some Android apps with Anbox. Spotify works and I can cast the music via WiFi to my stereo and via Bluetooth to a speaker.
  • How to change the libertine's default repository?

    已移動
    4
    0 評價
    4 貼文
    295 瀏覽
    dobeyD
    Unfortunately, the ports.ubuntu.com repository is separate from the standard Ubuntu archive, and there are very few, if any, mirrors available that include armhf or arm64 packages. So, you can't really change the repository in this case.
  • Galery video + Teleports video attachments

    16
    0 評價
    16 貼文
    526 瀏覽
    ?
    @domubpkm Thanks! But I think it would be wiser to wait a little bit more, than spending money on a new phone (OPO) and then buy another new phone (Pine) after I bought already a new Nexus 5, although my CAT S60 is still kicking...
  • 此主題已被刪除!

    1
    0 評價
    1 貼文
    1 瀏覽
    尚無回覆
  • Series of my Ubuntu Touch related videos

    app development ubuntu touch nexus 5 development video
    13
    10 評價
    13 貼文
    2k 瀏覽
    C
    @HendriXXX Thanks, your video helped a lot!
  • Can't find way to move Recorder app audio files to my PC. [Solved]

    15
    0 評價
    15 貼文
    1k 瀏覽
    OpolorkO
    Today, there was an update for the Recorder app. I tried again to move a recorded file to my PC - this time it worked even better - my phone was left on. No issue.
  • Power drain, perhaps caused by app Notes

    13
    1 評價
    13 貼文
    688 瀏覽
    G
    @Flohack said in Power drain, perhaps caused by app Notes: @guru Yes unfortunately dekkod is known to enter a busy-waiting loop when it cannot reach any network resources from the accounts - do you turn off your internet over night? Btw, the looping/polling proc was not dekkod but dekkod-notify. Looks like a concept flaw polling every second.
  • Install Ubuntu Touch on LG Nexus 5 with Android 4

    23
    1 評價
    23 貼文
    6k 瀏覽
    adeliepenguinA
    @dobey said in Install Ubuntu Touch on LG Nexus 5 with Android 4: [...] However the razor images are also the same as used on deb/flo, the first gen 2013 Nexus 7 tablets. Thanks for sorting this out. Mine says "product name: deb" in bootloader mode, but there's no such image on Google's download page. I'll use razorg then to compare firmware versions.
  • Bluetooth refuse to be activated on Nexus 5

    11
    0 評價
    11 貼文
    918 瀏覽
    B
    I was also affected by this issue after updating to version 66 today. Reinstalling via the UBports Installer resolved the issue. Install options used: Channel: 16.04/rc Wipe Userdata: No Bootstrap: Yes Format system partitions: No