[ROM][13][clover] LineageOS 20 for Xiaomi Mi Pad 4 [UNOFFICIAL]

Search This thread

kubaj007

Member
Apr 25, 2008
8
0
I have not find anything that would help me for MiPad 4. Can you share persist.img? Or your backup?
I have manged to create persist.img by this:

You can "wipe" persist with the command:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/persist

And back it up with:
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img

but there is no way to install it - TWRP does not support persist partition to select while flashing image and fastboot is black (does not work)

So if anyone can share backup or manual how to flash persist.img to Persist Partition will be more than appreciated.
 

ichigo_kurosaki

Senior Member
Feb 24, 2013
1,016
236
36
Butuan City
Just installed this rom because my tablet suddenly acted weird while on Lineageos13 by Sabar (not blaming the rom). Idk what happened but i was force rebooting the tab because it was freezing then it threw me back to twrp for whatever reason and it threw a bunch of codes in red.

So fast forward, i did a reset, flashed twrp 4.4 via twrp image flash, then installed this rom.

Now i can confirm usb audio works. Will observe this rom for days. I hope this will save me headaches over freezea. Lol
 

kubaj007

Member
Apr 25, 2008
8
0
I fixed it by luck. I used Xiaomi Tool V2 to flash the MIUI 12, then used the tool to flash back to LineAge OS 19.1. All fixed. I will now stay with LineAge 19.1 to stay out of trouble.
It seems I have figured it out!

So to recreate Persist image partition with orginial data:

I have manged to create persist.img by this - run these commands from TWRP terminal:

PART 1 - backup:

You can "wipe" persist with the command:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/persist

And back it up with:
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img

The file is exactly 32MB in size. You should backup persist.img file from the tablet.

----------------------
PART 2 - recovery:

dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist

reboot back to TWRP go to - advanced - file manager - try to find this path - or adjust according to yours: /dev/block/platform/soc/c0c4000.sdhci

Then create a partition /persist using mke4fs command (x shoud be replaced according to yours path - see above):

mke4fs -t ext4 /dev/block/platform/xxx/xxxxxxx.sdhci/by-name/persist

or

make_ext4fs /dev/block/platform/xxx/xxxxxxx.sdhci/by-name/persist

Failed to mount message appeared, but after restart it was OK and new Persist image partition with size 32MB was crated (you can check in Backup option in TWRP)

All sensors work, rotation works. Accidental sreen lock still persists - I assume that the sensors need to be calibrated (or I do not know for now).

Let me know if it worked for anyone else (I am not sure if the last two commands (dd and mke4fs from part 2 - recovery) shoud be in different order - i have experimented so much...)
 
Last edited:

ericcostes

Senior Member
Nov 18, 2011
413
45
Versailles
Hello please help !

I was Los19.1 and started moving to 20
I flashed twrp 370120 via adb , ok

but now I cannot mount my usb otg to load the new rom !

some ideas ?

best regards
Eric
 
Last edited:

berry903

New member
Jan 30, 2012
2
0
the latest image 20230320 is not working for me, dirty flash or clean install. both end up with error and do not install
 

berry903

New member
Jan 30, 2012
2
0
downloaded it a second tiime, now all is fine

@kyasu
did you consider going official with this rom? your work seems pretty awesome so far
 
Last edited:

sanzraul

Member
Nov 16, 2014
13
1
Version 20230320 installed with LINEAGE RECOVERY and working correctly. Great job. Thank you so much.
 

masbem

New member
Mar 30, 2023
2
1
Autorotate doesn't work. Does anyone have the same issue? Thanks

Create backup in TWRP and delete your persist.win backup file and replace with this files... and then restore just tick persist only... reboot system & if you get bootloop, you could try reinstall LOS20 again
 

Attachments

  • persist04012019.zip
    50.1 KB · Views: 21
  • Like
Reactions: SBWater

eliasildi

Member
Sep 1, 2014
26
1
IMG_20230331_225255.jpg


Can it be installed over this version without losing data?
 

the_wing

Member
Apr 5, 2013
29
4
Rome, Italy
Hi folks,

Just to be sure before buying: there is no showstopper in flashing this ROM over a official china one (not the global/eu version with bootloader already unlocked), right? I know I first have to unlock the bootloader, then flash TWRP with fastboot etc, but just to be sure!

Also, I will backup my "persist" partition with TWRP just in case, but if I do it right it shouldn't get screwed up if I flash LOS, right?

Sorry for my ignorance, but better be safe than sorry!
 

Top Liked Posts