Mi A2 Lite boots only on slot B - Xiaomi Mi A2 Lite Questions & Answers

I have a problem with my Mi A2 Lite.
I have installed the Lineage OS ROM: https://forum.xda-developers.com/mi-a2-lite/development/lineageos-16-0-xiaomi-mi-a2-lite-t3919060
It seems that works only one slot, the slot B.
I flash the updates of the rom following this guide: https://github.com/tkchn/daisyinstall/blob/master/README.md
If the active slot is the slot B, when I install an update of the rom in the slot A and then change the active slot to slot A in TWRP, then reboot and the phone goes in bootloop with the androidone logo.
Then I reboot the phone holding the power button, boot to fastboot and boot to recovery.
As this point I repeat the whole process, flashing the rom to slot B and changing the active slot to slot B and now if I reboot the phone all work.
I had this problem with all the updates that I have done.

You have probably different firmware versions on each partition. You can fix that by writing the B partitions into the A ones.
Go to twrp, and through either 'adb shell' or the recovery shell:
Code:
su
dd if=/dev/block/mmcblk0p32 of=/dev/block/mmcblk0p31
dd if=/dev/block/mmcblk0p27 of=/dev/block/mmcblk0p26
dd if=/dev/block/mmcblk0p25 of=/dev/block/mmcblk0p24
dd if=/dev/block/mmcblk0p14 of=/dev/block/mmcblk0p13
dd if=/dev/block/mmcblk0p45 of=/dev/block/mmcblk0p44
dd if=/dev/block/mmcblk0p29 of=/dev/block/mmcblk0p28
dd if=/dev/block/mmcblk0p48 of=/dev/block/mmcblk0p47
dd if=/dev/block/mmcblk0p55 of=/dev/block/mmcblk0p54
dd if=/dev/block/mmcblk0p20 of=/dev/block/mmcblk0p19
dd if=/dev/block/mmcblk0p18 of=/dev/block/mmcblk0p17
dd if=/dev/block/mmcblk0p59 of=/dev/block/mmcblk0p58
You should have exactly similar A/B partitions after this (except for system and boot, the ones updated), and there should be no problem.

With custom rom...
Install the rom , TWRP and disable encryption in slot A
Install gapps, magisk, kernel, etc in slot B
The device only boots in B slot
In stock rom boots in A slot
Its ok

GDFI said:
You have probably different firmware versions on each partition. You can fix that by writing the B partitions into the A ones.
Go to twrp, and through either 'adb shell' or the recovery shell:
Code:
su
dd if=/dev/block/mmcblk0p32 of=/dev/block/mmcblk0p31
dd if=/dev/block/mmcblk0p27 of=/dev/block/mmcblk0p26
dd if=/dev/block/mmcblk0p25 of=/dev/block/mmcblk0p24
dd if=/dev/block/mmcblk0p14 of=/dev/block/mmcblk0p13
dd if=/dev/block/mmcblk0p45 of=/dev/block/mmcblk0p44
dd if=/dev/block/mmcblk0p29 of=/dev/block/mmcblk0p28
dd if=/dev/block/mmcblk0p48 of=/dev/block/mmcblk0p47
dd if=/dev/block/mmcblk0p55 of=/dev/block/mmcblk0p54
dd if=/dev/block/mmcblk0p20 of=/dev/block/mmcblk0p19
dd if=/dev/block/mmcblk0p18 of=/dev/block/mmcblk0p17
dd if=/dev/block/mmcblk0p59 of=/dev/block/mmcblk0p58
You should have exactly similar A/B partitions after this (except for system and boot, the ones updated), and there should be no problem.
Click to expand...
Click to collapse
Thank you very much @GDFI!
Probably I have android 8 in slot A and android 9 in slot B.
I will try to do this. Will all my data and settings survive this?
For knowledge, is there a list to understand what mmcblk**** partitions match?
leechgid said:
With custom rom...
Install the rom , TWRP and disable encryption in slot A
Install gapps, magisk, kernel, etc in slot B
The device only boots in B slot
In stock rom boots in A slot
Its ok
Click to expand...
Click to collapse
I don't understand, can you explain better?

