Need help to install LineageOS on Samsung S2 - Android Q&A, Help & Troubleshooting

Hi,
Completely new to smartphones in general, I just bought a second-hand Samsung Galaxy S2 from a specialized website. I tried to install LineageOS on it but with no success so far (the LineageOS wiki for this device seems to forget some important things when starting from a stock ROM).
Current situation and things that might help:
I don't have a microSD card.
I have a backup of the original .pit file.
Even if I really do not want to use the stock ROM, I can not find a way to reinstall a working one: installation with Odin works but there is a "boot loop" on the Samsung logo.
Installing Replicant works, but it is unfortunately too extremist for me.
As I don't have a microSD card, I try installing with "adb sideload image_file.zip" (like I do with Replicant), but TWRP displays errors about partitions :
Code:
...
E:Unable to locate storage partition for storing settings file.
Updating partition details...
...done
Unable to find partition for path '/system'
Unable to find partition for path '/data'
MTP enabled
Starting ADB sideload feature...
Installing zip file '/sideload/package.zip'
Target: samsung/GT-I9100:4.1.2/JZ054K/I9100XWMS2:user/release-keys
detected filesystem ext4 for /dev/blockmmcblk0p9
detected filesystem ext4 for /dev/blockmmcblk0p10
Can't install this package on top of incompatible data.
Please try another package or run a factory reset
Updater process ended with ERROR: 7
I tried doing a "factory reset" from TWRP but result is the same.
Here are some information that might be useful, gathered from an ADB shell:
/etc/recovery.fstab
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# data partition must be located at the bottom for supporting device encryption
/dev/block/mmcblk0p9 /system ext4 ro,noatime wait
/dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p1 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p10 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check_spo,encryptable=/efs/metadata
/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/dw_mmc/mmc_host/mmc0/mmc0* auto auto defaults wait,voldmanaged=sdcard0:11,nonremovable,noemulatedsd
/devices/platform/s3c-sdhci.2/mmc_host/mmc1* auto auto defaults wait,voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/s3c_otghcd/usb* auto auto defaults voldmanaged=usbdisk0:auto
# recovery
/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly
/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly
/etc/mtab
Code:
rootfs / rootfs rw,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,seclabel,relatime 0 0
/tmp/recovery.fstab
Code:
...
=> Linking mtab
=> Processing recovery.fstab
I:Processing '/dev/block/mmcblk0p9'
E:Invalid block device 'ext4' in fstab line '/dev/block/mmcblk0p9 /system ext4 ro,noatime
wait
'I:Processing '/dev/block/mmcblk0p7'
E:Invalid block device 'ext4' in fstab line '/dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
'I:Processing '/dev/block/mmcblk0p1'
E:Invalid block device 'ext4' in fstab line '/dev/block/mmcblk0p1 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
'I:Processing '/dev/block/mmcblk0p10'
E:Invalid block device 'ext4' in fstab line '/dev/block/mmcblk0p10 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check_spo,encryptable=/efs/metadata
'I:Processing '/dev/block/mmcblk0p12'
E:Invalid block device 'ext4' in fstab line '/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
'I:Processing '/devices/platform/dw_mmc/mmc_host/mmc0/mmc0*'
E:Invalid block device 'auto' in fstab line '/devices/platform/dw_mmc/mmc_host/mmc0/mmc0* auto auto defaults wait,voldmanaged=sdcard0:11,nonremovable,noemulatedsd
'I:Processing '/devices/platform/s3c-sdhci.2/mmc_host/mmc1*'
E:Invalid block device 'auto' in fstab line '/devices/platform/s3c-sdhci.2/mmc_host/mmc1* auto auto defaults wait,voldmanaged=sdcard1:auto,noemulatedsd
'I:Processing '/devices/platform/s3c_otghcd/usb*'
E:Invalid block device 'auto' in fstab line '/devices/platform/s3c_otghcd/usb* auto auto defaults voldmanaged=usbdisk0:auto
'I:Processing '/dev/block/mmcblk0p5'
E:Invalid block device 'emmc' in fstab line '/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly
'I:Processing '/dev/block/mmcblk0p6'
E:Invalid block device 'emmc' in fstab line '/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly
'E:Unable to locate storage partition for storing settings file.
Updating partition details...
...done
I:Unable to find storage partition '/'.
I:Unmounting main partitions...
Unable to find partition for path '/system'
Unable to find partition for path '/data'
...
I spent many hours hours on this issue and read many many things. I really hope someone will be able to help, or at least sympathise Feel free to ask if I can provide some information. Thanks!

