Unable to access Redmi Note 5 Pro from Ubuntu 18.10
I'm using Ubuntu 18.10 (Cosmic Cuttlefish), and I've Redmi Note 5 Pro on MIUI Global 10.0 ROM. When I connect my device and try to access the drive, I get the following error :
Unable to access "SDM636 MTP SN:E5BA4F65"
Couldn't find matching udev device.
I asked the same question here about 20 days ago, but didn't get any response.
Output of some useful commands :
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0bda:b006 Realtek Semiconductor Corp.
Bus 001 Device 017: ID 2717:ff48
Bus 001 Device 006: ID 04f2:b50d Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ mtp-filetree
Device 0 (VID=2717 and PID=ff48) is a Xiaomi Mi-2s (MTP).
Attempting to connect device(s)
Android device detected, assigning default bug flags
Error 1: Get Storage information failed.
Device: (NULL)
LIBMTP_Get_Storage(): Resource temporarily unavailable
OK.
I also tried to install android-udev-rules
and followed the steps as described here. But still no progress.
I noticed something unusual, when I try to install an App from Android Studio, it worked (Only the installation, I'm still not able to access anything else). I don't why, but the app is there in my phone but I'm unable to get the Logcat.
PS: I also asked the same question here as well.
See also questions close to this topic
-
Integrating a twitter timeline from one account into Android Studio
I've been searching for a while now on how to add an account's timeline into my Android app. All of the tutorials lead to creating an actual Twitter app, but that is not what I want. What I'm looking for is just a timeline from an account like Toronto Raptors or similar that only shows their recent or all tweets (doesn't matter).
-
Android WebView: how to scroll to an <a name=here> position
I'm loading a self-created HTML page into a
WebView
in an Android app.The HTML page contains a tag like
<a name="here"></a>
somewhere in the middle.After loading that page, I'd like to be able to programmatically scroll to that position, as if I had clicked on a
<a href="#here">here</a>
link.I tried with
loadURL
and withloadDataWithBaseURL
, with every possible parameter combinations that I could think of, without success.Note 1: I want to be able to scroll to that position after the page has been already displayed.
Note 2: I cannot use
scrollTo(x,y)
because I don't know the y position of that<a name="here">
anchor within the page. If I could figure out the y position in the page of that<a name>
tag, that would also solve the problem, but I don't know how to find that y value either.(P.S. I'm loading the self-created HTML page by calling
loadDataWithBaseURL(null, _html, null, null, null);
where _html is the string with my HTML page) -
Best Tools and Technologies to develop Metro App
I am new to Application Development. I want to know which are the best tools and technologies in the market to develop a Metro App where I can incorporate below functionalities :
- Search - To and From
- Show the Map -
GIF
File - Show Direction and Time.
- Show different points in Maps along with details.
Thanks.
-
Getting EOS when using gstreamer to send video over serial to RPi Zero (USB Gadget)
I'm using my Ubuntu desktop and gstreamer to send USB webcam video to my RPi Zero. When I make the connection I first make sure the serial port (ttyACM0 on the linux deskstop and ttyGS0 on the RPi Zero) are setup with these:
stty 115200 raw -echo < /dev/ttyACM0 stty 115200 raw -echo < /dev/ttyGS0
I'm using the following command to grab video from my USB webcam on the linux desktop and send it to the RPi:
gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg,width=640,height=480,framerate=30/1 ! jpegparse ! jpegdec ! filesink location=/dev/ttyACM0 blocksize=1024 max-bitrate=115200 sync=false
I validate the data is coming over the port by executing the following on the RPi:
cat /dev/ttyGS0
To read the data on the Rpi I use the following command:
gst-launch-1.0 -v filesrc location=/dev/ttyGS0 blocksize=1024 ! fbdevsink
I'm uisng fbdevsink because I'm running headless, but I have the Rpi hooked to a monitor. I know fbdevsink works because I run the gstreamer test pattern thru it with no issues.
However, when I use it for reading the video across the serial port I get the following error:
root@raspberrypi:/home/pi# gst-launch-1.0 -v filesrc location=/dev/ttyGS0 blocksize=1024 ! fbdevsink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 0:00:02.373297098 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Does anyone have advice for streaming video across the serial port and displaying?
-
Prevent apt from overwriting a package manually installed
Ubuntu Bionic provides Protobuf 3.0.0, and I'd like to use the latest release, 3.6.1.
I've gone and built the Protobuf sources and installed them with the prefix
/usr
, so the files end up in the same place that the official Ubuntu package puts them.However, if I subsequently issue an
apt-get install protobuf-compiler
, it will overwrite myprotoc
binary with the older version. (Actually,protobuf-compiler
is specified as a build dependency of a package I'm building withmk-build-deps
.)I've tried using
apt-mark manual protobuf-compiler
to tellapt
that I've manually installed it, but it tells me I can't do that because the package is not installed. (How does it determine this? I don't know.)Similarly
apt-mark hold
does not prevent the binary from being overwritten.What is the correct way to install this software, have
apt
understand that the dependency is satisfied, and not have it overwrite my newer build with the old one? -
Not able to install Visual studio code on ubuntu
I am getting this error while installing Visual studio code on ubuntu.
I tried these commands,first three worked but I am getting an error after the fourth one.
- sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
- sudo apt-get update
- sudo apt-get install ubuntu-make
umake web visual-studio-code
usage: umake web [-h] {firefox-dev,phantomjs} ... umake web: error: argument framework: invalid choice: 'visual-studio-code' (choose from 'firefox-dev', 'phantomjs')
-
Cannot run program "adb": error=13, Permission denied
I have a program, which must execute only one command
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) Runtime.getRuntime().exec("adb shell input tap 0 0") } }
But I'm getting an error
Process: com.example.tomfo.pokerclicker, PID: 11578 java.io.IOException: Cannot run program "adb": error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050) at java.lang.Runtime.exec(Runtime.java:695) at java.lang.Runtime.exec(Runtime.java:525) at java.lang.Runtime.exec(Runtime.java:422) at com.example.tomfo.pokerclicker.MainActivity$onCreate$1.run(MainActivity.kt:14) at java.util.TimerThread.mainLoop(Timer.java:562) at java.util.TimerThread.run(Timer.java:512) Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:133) at java.lang.ProcessImpl.start(ProcessImpl.java:132) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) at java.lang.Runtime.exec(Runtime.java:695) at java.lang.Runtime.exec(Runtime.java:525) at java.lang.Runtime.exec(Runtime.java:422) at com.example.tomfo.pokerclicker.MainActivity$onCreate$1.run(MainActivity.kt:14) at java.util.TimerThread.mainLoop(Timer.java:562) at java.util.TimerThread.run(Timer.java:512)
Although I've added adb to path into properties on Windows and can run abd commands throw Android Studio console (but in Android Studio console command is not green). How to solve this problem? This command is working throw Studio console command
-
ADB command to check if app is launched and its running?
I am writing a python automation code and I am connecting to a open WiFi network which will open a default browser with sign In page.
Instead of this default page i want to use the Chrome browser to sign in to that WiFi network.
So, I want to know which ADB command I can use to check if the default browser application is launched.
Please help me with code snippet as well.
-
remote adb sync over ssh
This might already be answered but I couldn't find anything on Google or SO. So here we are.
I have a linux box at work with the android repo. When working from home, my mobile is connected to my laptop. I will make some changes to the files on the linux box via ssh.
The ask is I want to be able to do adb-sync from the linux box to my phone.
Is there a tool already existing for this? Or if I have to write one my own, can anyone give me some pointers? -
libmtp download and upload an entire folder tree to a MTP device
I am trying to implement libmtp.h library into one of my personal projects and I don't see an option to upload or download a directory to a MTP device or to a computer. There is a method LIBMTP_Get_File_To_File which is listed inside the library file using which I was been able to transfer files from MTP device but there is no mention on how to transfer a folder.
I found a workaround to transfer a folder structure—check whether a folder exists, if not create one and loop through the rest of the tree recursively and transfer them. But I don't feel that it's the correct way to achieve this.
Any suggestions will be helpful!
Thanks!
-
MTP driver in laptop not installing
I have an HP laptop with windows 10 installed in it. I have been trying to connect my phone with the laptop but the laptop only charges it. The phone is not listed in other devices in device manager and when I try to update the MTP driver, it gives a code 10 error. I've tried all possible solutions present on the internet but nothing has worked. Any help would be appreciated.
-
VB.NET delete file on MTP device
Hail ye fellow writers of code,
I'm currently working on a solution to import pictures from a camera, and so far I am able to copy those files, but I'm not able to remove those files afterwards. The camera in questions uses MTP, which cannot be changed.
The code I currently have for deleting those files is as follows:
surebox = MsgBox("Are you sure you want to delete the selected files?", MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Delete files?") If surebox = MsgBoxResult.Yes Then For Each item As ListViewItem In ListView1.Items If item.Checked = True Then My.Computer.FileSystem.DeleteFile(item.SubItems.Item(1).Text & "\" & item.SubItems.Item(0).Text) item.Remove() End If Next End If
In the code above, item.subitems.item(1).text states the path, and item.subtitems.item(0) states the file name.
Thanks in advance everyone.
-
Android Studio could not detect Redmi 5A
I connected my redmi 5A using usb cable, with developer and usb debugging enabled, but somehow android studio could not detect my device when i click the run icon.
i tried to troubleshoot and the event log showed this
Really need your help, i tried searching for solutions but none of it work
-
how to get Most Accurate GPS Location in All mobile devices using Background service
I am developing an android app in which i am using background services to get device Location using GPS in every 5 min. but I am facing a issue that in Redmi mobile devices i m not getting accurate location as compared to samsung devices.So if any one can guide me what is the solution for this.
-
How to enable show on lock screen permission in Redmi 5 programatically
I want to open activity through push notification, but in mi devices it is not opening due to "Show on lock screen" permission of, how to enable this programmatically.