[Other Operating Systems and Languages] TraceTheTiger:
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:

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