Best way to get USB host mass storage working? - Sony Ericsson Xperia Neo, Pro

I am using Neo V official build 4.1.B.0.431 (ICS 4.0.4), rooted, unlocked bootloader (doesn't seem to matter)
I've downloaded the kernel source code, compiled the `usb-storage.ko` module, and placed it on `/system/lib/modules/drivers/usb/storage/`.
I've also changed `/system/etc/vold.fstab`, added this line:
Code:
dev_mount usb /mnt/usbstor auto /devices/platform/msm_hsusb_host.0
Then I restarted the phone.
After that, I typed the commands (using root) in shell:
Code:
mount -o remount,rw /
insmod /system/lib/modules/drivers/usb/storage/usb-storage.ko
cd /mnt
mkdir usbstor
Then I plugged in the OTG cable with a USB Flash Drive.
The storage is successfully mounted (by vold, I think), as I can verify in Root Explorer. I don't have photos so can't verify whether media scanner can detect it.
But in Settings->Storage it didn't appear. Seems that the Settings app don't support. I cannot unmount it using GUI, so when I remove the storage it warns me about that.
Are there any ways to get the Settings app to show my USB storage so that I can unmount via GUI?
Also how to automatically `insmod` and create `/mnt/usbstor` when startup? I won't bother editing ramdisk, but anything under `/system` is fine. I saw a few shell scripts under `/system`, are they fine to use?

Download USB otg from market. It's for both, arc s & neo/ neo v.
Use it with caution it may burn your motherboard....
Sent from my MT11i using xda app-developers app

Fine. I didn't use any piece of compiled binary anywhere else, but I've done the following:
1. insmod and create mountpoint using `/system/etc/pre_hw_config.sh`
2. edited `res/xml/storage_list.xml` in `framework-res.apk`.
Now the USB storage shows up in system storage settings. The name showed "USB storage" though it still shows "mount USB". I can normally use it now.
It seems to be better than using 3rd-party applications.

alvinhochun said:
I am using Neo V official build 4.1.B.0.431 (ICS 4.0.4), rooted, unlocked bootloader (doesn't seem to matter)
I've downloaded the kernel source code, compiled the `usb-storage.ko` module, and placed it on `/system/lib/modules/drivers/usb/storage/`.
I've also changed `/system/etc/vold.fstab`, added this line:
Code:
dev_mount usb /mnt/usbstor auto /devices/platform/msm_hsusb_host.0
Then I restarted the phone.
After that, I typed the commands (using root) in shell:
Code:
mount -o remount,rw /
insmod /system/lib/modules/drivers/usb/storage/usb-storage.ko
cd /mnt
mkdir usbstor
Then I plugged in the OTG cable with a USB Flash Drive.
The storage is successfully mounted (by vold, I think), as I can verify in Root Explorer. I don't have photos so can't verify whether media scanner can detect it.
But in Settings->Storage it didn't appear. Seems that the Settings app don't support. I cannot unmount it using GUI, so when I remove the storage it warns me about that.
Are there any ways to get the Settings app to show my USB storage so that I can unmount via GUI?
Also how to automatically `insmod` and create `/mnt/usbstor` when startup? I won't bother editing ramdisk, but anything under `/system` is fine. I saw a few shell scripts under `/system`, are they fine to use?
Click to expand...
Click to collapse
Hi Alvin,
I´m having big issues with enabling USB Host mode as well (phone does not find any usb devices such as usb mouse or a pendrive), so I would greatly appreciate your help in finding the root of this problem. Here are the details and what I tried so far:
1. Im running on a rooted GT-i8530, leaked 4.1.2 rom with busybox installed
2. android.hardware.usb.host.xml permissions xml file exists in etc/permissions and just mentiones the apache license
3. Running USB host diagnostics I got:
Android API
Claims support yes
classes found yes
device detected no
Rooted API
Claims support N/A
Device detected N/A
Kernel
Claims support Yes
Device detected No
Verdict OS support No
3rd party apps No
4. I tried 3 different USB cables (original samsung one with female to female connector), another original micro usb to female plug, and a no name one,
5. No mouse nor usb sticks (fat32) seem to be recognized (below 200 ma)
6. Had a look into the storage folder and I can see a folder for external sd, sdcard and UsbA-UsbF. These Usb folders have no permissions set ( like rwx). Looking into the mnt folder I can see the same but in there the Usb folders have rwx permissions set.
7. I was thinking to manually mount the pendrive but when type into terminal as su: ls /dev/block there are no devices (like sda, sdb, sdc) or partitions ( sda1...) mentioned. So I didnt even try commands such as mount -t vfat /dev/block/sda1 /mnt/sdcard/usb...Only mmccblk, loop, dm, ram, vold, param is mentioned on dev/block
8. In vold.fstab all usb(a-f) folders including paths are visible
Now I read your post regarding the usb-storage.ko module and I guess thats whats missing for the phone in order to recognize any usb devices. Reason why I think that is because once I connect a usb device I cant even see any sda´s or sda1´s...In system/lib/modules the folder driver is non existent but I found in sys/module/usb_storage/drivers a usb-storage file but its not a .ko What do you think? I would appreciate your thoughts on that one..

Related

[Guide] S7 Slim Touch Screen not responding Rooting change sdcard2 to sdcard

Ok first things first : If you installed some launcher and your touch screen is not responding and you dont have USB debugging enabled then the only way to fix that is to install the original firmware, dload from here : http://www.androidtablets.net/forum...huawei-ideos-s7-slim-official-firmware-4.html check post 35 for the one i used
If you do have debugging enabled the download Superoneclick from below.
The super one click can aslo root the S7 slim and it has adb installed. Unxip it somewhere and go into the \adb folder. Open command prompt from there and run
Adb devices
If it doesnt show your device the either the debugging is not enabled or the right driver is not loaded. (Menu, Settings, Applications, Development, USB Debugging (Yes))
type adb shell
cd\data\app
rm *launcher*.apk
exit
adb reboot
This will remove the launchers thats faulty and touch screen will work again.
If you guys find a clockworkmod that works then leme know here cause i loaded the wrong one and its messed up.
Use psneuter to root and use the adb in the zip for the above
Cia
How to flash Recovery
Reserved for now
Use other Launchers
ADB remount
adb push c:\bluetooth_power.sh /system/etc/
unzip attached file to c:\
Swapping sdcard and sdcard2 around
adb remount
adb push vold.fstab /system/etc/vold.fstab
if you get permission denied error when doing adb remount then try the following instead :
adb push vold.fstab /sdcard/vold.fstab
adb shell
su
mount -o remount rw /system
cp /sdcard/vold.fstab /system/etc/vold.fstab
mount -o remount ro /system
exit
exit
reboot
Copy attached file into ur adb directory (and unzip it has the modified and original file in the zip) and do the above
Grumps said:
adb remount
adb push vold.fstab /system/etc/vold.fstab
if you get permission denied error when doing adb remount then try the following instead :
adb push vold.fstab /sdcard/vold.fstab
adb shell
su
mount -o remount rw /system
cp /sdcard/vold.fstab /system/etc/vold.fstab
mount -o remount ro /system
exit
exit
reboot
Copy attached file into ur adb directory (and unzip it has the modified and original file in the zip) and do the above
Click to expand...
Click to collapse
this works great - - i had a problem where i have not been able to recover my internal SD card - tried everything - even back to original eclair and all - now i just use the external sd (16gb) for everything. No problems with camera recognizing sd card or programs not downloading, etc, etc....
I'll still try to maybe swap out the internal card, or try to get it functional again somehow, but in the meantime, the S7 if again functional.
Rom
Im currently using this rom an dit works perfectly : http://www.androidtablets.net/forum...ical/15812-rom-tri_zet-ideos_s7-slim-mod.html
Only problem i had was updating google maps so i just loaded the new version via .apk manually
O yes If you load that rom and it comes on the first time the screen might not respond (stuck on lockscreen) but its busy loading software in the background. Mine came up on the lock screen saying connect charger although the battery wasnt low so i plugged the charge cable in. It then rebooted after a while and the touch screen is working perfectly.
http://forum.xda-developers.com/showthread.php?t=942166
Grumps said:
Im currently using this rom an dit works perfectly : http://www.androidtablets.net/forum...ical/15812-rom-tri_zet-ideos_s7-slim-mod.html
Only problem i had was updating google maps so i just loaded the new version via .apk manually
O yes If you load that rom and it comes on the first time the screen might not respond (stuck on lockscreen) but its busy loading software in the background. Mine came up on the lock screen saying connect charger although the battery wasnt low so i plugged the charge cable in. It then rebooted after a while and the touch screen is working perfectly.
http://forum.xda-developers.com/showthread.php?t=942166
Click to expand...
Click to collapse
I just got my Slim S7 yesterday, hated the launcher so I replaced it not thinking it would cause such a problem... long story short I tried installing the rom you linked hoping it would fix it(tried everything else) and the touch screen still is unresponsive and USB debugging is now disabled. Any ideas?
phxtravis said:
I just got my Slim S7 yesterday, hated the launcher so I replaced it not thinking it would cause such a problem... long story short I tried installing the rom you linked hoping it would fix it(tried everything else) and the touch screen still is unresponsive and USB debugging is now disabled. Any ideas?
Click to expand...
Click to collapse
well I finally got it working. I ended up doing multiple battery pulls and installed the geeksu recovery, and that's all I did. I'm up and running on that rom. Only thing is thatbi somehow lost root, but that was no biggy.

[APP] USB OTG Helper v6 [ROOT] (Stock/Custom kernel)

A one-stop no-pain solution for enabling and using USB OTG mass storage on your android phone!
What is USB OTG?
It stands for USB On-the-Go!
"It is a specification that allows USB devices such as digital audio players or mobile phones to act as a host allowing a USB flash drive, mouse, or keyboard to be attached." - Wikipedia
The stock kernel allows Mouse & Keyboard, but USB storage is missing..
Features:
Stock and custom kernels supported
Mount and Unmount drive with a single click
No Ads!
Full NTFS support built-in!! (from v3.0.3)
Automatically start on device connect (intent broadcast) (from v3.0.3)
Notification when drives mounted! (from v3.0.3)
One click access to unmount (from v3.0.3)
Option to enable UTF-8 if kernel support (from v4)
Automatically open explorer after drive mounted (from v3.0.7)
One click debugging and feedback (in app)
What phones are supported?
Sony Ericsson Xperia Neo, Neo V, Ray, Arc and the Arc S! Modules for stock kernel on second post.
If you get it to work on other devices, please PM me and I will add them to the list.
Please note that this app is an "Helper" app.. it will not magically make your kernel support USB Mass storage
What are the requirements?
root (su binary)
busybox
USB OTG cable
How to use on stock kernel?
See this post to load modules!
WARNING
I will not be held responsible for any damage to your device. Do not use for a long time, u may risk burning the device chip/motherboard due to the voltage supply in host mode.
Screenshots and Screencast:
Download: USB OTG Helper.apk
For modules for stock ROM / other ROMS -> See here.
Changelog:
v5 (2012-10-27):
+ Option to select system busybox or in-app busybox (fixes a lot of bugs in newer devices)
= Updated internal busybox binary
= Bumped version number
v4.3.3 (2012-10-26):
+ App log also saved in debug info [debugging data is much more meaningful now]
+ Settings to enable/disable debugging mode [off by default]
v4.2 (2012-10-24):
+ Supports multiple drives via powered hub [sda to sdz block devices]
= (Fix) Folder open intent (still needs OI or ScriptManager)
v4.1.5 (2012-10-20):
= (Fix) umask error (some users could not mount ext2 and ext3 drives)
= (Fix) folder open intent (but works only with some apps eg., OI file manager or Script Manager)
= minor bugfixes
v4.0.0 (2012-07-29):
+ Lots of visual changes
+ Settings (Preferences) activity
+ Changes for ICS (Action bar)
= (Fix) Choice of file explorer to open the mounted drive
= (Fix) Notification is cleared on Unmount
= Code optimizations
- UTF-8 mode off by default (enable in Settings menu)
v3.0.7 (2012-07-04):
+ UTF-8 default if kernel supports nls_utf8
+ Automatically start file explorer after mount
v3 (2012-06-27):
+ Full NTFS support (with write support)!
+ Automatically start app on device connect (intent broadcast)
+ Notification when drives mounted!
+ One click access to unmount
- Removed setup (to support many more devices)
+ Lots of optimization and bug-fixes!
v2 (2012-06-19):
+ NTFS module integrated
+ Bugfixes
+ Now NTFS drive can be explored with ANY file explorer (Fixed bug)
Touble-shooting!:
1. Settings -> "In-app Busybox preferred" -> Uncheck. Then try again.
If still not working:
1. Settings -> Debugging mode -> Check.
2. Do the steps that fail.
3. Send me debugging data (in the app itself)
Credits:
DooMLoRD @xda-developers.com - For the original idea and implementation.
shardul_seth @xda-developers.com - For creating this app.
Bug reports, feedback and constructive criticism , please send a PM
Please do not download from below attachments. They are for historical reasons only.
Reserved
Reserved....
How to download? Good thread well warned about USB overload by using unpowerd devices.
Sent from my LT18i using Tapatalk
Download link in the OP.
Enable "unknown sources" in Settings-> Applications
Copy to SD and install..
Will this work on stock .62 firmware with doomkernel v19???
Sent from my LT18i using Tapatalk
rkanwar said:
Will this work on stock .62 firmware with doomkernel v19???
Sent from my LT18i using Tapatalk
Click to expand...
Click to collapse
Yes, just try "MOUNT" first.. Only if it fails, try "Setup".
What exactly means: "Do not use for long time"? For how long can I use mouse or keyboard? Or xbox 360 wireless reciever? Or maybe it applies only to usb storages?
Is it like 15 mins or more like 2h?
dont work in my ICS
mondaza said:
dont work in my ICS
Click to expand...
Click to collapse
[SARCASM]Very useful info in debugging![/SARCASM]
Please mention your kernel version, your device and steps taken by you!
Atleast put what device you own in your signature.
also doesn't work for me. I have an Arc on stock firmware 4.02.A.0.42 (gingerbread), stock kernel plus root. Whatever I do, the app always displays "module copy failed"
drsoran2 said:
also doesn't work for me. I have an Arc on stock firmware 4.02.A.0.42 (gingerbread), stock kernel plus root. Whatever I do, the app always displays "module copy failed"
Click to expand...
Click to collapse
re-install busybox and report
drsoran2 said:
also doesn't work for me. I have an Arc on stock firmware 4.02.A.0.42 (gingerbread), stock kernel plus root. Whatever I do, the app always displays "module copy failed"
Click to expand...
Click to collapse
Try after mounting your phone's /system as R/W.
okay now I've updated and reinstalled busybox and superuser and tried again. Now it says "storage modules live" I then connected a pen drive to my usb otg cable and attached to the phone, then mounted it. It says "mounted on sd card". Now when I browse with a file manager I can find an "usb drive 1" directory but nothing is in it!
The drive most probably is NTFS formatted.. Use script manager file browser to view files
still no luck!
Not all flash drives work. Mostly low-powered and low capacity ones only work. Try connecting to a powered hub, it should work, including external hard disk drives. (This is for the guy above me)
My other device, a cheap generic chinese tablet works with every flash drive I throw at it, 500Gb portable hard drive even. And it is connected directly, not via a powered hub. And any file system (NTFS, Fat, Fat32); ext and hfs/+ not tried.
Regarding how long is safe using usb otg, I have been watching movies from full battery down to empty usually 2 full-length movies and have no problems with it using xperia arc. Maybe that's the reason it won't charge and host at the same time. To protect the hardware. Once the phone is out of juice, you'll be forced to stop.
Hope that answers the perennial question of "How long is safe?" I have seen at almost all usb otg/host threads.
drsoran2 said:
okay now I've updated and reinstalled busybox and superuser and tried again. Now it says "storage modules live" I then connected a pen drive to my usb otg cable and attached to the phone, then mounted it. It says "mounted on sd card". Now when I browse with a file manager I can find an "usb drive 1" directory but nothing is in it!
Click to expand...
Click to collapse
I have the exact same problem.
I've tried two USB-flash drives, one is a Kingston DataTraveler G2 16gb (NTFS), the other is a Kingston DataTraveler G3 4gb (FAT32), the only thing I have on the drives are 2 .apks.
By the way, I'm using a NEO with the Neo V's official ICS from Sony.
When I mount them, the LED in the drives flashes a few times, but that doesn't happen when I go in to the "USB drive 1" directory (wich is empty).
K4L said:
I have the exact same problem.
I've tried two USB-flash drives, one is a Kingston DataTraveler G2 16gb (NTFS), the other is a Kingston DataTraveler G3 4gb (FAT32), the only thing I have on the drives are 2 .apks.
By the way, I'm using a NEO with the Neo V's official ICS from Sony.
When I mount them, the LED in the drives flashes a few times, but that doesn't happen when I go in to the "USB drive 1" directory (wich is empty).
Click to expand...
Click to collapse
Not all drives work..
shardul_seth said:
Not all drives work..
Click to expand...
Click to collapse
I got it to work with my drives when I used the app "Usb Host Controller", so if anyone else has the same problem, try that app.
https://play.google.com/store/apps/details?id=hu.sztupy.android.usbhostcontroller
If I plug my wireless xbox360 controller and wireless mouse, may it burn my phone?

[Q] Access to Internal Storage in MB860 with damaged screen

Hi, I have a MB860 rooted and running Cyanogenmod. A few days ago the touch and LCD died. (presumably by break Flex).
I want to recover my data and pictures of internal storage, but the phone has PIN lock screen and only USB Charge for default (I can't change to Storage mode). When I connected to the PC I can access to RSD mode.
How I can recover my data with broken screen?
Thank you and have a nice 2014.
Greetings from Chile.
In the development section, there's a thread that discusses dual boot. Use that basis to copy the internal storage to an sd card or to your computer. There's not much you can do without the screen :/
Sent from my MB886 using xda app-developers app
Via ADB, you can copy contents from internal SD to external. Cp /sdcard/DCIM /sdcard-ext/bk_camera for example (the paths won't fit, I don't remeber the right ones for cm7)
Hit the damn thanks button instead!
Enviado desde mi MB860
You didn't say which CM version you're using. There are at least 4 generations available for the Atrix.
You can try this via command line. Make sure you type it out exactly as specified. You type in only the bold stuff, the rest are prompts/comments.
Code:
[color=grey]>[/color] [b]adb shell[/b]
[color=grey]$[/color] [b]su[/b]
[color=grey][i]#-- internal SD[/i][/color]
[color=grey]#[/color] [b]echo /dev/block/mmcblk0p18 > /sys/devices/platform/usb_mass_storage/lun0/file[/b]
[color=grey][i]#-- external SD[/i][/color]
[color=grey]#[/color] [b]echo /dev/block/mmcblk1p1 > /sys/devices/platform/usb_mass_storage/lun1/file[/b]
That should make your SD card(s) visible as windows drives.
When you're done, do "safe remove" in windows and then this:
Code:
[color=grey]>[/color] [b]adb shell[/b]
[color=grey]$[/color] [b]su[/b]
[color=grey]#[/color] [b]echo > /sys/devices/platform/usb_mass_storage/lun0/file[/b]
[color=grey]#[/color] [b]echo > /sys/devices/platform/usb_mass_storage/lun1/file[/b]
This should work at least on CM7 (kernel 2.6).
@andresrivas @ravilov that was what i was getting at, i just didn't remember the exact command lines to input to get it done, thats why i pointed in the right direction.
Sent from my MB886 using xda app-developers app
An alternative would be to USB mount from CWM, presuming you are using CWM. I'm not sure how it goes if its in TWRP or other recoveries. I've done it in that fashion ever since my digitizer messed up. Still looking for a way to fix it. No parts sold where I live
The adb trick should run fine.
If you have original firmware(or some of the very alpha cm9/cm19 kernels w/ HDMI enabled) you can try connecting the hdmi to a tv and see if you have the mirror feature enabled. If so, you can see your screen. As for input, you would need a usb keyboard and the multimedia dock or a hack cable.

[solved] Mount storage without power button and touchscreen

I was experiencing the wifi+bluetooth ship failure that I fixed once, twice, ..., but the fix didn't last
My last attemp to fix that resulted in a flex cable ribbon damage (bad move)
Power button and touch screen are now broken
Sounds like it's time to change phone :crying: I'm not willing to repair this time
I'm trying to access internal storage but I am stuck:
I can:
- access bootloader options (buy plug-in power or usb cable)
- go into recovery, but I can't validate my selection (no power button)
- go into fastboot, but it seems that mounting is not a fastboot possibility
- go into rom (fastboot reboot), but I need to touch screen to activate usb mount
Any idea ?
cailloup said:
I was experiencing the wifi+bluetooth ship failure that I fixed once, twice, ..., but the fix didn't last
My last attemp to fix that resulted in a flex cable ribbon damage (bad move)
Power button and touch screen are now broken
Sounds like it's time to change phone :crying: I'm not willing to repair this time
I'm trying to access internal storage but I am stuck:
I can:
- access bootloader options (buy plug-in power or usb cable)
- go into recovery, but I can't validate my selection (no power button)
- go into fastboot, but it seems that mounting is not a fastboot possibility
- go into rom (fastboot reboot), but I need to touch screen to activate usb mount
Any idea ?
Click to expand...
Click to collapse
Try this http://droid-at-screen.ribomation.com/installation/
Use a desktop window to access your phone. A long time back when my screen went off, i used this to access my phone.
guruzen said:
Try this http://droid-at-screen.ribomation.com/installation/
Use a desktop window to access your phone. A long time back when my screen went off, i used this to access my phone.
Click to expand...
Click to collapse
Thanks, one problem: USB debugging is not activated (what a noob I am not to have USB debugging check lol)
Do you have a custom recovery? If so, you should be able to access the shell through adb and USB while in recovery.
cailloup said:
Thanks, one problem: USB debugging is not activated (what a noob I am not to have USB debugging check lol)
Click to expand...
Click to collapse
If ravilov method works, write an android program that registers for onBootReceiver. In onReceive() have this code
Settings.Secure.putInt(context.getContentResolver(), Settings.Secure.ADB_ENABLED, 1)
Put the apk under /system/app and change the permission to rw-r-r
Restart your phone, the above app must run onBoot and u will have usb debugging enabled.
Lets see how things go.
ravilov said:
Do you have a custom recovery? If so, you should be able to access the shell through adb and USB while in recovery.
Click to expand...
Click to collapse
I have big part recovery V3 from Zn7mkUKzN1r8aCIV
So accessing shell would let me mount storage ?
How do I use adb from recovery ?
guruzen said:
If ravilov method works, write an android program that registers for onBootReceiver. In onReceive() have this code
Settings.Secure.putInt(context.getContentResolver(), Settings.Secure.ADB_ENABLED, 1)
Put the apk under /system/app and change the permission to rw-r-r
Restart your phone, the above app must run onBoot and u will have usb debugging enabled.
Lets see how things go.
Click to expand...
Click to collapse
So I won't be able to mount storage from shell, but I can write lines that will enable usb debugging so that I can use your first post ?
I
cailloup said:
I have big part recovery V3 from Zn7mkUKzN1r8aCIV
So accessing shell would let me mount storage ?
How do I use adb from recovery ?
So I won't be able to mount storage from shell, but I can write lines that will enable usb debugging so that I can use your first post ?
I
Click to expand...
Click to collapse
Looks like u cannot mount sdcard. I found something about adb enabling in init.rc that u can retrieve. Put your phone in recovery and connect to the system and do adb shell
You must be in # prompt. Pull out init.rc using the command "adb pull /init.rc ."
I am attaching my init.rc. diff it and you should find differences wrt to adb. Try replacing the adb differences and ensure the chmod is done for init.rc (initial permissions)
guruzen said:
Looks like u cannot mount sdcard. I found something about adb enabling in init.rc that u can retrieve. Put your phone in recovery and connect to the system and do adb shell
You must be in # prompt. Pull out init.rc using the command "adb pull /init.rc ."
I am attaching my init.rc. diff it and you should find differences wrt to adb. Try replacing the adb differences and ensure the chmod is done for init.rc (initial permissions)
Click to expand...
Click to collapse
adb device is ok
I got the init.rc with adb pull, it is exactly the same as yours
I tried adb pull emmc
pull sdcard
pull scard0
pull scard1
pull storage
etc
Some don't work, some work but I got only files from "sys" folder
I tried this
http://forum.xda-developers.com/showthread.php?t=2339530
Same folder issue
I tried adb shell su mount but I don't know what to do with it ^^
Since our init.rc are similar, I also tried [email protected] but I have nothing in the device list (while phone is on)
If you enabled root for adb inside the rom, you can use the following command in adb to mount the internal storage:
echo /dev/block/vold/179:97 > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun0/file
That will mount internal storage as usb storage and you will be able to access the files from a computer.
Edit: I just read that you don't have it enabled >.< Another way would be to use "input tap x y" which does not require root but as you don't have it enable, something has to be done through recovery.
Second edit: Try this inside recovery:
adb shell
mkdir sdcard0
mount /dev/block/mmcblk0p18 sdcard0
Now that the internal storage is mounted on sdcard0, exit adb shell and use the following command:
adb pull /sdcard0 sdcard
This should copy all the files from the internal storage to a new folder called sdcard in your computer.
Reiki21 said:
Second edit: Try this inside recovery:
adb shell
mkdir sdcard0
mount /dev/block/mmcblk0p18 sdcard0
Now that the internal storage is mounted on sdcard0, exit adb shell and use the following command:
adb pull /sdcard0 sdcard
This should copy all the files from the internal storage to a new folder called sdcard in your computer.
Click to expand...
Click to collapse
Yeah that worked!
currently pulling everything, it's going to be long
Thanks all for help
Problem solved

mtp/data transfer disabled in android Pie. Charging still works

So i thought my usb port was damaged, replaced it, still no data connection. charging just fine. all usb settings are greyed out.
I thought it may have been rom related, flashed a new rom, it replaced my recovery as well unfortunately, on first boot it installed an OTA to the 2nd slot, which also replaced my recovery, I cannot access ADB except over wifi which is pretty helpful but cant sideload over wifi, cannot access fastboot to flash any of the good stuff. I can use root but only through adb shell on computer which is a godsend.
I managed to manually install busybox, so i have that. cant figure out how to flash firmware without usb access. cant figure out how to pull patch and push my boot image with magisk without fastboot.
checked my init script as well as the init.usb scripts and compared them with a generic one online, they seem ok as far as i can tell. getprop shows usb is ok. But:
jasmine_sprout:/ # echo 1 > sys/devices/virtual/android_usb/android0/enable
/system/bin/sh: can't create sys/devices/virtual/android_usb/android0/enable: Permission denied
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2|jasmine_sprout:/sys/devices/virtual/android_usb/android1 # cat state
DISCONNECTED
jasmine_sprout:/sys/devices/virtual/android_usb/android1 # cd ..
jasmine_sprout:/sys/devices/virtual/android_usb # cd android0
jasmine_sprout:/sys/devices/virtual/android_usb/android0 # ls
f_audio_source f_midi power state subsystem uevent
jasmine_sprout:/sys/devices/virtual/android_usb/android0 # cat state
DISCONNECTED
I dont understand why it is attemtpting to create that instead of changing the value in it. and the second figure shows usb is disconnected but it is not
I am getting much better at linux but still have alot to learn, so i can understand most instruction just need a point in the proper direction.
Xiaomi Mi A2 type C
I will attach my init scripts i dunno how helpful that is. also trying to record a trace while connecting and enabling USB features. All USB options are greyed out
https://drive.google.com/drive/folders/18gKDQBjQ6wORyHncdcBBfHvOAZZkh44L?usp=sharing
google drive folder with all init files inside. im going to make them txt files and attach to xda actually
I attached all init files to original post.. I am growing desperate for regular functionality of my phone. I shouldve submitted a warranty claim instead of changing the USB of the device
Bump

Categories

Resources