[Oukitel (All phone models)] vxsw:
=>redirected from https://xdaforums.com/t/oukitel-wp15-bootloop.4371295

ok. again, english is not my first language, so it's a bit hard to explaining. if you more interesting, you may find information at any other en sources. but at least now you would understand what to search more clearly.

I would talk about only mostly important parts to be short.

about partitions:

- boot - it's a kernel and a first main partition we have a 4.14 version. not sure, but seems android 12 required 5.4 kernel. so, perhaps you can't use aosp12, only aosp11 builds.

- super - it's a main dynamic partition (you may treat it like an archive file), what contain at least 3 partitions for operation system:

- - system - part of original google gsi

- - product - vendor modified part of gsi

- - vendor - device drivers only

ok. we can schematically draw it like this (sizes for current official wp15 fw):

View attachment 5543487

so, basically, "whole virtual os drive" is a couple of a 3 partitions: "system + product + vendor". where "system + product" is a os part independent of device and vendor is a device specified part.

but, as google gsi as 3d party gsi is a stand alone os without drivers and they not use a "product" partition.

so if you want to use 3d party os, you need enough free space in dynamic partition. in case of above, at first, you must remove/resize to 0 "product" partition, then you may upload desired gsi as a "system" partition.

theoretically that's all.

partitions accessing.

- dark green partitions (boot and super) can be accessing via adb through bootloader mode, i.e. via using:

adb reboot bootloader

you'll can see a small white text at a bottom left corner of a phone display "fastboot mode...".

- light green partitions (system product, vendor) can be accessing via adb through fastbootD (seems "D" means "dynamic"), i.e. via using magic manipulations of power and volume buttons at power on, or via adb command:

fastboot reboot fastboot

you'll can see a big blue text "fastboot" at top of a display and some orange menu texts

partition manipulations:

- erase:

fastboot erase <partition_name>

so for system and product it'll be a:

fastboot erase system
fastboot erase product

n.b. erasing have no affect to size of partition.

- resizing

fastboot resize-logical-partition <partition_name_with_slot> <size_in_bytes>

so for resizing product to 0 with slot "a" (look at erase log, it show you current active slot in erased name of partition)

fastboot resize-logical-partition product_a 0

so, as I talk above, basically, wp15 have a too small size of a "system" partition ~42mb. so you need to resize it enough to desired not sparsed gsi. I mean more or equal in bytes. you may try to experiment with numbers and resize it to maximum possible. for sample:

fastboot resize-logical-partition system_a 2850000000

- uploading img to device

fastboot --disable-verity --disable-verification flash <partition_name> <image_file_name.img>

of cource img file must be visible to adb. also it must be sparsed. you may easily detect it via any text/hex viewer:

View attachment 5543517

you may upload not sparsed image, but not sure what it would work, also adb woul send you error message about wrong header. if your image is not sparced, you may sparse it by "img2simg" tool, but do not try to sparse already sparsed image - it would not work after uploading.

seems that's all main information what you need to set 3d party gsi.

of course, you must enable developer mode, allow flashing and unlock your phone at first (and even do not try to lock it back to avoid red state).

so if you do it at first time, you must do this:

unlock boot

- go to bootloader:

adb reboot bootloader

- unlock it

fastboot flashing unlock

push some keys - see instruction at phone display

- disable verification

fastboot --disable-verification flash vbmeta vbmeta.img

"vbmeta.img" is a file from your current fw and it must be visible to adb, seems you may download it directly from your phone, but not sure about correct command.

- clear user data

fastboot -w

- go to fastbootD

fastboot reboot fastboot

- erase system, product and resize them both

fastboot erase system
fastboot erase product
fastboot resize-logical-partition product_a 0
fastboot resize-logical-partition system_a 2850000000

- upload desired image as system

fastboot --disable-verity --disable-verification flash system <desired_image.img>

- clear user data and create it partitions

fastboot -w

- go back to bootloader

fastboot reboot bootloader

- format user data partitions

fastboot erase userdata

- that's all. just reboot

fastboot reboot

at next time, if you want to set another gsi, you just need:

- go to fastbootD

fastboot reboot fastboot

- erase system

fastboot erase system

- upload desired image as system

fastboot --disable-verity --disable-verification flash system <desired_image.img>

- clear user data and create it partitions

fastboot -w

- go back to bootloader

fastboot reboot bootloader

- format user data partitions

fastboot erase userdata

- reboot

fastboot reboot

n.b. if you use 3d party boot (twrp or similar), gsi may not work.

also not all of gsi would work. phhusson's 11.0 v313 works fine enough (I use it, but without root), linage of Andy Yan works too, but I did not remember version. any clear google gsi did not work. perhaps any aosp12 would not work with current kernel (may be wrong).