1

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 here: https://pastebin.com/R2wBL0W8

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 in LineageOS:
    1. /sdcard is a softlink to /storage/self/primary
    1. /storage/self/primary is a softlink to /mnt/user/0/primary
    1. /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://forum.xda-developers.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!

  • I think you should report that to rom developer – Једноруки Крстивоје Aug 29 '17 at 22:45
  • Are you sure you really formatted data (not only erased it)? And could it be it was encrypted before you started with the first factory-reset? – Izzy Aug 29 '17 at 22:58
  • I am not to familiar with that device in particular, but often on Moto's that have had LineageOS, we need to change the file system type for /data to ext4 since LoS often changes it to f2fs... just a thought. – acejavelin Aug 29 '17 at 23:45
  • @ЈеднорукиКрстивоје good idea! will do that. – Flo Hallo Aug 30 '17 at 15:40
  • @Izzy I'm quite certain that TWRP formats the partitions when you do a "wipe". it wasn't encrypted. – Flo Hallo Aug 30 '17 at 15:41
1

Thank you very much, @acejavelin! The solution was to format /data with ext4 instead of f2fs:

connect with adb while in TRWP, get the device name for /data, umount it, format with ext4, mount it again

df -h
umount /data
make_ext4fs /dev/block/mmcblk0p36
mount /data/

Then reboot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.