I found how to see the list of partitions of the Mi A2 Lite:
Code:
daisy:/ # ls -l /dev/block/platform/soc/7824900.sdhci/by-name/
total 0
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 DDR -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 aboot_a -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 aboot_b -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 apdp -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 bk1 -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 bk2 -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk3 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk4 -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk5 -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 bk6 -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 boot_a -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 boot_b -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib64_a -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib64_b -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib_a -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 cmnlib_b -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 config -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 devcfg_a -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 devcfg_b -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 devinfo -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 dip -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 dpo -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 dsp_a -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 dsp_b -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 fsc -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 fsg -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 keymaster_a -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 keymaster_b -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 keystore -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 limits -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 lksecapp -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 lksecappbak -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 logdump -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mcfg -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mdtp_a -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mdtp_b -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 misc -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modem_a -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modem_b -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modemst1 -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 modemst2 -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 mota -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 msadp -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 persist -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 persistbak -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 rpm_a -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 rpm_b -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 sbl1_a -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 sbl1_b -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 sec -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 splash -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 20 1970-05-16 13:21 ssd -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 syscfg -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 system_a -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 system_b -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_a -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_b -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 userdata -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 vendor_a -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 vendor_b -> /dev/block/mmcblk0p59
@GDFI You have omitted three partitions: system, boot, tz.
I understand system and boot, but what is the tz partition?
Should not be copied?
Code:
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_a -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_b -> /dev/block/mmcblk0p36

epcesp said:
@GDFI You have omitted three partitions: system, boot, tz.
I understand system and boot, but what is the tz partition?
Should not be copied?
Code:
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_a -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-05-16 13:21 tz_b -> /dev/block/mmcblk0p36
Click to expand...
Click to collapse
Sorry I omitted the TZ partition by error, it must be copied from b to a too. (not important here but if you want to have an idea about every partition "role" : https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565 )
For the boot and system partitions, you can also flash them from the B slot to the A one if you want, but when you flash an update from the B slot, the new system.img and boot.img from the update will be flashed into the A partitions ; so there's no absolute need to copy them manually unless you want to try booting from the A slot without updating. (I hope I am somehow clear lol )
Oh and it won't affect your data at all!

GDFI said:
Sorry I omitted the TZ partition by error, it must be copied from b to a too. (not important here but if you want to have an idea about every partition "role" : https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565 )
For the boot and system partitions, you can also flash them from the B slot to the A one if you want, but when you flash an update from the B slot, the new system.img and boot.img from the update will be flashed into the A partitions ; so there's no absolute need to copy them manually unless you want to try booting from the A slot without updating. (I hope I am somehow clear lol )
Oh and it won't affect your data at all!
Click to expand...
Click to collapse
Thanks, you were very clear!
Definitely, I used these commands:
Code:
su
dd if=/dev/block/mmcblk0p32 of=/dev/block/mmcblk0p31 # aboot_b -> aboot_a
dd if=/dev/block/mmcblk0p52 of=/dev/block/mmcblk0p51 # boot_b -> boot_a
dd if=/dev/block/mmcblk0p27 of=/dev/block/mmcblk0p26 # cmnlib64_b -> cmnlib64_a
dd if=/dev/block/mmcblk0p25 of=/dev/block/mmcblk0p24 # cmnlib_b -> cmnlib_a
dd if=/dev/block/mmcblk0p14 of=/dev/block/mmcblk0p13 # devcfg_b -> devcfg_a
dd if=/dev/block/mmcblk0p45 of=/dev/block/mmcblk0p44 # dsp_b -> dsp_a
dd if=/dev/block/mmcblk0p29 of=/dev/block/mmcblk0p28 # keymaster_b -> keymaster_a
dd if=/dev/block/mmcblk0p48 of=/dev/block/mmcblk0p47 # mdtp_b -> mdtp_a
dd if=/dev/block/mmcblk0p55 of=/dev/block/mmcblk0p54 # modem_b -> modem_a
dd if=/dev/block/mmcblk0p20 of=/dev/block/mmcblk0p19 # rpm_b -> rpm_a
dd if=/dev/block/mmcblk0p18 of=/dev/block/mmcblk0p17 # sbl1_b -> sbl1_a
dd if=/dev/block/mmcblk0p57 of=/dev/block/mmcblk0p56 # system_b -> system_a
dd if=/dev/block/mmcblk0p36 of=/dev/block/mmcblk0p35 # tz_b -> tz_a
dd if=/dev/block/mmcblk0p59 of=/dev/block/mmcblk0p58 # vendor_b -> vendor_a
Now I have to wait the next update to see if it works.
I have a doubt, if the custom roms only change the system and boot partitions, does that mean that without having the original rom the other partitions will no longer be updated?

