« first day (5 days earlier)      last day (33 days later) » 

9:23 AM
$sudo mount -t ext4 -o loop,rw,noexec,noatime vendor.img /mnt/vendor
$ df -h | grep vendor
/dev/loop25 521M 520M 0 100% /mnt/vendor
therefore no space left, can't edit the fstab
$ sudo vim /mnt/vendor/etc/fstab.mt6785
:w gives
"/mnt/vendor/etc/fstab.mt6785" E514: write error (file system full?)
 
@GiulioBenetti i don't have that knowledge but it may require ti duplicate blocks first. you might have already found a link to topjohnwu tweet about (if not i will search for it)
copy the file to other location, try to use redirection > instead of copying back afterwards
 
9:47 AM
sudo mount -t ext4 -o loop,rw,noexec,noatime vendor.img /mnt/vendor
sudo dd if=./vendor.img bs=1MiB of=./vendor.img conv=notrunc oflag=append count=5 #to add 5MB
sudo losetup | grep vendor #get the right loop device, in my case loop25
sudo losetup -c /dev/loop25
sudo resize2fs /dev/loop25
sudo vim /mnt/vendor/etc/fstab.mt6785 #removed the avb options in vendor, system and product
sudo umount /mnt/vendor

now i have an edited (bigger) vendor.img in the A slot:
$ du ./super*/*
1552656 ./superA/product.img
 
that won't work you must keep original size. did you try 'cat newfile > fstab.mt6785' instead of copying?
https://twitter.com/topjohnwu/status/1170404631865778177
e2fsck -E unshare_blocks
(but no clue how to deduplicate afterwards)
@GiulioBenetti how about bless hex editor? afaik invalid flags are just ignored so you could replace strings with placeholder ,
 
let's go on in the other topic
 
@GiulioBenetti don't know how vim handles files internally, but editors like sed won't work. reason is, such editors do not actually edit a file, the file is replaced. that will lead in new inode and the file will lose it's secontext. therefore i recommend 'cat source > target' for updating file content in place
you can check secontext with 'ls -Z' or 'busybox ls -Z'
 
10:07 AM
sad story
# echo "" > fstab.mt6785
bash: echo: write error: No space left on device

with the edited local file it doesn't work too
 
10:26 AM
@GiulioBenetti please compare total size over all partitions with super.img, is there any gap/sparse available?
 
$ du -h super*
3,1G superA
3,1G superB
3,6G super.img
it seems to me that A and B are the same thing
 
10:37 AM
the strange thing is that, if i delete a file:
sudo rm res/sound/ringtone.wav
and I have free space
/dev/loop25 521M 518M 0 100% /mnt/vendor
i still cannot edit the file.
 
11:05 AM
1 hour ago, by alecxs
https://twitter.com/topjohnwu/status/1170404631865778177
e2fsck -E unshare_blocks
(but no clue how to deduplicate afterwards)
there is some instruction about increasing logical partition with fastbootd on github
 
11:58 AM
I use fastboot (not fastbootd), is it the same?
I built my own super.img but it doesn't work. Added details in the other post
 
12:13 PM
@GiulioBenetti fastbootd is not same as fastboot. guess it is part of stock recovery
@GiulioBenetti no clue, but Invalid sparse file format at header magic doesn't look right
fastboot resize-logical-partition
on the other hand looks like regular fastboot command. furthermore phhusson also has TWRP installed, which mean stock recovery not available
*Systemad
 
1:07 PM
e2fsck -E unshare_blocks vendor.img
makes no difference if i do not resize vendor.
however, in my attempt to build a new super.img the total size is smaller than the previous one, therefore I do not need to
fastboot resize-logical-partition
I still do not get if my system is A/B or onlyA.
 
1:23 PM
@GiulioBenetti try 'fastboot getvar current-slot' or
'adb shell ls -l /dev/block/platform/bootdevice/by-name'
there should be something like _a / _b (if not A-only device)
 
s96_pro:/ # ls -l /dev/block/platform/bootdevice/by-name/
total 0
lrwxrwxrwx 1 root root 16 2021-02-17 13:26 boot -> /dev/block/sdc35
lrwxrwxrwx 1 root root 16 2021-02-17 13:26 boot_para -> /dev/block/sdc22
lrwxrwxrwx 1 root root 16 2021-02-17 13:26 cache -> /dev/block/sdc41
lrwxrwxrwx 1 root root 16 2021-02-17 13:26 cam_vpu1 -> /dev/block/sdc28
lrwxrwxrwx 1 root root 16 2021-02-17 13:26 cam_vpu2 -> /dev/block/sdc29
lrwxrwxrwx 1 root root 16 2021-02-17 13:26 cam_vpu3 -> /dev/block/sdc30
lrwxrwxrwx 1 root root 16 2021-02-17 13:26 dtbo -> /dev/block/sdc37
>fastboot.exe getvar current-slot
getvar:current-slot FAILED (remote: 'GetVar Variable Not found')
C:\Users\ba1820\Desktop\s96Root\platform-tools>fastboot getvar all
(bootloader) max-download-size: 0x8000000
(bootloader) variant:
(bootloader) logical-block-size: 0x1000
(bootloader) erase-block-size: 0x0
(bootloader) hw-revision: ca00
(bootloader) battery-soc-ok: yes
(bootloader) battery-voltage: 4050mV
(bootloader) partition-size:sgpt: 8000
(bootloader) partition-type:sgpt: raw data
(bootloader) partition-size:flashinfo: 1000000
(bootloader) partition-type:flashinfo: raw data
(bootloader) partition-size:userdata: 1c9def8000
probably not an A/B device
 
1:47 PM
@GiulioBenetti except for preloader there aren't any slots in symlinks. that device is A-only system-as-root device. Furthermore i am not really sure if boot ramdisk existed before (might be created by magisk?) what i can see is dtbo partition, this probably requires hexpatching
@GiulioBenetti or maybe it is A/B device (although we can't see it), because slots are within super - can't really say :(
 
inside dtbo i cannot find &2C 76 65 72 69 66 79 (verity) but i can find "avb"

AVB0�����������������������������������������������������������������������������������������������������������������������avbtool 1.1.0���
 
probably easiest method is add all partitions into tar file and let Magisk Manager do the hexpatches
according to above link A/B devices have vbmeta_system_a vbmeta_system_b vbmeta_vendor_a vbmeta_vendor_b dtbo_a dtbo_b
so your device is most likely A-only device
@GiulioBenetti i don't have a-only system-as-root device so can't do this for you, but someone could try if you upload tar file mediafire or any filehoster
@GiulioBenetti be aware flashing modified dtbo might brick your device and make TWRP unreachable. make sure you have backup and fastboot access
 
2:10 PM
PANIC INTENSIFIES
 
if fastboot also broken you still have SP Flash Tool
@GiulioBenetti generally spoken hexpatching should be respect original file length. in case of fstab you can't replace strings with whitespaces because of the columns of this file format. comma is good replacement character for fstab. but in case of dtbo i don't know. i recommend to do research how dtb looks like in source code before doing any hexpatching yourself. or look into magisk installer how to invoke the magisk binary manually
 

« first day (5 days earlier)      last day (33 days later) »