yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 4 Q&A, Help & Troubleshooting] gwm121:
the battery has been faultless, i have other batteries, same problem.

I ran custom rom aocp pie a long time with just one problem, batteries running out when powered off. Original, and 2 brand new replacements and one from another note 4. Same batteries in a standard note 4 marshmallow no problem.

Then I loaded resurection remix, it ran a number of times, with a no start sometimes ....rectified by taking battery out a few hours.

I now cant start the fone or get into twrp (to reload aocp) at all.

Any ideas anyone?
[HTC Excalibur] xzaviergomez:
Hi. I've installed 6.1 on my Excalibur, and it was a very easy, painless process. I'm now trying to do the same to an Excalibur that belongs to a friend, but am running into a problem.

My screen never turns white, and when the wizard tells me to press OK on the screen to allow JumpSPL to run, the option is not available on the phone. The phone stays on the home screen. Any ideas?
[HTC Excalibur] jdoggraz:
Follow the tutorial and you should app unlock the phone..

Click Here
[Xiaomi Redmi Note 5 Pro Questions & Answers] cesar581:
Hey guys!

My phone Redmi note 5 pro when booted to fastboot mode automatically reboots after some seconds. It does not stay in fastboot mode.

Any help is appreciated.
[Android Software Development] Yuki1001:
Reserved floor #2.
[Android Software Development] Yuki1001:
Reserved floor #3.
[Android Software Development] Mr Hassan:
\unlock-super>erofsUnpackRust Download/product.img product

erofsUnpack 1.3.211216

<E> erofs: cannot find valid erofs superblock

thread '<unnamed>' panicked at 'read erofs super block failed', src\lib.rs:168:9

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Android Software Development] Mr Hassan:
getting this error in vendor extracting

C:\unlock-super>erofsUnpackRust Download/product.img product

erofsUnpack 1.3.211216

<E> erofs: cannot find valid erofs superblock

thread '<unnamed>' panicked at 'read erofs super block failed', src\lib.rs:168:9

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Android Software Development] Mr Hassan:
now this is

unlock-super>make_ext4fs -J -T 1230764400 -S system/config/system_file_contexts -l 626733056 -C system/config/system_fs_config -L system -a system system_a.img system/system

loaded 3141 fs_config entries

Creating filesystem with parameters:

Size: 626733056

Block size: 4096

Blocks per group: 32768

Inodes per group: 7664

Inode size: 256

Journal blocks: 0

Label: system

Blocks: 153011

Block groups: 5

Reserved block group size: 39

error: ext4_allocate_best_fit_partial: failed to allocate 4720 blocks, out of space?

Failed to create image system_a.img, removing it
[Android Software Development] Yuki1001:
The size setting of your new ext4 img is too small. Consider a larger value.

EDIT: Normally, your files maybe 2GB+ larger than the erofs img. Check your files' real size and give a good value to -l parameter.
[Android Software Development] Mr Hassan:
My ext have around 900mb

And vendor something like 1400mb

And both are getting same error

I thought maybe big size i just try remove some file but still same

If its small size issue then how can increase or large it?

Or should i merge both partitions on same but i don't think it'll be possible
[Android Software Development] Yuki1001:
Would you like to take some screenshots of your extracted folder's size and the original image's size?

PS: After calculating all your files' total size, I recommend you to reserve at least 500MB+ free space inside your new ext4 image.
[Android Software Development] ChrisFeiveel84:
You on oos 11 ?oos 11 have no erofs

Oos 12 have erofs
[Android Software Development] Mr Hassan:
Ofcourse I'm in os12
[Android Software Development] Mr Hassan:
Sure tomorrow I'll send you the screen shot of unpack and img both images
[Android Software Development] lebigmac:
Hi @Yuki1001

Please keep up the great work! The more people have RW access to their own devices the better for the open source community! :D(y)

If you want to integrate your erofs fix into my script please contact me! Of course you will be properly credited! ;)(y)
[Android Software Development] Mr Hassan:
Well its not looks like yours kind of

But you know better

But its good thing if he helping people's with a different way

I personally like this thread becoz i just want to make one vendor rw

And then I'm able to boot after flash

edited remove quote on @

Yuki1001 request​
[Android Software Development] Mr Hassan:
and today its not even unpack dont know where doing mistake

unlock-super>erofsUnpackRust Download/vendor.img vendor

erofsUnpack 1.3.211216

<E> erofs: cannot find valid erofs superblock

