[Android Software/Hacking General [Developers Only]] gouster3:
Help?

Hi. Can anyone help me to get it working? I have Xperia XZ, and i dont want to use SD card for linux partition, so i have shrinked my data partition to 16GB, and created new 7GB ext4 partition for linux rootfs. I want to have android kernel in fota partition (so if i mess up something with linux, i just simply boot Recovery, and i will get Android without debian booted), and debian initramfs in boot partition (with script to extract fota into /android folder, so if i flash new rom to system, and kernel to fota partition, i will not mess up debian instalation).

fdisk output:

C:\Flashtool\x10flasher_lib>adb shell
fdisk /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT

Command (m for help):
p
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326

Number Start (sector) End (sector) Size Code Name
1 256 4351 2048K 0700 TA
2 8192 40959 16.0M 0700 LTALabel
3 40960 45055 2048K 0700 xbl
4 45056 49151 2048K 0700 xblbak
5 49152 53247 2048K 0700 tz
6 53248 57343 2048K 0700 tzbak
7 57344 58343 500K 0700 rpm
8 58344 59343 500K 0700 rpmbak
9 59344 60367 512K 0700 hyp
10 60368 61391 512K 0700 hypbak
11 61392 62415 512K 0700 pmic
12 62416 63439 512K 0700 pmicbak
13 63440 65487 1024K 0700 aboot
14 65488 67535 1024K 0700 abootbak
15 67536 68559 512K 0700 keymaster
16 68560 69583 512K 0700 keymasterbak
17 69584 70095 256K 0700 cmnlib
18 70096 70607 256K 0700 cmnlibbak
19 70608 71119 256K 0700 cmnlib64
20 71120 71631 256K 0700 cmnlib64bak
21 71632 71887 128K 0700 devcfg
22 71888 72143 128K 0700 devcfgbak
23 72144 133583 30.0M 0700 s1sbl
24 133584 195023 30.0M 0700 s1sblbak
25 195024 195223 100K 0700 tzs1attest
26 195224 195423 100K 0700 tzs1attestbak
27 195424 196447 512K 0700 tzs1sbl
28 196448 197471 512K 0700 tzs1sblbak
29 204800 208895 2048K 0700 fsg
30 208896 339967 64.0M 0700 boot
31 339968 534527 95.0M 0700 modem
32 534528 567295 16.0M 0700 dsp
33 567296 567297 1024 0700 devinfo
34 567304 567815 256K 0700 apdp
35 567816 568327 256K 0700 msadp
36 568328 568329 1024 0700 dpo
37 568336 635183 32.6M 0700 splash
38 635184 637231 1024K 0700 ddr
39 637232 637487 128K 0700 sec
40 637488 637503 8192 0700 ssd
41 638976 643071 2048K 0700 modemst1
42 647168 651263 2048K 0700 modemst2
43 655360 1179647 256M 0700 cache
44 1179648 1245183 32.0M 0700 persist
45 1245184 1246207 512K 0700 keystore
46 1246208 1247231 512K 0700 frp
47 1247232 1251327 2048K 0700 sti
48 1251328 1382399 64.0M 0700 FOTAKernel
49 1382400 1447935 32.0M 0700 rdimage
50 1449984 1470463 10.0M 0700 apps_log
51 1474560 1507327 16.0M 0700 diag
52 1507328 1548287 20.0M 0700 Qnovo
53 1548288 2367487 400M 0700 oem
54 2367488 34367187 15.2G 0700 userdata
55 48963584 61067263 5910M 0700 system
56 34367188 48963583 7127M 0700 linux

Command (m for help):

partition 30 is linux initramfs

partition 48 is stock android boot.img (kernel)

partition 56 is linux rootfs.

https://uplod.ws/0nuccns8vd3s :

boot.img - my attemp to do initramfs

fota.img - stock kernel from my rom

So, can anyone look at my boot.img and tell me what i am doing wrong? Thanx.