Your life would be easier if you paid ten dollars for an SD card lol. My advice is to flash the stock ROM back. Root it. Install dual boot patcher apk and install lineage as data1. This way you avoid your headache and if anything goes wrong you can just boot back to the stock ROM and try again. Also are you sure you have the right ROM? S2 stuff is hard to find. I've been working on an s3 with no luck. Years ago I downgraded the bootloader and bricked it.

Interesting to know that dual boot with microSD card would be easier than only LineageOS (I am coming from the Linux word where it is generally simpler to remove Windows)… I will try to see that.
I got the stock ROM from samsung-updates.com/device/?id=GT-I9100. I am really disappointed to know that vendors like Samsung does not provide these officially.

Finally done it, thanks to people on Reddit! :victory:
Go to 3W dot reddit dot com/r/LineageOS/comments/603qeq/cannot_boot_into_twrp_on_samsung_galaxy_s2/ where the solution is written many times by different persons. Just note that you have to use TWRP 3.1.0, version 3.1.1 fails (see first post).
Now the goal is to update the LineageOS official wiki…

Related

[Q] File system and partitions

Can some confirm if I understand correctly
As I understand internal GS2 memory is divided into several partitions:
/dev/block/mmcblk0p9 on /system type ext4
/dev/block/mmcblk0p7 on /cache type ext4
/dev/block/mmcblk0p1 on /efs type ext4
nil on /sys/kernel/debug type debugfs
/dev/block/mmcblk0p10 on /data type ext4
/dev/block/mmcblk0p4 on /mnt/.lfs type j4fs
/dev/block/vold/179:11 on /mnt/sdcard type vfat
So as I understand in CWM recovery:
format data formats dev/block/mmcblk0p10 on /data type ext4
format system formats /dev/block/mmcblk0p9 on /system type ext4
format cache formats /dev/block/mmcblk0p7 on /cache type ext4
wipe data / factory reset - on stock deletes everything from dir /data or just some files from dir /data
wipe cash - deletes all files from from /cache or just some files from dir /cache
wipe dalvik- deletes all files from from /data/dalvik-cache or just some files from dir /data/dalvik-cache
format /sdcard formats /dev/block/vold/179:11 on /mnt/sdcard type vfat ????
format /emmc formats what????
In what partition is bootloader?
In what partition is kernel?
In what partition is CWM recovery?
Where are located download mode (home+down+power) system/files?
From recent experience I understood that nandroid is not doing backup of all partitions. EFS partition is not backed up.
What else is not backed up and what partitions are backed up?
What partition is backed up in nandroid boot.img file?
Don't mess with them until you really know what you are doing
if bootloader gets messed up then its a brick
I really don't want to have problem and that's why I'm asking.
When you know simple basics it much safer to change ROM's
Well, if you'd search before asking questions, you'd have the information already.
Basically:
Code:
0 '/tmp' 'ramdisk' '(null)' '(null)' 0
1 '/efs' 'ext4' '/dev/block/mmcblk0p1' '(null)' 0
2 '/boot' 'emmc' '/dev/block/mmcblk0p2' '(null)' 0
3 '/recovery' 'emmc' '/dev/block/mmcblk0p6' '(null)' 0
4 '/cache' 'ext4' '/dev/block/mmcblk0p7' '(null)' 0
5 '/system' 'ext4' '/dev/block/mmcblk0p9' '(null)' 0
6 '/data' 'ext4' '/dev/block/mmcblk0p10' '(null)' -16384
7 '/preload' 'ext4' '/dev/block/mmcblk0p12' '(null)' 0
' 0 '/sdcard' 'vfat' '/dev/block/mmcblk1p1' '/dev/block/mmcblk1
9 '/sdcard1' 'vfat' '/dev/block/mmcblk0p11' '(null)' 0
Bootloader is in p2 and p3.
Kernel is in p5.
Recovery is inside the kernel.
Download mode (home+down+power) system/files is in initramfs (also kernel, basically).
Boot.img file contains the kernel if I remember correctly.
If you're concerned about partitions, back them all up with dd. However, be careful goes without saying
Sure I was looking, but short and simple answer couldn't find
Thanx
And additional questions:
So if /system (/dev/block/mmcblk0p9) is deleted, then phone still should be able to boot into download or recovery mode? (because Bootloader is in p2 and p3; Kernel is in p5.)
Can it be that in boot.img is packed p2, p3, p5 partitions?
/system comes with the ROM, so yes - you can delete it and still have recovery.
Why don't you extract the boot.img and see what's in it?
Sure I've tried to extract but..
In phone "Nandroid browser" can't open
In windows "unyaffs" says "broken image file"
In windows "DiskInternals Linux Reader" also not working
If you search you will find the post that shows how to extract on SGS2 and tools required .
jje
limmes said:
In what partition is bootloader?
In what partition is kernel?
In what partition is CWM recovery?boot.img file?
Click to expand...
Click to collapse
i always formats system and boot in cwm 4.x.x but since 5.x.x only system is present, meaning formating boot is good but is more dangerous for all users to access.
formating system solves many issues.

