Messed up phone via MTP - deleted "storage folder",

So I managed to completely mess up my phone just by deleting one folder: There is a folder called “storage” in the internal storage, it seemed redundant to me and therefore I deleted it.

As a result I lost all my data (both internal storage and sdcard), and what’s worse, the device goes into soft reboot every few minutes or so.

I have wiped the cache, did a factory reset, re-flashed the firmware and re-created the “/storage” folder from my PC, all to no avail. Does anyone have a remedy at hand? I am totally stunned. I have often done stupid things with my old phone, but I have never seen anything like that, I have never seen any problem that can’t even be solved by factory reset.

So I’d be extremely grateful for any useful suggestion!

On my phone there are the subfolders
/emulated/0/updater
in the storage folder.
Though one would think that reflashing the firmware would recreate all the important folders :neutral_face:

UPDATE: I removed the external SD Card and the rebooting stops. Hope it won’t start again when I restore it.

what other folders do you have under /storage ?

My situation now is that I have re-create the folder /storage/emulated/0 and /storage/emulated/legacy but this does not help.
Things are noremal when I use another sdcard, even though the file system appears to be in order.
tried adb logcat, these are the last words of my device before it goes into soft reboot:

I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356148 (obb)
E/cutils ( 4515): to chown(/storage/emulated/0/Android/obb, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356148 (obb)
I/ActivityManager( 2694): Start proc org.fairphone.launcher for activity org.fairphone.launcher/.Launcher: pid=4515 uid=10017 gids={50017, 1015, 3003, 1028}
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356070 (0)
E/cutils ( 4528): to chown(/mnt/shell/emulated/0, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356070 (0)
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 413560b8 (obb)
E/cutils ( 4528): to chown(/mnt/shell/emulated/obb, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 413560b8 (obb)
I/ActivityManager( 2694): Start proc com.google.process.gapps for content provider com.google.android.gsf/.gservices.GservicesProvider: pid=4528 uid=10057 gids={50057, 3003, 1007, 1028, 1015, 1006, 3002, 3001, 2001, 3006}
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356100 (Android)
E/cutils ( 4528): to chown(/storage/emulated/0/Android, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356100 (Android)
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356148 (obb)
E/cutils ( 4528): to chown(/storage/emulated/0/Android/obb, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356148 (obb)
I/Crashlytics( 4515): Initializing Crashlytics 1.1.11.10
I/GservicesProvider( 4528): Gservices pushing to system: true; secure/global: true
I/PowerManagerService( 2694): setBrightness mButtonLight 0.
I/PowerManagerService( 2694): setBrightness mButtonLight 0.
I/SurfaceTexture( 2654): Toast destroying EGLImage dpy=0x1 img=0x41c79490
I/BufferQueue( 2654): Toast consumerDisconnect
I/BufferQueue( 2654): Toast ~BufferQueue
I/Launcher( 4515): Create Launcher
I/ActivityManager( 2694): Process android.process.acore (pid 2888) has died.
I/SurfaceTextureClient( 2798): [STC::queueBuffer] (this:0x5e0df140) fps:0.75, dur:2667.69, max:2179.28, min:488.41
I/BufferQueue( 2654): StatusBar [queue] fps:0.75, dur:2667.75, max:2179.31, min:488.43
I/BufferQueue( 2654): StatusBar [release] fps:0.75, dur:2665.06, max:2090.21, min:574.85
I/SurfaceFlinger( 2654): [SurfaceFlinger] fps:28.581194,dur:1084.63,max:413.12,min:11.50
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356070 (0)
E/cutils ( 4554): to chown(/mnt/shell/emulated/0, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356070 (0)
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 413560b8 (obb)
E/cutils ( 4554): to chown(/mnt/shell/emulated/obb, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 413560b8 (obb)
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356100 (Android)
E/cutils ( 4554): to chown(/storage/emulated/0/Android, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356100 (Android)
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356148 (obb)
E/cutils ( 4554): to chown(/storage/emulated/0/Android/obb, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356148 (obb)
I/ActivityManager( 2694): Start proc com.google.android.gms for service com.google.android.gms/.ads.identifier.service.AdvertisingIdService: pid=4554 uid=10057 gids={50057, 3003, 1007, 1028, 1015, 1006, 3002, 3001, 2001, 3006}
I/WifiStateMachine( 2694): fetchRssiAndLinkSpeedNative, newRssi:-38, newLinkSpeed:54
W/NotificationService( 2694): Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@41860838 in package com.keramidas.TitaniumBackup
I/MultiDex( 4528): VM with version 1.6.0 does not have multidex support
I/MultiDex( 4528): install
I/MultiDex( 4554): VM with version 1.6.0 does not have multidex support
I/MultiDex( 4554): install
I/MultiDex( 4528): MultiDexExtractor.load(/data/app/com.google.android.gms-1.apk, false)
I/MultiDex( 4554): MultiDexExtractor.load(/data/app/com.google.android.gms-1.apk, false)
I/MultiDex( 4554): loading existing secondary dex files
I/MultiDex( 4528): loading existing secondary dex files
I/MultiDex( 4528): load found 2 secondary dex files
I/MultiDex( 4554): load found 2 secondary dex files
I/MultiDex( 4554): install done
I/MultiDex( 4528): install done
I/PowerManagerService( 2694): setBrightness mButtonLight 0.
W/ADB_SERVICES( 161): terminating JDWP 4515 connection: Try again
I/ActivityManager( 2694): Process com.android.vending (pid 4502) has died.
I/PowerManagerService( 2694): setBrightness mButtonLight 0.
I/SurfaceTextureClient( 2798): [STC::queueBuffer] (this:0x5e0df140) fps:0.21, dur:4751.92, max:4751.92, min:4751.92
I/BufferQueue( 2654): StatusBar [queue] fps:0.21, dur:4753.29, max:4753.29, min:4753.29
I/BufferQueue( 2654): StatusBar [release] fps:0.21, dur:4756.30, max:4756.30, min:4756.30
I/SurfaceFlinger( 2654): [SurfaceFlinger] fps:0.210174,dur:4757.97,max:4757.97,min:4757.97
I/WifiStateMachine( 2694): fetchRssiAndLinkSpeedNative, newRssi:-39, newLinkSpeed:54
W/ActivityManager( 2694): Exception when unbinding service com.google.android.gms/.ads.identifier.service.AdvertisingIdService
W/ActivityManager( 2694): android.os.DeadObjectException
W/ActivityManager( 2694): at android.os.BinderProxy.transact(Native Method)
W/ActivityManager( 2694): at android.app.ApplicationThreadProxy.scheduleUnbindService(ApplicationThreadNative.java:843)
W/ActivityManager( 2694): at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:1396)
W/ActivityManager( 2694): at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:1678)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:11416)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3169)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3266)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:920)
W/ActivityManager( 2694): at android.os.BinderProxy.sendDeathNotice(Binder.java:436)
W/ActivityManager( 2694): at dalvik.system.NativeStart.run(Native Method)
W/ActivityManager( 2694): Exception when stopping service com.google.android.gms/.ads.identifier.service.AdvertisingIdService
W/ActivityManager( 2694): android.os.DeadObjectException
W/ActivityManager( 2694): at android.os.BinderProxy.transact(Native Method)
W/ActivityManager( 2694): at android.app.ApplicationThreadProxy.scheduleStopService(ApplicationThreadNative.java:872)
W/ActivityManager( 2694): at com.android.server.am.ActiveServices.bringDownServiceLocked(ActiveServices.java:1323)
W/ActivityManager( 2694): at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:1404)
W/ActivityManager( 2694): at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:1678)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:11416)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3169)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3266)
W/ActivityManager( 2694): at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:920)
W/ActivityManager( 2694): at android.os.BinderProxy.sendDeathNotice(Binder.java:436)
W/ActivityManager( 2694): at dalvik.system.NativeStart.run(Native Method)
W/ActivityManager( 2694): Scheduling restart of crashed service com.android.vending/com.google.android.finsky.services.ContentSyncService in 162678ms
I/ActivityManager( 2694): Process org.fairphone.launcher (pid 4515) has died.
I/AlarmManager( 2694): reset poweroff alarm none
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356070 (0)
E/SystemServer( 2694): ServerThread has no response for 15 sec. Dump stack trace…
I/Process ( 2694): Sending signal. PID: 2694 SIG: 16
I/dalvikvm( 2694): threadid=3: reacting to signal 16
E/cutils ( 4576): to chown(/mnt/shell/emulated/0, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356070 (0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=1 @ 413560b8 (obb)
E/cutils ( 4576): to chown(/mnt/shell/emulated/obb, 0, 0)
I/sdcard ( 160): [1] SETATTR fh=0 valid=6 @ 413560b8 (obb)
I/sdcard ( 160): [1] SETATTR fh=0 valid=1 @ 41356100 (Android)
E/cutils ( 4576): to chown(/storage/emulated/0/Android, 0, 0)
I/sdcard ( 160): [0] SETATTR fh=0 valid=6 @ 41356100 (Android)
I/sdcard ( 160): [0] SETATTR fh=0 valid=1 @ 41356148 (obb)
E/cutils ( 4576): to chown(/storage/emulated/0/Android/obb, 0, 0)
I/sdcard ( 160): [1] SETATTR fh=0 valid=6 @ 41356148 (obb)
I/logwrapper( 118): /system/bin/6620_launcher terminated by signal 9

Now formatted the sd card and this seems to have done the deal

So my lesson for today: Never EVER touch the /storage folder!

I just wonder why it is exposed via MTP if touching it can wreck your data. I suggest this should be fixed!!

2 Likes

Glad you worked it out, mate :smile:
Don’t know if it’s fixable, though.
That folder definitely serves a purpose on that specific partition.
And that partition is not protected by default, so…

I will flag to support to see if the folder can be ‘hidden’ in any way to stop people inadvertently deleting - this may not be possible though.

Best advice in the world (I’ve learnt the hard way with these sorts of things too!) don’t delete anything unless you know what it is and that it is safe to do so :wink:

This topic is now closed. New replies are no longer allowed.

1 Like