command line – Termux (Terminal) tsu is adding “(unreachable)” to my current working path

When I run tsu (which is Termux’s version of su), my current working directory gets prefixed with “(unreachable)”, as you can see from the transcript of my session.

(u0_a116 …/~)$ tsu
(root …/home)# pwd
(unreachable)/data/data/com.termux/files/home
(root …/home)#

I did some digging and found what seems to me is the culprit.
tsu is a script that sets up an environment for the root user and then runs su to give you root privilege with the new environment. This is what the command that tsu is running looks like after opening all the variables.
/sbin/su -c PATH=/sbin/.magisk/busybox env -i PATH=/data/data/com.termux/files/usr/bin:/data /data/com.termux/files/usr/bin/applets:/system/bin:/system/xbin:/sbin:/sbin/bin ANDROID_DATA=/data TMPDIR=/data/data/com.termux/files/home/.suroot/.tmp PREFIX=/ data/data/com.termux/files/usr TERM=xterm-256color LD_PRELOAD=/data/data/com.ter mux/files/usr/lib/libtermux-exec.so ANDROID_ROOT=/system HOME=/data/data/com.ter mux/files/home/.suroot /data/data/com.termux/files/usr/bin/bash

This causes a problem when I try to run a script that is using relative paths. (I’m running a script to setup a full linux distro with proot in Termux).