thread '<unnamed>' panicked at 'read erofs super block failed', src\lib.rs:168:9

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Android Software Development] Yuki1001:
Reserved floor#16.
[Android Software Development] Yuki1001:
I had problems extracting my vendor.img using others' erofs unpack tools. Only the erofsunpackrust.exe works. Maybe your vendor.img is special? (which means you need to try other erofs unpack tools for luck)
[Android Software Development] Mr Hassan:
but same thing i used before and works for me and you see upper results

anyway now is there any other erofs avaliable to test?
[Android Software Development] Mr Hassan:
View attachment 5716687View attachment 5716689

here,s the size of vendor unpack and repack
[Android Software Development] Yuki1001:
So you could to set the ext4 vendor image to 2G. 2G = 2147483678 bytes. Try to set the -l parameter to 2147483648.
[Android Software Development] Mr Hassan:
In start this line need to change?

This 123076xxx?

make_ext4fs -J -T 1230764400

Or just replace this

vendor_file_contexts -l %FS_SIZE% -C

%***%

With this number

2147483648

And what about this one? Is this also need to replace somewhere?

2147483678
[Android Software Development] lebigmac:
Apology accepted. Thanks for your compliment :)

Yes that's true my old script is a bit outdated by now. Together with your help we can make it fully EROFS compatible :D

I like how you came up with your own way of doing the rw magic using the make_ext4fs tool without copying other people's source code. That's commendable. Not all can resist the sin of stealing other honest developer's code.

I am always happy about innovations in the rw game. That's only beneficial to the whole open source community. ;)(y)

And I think you got it right when it comes to converting everything to EXT4 file system format. This is definitely the way to go for the future it seems. You hit the bullseye! Nice! 🎯(y)
[Android Software Development] Mr Hassan:
@strongly agree with your point

If you both work together you'll kick OS12 @$$
[Android Software Development] Mr Hassan:
ok i successfully make vendor and i flashed but after boot vendor part is stil ro

make_ext4fs -J -T 1230764400 -S vendor/config/vendor_file_contexts -l 2147483648 -C vendor/config/vendor_fs_config -L vendor -a vendor vendor_a.img vendor/vendor

loaded 2955 fs_config entries

Creating filesystem with parameters:

Size: 2147483648

Block size: 4096

Blocks per group: 32768

Inodes per group: 8192

Inode size: 256

Journal blocks: 0

Label: vendor

Blocks: 524288

Block groups: 16

Reserved block group size: 127

Created filesystem with 2964/131072 inodes and 368723/524288 blocks

Invalid sparse file format at header magic

Resizing 'vendor_a' OKAY [ 0.000s]

Sending sparse 'vendor_a' 1/6 (259216 KB) OKAY [ 7.490s]

Writing 'vendor_a' OKAY [ 0.860s]

Sending sparse 'vendor_a' 2/6 (261485 KB) OKAY [ 6.315s]

Writing 'vendor_a' OKAY [ 0.703s]

Sending sparse 'vendor_a' 3/6 (262140 KB) OKAY [ 6.220s]

Writing 'vendor_a' OKAY [ 0.712s]

Sending sparse 'vendor_a' 4/6 (258441 KB) OKAY [ 6.188s]

Writing 'vendor_a' OKAY [ 0.719s]

Sending sparse 'vendor_a' 5/6 (258717 KB) OKAY [ 6.191s]

Writing 'vendor_a' OKAY [ 0.712s]

Sending sparse 'vendor_a' 6/6 (100836 KB) OKAY [ 2.422s]

Writing 'vendor_a' OKAY [ 1.792s]

Finished. Total time: 48.503s
[Android Software Development] Mr Hassan:
i just edit one line in build prop in vendor and flashed but device rebooting just

Resizing 'vendor_b' OKAY [ 0.000s]

Sending sparse 'vendor_b' 1/6 (259216 KB) OKAY [ 8.907s]

Writing 'vendor_b' OKAY [ 0.890s]

Sending sparse 'vendor_b' 2/6 (261485 KB) OKAY [ 7.546s]

Writing 'vendor_b' OKAY [ 0.813s]

Sending sparse 'vendor_b' 3/6 (262140 KB) OKAY [ 9.717s]

Writing 'vendor_b' OKAY [ 0.786s]

Sending sparse 'vendor_b' 4/6 (258441 KB) OKAY [ 7.500s]

Writing 'vendor_b' OKAY [ 0.703s]

Sending sparse 'vendor_b' 5/6 (258717 KB) OKAY [ 7.532s]

Writing 'vendor_b' OKAY [ 0.704s]

