How to edit the param.lfs on Samsung Note 4 910F - Other Operating Systems and Languages

Hello XDA,
I want to edit my splash screen on my Note 4.
I already searched the interwebs and found a tutorial, but it didn't work for me :/
So I was trying to figure it out myself.
First I searched for the correct mmcblk
My devices are named like this
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 aboot -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 apnhlos -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 boot -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 cache -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 dbi -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 ddr -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 efs -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 fota -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 hidden -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 mdm1m9kefs1 -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 mdm1m9kefs2 -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 mdm1m9kefs3 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 mdm1m9kefsc -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 misc -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 modem -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 pad -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 param -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 persdata -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 persist -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 recovery -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 rpm -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 sbl1 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 sbl1bak -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 ssd -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 system -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 20 2014-07-17 00:58 tz -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 2014-07-17 00:58 userdata -> /dev/block/mmcblk0p27
I decided to "clone" the param block to '/sdcard/param.lfs' using this command:
dd if=/dev/block/mmcblk0p12 of=/sdcard/param.lfs
Click to expand...
Click to collapse
This worked without problems and I got my file.
Now I've got the problem that I can't open or extract it in anyway.
I tried the following things:
tar command
a python script I found
a bash script I found
Mounting it to a folder
None of them worked for me.
Here are the scripts:
Bash Script:
#!/bin/bash
# filename: extract-jpg.sh
starts=(`grep -Pabo $'\xFF\xD8' $1 | cut -f 1 -d :`)
ends=(`grep -Pabo $'\xFF\xD9' $1 | cut -f 1 -d :`)
for (( i = 0 ; i < ${#starts[@]} ; i++ )); do
end=$((ends[$i] + 2))
count=$((end - starts[$i]))
echo "-I- Extracting ${starts[$i]}.jpg"
dd if=$1 bs=1 skip=${starts[$i]} count=$count > ${starts[$i]}.jpg
done
Python Script
from os import system
import sys
sys.stderr = open("./log.txt", "wb")
#sys.stdout = open("./stdout.txt", "wb")
def pr_err(msg):
print(msg)
system("pause")
exit()
def try_to_open(file):
res = ""
try:
res=open(file,"rb").read()
except:
pr_err("%s not found or can't be opened" % file)
return res
def open_jpg(file):
jpg = try_to_open(file)
if (len(jpg) == 0):
pr_err("%s is empty" % file)
elif (len(jpg) > 64673):
pr_err("%s bigger than 64673 bytes" % file)
else:
print("opened %s" % file)
return jpg
param = try_to_open("./param.lfs")
print("opened param.lfs")
img_orig = open_jpg("./image_orig.jpg")
img_new = open_jpg("./image_new.jpg")
if (len(img_orig) < len(img_new)):
pr_err("image_new.jpg is bigger than image_orig.jpg. Try to decrease its size.")
img_start = param.find(img_orig)
if img_start == -1:
pr_err("image_orig.jpg is not found in param.lfs")
else:
print("found image_orig.jpg in param.lfs")
length = len(img_orig) - len(img_new)
img = img_new + "\x00"*length
if length:
print("created image_new_.jpg with same size as image_orig.jpg")
open("./image_new_.jpg","wb").write(img)
new_param = param[:img_start] + img + param[img_start + len(img_orig):]
#print(len(param[:img_start]), len(img), len(param[img_start + len(img_orig):]))
if (len(new_param) != len(param)):
pr_err("Error, sizes of param_mod.lfs and param.lfs not matches")
open("./param_mod.lfs", "wb").write(new_param)
print("created param_mod.lfs")
system("pause")
So, my question is... How do I extract and repack it so I can change the splash screen to something ... Fancy
Additional Details:
Device Brand: Samsung
Device Model: Note 4 910F - Snapdragon
ROM: Emotroid Android 6.0 ROM

Related

Verizon S4 Partition Info

just dumped this figured it could be of use
lrwxrwxrwx root root 1969-12-31 23:01 aboot -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 1969-12-31 23:01 apnhlos -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 1969-12-31 23:01 backup -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 1969-12-31 23:01 boot -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 1969-12-31 23:01 cache -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 1969-12-31 23:01 carrier -> /dev/block/mmcblk0p28
lrwxrwxrwx root root 1969-12-31 23:01 efs -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 1969-12-31 23:01 fota -> /dev/block/mmcblk0p22
lrwxrwxrwx root root 1969-12-31 23:01 fsg -> /dev/block/mmcblk0p24
lrwxrwxrwx root root 1969-12-31 23:01 hidden -> /dev/block/mmcblk0p27
lrwxrwxrwx root root 1969-12-31 23:01 m9kefs1 -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 1969-12-31 23:01 m9kefs2 -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 1969-12-31 23:01 m9kefs3 -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 1969-12-31 23:01 mdm -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 1969-12-31 23:01 modemst1 -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 1969-12-31 23:01 modemst2 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 1969-12-31 23:01 pad -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 1969-12-31 23:01 param -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 1969-12-31 23:01 persdata -> /dev/block/mmcblk0p26
lrwxrwxrwx root root 1969-12-31 23:01 persist -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 1969-12-31 23:01 recovery -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 1969-12-31 23:01 rpm -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 1969-12-31 23:01 sbl1 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 1969-12-31 23:01 sbl2 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 1969-12-31 23:01 sbl3 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 1969-12-31 23:01 ssd -> /dev/block/mmcblk0p25
lrwxrwxrwx root root 1969-12-31 23:01 system -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 1969-12-31 23:01 tz -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 1969-12-31 23:01 userdata -> /dev/block/mmcblk0p29

Mount points and partition layout (oreo)

I don't know if anyone need it but here it is
Code:
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 bootfail_info -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 cache -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 cust -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 dfx -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 dto -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 dts -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 erecovery_kernel -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 erecovery_ramdisk -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 erecovery_vbmeta -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 erecovery_vendor -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 fastboot -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 frp -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 fw_hifi -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 fw_lpm3 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 hisitest0 -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 hisitest1 -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 hisitest2 -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 kernel -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 misc -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 modem_fw -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 modem_om -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 modem_secure -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 modemnvm_backup -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 modemnvm_factory -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 modemnvm_img -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 modemnvm_system -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 modemnvm_update -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 nvme -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 odm -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 oeminfo -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 patch -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 persist -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 product -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 ramdisk -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 recovery_ramdisk -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 recovery_vbmeta -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 recovery_vendor -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 reserved2 -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 reserved3 -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 reserved4 -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 reserved5 -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 reserved8 -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 reserved9 -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 rrecord -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 secure_storage -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 sensorhub -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 splash2 -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 system -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 teeos -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 trustfirmware -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 userdata -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 vbmeta -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 vendor -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 2018-03-16 17:19 version -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 vrl -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 2018-03-16 17:19 vrl_backup -> /dev/block/mmcblk0p2
Join Telegram group if you are willing to test latest stuff.

Root (Magisk) possible?

I'm looking for a solution to get Root (Magisk) to work.
On my other devices it was possible only to boot TWRP, make a backup of boot.img, patch it later with Magisk Manager and install the patched_boot.img. This is the easiest way to get OAT to work (only flash back the original boot.img)
I've found a Root solution that should work on Motorola One AND One Power here:
https://tabcult.com/2018/09/15/how-...and-root-motorola-one-and-motorola-one-power/
but I couldn't get it to work.
Because it looks that TWRP for One and One Power should be the same I looked for newer TWRPs and found them here: https://twrp.me/motorola/motorolamotoonepower.html
but it doesn't work either...
Or:
Does anybody has (or can extract) the original Recovery? Without this I wouldn't try to install any twrp...
Motorola One & One Power is built on different socs and have different screen res, so TWRP for One Power won't work for us.
I tried to locate the partitions, but I couldn't find any "recovery"-partition.
I'm sure it's somewhere...but where?
Code:
deen_sprout:/ $ ls -al dev/block/platform/soc/7824900.sdhci/by-name
total 0
drwxr-xr-x 2 root root 1280 1970-02-02 13:53 .
drwxr-xr-x 4 root root 1360 1970-02-02 13:53 ..
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 DDR -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 aboot_a -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 aboot_b -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 apdp -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 boot_a -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 boot_b -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 carrier -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 cid -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 cmnlib64_a -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 cmnlib64_b -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 cmnlib_a -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 cmnlib_b -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 devcfg_a -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 devcfg_b -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 dpo -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 dsp_a -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 dsp_b -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 dto_a -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 dto_b -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 frp -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 fsc -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 fsg_a -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 fsg_b -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 hw -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 keymaster_a -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 keymaster_b -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 kpan -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 logo_a -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 logo_b -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 logs -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 metadata -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 misc -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 modem_a -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 modem_b -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 modemst1 -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 modemst2 -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 mota -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 msadp -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 oem_a -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 oem_b -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 padA -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 persist -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 prov_a -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 prov_b -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 rpm_a -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 rpm_b -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 sbl1_a -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 sbl1_b -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 sp -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 ssd -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 syscfg -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 system_a -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 system_b -> /dev/block/mmcblk0p61
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 tz_a -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 1970-02-02 13:53 tz_b -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 userdata -> /dev/block/mmcblk0p62
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 utags -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 utagsBackup -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 vbmeta_a -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 vbmeta_b -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 vendor_a -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-02-02 13:53 vendor_b -> /dev/block/mmcblk0p59
deen_sprout:/ $
I have found the original Firmware for my device:
https://mirrors.lolinet.com/firmwar...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
There is no recovery in it
I tried to patch the boot.img with magisk but the patched_boot.img is much smaller, that doesn't look like on my other devices.
There are many questions and it seems to difficult for me
Sylvia said:
I have found the original Firmware for my device:
https://mirrors.lolinet.com/firmwar...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
There is no recovery in it
I tried to patch the boot.img with magisk but the patched_boot.img is much smaller, that doesn't look like on my other devices.
There are many questions and it seems to difficult for me
Click to expand...
Click to collapse
Yes, I also noticed that the firmware doesn't contain any recovery image, so yeah..it's kind of strange. No image and no partition. But I've booted to stock recovery, so it's there
So, it turns out that devices with A/B partitions don't have a separate recovery partition. It's built in to boot image.
https://www.xda-developers.com/how-a-b-partitions-and-seamless-updates-affect-custom-development-on-xda/
Thank you, very interesting article. So I don't have to look for it anymore.
Seems that we have wait for a TWRP, hopefully there are many people who will ask for it :fingers-crossed:
When I have time I try to compile a TWRP.
If someone wants to try it:
https://www.xda-developers.com/compile-twrp-for-your-device/

ValueError: malformed recovery.fstab line: "/boot emmc /dev/block/platform/sprd-sdhci

ValueError: malformed recovery.fstab line: "/boot emmc /dev/block/platform/sprd-sdhci
I need help with compiling CM-13 for my device, I've been following AlaskaLinuxUser's guide for building the device tree from scratch. I'm stuck at one point when building that I just can't figure out though, can anyone help me please?
Made recovery image: /home/raid/android/system/out/target/product/goyave3g/recovery.img
Target build info: /home/raid/android/system/out/target/product/goyave3g/system/build.prop
Construct recovery from boot
mkdir -p /home/raid/android/system/out/target/product/goyave3g/obj/PACKAGING/recovery_patch_intermediates/
PATH=/home/raid/android/system/out/host/linux-x86/bin:$PATH /home/raid/android/system/out/host/linux-x86/bin/imgdiff /home/raid/android/system/out/target/product/goyave3g/boot.img /home/raid/android/system/out/target/product/goyave3g/recovery.img /home/raid/android/system/out/target/product/goyave3g/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
build/tools/generate-notice-files.py /home/raid/android/system/out/target/product/goyave3g/obj/NOTICE.txt /home/raid/android/system/out/target/product/goyave3g/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /home/raid/android/system/out/target/product/goyave3g/obj/NOTICE_FILES/src
failed to reconstruct target deflate chunk 1 [(null)]; treating as normal
chunk 0: type 0 start 0 len 5230602
chunk 1: type 2 start 5230602 len 1732096
chunk 2: type 0 start 6193783 len 269705
Construct patches for 3 chunks...
Combining NOTICE files into HTML
Combining NOTICE files into text
patch 0 is 206 bytes (of 5230602)
patch 1 is 1730987 bytes (of 963181)
patch 2 is 196 bytes (of 269705)
chunk 0: normal ( 0, 5230602) 206
chunk 1: deflate ( 5230602, 3389635) 1730987 (null)
chunk 2: normal ( 8620237, 270131) 196
Installing recovery patch to system partition
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 55, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 37, in main
OPTIONS.info_dict = common.LoadInfoDict(input_dir)
File "/home/raid/android/system/build/tools/releasetools/common.py", line 201, in LoadInfoDict
d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"], d["device_type"])
File "/home/raid/android/system/build/tools/releasetools/common.py", line 285, in LoadRecoveryFSTab
raise ValueError("malformed recovery.fstab line: "%s"" % (line,))
ValueError: malformed recovery.fstab line: "/boot emmc /dev/block/platform/sprd-sdhci.3/by-name/KERNEL"
build/core/Makefile:1074: recipe for target '/home/raid/android/system/out/target/product/goyave3g/system/bin/install-recovery.sh' failed
make: *** [/home/raid/android/system/out/target/product/goyave3g/system/bin/install-recovery.sh] Error 1
make: Leaving directory '/home/raid/android/system'
#### make failed to build some targets (03:18 (mm:ss)) ####
Click to expand...
Click to collapse
This is what is in my recovery.fstab
/boot emmc /dev/block/platform/sprd-sdhci.3/by-name/KERNEL
/system ext4 /dev/block/platform/sprd-sdhci.3/by-name/system
/data ext4 /dev/block/platform/sprd-sdhci.3/by-name/userdata flags=length=-16384
/cache ext4 /dev/block/platform/sprd-sdhci.3/by-name/CSC
/recovery emmc /dev/block/platform/sprd-sdhci.3/by-name/RECOVERY
/efs emmc /dev/block/platform/sprd-sdhci.3/by-name/efs flags=backup=1;display=EFS
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=removable;storage;display=USB-OTG
Click to expand...
Click to collapse
EDIT:
Here is some partition information from my device
Number Start End Size File system Name Flags
1 4194304B 6291455B 2097152B SBOOT msftdata
2 6291456B 8388607B 2097152B SBOOT2 msftdata
3 8388608B 9437183B 1048576B wfixnv1 msftdata
4 9437184B 10485759B 1048576B wfixnv2 msftdata
5 10485760B 11534335B 1048576B tdfixnv1 msftdata
6 11534336B 12582911B 1048576B tdfixnv2 msftdata
7 12582912B 16777215B 4194304B WDSP msftdata
8 16777216B 25165823B 8388608B MODEM msftdata
9 25165824B 33554431B 8388608B MODEM2 msftdata
10 33554432B 37748735B 4194304B TDDSP msftdata
11 37748736B 38797311B 1048576B FOTA_SIG msftdata
12 38797312B 39845887B 1048576B wruntimenv1 msftdata
13 39845888B 40894463B 1048576B wruntimenv2 msftdata
14 40894464B 41943039B 1048576B tdruntimenv1 msftdata
15 41943040B 42991615B 1048576B tdruntimenv2 msftdata
16 42991616B 45088767B 2097152B PARAM msftdata
17 45088768B 66060287B 20971520B ext4 efs msftdata
18 66060288B 71303167B 5242880B ext4 prodnv msftdata
19 71303168B 72351743B 1048576B RESERVED2 msftdata
20 72351744B 89128959B 16777216B KERNEL msftdata
21 89128960B 105906175B 16777216B RECOVERY msftdata
22 105906176B 315621375B 209715200B ext4 CSC msftdata
23 315621376B 1888485375B 1572864000B ext4 system msftdata
24 1888485376B 1901068287B 12582912B ext4 HIDDEN msftdata
25 1901068288B 7802454015B 5901385728B ext4 userdata msftdata
Click to expand...
Click to collapse
lrwxrwxrwx root root 2019-05-20 19:56 CSC -> /dev/block/mmcblk0p22
lrwxrwxrwx root root 2019-05-20 19:56 FOTA_SIG -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2019-05-20 19:56 HIDDEN -> /dev/block/mmcblk0p24
lrwxrwxrwx root root 2019-05-20 19:56 KERNEL -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 2019-05-20 19:56 MODEM -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2019-05-20 19:56 MODEM2 -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2019-05-20 19:56 PARAM -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 2019-05-20 19:56 RECOVERY -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 2019-05-20 19:56 RESERVED2 -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 2019-05-20 19:56 SBOOT -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2019-05-20 19:56 SBOOT2 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2019-05-20 19:56 TDDSP -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2019-05-20 19:56 WDSP -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2019-05-20 19:56 efs -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 2019-05-20 19:56 prodnv -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 2019-05-20 19:56 system -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 2019-05-20 19:56 tdfixnv1 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2019-05-20 19:56 tdfixnv2 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2019-05-20 19:56 tdruntimenv1 -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2019-05-20 19:56 tdruntimenv2 -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 2019-05-20 19:56 userdata -> /dev/block/mmcblk0p25
lrwxrwxrwx root root 2019-05-20 19:56 wfixnv1 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2019-05-20 19:56 wfixnv2 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2019-05-20 19:56 wruntimenv1 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2019-05-20 19:56 wruntimenv2 -> /dev/block/mmcblk0p13
Click to expand...
Click to collapse
Any help would be greatly appreciated!
Thanks!

Unable to extract userdata partition size

Greetings everyone. I'm trying to figure out the size of my userdata partition in my new Cubot Nova running Android 8.1 Oreo.
On older devices I managed to do this by running the following commands:
adb shell ls -al /dev/block/platform/bootdevice/by-name --------------> To list my partitions by name and find the actual userdata partition name. In my case, it's /dev/block/mmcblk0p33
Code:
Z:\Android\devices\Cubot Nova\adb platform-tools>adb shell ls -al /dev/block/platform/bootdevice/by-name
total 0
drwxr-xr-x 2 root root 780 2019-11-28 19:47 .
drwxr-xr-x 4 root root 860 2019-11-28 19:47 ..
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 boot -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 boot_para -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 cache -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 expdb -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 flashinfo -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 frp -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 gz1 -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 gz2 -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 lk -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 lk2 -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 loader_ext1 -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 loader_ext2 -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 logo -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 mcupmfw -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 md1dsp -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 md1img -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 metadata -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 nvcfg -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 nvdata -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 nvram -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 odmdtbo -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 para -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 23 2019-11-28 19:47 preloader_a -> /dev/block/mmcblk0boot0
lrwxrwxrwx 1 root root 23 2019-11-28 19:47 preloader_b -> /dev/block/mmcblk0boot1
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 proinfo -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 protect1 -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 protect2 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 2019-11-28 19:47 recovery -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 sdrpmb -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 sec1 -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 seccfg -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 spmfw -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 system -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 tee1 -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 tee2 -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 userdata -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 2019-11-28 19:47 vendor -> /dev/block/mmcblk0p30
Then I would run tune2fs -l /dev/block/mmcblk0p33 in the shell to get the partition info (block count and block size) to calculate, but it's not working. I get the following error message:
Code:
tune2fs 1.43.3 (04-Sep-2016)
tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p33
I googled the error message, but I couldn't find anything specific to Android, just Linux. Can someone please help me figure out what I'm doing wrong?.
Is there's another way to get the partition size?
I need it to perform backups with SP Flash Tools. TWRP is unable to decrypt my phone or mount it's internal storage, so that's not an option
Thanks in advance
EDIT: I should have mentioned that the phone is rooted via Magisk, and I run the tune2fs command with superuser access.
Nevermind, I'm dumb. This worked just fine:
blockdev --getsize64 /dev/block/mmcblk0p33

Categories

Resources