[Q] [q] how to write a recovery.fstab for cwm?

I am trying to port cwm 6.0.1.4 for my HTC Desire S via the cwm builder. Its running so far, but not exactly working, because it doesnt mount all partitions correctly. So i assume, there must be something wrong with my recovery.fstab. I used an older recovery.fstab i found on the internet, but maybe it hasnt got the right "options" to mount all partitions correctly.
So can anybody explain me, how to make a working one? Which partitions are needed and how they have to be mounted?
thanks!
Adromir said:
I am trying to port cwm 6.0.1.4 for my HTC Desire S via the cwm builder. Its running so far, but not exactly working, because it doesnt mount all partitions correctly. So i assume, there must be something wrong with my recovery.fstab. I used an older recovery.fstab i found on the internet, but maybe it hasnt got the right "options" to mount all partitions correctly.
So can anybody explain me, how to make a working one? Which partitions are needed and how they have to be mounted?
thanks!
Click to expand...
Click to collapse
why dont you dump the recovery from your phone, unpack and use the recovery.fstab from the stock recovery ?
globula_neagra said:
why dont you dump the recovery from your phone, unpack and use the recovery.fstab from the stock recovery ?
Click to expand...
Click to collapse
Because with just the stock Recovery it doesn't mount all needed partitions correctly. I took the stock recovery i extracted from the latest RUU.
give me the stock recovery and i will do the recovery.fstab for you
globula_neagra said:
give me the stock recovery and i will do the recovery.fstab for you
Click to expand...
Click to collapse
Here it is. Thats really great! Thanks a lot
try this recovery
what i did, i used the recovery.fstab from this http://forum.xda-developers.com/showthread.php?t=1484753
i would like to try the recovery from the 4ext and see what mount points and how the filesystem is managed.
if you have one share`it with me.
the attached files is the cwm that i cooked, using the stock recovery and adding the fstab from the 5.8 cwm
you can flash it and see what results you have (if you get anny errors)
but don`t use the recovery to flash something till you don`t get the mount results to see if the mounting points are like this, if the mounting points are like this you should be ok to try and flash a rom.
# mount point fstype device
/recovery emmc /dev/block/mmcblk0p21
/boot emmc /dev/block/mmcblk0p22
/cache ext4 /dev/block/mmcblk0p27 fstype2=ext3
/data ext4 /dev/block/mmcblk0p26 fstype2=ext3
/sdcard vfat /dev/block/mmcblk1p1
/system ext4 /dev/block/mmcblk0p25 fstype2=ext3
to find out the mounting points
adb shell
mount
and you should have a long output like this (This are not from a htc desire s ! )
C:\Android\android-sdk\platform-tools>adb shell
uid=0 [email protected]:/ # mount
mount
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p12 on /system type ext4 (ro,relatime,user_xattr,barrier=1,dat
a=ordered)
/dev/block/mmcblk0p13 on /data type ext4 (rw,nosuid,nodev,relatime,user_xattr,ba
rrier=1,data=ordered,noauto_da_alloc)
/dev/block/mmcblk0p14 on /persist type ext4 (rw,nosuid,nodev,relatime,user_xattr
,barrier=1,data=ordered)
/dev/block/mmcblk0p15 on /cache type ext4 (rw,nosuid,nodev,relatime,user_xattr,b
arrier=1,data=ordered)
/dev/block/mmcblk0p17 on /content type ext4 (rw,nosuid,nodev,relatime,user_xattr
,barrier=1,data=ordered)
/dev/block/vold/179:97 on /mnt/external_sd type vfat (rw,dirsync,nosuid,nodev,no
exec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=
cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:20 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,
relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437
,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:20 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,no
exec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=
cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
uid=0 [email protected]:/ #
Thanks for your effort, but i can't test the recovery properly because there is a key missing to run an option. I can browse through the menu with volume +/- though, but can't enable the selected option.
I found an 4ext Recovery (version 1005.5.0), i attached it with the fstab i extracted from it
well, i could use the maping key from the cwm 5.8
there are some cwm`s that need enabling
for example on a tablet i need to press 27 times the volume key -, or a combination of + - + (volume keys) to enable the selection.
i can not test the recovery, i will rebuild later on a version based on the 5.8 key maping.
on the screen did you got any errors ?
No, it didnt show any errors yet. Is it possible to make it touch too? I tried to cook up a cwm with the fstab of 4ext but it completly failed to load any partition. 4ext itself is working though
here is the touch one, check also if the key`s are working
the recovery that you made, the keys where working ?
Havent tried the keys on my Build, but with yours they are working.
In the cwm i got this errors:
I:Skipping execution of extended command, file not found
I:Can't partition unsafe device: /dev/block/mmcblk1p1
I:Can't format unknown volume: /external_sd
I:Can't format unknown volume: /emmc
Now trying to make a Backup, that seems to work, but i am not completly sure, havent tried to restore it yet. Will do that tomorrow
this is the first cwm that i made for you, but with the key maping from the stock recovery
http://www.mediafire.com/?kc8dk9gl2c9660o
---------- Post added at 07:10 PM ---------- Previous post was at 07:08 PM ----------
you can check the recovery files on the sd card, if you see there the boot.img recovery, and system/data mds5 it should be ok to restore.
Is this different from the built you attached last? This works fine with the keys.
btw. can you maybe give me some tips how you built it? Later i want to make a new cwm for my tablet, but i dont want to bother you with that too
yes it is different, it is like the first build but i used the key mapping from the htc desire s stock recovery, the one from the ruu
well the tips are, keep trying till you get something working.
for example on my tablet i am using a htc sensation xl recovery (not all the stuff only the recovery which is in the sbin directory if you unpack the recovery)
unpack the stock recovery, and analyse the recovery.fstab by comparing it to the mount points, if they are ok is very good, you will have bigger chance to get something working.
try and use the clockwork builder and see if you get any results, but select the stock recovery.fstab (you have the option when you cook the recovery, is the second option)
if you don`t get any results like this try to find a similar device from a spec point of view and steal the /sbin/recovery from the device cwm recovery, put it on your recovery, repack and test.
it depends on what tablet you have also
If you need help in the future, send me a pm, because i check only once per week this section of the forum.
Ok, found boot.img but no system/data and system.ext3.dup is only about 100kb of size. Is that correct?
in the logfile there are three errors:
W:Unable to get recovery.fstab info for /datadata during fstab generation
W:Unable to get recovery.fstab info for /emmc during fstab generation
W:Unable to get recovery.fstab info for /sd-ext during fstab generation
no, is not corect, that means that the recovery made by the clockworok server has some flaws
i will try to make a new one, based on 4ext recovery
---------- Post added at 07:47 PM ---------- Previous post was at 07:31 PM ----------
K, i remade the fstab
it looks like this now
# mount point fstype device
/recovery emmc /dev/block/mmcblk0p21
/boot emmc /dev/block/mmcblk0p22
/cache ext4 /dev/block/mmcblk0p27 fstype2=ext3
/data ext4 /dev/block/mmcblk0p26 fstype2=ext3
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/system ext4 /dev/block/mmcblk0p25 fstype2=ext3
/sd-ext ext4 /dev/block/mmcblk1p2 fstype2=ext4
/system_lib ext4 /dev/block/mmcblk0p28 fstype2=ext4
You could try and find a similar device that has the version 6 recovery and try the recovery from that device (am talking about getting the recovery, unpack it, take the recovery file which is in boot.img-ramdisk\sbin\recovery
In the end, it`s all about testing
I did all my stuff alone, nobody helped me.
http://www.mediafire.com/?69a74qq9idko02v this is the recovery based on the recovery.fstab from the 4ext recovery which looks more complete.
Thanks very, very much, i really appreciate your efforts. So now, i'll start trying and trying until i get a working one
Help me plz..
I don't haved knowledge about android scripting or any something like that,.. but I was try hard to get and learn about creating CWM of my stock recovery.img .. after all is unfortunately .. always failed.
I haved try on builder.clockworkmod.com but itsn't success,...
would any member in here should help me to create CWM from my stock recovery.img please... my phone is One Scribe ZA987 with MTK6577
Hi Guys, I have a quick question
I am new to this but im learning quickly.... I think!
im making up my own recovery and so far my recovery.fstab looks like this:
/recovery emmc /dev/block/mmcblk0p8
/boot emmc /dev/block/mmcblk0p9
/cache ext4 /dev/block/mmcblk0p10 fstype2=ext3
/data ext4 /dev/block/mmcblk0p12 fstype2=ext3
/system ext4 /dev/block/mmcblk0p11 fstype2=ext3
/factory ext4 /dev/block/mmcblk0p4 fstype2=ext3
/crypo emmc /dev/block/mmcblk0p3
but when trying to do a backup it throws up an error saying it cant write to SDCARD, which makes sense as its not mounted
So, the question is, how do I go about mounting it for recovery?
Now, the sdcard is internal, there is no external card, I believe its symlinked to /storage/sdcard within android which is all located in the partition /data/ (mmcblk0p12)
sooo, can anyone help, ive been trawling the interweb and I can find lots of ways to do this within the main OS, but how do I go about it for recovery.fstab to be used in a custom clockwork recovery img
globula_neagra said:
why dont you dump the recovery from your phone, unpack and use the recovery.fstab from the stock recovery ?
Click to expand...
Click to collapse
can you explain to me how to dump? my phone is brigadier

Help (g2 mini/d620k external and internal storage swap)

hi, masters.. i just want to ask regarding my LG G2 D620K, I want to swap its internal and external storage. it's already rooted. I've read procedures for manual editing vold.fstab on root/system/etc..but i cant find such file. i've found something with "fstab" but it's "fstab.g2m". .below is what it says inside:
Android fstab file. # The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition. # Currently we dont have e2fsck compiled. So fs check would failed. # #<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> /devices/msm_sdcc.2/mmc_host /storage/external_SD vfat nosuid,nodev wait,voldmanaged=external_SD:auto /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1,discard wait,check /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,discard,data=ordered wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt #/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc wait,check #/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check #/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,data=ordered wait,check #/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,data=ordered wait,check #/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults #/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults #/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
android version: 5.0.2
software version: v20b-515-03
thank you in advance for any help

[Q] Add EXT4 support to ROM to mount external hard drive

Hey folks.
So, I have installed a custom rom to an android box, it runs on EXT4 itself for the system but if I try to connect an external hard drive formatted as EXT4 it only says it's unsupported and will give me the option to format it, which I won't do. I don't want FAT32 or ExFAT or NTFS. I need EXT4 for reasons.
I was using this hard drive with my RaspberryPi before and it worked fine. Also this box is rooted and I can mount it manually with "mount -t ext4 /dev/block/sda /mnt/hd" or whatever and I can see the files, have read/write BUT other apps can't see it due to Android security (even messing with chown/chmod).
I'm not sure how to add EXT4 support to mountable storage at all to a ROM. The dev seems to be busy with other projects and won't help, so I have to figure it out on my own.
I have searched left and right but couldn't find any answer on how to do it myself, nothing very conclusive.
Should I just add the hdd to fstab.amlogic? Does it have anything to do with vold? I wanted the system to be able to recognize it and mount it, not mount it myself like this.
Futher info:
This is the BLKID for the hdd:
Code:
/dev/block/sda: UUID="4de...d5" TYPE="ext4"
/dev/block/vold/disk:8,0: UUID="4de...d5" TYPE="ext4"
This is the fstab.amlogic:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/misc /misc emmc defaults defaults
/dev/block/system /system ext4 ro wait
/dev/block/data /data ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,encryptable=footer
/dev/block/cache /cache ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check
/devices/*.sd/mmc_host/sd* auto auto defaults voldmanaged=sdcard1:auto,noemulatedsd
/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sd* auto auto defaults voldmanaged=udisk:auto
/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sr* auto auto defaults voldmanaged=sr0:auto
/dev/block/loop auto loop defaults voldmanaged=loop:auto
# Add for zram. zramsize can be in numeric (byte) , in percent
/dev/block/zram0 /swap_zram0 swap defaults wait,zramsize=524288000
/dev/block/tee /tee ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check
Thank you.

Bugged - no chance to fix?

Hi everybody
Currently i have attached a F1 to my pc which has some weird conditions...
The phone itself seems to be flashed to latest LineageOS, but it is encrypted.
Maybe because of the latest sideload, i can't really tell because the owner gave this to a friend...
So, prefered solution would be: decrypt the phone, get all the pictures/videos from it.
Another acceptable solution would be: install from scratch.
But:
fastboot seems to be botched.
Code:
C:\adb>adb devices
List of devices attached
22fd65f3 recovery
Looking good, adb can access this device.
So, if i could flash some decrypt-voodoo that the device boots and decrypts system...
But no, failing so far.
Then i thought, well, as it is already gone, just fastboot flash and forward.
Nope:
Code:
C:\adb>fastboot devices
???????????? fastboot
And the device goes back to bootloop.
Booting to recovery gives me a TWRP 3.5.2_10-0
Full access, except the encrypted data.
recovery is fully working, so i tried to flash vbmeta with fastboot (--disable-verity --disable-verification) but fastboot seems to be broken.
So... any thoughts where to start first?
Thx
I pulled fstab from phone:
twrp.fstab
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# mount point type device device2 flags
/boot emmc /dev/block/bootdevice/by-name/boot flags=display="Boot"
/cache ext4 /dev/block/bootdevice/by-name/cache
/recovery emmc /dev/block/bootdevice/by-name/recovery flags=display="Recovery";backup=1
/system ext4 /dev/block/bootdevice/by-name/system flags=backup=1;wipeingui;display="System"
/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=backup=1;wipeingui;display="Vendor"
/system_image emmc /dev/block/bootdevice/by-name/system flags=backup=1;flashimg=1
/vendor_image emmc /dev/block/bootdevice/by-name/vendor flags=backup=1;flashimg=1
/data ext4 /dev/block/bootdevice/by-name/userdata flags=encryptable=footer;length=-16384;fileencryption=ice:aes-256-cts:aes-256-heh
/firmware vfat /dev/block/bootdevice/by-name/modem flags=display="Firmware";mounttodecrypt
/cust ext4 /dev/block/bootdevice/by-name/cust flags=display="Cust"
/misc emmc /dev/block/bootdevice/by-name/misc
/modem emmc /dev/block/bootdevice/by-name/modem flags=backup=1;display="Modem"
/bluetooth emmc /dev/block/bootdevice/by-name/bluetooth flags=backup=1;subpartitionof=/modem
/dsp emmc /dev/block/bootdevice/by-name/dsp flags=backup=1;subpartitionof=/modem
/efs1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;display=EFS
/efs2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs1
/efsc emmc /dev/block/bootdevice/by-name/fsc flags=backup=1;subpartitionof=/efs1
/efsg emmc /dev/block/bootdevice/by-name/fsg flags=backup=1;subpartitionof=/efs1
/persist ext4 /dev/block/bootdevice/by-name/persist flags=display="Persist"
/storage ext4 /data/media/0 flags=display="Internal Storage";usermrf;backup=1;fsflags="bind";removable
# Removable storage
/usb_otg vfat /dev/block/sdg1 /dev/block/sdg flags=display="USB-OTG";storage;wipeingui;removable
/external_sd vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0 flags=display="MicroSD Card";storage;wipeingui;removable
recovery.fstab
Code:
# Android fstab file.
# The filesystem that contains the filesystem e2fsck binary (typically /system) cannot
# specify 'check', and must come before any filesystems that do specify 'check'
# NOTE: /system and /vendor partitions are early-mounted and the fstab entry is specified in device tree (duplicated below for recovery image purposes only):
# /proc/device-tree/firmware/android/fstab/system
# /proc/device-tree/firmware/android/fstab/vendor
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=0,noauto_da_alloc latemount,wait,check,fileencryption=ice,quota,encryptable=footer
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly
/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,recoveryonly
/devices/platform/soc/8804000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer
/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
and the regular fstab
Code:
/dev/block/sda20 /cache ext4 rw 0 0
/dev/block/sde48 /system_root ext4 ro 0 0
/dev/block/sde47 /vendor ext4 ro 0 0
/dev/block/sda21 /data ext4 rw 0 0
/dev/block/sde46 /firmware vfat rw 0 0
/dev/block/sda18 /cust ext4 rw 0 0
/dev/block/sda14 /persist ext4 rw 0 0
/storage ext4 rw 0 0
/usb_otg vfat rw 0 0
/external_sd vfat rw 0 0
Lonesome Walker said:
Hi everybody
Currently i have attached a F1 to my pc which has some weird conditions...
The phone itself seems to be flashed to latest LineageOS, but it is encrypted.
Maybe because of the latest sideload, i can't really tell because the owner gave this to a friend...
So, prefered solution would be: decrypt the phone, get all the pictures/videos from it.
Another acceptable solution would be: install from scratch.
But:
fastboot seems to be botched.
Code:
C:\adb>adb devices
List of devices attached
22fd65f3 recovery
Looking good, adb can access this device.
So, if i could flash some decrypt-voodoo that the device boots and decrypts system...
But no, failing so far.
Then i thought, well, as it is already gone, just fastboot flash and forward.
Nope:
Code:
C:\adb>fastboot devices
???????????? fastboot
And the device goes back to bootloop.
Booting to recovery gives me a TWRP 3.5.2_10-0
Full access, except the encrypted data.
recovery is fully working, so i tried to flash vbmeta with fastboot (--disable-verity --disable-verification) but fastboot seems to be broken.
So... any thoughts where to start first?
Thx
Click to expand...
Click to collapse
If the phone doesn't recognize in fastboot you need the fix and the drivers.
You can find everything you need in my POCO F1 Ultimate Collection & Guides.
Check AMD/Intel Fastboot Fix.
If you know pin/pattern you can flash the TWRP by REIGNZ go to recovery put pin/pattern to decrypt then connect your device to pc while you are in twrp (if MTP doesn't work at first go advanced>file manager> and choose sdcard0 (internal storage) then your device shoule recognized in pc and get your data.
To clean flash follow my clean installation guide.
Everything you need is on my thread I mentioned above.
Okay, this is interesting...
My own Poco F1 had no issues with the drivers installed before.
After updating, the actual bugged F1 can fastboot but my own can't anymore.
WTF?
I also switched cables, doesn't matter.
Okay, nevertheless, mine is not broken, so this will be a task for later...
Thank you so far for this working hint!
So, i now finally have rescued all the pictures, videos and Whatsapp stuff.
My friend is happy.
The next step would be flashing the Pixel Experience.
But: how to find out which Android version is currently installed?
Or should i flash the latest stock rom from Xiaomi? I mean, it can't be higher than that, right?
Thank you for your response!

Categories

Resources