Sending sparse 'vendor_b' 6/6 (100836 KB) OKAY [ 2.843s]

Writing 'vendor_b' OKAY [ 1.781s]

Finished. Total time: 61.032s
[Android Software Development] Yuki1001:
I suggest you to build a new super image and flash it via fastboot mode instead of flashing vendor via fastbootd. It may modifies your image and causes other problems.

PS: We are increasing each partition's size and rebuilding a new super image. Using fastbootd will shrink your vendor's image and may even cause damage to the filesystem.

Maybe you have modified a critical one for booting?
[Android Software Development] Yuki1001:
The newly built vendor.img is not sparse. They are prepared for the following step of building a new super.img. So if you must flash the vendor.img seperately via fastbootd, transform it from raw format to sparse format and then flash.
[Android Software Development] Mr Hassan:
once again thanks for your time why not i dig it little more deeper

i just make dump super.img and flash it without doing anything so device reboot to fastboot

and not booting/// that,s why i,m scared with making super.img

i maked vendor and flash device booted

but again i flash another build.prop edit vendor so device not boot so i decide

to flash old vendor to see its booting or not but its not booted this time

i flashed with many differt commands but its wont booted

i used these commands

fastboot flash vendor vendor.img

vendor_a vendor_a.img

vendor vendor.img --all slot

and also tried in slot b

basiclly my device is ativated in slot b

so i booted my device via stock rom vendor.img

device booted

(Keep in mind i used vendor.img from Fastboot ROM to unpack and repack it)

later i relaized to used device vendor to make another rw.img

but i noticed my device vendor size is now 2gb before it was about 1gb something

but still i try to unpack it but its gived a same error as i show upper in logs and you said i need to change my erofs.img (but i never founded it anywhere)

so here i,m asking your my fastboot rom not have super.img its have table like this

system_ext

system

vendor

product etc

so is it ok to use img files from FB rom?

and still its neccesry to make super.img?

plz shine more light on it thanks
[Android Software Development] Yuki1001:
Have you modified fstab.qcom under /vendor/etc? If your fstab only has erofs mount entries, you should add ext4 mount entries for partitions inside super.
[Android Software Development] Mr Hassan:
Well be honest i don't know anything about it

Can u details about it how should i modify it or how can i know my erofs entries and how can i add ext4 mount entries in this
[Android Software Development] Mr Hassan:
i,m sure you talk about this place and also you talk about modify it in unpack vendor and flash it

can you talk abou little more which things here need to modify

it have one ext4 and one is erofs now what should i do?
[Android Software Development] Mr Hassan:
done everything flashed and device booted i think my dev mapper have rw

but

mount l grep "dm-0"

mount: Max 2 arguments

any idea about this?

in

ls -l

drwxr-xr-x 15 root shell

in my dev mapper have rw access now bro but vendor etc still ro

dont know what to do now

edited here,s some more result bro

:/ # mount /dev/block/dm-19 /

:/ # mount /dev/block/dm-1 /

:/ # mount -o rw,remount /vendor_a

mount: '/vendor_a' not in /proc/mounts

1|OnePlus8:/ #

@

Yuki1001​
[Android Software Development] Yuki1001:
You are required to use "|" not "l".

The mount point of your vendor partition is /vendor.
[Android Software Development] Mr Hassan:
here,s the frist 3 is odm system_a and vendor_a

# mount | grep "dm-0"

# mount | grep "dm-3"

# mount | grep "dm-19"

but in system_ext etc i get this error

these partitions showing ro but not showing which one have rw

i try mount vendor by your command as well but still browser not switch to rw

mount -o rw,remount /vendor

i noticed one command will able to switch root / to rw

mount /dev/block/dm-0 /

this command swtich ro to rw but still nothing able to edit

# mount | grep "dm-1"

/dev/block/dm-10 on /mnt/vendor/my_product type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-13 on /mnt/vendor/my_company type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-14 on /mnt/vendor/my_carrier type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-15 on /mnt/vendor/my_region type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-12 on /mnt/vendor/my_heytap type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-11 on /mnt/vendor/my_stock type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-16 on /mnt/vendor/my_preload type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-17 on /mnt/vendor/my_bigball type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-18 on /mnt/vendor/my_manifest type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-10 on /my_product type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-13 on /my_company type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-14 on /my_carrier type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-15 on /my_region type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-12 on /my_heytap type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-11 on /my_stock type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-16 on /my_preload type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-17 on /my_bigball type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

/dev/block/dm-18 on /my_manifest type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)

