Android Blog |
Android Blog
Alternative to MTP to transfer files between your smartphone and your computer
- Plug your smartphone to your Linux box with a USB data cable.
- On you smartphone, go into Settings ➡️ Wireless & Networks ➡️ More (or plus) ➡️ Tethering & Portable Hotspot ➡️ USB Tethering and enable it.
- Make sure that you've been assigned an IP address on usb0. If not assign one manually.
- Make sure that you can ping 192.168.42.129.
- Launch ES File Explorer, go into Menu ➡️ Network ➡️ Remote Manager and turn it on.
- Launch an FTP client on your Linux box pointing to 192.168.42.129 on port 3721.
- Obviously if you can't ping your smartphone on 192.168.42.129, you're not going to get anywhere.
- Check if you can connect to your FTP server over WIFI. If it doesn't work then you have a problem with the FTP server.
- If you're using ES File Explorer make sure that in the Settings you have sett the root directory to your SD Card correct path. Otherwise if you've set it to / and your device isn't rooted, it won't work.
- Check that your FTP server isn't restricted to listen on a specific IP address and excluding 192.168.42.129. To do that you can connect to your smartphone over and ADB shell session and type netstat -ant. Using ES File Explorer, this is what I get. My FTP server is running on port 3721 and listening on all IP addresses (yeah I know listening on all IP addresses can be a security risk but in this particular case, only if you still WIFI enabled and allow anonymous access).
TWRP - Failed To Restore Data / Error Sending Message To Add Storage 65537
- Restoring a ROM fails at restoring the Data partition
- When you try to format the Data partition you get "Error Sending Message To Add Storage 65537"
- You install a custom ROM successfully but it never fully boot
Chances are that because of a bug in some version of TWRP, sometimes MTP gets enabled by default when you go into recovery, thus prevents R/W access to the data partition.
Android - "UIDS on the system are inconsistent" error
A few times, probably after using Link2SD to move an app from the SD card to the phone internal storage or convert a user app into a system app, I received the following message
Although it looks scary, it is easy to fix. The key to resolve the error is to look on your device in:
/data/system/uiderrors.txt
If you have rooted your device, which if you've been using something like Link2SD is most likely, use something like ES File explorer, making sure that you've enabled root access and open the above file, scroll to the bottom of the log to find and delete the APK which is causing the error. Otherwise, read on!
Here is an example of mine where the package "com.wordreference" was the cause of the problem.
- Connect your device to your computer, fire up ADB and get a shell session
wisedom@wisedom-thinkpad ~ $ adb devices* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
01547AE81900F006 devicewisedom@wisedom-thinkpad ~ $ adb shell
Above, I've checked that my device (in bold) was connected before firing up a shell session. - Display the content of /data/system/uiderrors.txt
root@android:/ # cat /data/system/uiderrors.txt
08/04/2015 18:13: No settings file; creating initial state
4/8/15 8:20 PM: Need to read from backup settings file
4/8/15 9:21 PM: System package com.google.android.ears no longer exists; wiping its data
….
….
29/06/2015 07:04: System package com.vp.alarmClockPlusDock no longer exists; wiping its data 02/07/2015 20:10: Need to read from backup settings file
06/07/2015 12:18: Need to read from backup settings file
09/07/2015 21:31: Need to read from backup settings file
09/07/2015 21:31: Package com.wordreference has mismatched uid: 10085 on disk, 10127 in settings
10/07/2015 00:14: Need to read from backup stopped packages file
Above (in bold), you can clearly see which package was responsible for the error.
- Next, all needed to be done was to delete the package (I had 2 my in case). root@android:/ # rm /data/app/com.wordreference-1.apk root@android:/ # rm /data/app/com.wordreference-2.apk
- Reboot your device to finish.