If I take out the ‘env -i` from the command then I get the current working directory without the prefixed “(unreachable)”. This does not setup the new environment, it leaves the old environment intact as if I would have selected –preserve option.

applications – I’m facing issue in Android studios, my emulator process isn’t working

My codings are correct it’s just as soon as I run my app it finishes gradle build but after that message pops up showing error while waiting for device:the emulator process for avd was killed

I intalled latest version already made new app in avd so that it can create but it isn’t happening do you have any solutions?

sound – Chrome prevents keyboard play/pause button from working

I have Ubuntu 20.04.

If Chrome is not open, my keyboard’s play/pause button works (e.g. with VLC).

But if Chrome is open, my keyboard’s play/pause button does nothing. It won’t work on any app, not even on YouTube Music in Chrome. (My other media buttons — mute, softer and louder — continue to work.)

When I close Chrome, the button works again.

I would like this play/pause button to always work even when Chrome is open. (The button doesn’t have to work on Chrome itself, because Chrome provides its own play/pause button, though it would be nice if it did work there as well.)

I tried the fixes using Chrome’s flag and setting Gnome’s keyboard, but neither made any difference.

Do you know how I can fix this, please.

Thanks

macos – Wrong working directory, if bash script is opened via double-click

I wrote a bash script in order to directly start eclipse from different workplace locations. Each workplace contains the script, after running it, eclipse is started with the respective workspace set.

#!/bin/bash

# relative path
#ECLIPSE_DIR='../../'
ECLIPSE_DIR='/Users/mike/Development/java/'
ECLIPSE="${ECLIPSE_DIR}eclipse/eclipse.app"

AUTHOR='mike'

# current directory is workspace
WORKSPACE=`pwd`
echo "WORKSPACE = $WORKSPACE"

# start eclipse from current directory
#open -n $ECLIPSE --args -data $WORKSPACE -vmargs -Duser.name='$AUTHOR'

The script is working, when I run it from the terminal. But when I double-click it, it uses the home directory as working directory and thus starts eclipse not from the directory that contains the script.

Apparently scripts are executed from ~/., which is the cause for my trouble. What can I do to fix this? Or how can I change my script to get the desired behavior?

mediatek – Fastboot not working with new Teclast P80H

I am developing an in-car product and app. Previously, I had a Teclast P80H tablet with a micro-USB connector and running Android 7.0. I was able to enter fastboot mode and from Windows cmd window, issue the Android SDK command “fastboot oem off-mode-charge 0”. This successfully reconfigured that older tablet so that, if the tablet was fully shut down and turned off, connecting 5V to the micro-USB jack would cause the tablet to boot up and run. This was great for my in-car product and app.

Now that old tablet is no longer available, so I’m trying a newer version of the Teclast P80H. This one has a USB-C connector and runs Android 10.0. It takes a slightly different method to get into fastboot mode, but I think I’ve figured it out. However, when I issue the command “fastboot oem off-mode-charge 0” I get a message “FAILED (remote: ‘unknown cmd.’)”.

In order to make sure I really do have the tablet in fastboot mode, I’ve tried a couple things. First, issuing “fastboot reboot” does indeed reboot the new tablet like it did with the old tablet. Even better, the command “fastboot oem get_identifier_token” seems to work, telling me “(bootloader) Identifier token:” and on the next line “(bootloader) ******************”. Well, I’ve omitted the actual identifier for security purposes, of course, I guess. But this seems to prove to me that I have the tablet in the right mode to receive the “fastboot oem off-mode-charge 0” command.

But it seems like maybe this version of the tablet’s oem commands doesn’t include “off-mode-charge”. Perhaps the name or syntax has changed. But I don’t know how to find out. While “fastboot help” works, it seems that ‘fastboot oem help” doesn’t. I don’t know how to figure out how to configure this new tablet.

Again, my objective is for the tablet to boot up from full shutdown, whenever 5V is applied through the USB-C connector. BTW, I’m using the USB-C to USB-A cable that came with the tablet, plugging the USB-A end into my Windows 10 computer.

I did re-install the latest Android Studio. I also updated the SDK to Android 10. (It was Android 9.) However, the fastboot.exe program remains with an 11/14/2019 file date, perhaps the original date I installed it.

Any suggestions? Thanks!

unity – Scene reset function not working

I am entirely new to programming. Recently just watched this YouTube tutorial and follow the way the author wrote the code until (1:22:24). I’m not sure why the scene reset function for trasnform.position.y > 10 not working for me. The compiler does not detect any error and game run as normal but the scene does not reset when the bird position on y axis more than 10. I’m using another bird object anwyay since i can’t find exactly the same bird picture as author did. Also is there a way to check what the value store in each variable? Example I want to check what the value stored in “transform.position.y” to find out why it is not working.

using UnityEngine;
using UnityEngine.SceneManagement;
    
public class GreenBird : MonoBehaviour
{
    Vector3 _initialPosition;

    private void Awake()
    {
        _initialPosition = transform.position;
    }

    void update()
    {
        if (transform.position.y > 10)
        {
            string currentSceneName = SceneManager.GetActiveScene().name;
            SceneManager.LoadScene(currentSceneName);
        }
    }

    private void OnMouseDown()
    {
        GetComponent<SpriteRenderer>().color = Color.red;
    }

    private void OnMouseUp()
    {
        GetComponent<SpriteRenderer>().color = Color.white;
        Vector2 directionToInitialPosition = _initialPosition - transform.position;
        GetComponent<Rigidbody2D>().AddForce(directionToInitialPosition * 100);
    }

    private void OnMouseDrag()
    {
        Vector3 newPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
        transform.position = new Vector3(newPosition.x, newPosition.y);
    }
}

sharepoint online – SPFX Source URL Redirect NOT Working

I am currently working on a custom WebPart in SPFX and am having some issues with a URL redirect.

The code is looking to see if a field is empty, if the field == empty then it will automatically redirect to the current page. If the field is NOT empty, the code will redirect to the URL provided in the field.

Here is the code:

var tableResults="";
      var response = request.currentTarget.response || request.target.responseText;
      var data = JSON.parse(response);
      var currentPageUrl = this.context.pageContext.site.serverRequestPath;
      var redirectURL = this.properties.redirect;
      if (data.error) {
          console.log(data.error.message.value);
      }
      else {
          tableResults="<table border='1' cellpadding='10' ><tr><th>Enroll</th><th>Event</th><th>Spots Left</th></tr>";
          for (var i=0; i<data.d.results.length; i++)
          {
              //alert(i + ": " + data.d.results(i).Time);
              if(parseInt(data.d.results(i).AttendeesId) < parseInt(data.d.results(i).Quota) && redirectURL == "")
              {
                tableResults=tableResults + "<tr><td><a href='https://ewscripps.sharepoint.com/sites/rsvp/Lists/Register/NewForm.aspx?SessionID="+ data.d.results(i).Id + "&Source=" + currentPageUrl + "'>Click To Enroll</a></td>";
              }
              else if (parseInt(data.d.results(i).AttendeesId) < parseInt(data.d.results(i).Quota) && redirectURL != "")
              {
                console.log(redirectURL);
                tableResults=tableResults + "<tr><td><a href='https://ewscripps.sharepoint.com/sites/rsvp/Lists/Register/NewForm.aspx?SessionID="+ data.d.results(i).Id + "&Source=" + redirectURL + "'>Click To Enroll</a></td>";
              }
              else
              {
                tableResults=tableResults + "<tr><td><font color='red'>Event Full</font></td>";
              }
              var spotsLeft = data.d.results(i).Quota - data.d.results(i).AttendeesId;
              tableResults=tableResults + "<td>" + data.d.results(i).Title + "</td><td>" + spotsLeft + "</td></tr>";
          }
          tableResults=tableResults + "</table>";

            //then you just need to generate the legend
            sessionsdiv.innerHTML= tableResults;
      }

The console.log(redirectURL) is showing the URL entered in the field, but for some reason, SharePoint is redirecting to the “All Items” list as it does by default.

Any help would be much appreciated!

Thanks!

How to make this powershell script working in bath file?

$bytes = (System.IO.File)::ReadAllBytes("$HomeDesktopTest.lnk")
$bytes(0x15) = $bytes(0x15) -bor 0x20 #set byte 21 (0x15) bit 6 (0x20) ON
(System.IO.File)::WriteAllBytes("$HomeDesktopTest.lnk", $bytes)

windows – WintoUSB not working!

I need to create a portable windows To Go workplace for my job, i tried WinToUSB tool and it didn’t work, it keeps stucking at 0% when creating Windows to Go with a USB 3.0, so, is there any other way or tools that can create a WTG drive?

SharePoint PWA Manifest file not working

I have created an SPfx webpart with PWA features. My service worker and manifest.json file are working in my local workbench but when deployed to sharepoint 2019 server, manifest file does not load.

I tried to change the extension to manifest.webmanifest but it is still not working.
Also added crossorigin=”use-credentials” programatically as below –

aLink.setAttribute(“crossOrigin”,”use-credentials”);

My manifest file is read from SharePoint style library. Is there anything else that is missing to make it work?