mount -o rw,remount /vendor

mount: '/dev/block/dm-4'->'/vendor': Operation not permitted
[Android Software Development] Mr Hassan:
now see this isn,t creepy even its showing my these parts are converted to ext4 and also

rw but still fuSking not able to edit something

OnePlus8:/ # mount | grep "dm-0"

/dev/block/dm-0 on / type ext4 (rw,seclabel,relatime)

OnePlus8:/ # mount | grep "dm-19"

/dev/block/dm-19 on / type ext4 (rw,seclabel,relatime)

OnePlus8:/ # mount | grep "dm-3"

@

Yuki1001​
[Android Software Development] Mr Hassan:
can u calculate exact size for me becoz i add only 50mb and flashed but getting this error

FAILED (remote: 'Not enough space to resize partition')

this is my unpacked vendor size 1,467,228,472

and this is vendor.img size 952,664,064

make sure its ven

not ven_a

only

its have both
[Android Software Development] Yuki1001:
So you'd better give your new vendor.img (ext4 format) at least a size of 1,610,612,736 (1.5GB). Or 1.6G, 1.7G? Set the size on your own.
[Android Software Development] Yuki1001:
Magisk uses "inherit the requester's namespace" by default. Mount the fs as r/w in your Root Explorer (or similar application) not terminal. Then modify as you like.

I noticed that your ext4 image is resized by fastbootd automatically. Try avoid using fastbootd and build a static and new super.img instead. (Flash the super.img under fastboot mode: fastboot flash super super.img).

EDIT: use the command to remount to rw:

mount -o remount,rw (mount point)

# Example mount root directory rw:

mount -o remount,rw /
[Android Software Development] Mr Hassan:
As i explain in pm to you

In odm system etc i don't need even to use this command

Just press rw in root browser and its done

Now need vendor I'm in last step
[Android Software Development] Mr Hassan:
After flash vendor device not booting

?

In stock image its flashing

1/4

And in modded image

1/6
[Android Software Development] IamTheBRAVE:
@lebigmac

Are you aware of this dcript? It's an advanced version of dfe to disable encryption and switch system rw i think. Or am i wrong?

https://xdaforums.com/t/a-b-a-only-...tion-for-ro-and-rw-neo-stable.4454017//unread

Edit: sorry, i thought i was on lebigmac's thread.
[Android Software Development] Mr Hassan:
You founded unique thing but idt its for rw
[Android Software Development] IamTheBRAVE:
Yeah, i know it's not directly to make system rw, but this script ( dfe-neo) works on A12+ so it could help decrypt EROFS before trying rw script. Also help with getting TWRP working unencrypted on op9pro.
[Android Software Development] Mr Hassan:
Did you try by your self in op9 os12?

Coz i asked from them he said its not for rw
[Android Software Development] IamTheBRAVE:
No i didn't. Like i said, the script is not for rw. But the devs could find a workaround on a EROFS system.

maybe...
[Android Software Development] Mr Hassan:
I'm badly waiting for erofs convert to ext4
[Android Software Development] lebigmac:
Hi thanks for the heads up. Yes of course I know that thread by my nemesis.

The DFE work is commendable but I cannot condone any blatant intellectual property infringement that he may have caused me (...)

Yeah the words are pretty similar. That can get a bit confusing sometimes :)
[Android Software Development] lebigmac:
Hi @Yuki1001 do you have any idea why I keep getting this error when running the make_ext4fs binary? :unsure:

error: build_directory_structure: cannot lookup security context for /system_ext/lost+found

even though I clearly have this line in my context file:

/system_ext/lost+found u:object_r:system_file:s0

And how important is the fs_config file? Can I just skip that?

