[Android Q&A, Help & Troubleshooting] cuacuab:
lineageOS: cannot use internal SD after factory reset: "Failed to find root"

Hello all,

sorry for posting here, i'm not allowed to post at the peregrine forum section.

I have a Moto G 4G (LTE) peregrine which worked fine with the latest LineageOS 14.1. + twrp-3.1.1-0.

Then i made a factory reset because i wanted to gift it to my mother.

After that, no app could access the INTERNAL SD card for storing eg. pictures or downloads.

When you open the "Files" app, it crashes immediately.

Then logcat shows the output below.

I tried the following to no avail:

- reset with formating data, cache, etc (factory reset)

- reset with formating EVERYTHING, including /system, then reflashing lineage-14.1-20170811-nightly-peregrine-signed.zip and open_gapps-arm-7.1-nano-20170813.zip

- reset with formating EVERYTHING, including /system, then reflashing some other 7.1 ROM found here in the forum (cannot remember which)

- reset with formating EVERYTHING, including /system, then reflashing the original ROM XT1039_Retail_Germany_51_Untouched.zip

the original ROM was rather bad because the keyboard kept crashing and it was totally unusable. still no access to the internal SD card.

- messing with the directory structure:

/sdcard is a softlink to /storage/self/primary

/storage/self/primary is a softlink to /mnt/user/0/primary

/mnt/user/0/primary doesn't exist, it only goes as far as /mnt/user/0

so i tried different scripts from this thread https://xdaforums.com/showthread.php?t=2211109 to create /mnt/user/0/primary at boot, which all didn't work.

it seems LOS 14.1 cannot run init scripts or user init scripts or whatever.

it didn't work.

also, the external SD card slot isn't reliable anymore, so that's out of the question as well.

I'm rather stuck!

can anybody help me? :)

any help is appreciated!

Thank you very much!

08-20 22:24:05.859 892 1873 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.documentsui/.LauncherActivity (has extras)} from uid 10028 on display 0
08-20 22:24:05.876 337 495 D audio_hw_primary: start_output_stream: enter: stream(0xb624e980)usecase(1: low-latency-playback) devices(0x2)
08-20 22:24:05.876 337 495 D audio_hw_primary: start_output_stream: enter: usecase(1: low-latency-playback) devices(0x2)
08-20 22:24:05.876 337 495 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
08-20 22:24:05.876 337 495 W msm8974_platform: Codec backend bitwidth 16, samplerate 48000
08-20 22:24:05.876 337 495 D hardware_info: hw_info_append_hw_type : device_name = speaker-lite
08-20 22:24:05.876 337 495 I msm8974_platform: platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(14)
08-20 22:24:05.876 337 495 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 14, path = 0
08-20 22:24:05.876 337 495 D ACDB-LOADER: ACDB -> send_adm_topology
08-20 22:24:05.876 337 495 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
08-20 22:24:05.876 337 495 D ACDB-LOADER: ACDB -> send_audtable
08-20 22:24:05.877 337 495 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
08-20 22:24:05.877 337 495 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
08-20 22:24:05.877 337 495 D ACDB-LOADER: ACDB -> send_audvoltable
08-20 22:24:05.877 337 495 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
08-20 22:24:05.877 337 495 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
08-20 22:24:05.877 337 495 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
08-20 22:24:05.890 337 495 D audio_hw_primary: select_devices: done
08-20 22:24:05.948 892 929 W BroadcastQueue: Permission Denial: broadcasting Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } from com.cyanogenmod.trebuchet (pid=1909, uid=10028) requires com.google.android.launcher.permiss
ion.RECEIVE_LAUNCH_BROADCASTS due to receiver com.google.android.gms/.icing.proxy.ApplicationLauncherReceiver
08-20 22:24:05.963 892 1226 I ActivityManager: Start proc 4441:com.android.documentsui/u0a11 for activity com.android.documentsui/.LauncherActivity
08-20 22:24:05.965 892 929 W BroadcastQueue: Permission Denial: receiving Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$GmsExternalReceiver requires com.androi
d.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS due to sender com.cyanogenmod.trebuchet (uid 10028)
08-20 22:24:06.064 4441 4441 I art : Starting a blocking GC AddRemoveAppImageSpace
08-20 22:24:06.066 4441 4441 W System : ClassLoader referenced unknown path: /system/priv-app/DocumentsUI/lib/arm
08-20 22:24:06.214 892 911 I ActivityManager: Start proc 4472:com.android.externalstorage/u0a12 for content provider com.android.externalstorage/.ExternalStorageProvider
08-20 22:24:06.222 892 1074 I ActivityManager: START u0 {dat=//com.android.documentsui.launchControl flg=0x10280000 cmp=com.android.documentsui/.FilesActivity} from uid 10011 on display 0
08-20 22:24:06.279 4472 4472 I art : Starting a blocking GC AddRemoveAppImageSpace
08-20 22:24:06.280 4472 4472 W System : ClassLoader referenced unknown path: /system/priv-app/ExternalStorageProvider/lib/arm
08-20 22:24:06.331 4472 4472 D ExternalStorage: After updating volumes, found 0 active roots
08-20 22:24:06.358 892 911 I ActivityManager: Start proc 4490:com.android.mtp/u0a10 for content provider com.android.mtp/.MtpDocumentsProvider
08-20 22:24:06.432 4490 4490 I art : Starting a blocking GC AddRemoveAppImageSpace
08-20 22:24:06.514 892 1074 D VoldConnector: SND -> {9 appfuse mount 10010 4490 MtpDocumentsProvider}
08-20 22:24:06.528 892 979 D VoldConnector: RCV <- {200 9 AppFuse command succeeded}
08-20 22:24:06.633 4441 4441 W RestoreRootTask: Failed to find root: content://com.android.externalstorage.documents/root/home
08-20 22:24:06.679 4441 4511 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 10/09/15, 6cbbf7d, I3193f6e94a
08-20 22:24:06.685 4441 4511 I OpenGLRenderer: Initialized EGL, version 1.4
08-20 22:24:06.685 4441 4511 D OpenGLRenderer: Swap behavior 1
08-20 22:24:06.690 892 1074 I WindowManager: Failed to capture screenshot of Token{e3bfe3f ActivityRecord{a0dca5e u0 com.android.documentsui/.FilesActivity t14 f}} appWin=Window{7ef870e u0 com.android.documentsui/com.android.documentsui.FilesActivi
ty} drawState=1
08-20 22:24:06.766 892 1873 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@8400679 attribute=null, token = android.os.BinderProxy@602ba4a