epcesp said:
Now I have to wait the next update to see if it works.
I have a doubt, if the custom roms only change the system and boot partitions, does that mean that without having the original rom the other partitions will no longer be updated?
Click to expand...
Click to collapse
Nice!
Yep, the custom roms rely on stock vendor, modem etc... and if you install one on the top of 10.0.0.3 stock for example, the vendor, modem, about, and other partitions will keep the same version and won't be updated with the custom rom updates.
You can update them manually by flashing newer images of those partitions (that can be extracted from ota updates), as long as the new version is still compatible with the rom ; for example a custom rom made to be compatible with an Oreo vendor may not work if the vendor is updated to its Pie version (The vendor having an Oreo version in the slot A might be the reason you couldn't boot :v ). Some developers recommend to use certain versions sometimes.
In short, those partitions won't be updated unless you want to do it manually

Clear, but if I want to update to latest version, mantaining my data and my rom, which partitions should I flash?
All except system and boot?

Yes, you flash everything except system and boot.
But one important thing is : if you have disabled encryption, flashing an update of vendor partition will re-enable forced encryption, so you would need to go to TWRP just after flashing and install Encryption disabler zip BEFORE the first boot, otherwise your data would be encrypted directly after first booting.

I made an update of the rom and now the phone works also in slot a, thanks @GDFI!
GDFI said:
Yes, you flash everything except system and boot.
But one important thing is : if you have disabled encryption, flashing an update of vendor partition will re-enable forced encryption, so you would need to go to TWRP just after flashing and install Encryption disabler zip BEFORE the first boot, otherwise your data would be encrypted directly after first booting.
Click to expand...
Click to collapse
What happens if I have my data already encrypted? I encrypted the phone from android settings.
When I installed the rom for the first time I flashed also force encryption disabled, as reported in the installation guide. Then in the rom from android security settings I encrypted the phone.
I'm not very sure about the purpouse of force encryption disabler.

epcesp said:
What happens if I have my data already encrypted? I encrypted the phone from android settings.
When I installed the rom for the first time I flashed also force encryption disabled, as reported in the installation guide. Then in the rom from android security settings I encrypted the phone.
I'm not very sure about the purpouse of force encryption disabler.
Click to expand...
Click to collapse
Happy it worked
Some ROMs don't support encryption, and TWRP especially cannot read encrypted data so most people prefer disable it. Since you're already encrypted, you can ignore the Disabler stuff!

Ok, thank you very much for all the support!

Related

Internal Memory Data [images] Recovery - Stuck at mmcblk0p12.raw

Okay so I'm trying to recover all the images on a Samsung Galaxy Tab Pro,
by following this guide Because there is a lot of pictures on it, that has to be recovered.
So far I have done everything the guide told me to, with some small changes.
First of all I found out that I have to use port 5037 instead of 5555 in this code line:
Code:
/system/xbin/busybox nc -l -p 5037 -e /system/xbin/busybox dd if=/dev/block/mm
Because if I use 5555 i get the "Address already in use"
And I only get access if I use 5037 instead.
Right now I'm stuck at step 6 in the guide. First nothing worked, I didn't get any progress, and the byte data was 0 all the time. Even the timer didn't begin to count the time. After some research in the guide i found out,
that I had to use ncat instead of nc
When I use this code line:
Code:
ncat 127.0.0.1 5555| pv -i 0.5 > mmcblk0p12.raw
This means the timer is counting now. But still no progress, except after a 2 - 3 minutes I get an error telling me the file or directory doesn't exist. The guide say that I maybe have to use another mmcblk, I tried a few, same thing. Therefore I tried to use this:
Code:
ls -l /dev/block/platform/*/by-name
And got this:
Code:
lrwxrwxrwx root root 1970-01-01 21:14 aboot -> /dev/block/mmcbl k0p6
lrwxrwxrwx root root 1970-01-01 21:14 apnhlos -> /dev/block/mmc blk0p1
lrwxrwxrwx root root 1970-01-01 21:14 backup -> /dev/block/mmcb lk0p17
lrwxrwxrwx root root 1970-01-01 21:14 boot -> /dev/block/mmcblk 0p14
lrwxrwxrwx root root 1970-01-01 21:14 cache -> /dev/block/mmcbl k0p24
lrwxrwxrwx root root 1970-01-01 21:14 dbi -> /dev/block/mmcblk0 p4
lrwxrwxrwx root root 1970-01-01 21:14 ddr -> /dev/block/mmcblk0 p5
lrwxrwxrwx root root 1970-01-01 21:14 efs -> /dev/block/mmcblk0 p11
lrwxrwxrwx root root 1970-01-01 21:14 fota -> /dev/block/mmcblk 0p16
lrwxrwxrwx root root 1970-01-01 21:14 fsc -> /dev/block/mmcblk0 p19
lrwxrwxrwx root root 1970-01-01 21:14 fsg -> /dev/block/mmcblk0 p18
lrwxrwxrwx root root 1970-01-01 21:14 hidden -> /dev/block/mmcb lk0p25
lrwxrwxrwx root root 1970-01-01 21:14 modem -> /dev/block/mmcbl k0p2
lrwxrwxrwx root root 1970-01-01 21:14 modemst1 -> /dev/block/mm cblk0p12
lrwxrwxrwx root root 1970-01-01 21:14 modemst2 -> /dev/block/mm cblk0p13
lrwxrwxrwx root root 1970-01-01 21:14 pad -> /dev/block/mmcblk0 p9
lrwxrwxrwx root root 1970-01-01 21:14 param -> /dev/block/mmcbl k0p10
lrwxrwxrwx root root 1970-01-01 21:14 persdata -> /dev/block/mm cblk0p22
lrwxrwxrwx root root 1970-01-01 21:14 persist -> /dev/block/mmc blk0p21
lrwxrwxrwx root root 1970-01-01 21:14 recovery -> /dev/block/mm cblk0p15
lrwxrwxrwx root root 1970-01-01 21:14 rpm -> /dev/block/mmcblk0 p7
lrwxrwxrwx root root 1970-01-01 21:14 sbl1 -> /dev/block/mmcblk 0p3
lrwxrwxrwx root root 1970-01-01 21:14 ssd -> /dev/block/mmcblk0 p20
lrwxrwxrwx root root 1970-01-01 21:14 system -> /dev/block/mmcb lk0p23
lrwxrwxrwx root root 1970-01-01 21:14 tz -> /dev/block/mmcblk0p 8
lrwxrwxrwx root root 1970-01-01 21:14 userdata -> /dev/block/mm
Now my question is, whats next?
I hope to find the lost pictures on the tablet, but I'm not sure what to do.
I can see the the info about userdata is; /dev/block/mm, but it's the same thing like the others I have tried..
Yes I did root the tablet, and yes "BusyBox" and "adb shell" have Root access
Everything is like it should be, but still I'm stuck.
What I'm I missing?

Unofficial CM 13.0 [MM 6.0.1] Issue - Finding Boot Image

The output of
Code:
[email protected]:/ # ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name/
total 0
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 2016-05-20 18:17 cache -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 dgs -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 efs -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 2016-05-20 18:17 metadata -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 misc -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 param -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 radio -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 sbl -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 2016-05-20 18:17 system -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 2016-05-20 18:17 userdata -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 20 2016-05-20 18:17 xloader -> /dev/block/mmcblk0p1
says boot is
Code:
mmcblk0p7
but when unpacked, changed, and flashed to boot, I load up into CWM Recovery, when the recovery partition is clearly
Code:
mmcblk0p8
.
Am I doing something wrong? Is the (insert non-n00b word here) skipping the boot partition?

[HELP] Create a nandroid backup (Xperia C6 Clone/China)

Hello.
So, as I described here, I success got root on this device. Now, I want a full backup in case things going bad. And obvious, a way to restore this backup.
I was searching for days for a ROM, but it simply don't exist (yet). This model have an identification (alps l1 mp6 v2 gxq6580 weg l p69) wich is used in some other devices (includings Samsung clones), so, I checked all the ROMs I found looking into /system partition on my device and comparing with /system image of the ROMs (I used SuperR's Kitchen), and none of them are equal, I mean, a lot of files (includind build.prop) are different, so there is a great chance to brick my phone if I use it.
Even if it is found, I can't restore with SP Flash Tools, because it don't work with this phone. I tried to readback, but it recognizes but never start. As the phone is a MT6580 based SoC, maybe is compatability issue also. MTK Droid Tools don't work also. It recognizes, but can't do anything (don't generate scatter, don't root, don't nothing), again maybe a compatibility also.
The stock recovery have no option to backup, and I'm afraid to flash a CWM or TWRP, because I don't know much about porting these things, and I don't have much information about partitions and these things yet. ADB while in recovery give me an unauthorized device, by the way.
The phone accept fastboot commands, but don't accept the 'fastboot boot image.img", to try a temporary recovery, it only accept the 'fastboot flash image.img'. As sayed on the thread above, the bootloader is now unlocked, by the way.
So... this the situation... Can't have backup for now. If it help you to help me, there is the result of ls -all /dev/block/platform/mtk-msdc.0/by-name/ command in adb shell:
Code:
1|[email protected]_weg_l:/ # ls -all /dev/block/platform/mtk-msdc.0/by-name/
lrwxrwxrwx root root 2017-03-30 00:16 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2017-03-30 00:16 cache -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 2017-03-30 00:16 expdb -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2017-03-30 00:16 flashinfo -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 2017-03-30 00:16 frp -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2017-03-30 00:16 keystore -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 2017-03-30 00:16 lk -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2017-03-30 00:16 logo -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2017-03-30 00:16 metadata -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2017-03-30 00:16 nvdata -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2017-03-30 00:16 nvram -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2017-03-30 00:16 oemkeystore -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 2017-03-30 00:16 para -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2017-03-30 00:16 proinfo -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2017-03-30 00:16 protect1 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2017-03-30 00:16 protect2 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2017-03-30 00:16 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2017-03-30 00:16 seccfg -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2017-03-30 00:16 secro -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 2017-03-30 00:16 system -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 2017-03-30 00:16 userdata -> /dev/block/mmcblk0p20
[email protected]_weg_l:/ #
I sucessfully (I think) dump a boot image with dd command (dd if=/dev/block/mmcblk0p7 of=/sdcard/boot.img), but I'm not sure it is 100% perfect and if it can be safely used to restore (and how to restore... maybe 'fastboot flash'?). Maybe I can dump some other images, but I don't tried yet.
If you need any other information, I reply in almost same time.
Thanks in advice.
So, I did a dd to dump boot and recovery, and open them sucessfuly on kitchen. Unfortunally, I can't do the same with system because adb only works with phone in normal mode.
Anyway to get the system for this phone? And, can I use these dumped files with 'fastboot flash' command?
Thanks!
romulocarlos said:
So, I did a dd to dump boot and recovery, and open them sucessfuly on kitchen. Unfortunally, I can't do the same with system because adb only works with phone in normal mode.
Anyway to get the system for this phone? And, can I use these dumped files with 'fastboot flash' command?
Thanks!
Click to expand...
Click to collapse
Hello, i have recently posted a complete ROM on needrom. https://www.needrom.com/download/sony-xperia-c6-clone-mt6580/
i guess that is the one your are looking for. Good luck and sorry for my bad englich.
Help
Rom is corrupted, is not it? It's working? tell me how to download, I thank you

[WIP] Sprint LG G6 Development Megathread

@Ferga2790 seems to have found the answer! You can flash the Canadian H873 kdz and unlock it. Files are located here: https://forum.xda-developers.com/showpost.php?p=76312669&postcount=10. Good luck! :cyclops: :highfive:
Download mode: power off, hold vol +, plug USB cable into phone
Recovery mode: power off, hold vol - and power, plug USB cable into phone
When you select "reboot to bootloader" in the recovery main menu, it just boots up the phone as normal. ADB nor Fastboot work in either of these modes.
All partitions (after running py lglaf.py --unlock -c "!EXEC ls -la /dev/block/bootdevice/by-name ")
/dev/block/bootdevice/by-name:
total 0
drwxr-xr-x 2 root root 1380 2017-04-28 18:02 .
drwxr-xr-x 4 root root 1560 2017-04-28 18:02 ..
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 aboot -> /dev/block/sde6
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 abootbak -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 apdp -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 boot -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 cache -> /dev/block/sda16
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 carrier -> /dev/block/sda13
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 cdt -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 cmnlib -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 cmnlib64 -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 cmnlib64bak -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 cmnlibbak -> /dev/block/sde23
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 ddr -> /dev/block/sdd1
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 devcfg -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 devcfgbak -> /dev/block/sde17
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 devinfo -> /dev/block/sdb6
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 dip -> /dev/block/sdb5
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 dpo -> /dev/block/sde28
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 drm -> /dev/block/sda4
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 eksst -> /dev/block/sda9
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 encrypt -> /dev/block/sda8
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 factory -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 fota -> /dev/block/sdb3
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 fsc -> /dev/block/sdf3
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 fsg -> /dev/block/sdb4
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 grow -> /dev/block/sda18
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 grow2 -> /dev/block/sdb7
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 grow3 -> /dev/block/sdc3
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 grow4 -> /dev/block/sdd4
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 grow5 -> /dev/block/sde29
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 grow6 -> /dev/block/sdf4
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 grow7 -> /dev/block/sdg2
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 hyp -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 hypbak -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 keymaster -> /dev/block/sde20
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 keymasterbak -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 keystore -> /dev/block/sda12
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 laf -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 lafbak -> /dev/block/sda2
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 misc -> /dev/block/sda6
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 modem -> /dev/block/sde18
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 modemst2 -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 mpt -> /dev/block/sda3
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 msadp -> /dev/block/sde27
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 persist -> /dev/block/sda14
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 persistent -> /dev/block/sdg1
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 pmic -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 pmicbak -> /dev/block/sde15
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 raw_resources -> /dev/block/sde8
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 raw_resourcesbak -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 rct -> /dev/block/sda10
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 recovery -> /dev/block/sde2
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 recoverybak -> /dev/block/sde3
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 reserve -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 rpm -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 rpmbak -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 sec -> /dev/block/sde19
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 sns -> /dev/block/sda5
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 ssd -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 system -> /dev/block/sda15
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 tz -> /dev/block/sde4
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 tzbak -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 2017-04-28 18:02 userdata -> /dev/block/sda17
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 xbl2 -> /dev/block/sdc1
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 xbl2bak -> /dev/block/sdc2
lrwxrwxrwx 1 root root 15 2017-04-28 18:02 xblbak -> /dev/block/sdb2
User @l33tlinuxh4x0r has gotten Download Mode to somewhat work with a modified lglaf, as seen in this post.
Thanks to @Flippy125 for explaining how to access Download Mode in this thread.
Reserved
I have gotten download mode to work somewhat using lglaf.py from this post located here
I am using windows 10 pro
Python 3.6
and the above file.
I have managed to get ls and lsmod commands working.
lsof and lsusb also work.
examples are:
Code:
python lglaf.py --unlock -c "!EXEC ls / "
python lglaf.py --unlock -c "!EXEC ls /system/bin/ "
note that there are 2 spaces between !EXEC and ls and one space after the command ending in /. Capitalization is also important.
I will work on more but I really don't want to mess up my phone.
EDIT: I forgot one of the most important things. How to get your phone to reboot back to normal. Run the following command.
Code:
python lglaf.py --unlock -c "!CTRL RSET"
Figured it out on Windows.
Mr nerd said:
Figured it out on Windows.
Click to expand...
Click to collapse
No updates afaik. I don't have a second device that I am willing to brick to test anything else, but as far as I can tell we are locked down so tight that we will probably never see root on this device unless the rooting methods change 100% and don't require filesystem access and even if that were the case root would be useless as the main reason for root is writing to the filesystem.
EDIT: IF lg allows us to root or unlocks this phone we could have root but I don't see that happening either. Also if we had a tot file for this phone we could have root access but it would be dangerous and if you change anything with it you would get a secure boot error. All we can hope for is that lg releases an engineering build or makes some other major mistake or something else leaks.
l33tlinuxh4x0r said:
No updates afaik. I don't have a second device that I am willing to brick to test anything else, but as far as I can tell we are locked down so tight that we will probably never see root on this device unless the rooting methods change 100% and don't require filesystem access and even if that were the case root would be useless as the main reason for root is writing to the filesystem.
EDIT: IF lg allows us to root or unlocks this phone we could have root but I don't see that happening either. Also if we had a tot file for this phone we could have root access but it would be dangerous and if you change anything with it you would get a secure boot error. All we can hope for is that lg releases an engineering build or makes some other major mistake or something else leaks.
Click to expand...
Click to collapse
Ahh ok ok so do you know how we could start looking for Vulns? I never understood how to debug a phone
Mr nerd said:
Ahh ok ok so do you know how we could start looking for Vulns? I never understood how to debug a phone
Click to expand...
Click to collapse
There is a site that lists all of the known vulnerabilities for linux and android but I forgot what it is. Google probably knows though. However even with a vulnerability root will probably throw an secure boot error. We need a venerability for the bootloader.
Ahh i see what you mean. Well do you know how to debug or fuzz a bootloader?
http://hexdetective.blogspot.com/2017/02/exploiting-android-s-boot-getting.html
Sent from my LG-LS993 using Tapatalk
Hi!
Possible downgrade ZVA to ZV9 or ZV6?
On old model LS996 method to write partitions: https://forum.xda-developers.com/g-flex2/development/lg-g-flex-2-ls996-zv6-sprint-5-1-1-t3169212
I dont' know what to do whith python I cant get to work I enter the codes that are in the instructions and all I get is error after error. telling me that the path is wrong but i got to that path and the file is there .

How can I backup System?[SOLVED]

Hello all. So without having TWRP stable and running, how can we pull a copy of system.img considering there is not a system partition, per se. Usually you could dd it and fastboot flash it but there is no system partition when you run ls -lah /dev/block/bootdevice/by-name. There is however a super partition which contains system, vendor and product. I've extracted the super partitioon to a .img. Is there a way to get it from this? This whole dynamic partition crap is confusing. Thanks!
I THINK I FOUND OUT A WAY TO BACK IT UP..
Code:
# ls -lah /dev/block/mapper
total 0
drwxr-xr-x 2 root root 380 1970-01-15 18:29 .
drwxr-xr-x 6 root root 3.5K 1970-01-15 18:29 ..
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-15
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-14
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-13
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 [email protected] -> /dev/block/dm-16
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 odm-verity -> /dev/block/dm-11
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 odm_a -> /dev/block/dm-3
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 odm_b -> /dev/block/dm-7
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 product-verity -> /dev/block/dm-9
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 product_a -> /dev/block/dm-1
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 product_b -> /dev/block/dm-5
[COLOR="DarkRed"][B]lrwxrwxrwx 1 root root 15 1970-01-15 18:29 system_a -> /dev/block/dm-0
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 system_b -> /dev/block/dm-4[/B][/COLOR]
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 system_root-verity -> /dev/block/dm-8
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 userdata -> /dev/block/dm-12
lrwxrwxrwx 1 root root 16 1970-01-15 18:29 vendor-verity -> /dev/block/dm-10
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 vendor_a -> /dev/block/dm-2
lrwxrwxrwx 1 root root 15 1970-01-15 18:29 vendor_b -> /dev/block/dm-6
As you can see here, we have 2 block devices pointing to system_a and system_b. I would imagine using dd to make a copy would be good enough for now.
Code:
dd if=/dev/block/mapper/system_a of=/sdcard/system_a.img
And then fastboot flash it to your current slot
Code:
fastboot flash system system_a.img
As a side note, to be able to tell which slot is currently being used, you can run
Code:
fastboot getvar all
and look for (bootloader) current-slot
Hope this helps

Categories

Resources