Thanks! (y)
[Android Software Development] IamTheBRAVE:
I'm not an expert but here's the content of system_ext/etc/selinux. (I'm on PA13, op9pro)

Maybe you should write it this way?

/(system_ext|system/system_ext)/lost+found u:object_r:system_file:s0
[Android Software Development] Yuki1001:
Maybe the problem could appears in some situations. Try these commands if they work.

I guess lost+found is illegal in your environment?

sed -i "s/\[/\\\[/g" config/*file_contexts

sed -i "s/+/\\+/g" config/*file_contexts

The fs_config contains the permission and ownerships of every file. Without them the system even cannot boot up! Different files and folders have their own permissions and ownerships.

Obviously, NO.

EDIT: Happy Halloween!
[Android Software Development] midozalouk:
1-Can I just make modification to system image and that makes it rw without other images

?

2-Can i add the edited system img to super image without the rest of the steps? Using the lpmake command even it will not be read write?
[Android Software Development] JedidroidX:
Magisk has a module that I use which emulates read/write permissions to system partition. Its called OverlayFS and it works phenomenal. Currently using on Lineage 19.1 for the Oneplus 8T! Much more simple than flashing images, I recommend going this route for the sake of simplicity. It's worth a try! Happy flashing! I hope it helps accomplish your goal.

https://github.com/Magisk-Modules-Alt-Repo/magisk_overlayfs
[Android Software Development] IamTheBRAVE:
Unfortunately didn't work for me. Kernel does not support overlayfs. OnePlus 9pro A13 paranoid android
[Android Software Development] midozalouk:
that will involve rooting always

and i wont like to always to be rooted cuz of the stuped bank apps

i just need to do my modifications then unroot

and vice versa
[Android Software Development] Yuki1001:
1. For super devices, unpack super, modify system then repack, then fastboot flash is ok. No root needed (when you have another rooted device).

2. The system image is EROFS not EXT4, so it's not possible to modify it (READ ONLY). Extract the erofs, do your modifications, and make_ext4fs. Repack the super and flash.

Ask if you have further questions.
[Android Software Development] Mr Hassan:
Can you make your whole method with script flashable like @lmabds etc have?
[Android Software Development] midozalouk:
Can i just edit the system partition as ext4 and repack it with other erofs and flash it?
[Android Software Development] Yuki1001:
As I explained to @lebigmac, this solution requires you to switchs between 2 platforms, so a single device cannot finish the whole process.

Maybe I'll find make_ext4fs and erofsunpack exectuable for arm64 linux, then integrate the whole progress to the phone (Linux side).
[Android Software Development] Yuki1001:
Until now the fstab I seen is supporting both erofs and ext4 to boot, so I guess it's ok.

Maybe you'd like to check your fstab?
[Android Software Development] Mr Hassan:
Brother do it if you can otherwise make script for linux no matter win or mobile

Linux is also good
[Android Software Development] midozalouk:
Here is the script you should make it run over android 😉

GitHub - thka2016/erofsUnpack: kotlin native编写的erofs镜像解包工具

kotlin native编写的erofs镜像解包工具. Contribute to thka2016/erofsUnpack development by creating an account on GitHub.

github.com

How to check fstab?
[Android Software Development] lebigmac:
adb shell
cat /vendor/etc/*fstab*

You can also check your mount output to get an idea of how things are mounted in fstab ;)(y)
[Android Software Development] Mainur6:
how to use this in android
[Android Software Development] Mainur6:
./tools/lpunpack ./super_orig.img sup_unpack

how to run this command in android ?
[Android Software Development] Mainur6:
i am getting this error, how to fix this ?
[Android Software Development] IamTheBRAVE:
I had a similar error trying to run erofsunpackRUST-android too. It thinks the first superblock is corrupt and panics. I stopped trying this.

Head over to lebigmac's thread, my last post shows how i got my super rw (mostly on android if you have already have your super_original, or you could use the script to dump the file directly first)
[Android Software Development] Daniha:
I'm trying on os11 but its not unpacking by unpackrust.exe
[Android Software Development] 791853:
Hello my name is Chris however I seem to have a question for you is the universal guide for sky elite octaPlus op2 also thank you very much in advance also I need to learn how to root my device it is unlocked fully and it is running android 11 also I have not unlocked the bootloader that I need help on buf tomorrow I will be going to the library to learn and work so thank you so much in advance God bless
[Android Software Development] 791853:
Thanks in advance have a great weekend good night Sweet dreams see ya
[Android Software Development] lebigmac:
failed to find [/system/apex] in canned fs_config
loaded 535 fs_config entries
Creating filesystem with parameters:
Size: 695435264
Block size: 4096
Blocks per group: 32768
Inodes per group: 7088
Inode size: 256
Journal blocks: 2652
Label:
Blocks: 169784
Block groups: 6
Reserved block group size: 47

@Yuki1001 Do you know what does it mean?

First it says failed to find [/system/apex] in canned fs_config even though that line is clearly there inside the system_fs_config file:

/system/apex 0 0 755

And then it say that it actually found a couple files in the fs_config file: loaded 535 fs_config entries

Then why it still throw error? :unsure:

I am executing program like this:

make_ext4fs -J -T 1230764400 -l 695435264 -a system -S config/file_context -C config/system_fs_config system_new.img /system

Am I doing it wrong? Thanks for your advice! :D(y)