yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] munjeni:
I'm expected this! And I'm wasted my time for what??
[Miscellaneous Android Development] pandavova:
I'm sorry, I just got home, I was busy yesterday. Will flash the images now.

Edit:

The unmodified.img booted without problems.

The repacked.img booted too!

I executed the script 4 times in total, after the 3 time, the log didn't change.

I synced, rebooted and the phone is stuck at the Sony logo.

Btw, should I sync in the adb shell after every script run or just one time at the end?
[Miscellaneous Android Development] munjeni:
Ok, you should sync after every run, but I think problem is not sync but something which I am unable to figure out & I don't owning phone with android 11 and super partition to test the things so this is hard for me to figure out. I dodn't know realy, have no idea
[Miscellaneous Android Development] munjeni:
Do you can somehow catch lastlog (bootloop log)? Don't ask how I don't know, maybe cat /proc/last_kmsg ? Or if you have something in /data/tombstones folder?
[Miscellaneous Android Development] pandavova:
I just found out my phone has a OrangeFox Recovery Port, never knew about OrangeFox, used only CWM and TWRP. Looks like data is decrypted (my phone is still in the bootloop state), without formating data, I will test soon if thats because of your boot img or because of something else.
[Miscellaneous Android Development] munjeni:
There is also some logs which might help too, for example logs which is keept inside trim area partition on every boot, maybe you get me your trim area dump via pm?
[Miscellaneous Android Development] munjeni:
Maybe encryption is problem here? Maybe things work when phone is not encrypted?
[Miscellaneous Android Development] munjeni:
Hope you figure out something when you get some free time, thats all what I can do right now
[Miscellaneous Android Development] bobbyp1086:
I did use stop, and there was no way to retrieve a log. The screen went black, and was flashing like the backlight was flickering. For two hours it did this. Upon forcing a power down, it wouldn't boot. Not like a brick, literally without holding volume down to get to the bootloader, it would not do a thing. On my g stylus, rip, it somehow separated it self from the encrypted files, so it wouldn't boot to anything and getting to twrp, it sat there in twrp screen but adb was accessible, all I could see was encryptions for everything. But I'm back up, second time around is a lot more noticable what has changed with Android 10.

Again I couldn't get a log i had to fastboot flash the rom at which point I did flash vbmeta with flags disable-verity and verification, but that didn't even with. I have the rom and a flash.bat file setup to do it automatically if anybody wants to try.

But I'm ready for another round
[Miscellaneous Android Development] bobbyp1086:
Download the magisk and edit before making modified boot. Or did they remove that like core mode, messed up a bunch of my hiding with that gone
[Miscellaneous Android Development] bobbyp1086:
Is 15 ran multiple times like 13 and 14?
[Miscellaneous Android Development] f1^ter:
If there are clone errors, then of course several times until the errors go away.
[Miscellaneous Android Development] bobbyp1086:
Alrighty so I got a extra pad of safety, I'll be running logcat thru adb writing it to a file as I go, idk if the stop command will stop that, I'll see if it works after the command is issued. I'm about to give it a go once backup is complete
[Miscellaneous Android Development] bobbyp1086:
ok good sir, i am officially calling timeout. flashed 15 3 times. errors fading to just each partition, 6. No errors in logcat which ran the whole time. upon hitting no errors, i ran syncand then reboot, not boot stuck at first screen after bootloader warning, had to reflash, but i did fgure 3 things out.

1. We are trying to convert everything on encrypted device, thats why it bricks.

2. We are attempting to change partitions that are not needed to be rw, and actually throws errors no matter what we enable/disable and in turn prevents change

3. i do have dm-verity and verification disabled. i flashed the vbmeta with the --disable-verity-disable-verification.

what i would like to try, even if its a super secret version of the script, that allows us to choose the mounts to be rw/ro. like 1= /, 2=/system, ect.... pick and choose, one of the partiontions is leaving phone bricked by kicking the user out and keeping the encrypted device files.

your script tho in the end was successful everything was rw.

Update. Twrp is up and running, said screw it after a dead phone wouldnt get past boot screen, havent ran script since reflashing entire rom, yet it seems to have survived the formating and erasing and flashing....weird but hey i can see what happens and better what happened for failures of past
[Miscellaneous Android Development] munjeni:
I have no idea, but I have hope that somebody with some experience get involved here. You say you can't catch log? Try adb! Log is inside adb window! And you can pull seccond log from /data/local/tmp with command:

adb pull /data/local/tmp/script.log
[Miscellaneous Android Development] munjeni:
I have no idea, but I have hope that somebody with some experience get involved here. You say you can't catch log? Try adb! Log is inside adb window! And you can pull seccond log from /data/local/tmp with command:

adb pull /data/local/tmp/script.log

You no need screen for it!

Thats first step for things figuration. Seccond step would be catching kernel last_kmsg log (bootloop log) if possible, probably not possible. Third step (if seccond step fail) would be disasembling phone (at least it would be in my stile) finding out uart ports and making connection for debuging, more info how it looks e.g. on Sony -> https://developer.sony.com/develop/open-devices/guides/access-uart-ports Without booloop log we can't figure out why device not boot. One should make custom kernel for it e.g. compile custom kernel with enabled LAST_KMSG, in that case last_kmsg can be catched after every unsucesfull boot e.g. your boot fail, next boot you boot recovery and catch last_log, just idea. I will not waste my time with "how can I do it", what I need is 1. superrepack logs (main window log + script.log) and 2. in case superrepack logs is clean and without errors but device not boot I will need last_kmsg, there is no other way for me to figure out things.
[Miscellaneous Android Development] bobbyp1086:
Here is the last one, as i said no errors, adb log, logcat and dmesg all froze as soon as my phone did. no errors. as a matter after i flashed, it wass stuck on motirola m screen, got it back with rw after a fresh install after the freeze all but magisk folders and it looks like boot partitions but i got rw where it counts
[Miscellaneous Android Development] munjeni:
You just reflashed and rw stayed? Thats strange! I don't know whats going on with motorola devices but this might be isue -> https://xdaforums.com/t/tool-win-li...s-rw-in-super-partition.4120963/post-84936075 -> FEC!

Also some reports about motorola fec isues -> https://xdaforums.com/t/recovery-unofficial-twrp-dirty-port-for-g7-play.3947205/post-81989031
[Miscellaneous Android Development] munjeni:
Can you give me dmesg log?
[Miscellaneous Android Development] bobbyp1086:
I don't have for that time. Here's a quick timeline of what happened

1. Ran script, 5th time no errors

2. Ran cmd "sync" and "reboot"

3. Phone wouldn't get passed the moto M, right after warning that bootloader is unlocked. Phone would react to finger on fingerprint reader as well as phone screen on and off with power button. So I reset this was version 14, same thing happens with version 15 only 3rd time before no errors

4. Wasn't losing my stuff again so I fiddled around with a twrp I found, booted not flashed.

Worked after I booted to slot a, only I had rw access.

What I am thinking has happened.

1. Entering password on twrp screen decrypted files which were encrypted and the phone booted.

2. The script somehow changes active slots. And boot to slot a fixed that

3. I am iron man, therefore I have jarvis

I'm not gonna claim that 3 is right, or wrong. But the first 2 are what seems logical
[Miscellaneous Android Development] munjeni:
Ok, but I need ANY dmesg (just after fresh reboot) just to look what protections is active
[Miscellaneous Android Development] bobbyp1086:
Oh I got better than that. If you open the boot.img using 7zip, I use open archive* find the biggest file usually last one, right click open inside # it leads to gold. The security used, vbmeta, and everything flashed in the boot partition. 7zip can see all inside .Img .bin . Whatever lol. But yes I can get you a dmesg right after boot, but I do have log catcher, figured I should do let me see what it did log
[Miscellaneous Android Development] munjeni:
To be honest right now I do not care, even you no need to give me dmesg
[Miscellaneous Android Development] bobbyp1086:
I'm looking my friend, it's hard I use es file explorer still and suddenly systemless root isn't detected
[Miscellaneous Android Development] bobbyp1086:
Here you go, did you a few better. The lastlog is what was happening at the time as well as both recovery and dmesg. :)
[Miscellaneous Android Development] bobbyp1086:
I'm only seeing one uploaded, I have dmesg and recovery
[Miscellaneous Android Development] munjeni:
I need android kernel dmesg and not one from recovery kernel. And I not need last_log, I need dmesg.
[Miscellaneous Android Development] bobbyp1086:
It's not uploading. I'll send a link to drive

dmesg.log

drive.google.com
[Miscellaneous Android Development] munjeni:
Well, I;m just checked your dmesg and there is definitelly nothing about FEC, but ton of lines contain something like this:

1.869240] F2FS-fs (sde28): recover_inode: ino = b15, name = <encrypted>, inline = 1
[ 1.869297] F2FS-fs (sde28): recover_data: ino = b15 (i_size: recover) recovered = 2, err = 0
[ 1.869302] F2FS-fs (sde28): recover_inode: ino = b94, name = <encrypted>, inline = 1
[ 1.869332] F2FS-fs (sde28): recover_data: ino = b94 (i_size: recover) recovered = 3, err = 0
[ 1.869336] F2FS-fs (sde28): recover_inode: ino = b94, name = <encrypted>, inline = 1
[ 1.869362] F2FS-fs (sde28): recover_data: ino = b94 (i_size: recover) recovered = 3, err = 0
[ 1.869366] F2FS-fs (sde28): recover_inode: ino = b94, name = <encrypted>, inline = 1
[ 1.869390] F2FS-fs (sde28): recover_data: ino = b94 (i_size: recover) recovered = 3, err = 0
[ 1.869394] F2FS-fs (sde28): recover_inode: ino = b94, name = <encrypted>, inline = 1
[ 1.869418] F2FS-fs (sde28): recover_data: ino = b94 (i_size: recover) recovered = 3, err = 0
[ 1.869422] F2FS-fs (sde28): recover_inode: ino = a163, name = <encrypted>, inline = 1
[ 1.870456] F2FS-fs (sde28): recover_dentry: ino = a163, name = <encrypted>, dir = 2c, err = 0
[ 1.870488] F2FS-fs (sde28): recover_data: ino = a163 (i_size: recover) recovered = 3, err = 0
[ 1.870493] F2FS-fs (sde28): recover_inode: ino = a19e, name = <encrypted>, inline = 1
[ 1.871070] F2FS-fs (sde28): recover_dentry: ino = a19e, name = <encrypted>, dir = 82, err = 0
[ 1.871100] F2FS-fs (sde28): recover_data: ino = a19e (i_size: recover) recovered = 5, err = 0
[ 1.871105] F2FS-fs (sde28): recover_inode: ino = a1b3, name = <encrypted>, inline = 1
[ 1.872187] F2FS-fs (sde28): recover_dentry: ino = a1b3, name = <encrypted>, dir = 74d9, err = 0

What is sde28 partition? Right now I do not have idea why inodes and data is recovered, its like having FEC anabled, but its definitelly recovered. Also I see its encrypted. Try ask somebody in your device subforum maybe somebody have idea
[Miscellaneous Android Development] bobbyp1086:
Sde28 I'll find out, my super is sde26 I'm thinking that's the roll back or if possible another slot, b perhaps.

But let me see what I can find out
[Miscellaneous Android Development] munjeni:
You can do it with:

ls -l /dev/block/bootdevice/by-name
[Miscellaneous Android Development] snoopy29:
Could you compile superrepack in 32 bit? I have a a64 OS. I haven't learned if I can just use a arm64 OS (the CPU is 64 bit so why not...?)
[Miscellaneous Android Development] munjeni:
It will not compile in 32 bit, and to be honest I do not have free time to even try to compile it in 32 bit mode since many things allready implemented is only for 64 bit even I'm unsure google toolchain support 32 bit. For what you need 32 bit binary?
[Miscellaneous Android Development] snoopy29:
I'm running A64 rom.

sh: ./superrepack: not executable: 64-bit ELF file
[Miscellaneous Android Development] munjeni:
You need superrepack.arm64_pie
[Miscellaneous Android Development] bobbyp1086:
Sde28=userdata
[Miscellaneous Android Development] snoopy29:
I renamed it, superrepack.arm64_pie is superrepack
[Miscellaneous Android Development] munjeni:
Can you finaly tell us what is your device and what is rom version you have running, me is not magician to know why it not working for you, tell us and I will try to help. Can it be its not arm64 but x86-64 ?? What say "cat /proc/cpuinfo" ?
[Miscellaneous Android Development] snoopy29:
Cubot King Kong 2 - https://sourceforge.net/projects/andyyan-gsi/files/lineage-17.x/ (a64-b)

KINGKONG_MINI2:/ $ cat /proc/cpuinfo

processor : 0

Processor : ARMv7 Processor rev 4 (v7l)

model name : ARMv7 Processor rev 4 (v7l)

BogoMIPS : 18.17

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xd03

CPU revision : 4

processor : 1

Processor : ARMv7 Processor rev 4 (v7l)

model name : ARMv7 Processor rev 4 (v7l)

BogoMIPS : 18.17

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xd03

CPU revision : 4

processor : 2

Processor : ARMv7 Processor rev 4 (v7l)

model name : ARMv7 Processor rev 4 (v7l)

BogoMIPS : 18.17

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xd03

CPU revision : 4

processor : 3

Processor : ARMv7 Processor rev 4 (v7l)

model name : ARMv7 Processor rev 4 (v7l)

BogoMIPS : 18.17

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xd03

CPU revision : 4

Hardware : MT6761V/WBB

Revision : 0000

Serial : 0000000000000000

KINGKONG_MINI2:/ $
[Miscellaneous Android Development] munjeni:
Well, are you sure you have running 64b? 64b is ARM 64-bit, AB and superrepack should work. If not work and you are sure you have running 64bit os than I have no idea! Probably it use not standard google android toolchain? I realy don't know
[Miscellaneous Android Development] snoopy29:
Defo running 64b. Trying to figure it out here - https://xdaforums.com/t/gsi-10-lineageos-17-x-gsi-all-archs.4004673/page-50#post-85124931

I'd go back to Android 9 in a heartbeat to avoid all this restrictive ****e!
[Miscellaneous Android Development] munjeni:
A page-two back tells that motorola devices have some protections which can't be disabled (probably from kernel), cause blocks and inodes restore -> post 291 something similar to FEC protection & I don't know how that can be disabled, probably on kernel level? Tool as a tool is working, the rest somebody need to figure out and tell me
[Miscellaneous Android Development] 012345678:
tool works perfect :) Mi 11 Ultra
[Miscellaneous Android Development] lebigmac:
Hi @012345678 I'm happy that both tools work so well on your device.

After you successfully ran my script on your device did you restore your original stock read-only super image before running the superrepack tool by @munjeni ? Or did you run it on top of your already R/W patched super image? That would mean the shared_blocks read-only feature must have been removed twice! :LOL:
[Miscellaneous Android Development] munjeni:
I'm believing problem is inside kernel, you need to disable fec variant in kernel in most case
[Miscellaneous Android Development] teresaejunior:
After following instructions as they were given, there were no errors, but my phone is now stuck on recovery mode. Any ideas?
[Miscellaneous Android Development] munjeni:
This is open source and I no want to waste my time with superrepack, source code is here https://github.com/munjeni/super_image_dumper it need somebody who have time, experience and phone for it, I don't have phone with super partition so right now I don't care to be honest. You should try https://xdaforums.com/t/script-android-10-universal-mount-system-read-write-r-w.4247311/
[Miscellaneous Android Development] munjeni:
I have no idea, some more protections active or maybe something is deleted by repair filesystem. For idea you should install git on your linux machine, mount unmodified system, copy all files and folders to new folder and do git init inside new folder, than delete all files from folder excluding .git folder, mount and extract modified system and do git status, git will tell you if something is deleted or modified during filesystem reparation, thats a sugestion as a start point.
[Miscellaneous Android Development] tha_mechanic:
@Articul8Madness

@munjeni

From what I noticed is it is a Kernal error. When I inspected my dmesg log you can see that there are audit errors. I also spoke to @lebigmac about this as well. I did successfully get that script to work on my Motorola edge+. But it only worked after running the repair script in Linux after running his systemrw script inside the phone.

From what I remember it appears that the phone is seeing too many requests at one time. Probably Motorola's way to plug a hole, or stop a leak? If that makes sense.

I don't believe the Kernal won't allow you to get the info. I believe that it is seeing a large amount of activity in a short period and it's raises red flags in the kernal
[Miscellaneous Android Development] munjeni:
Your picture is incomplete! So I can't know if you have errors. Avc lines inside your dmesg is selinux, but what I know my tool disable selinux temporary before any operation. I can't tell anything because of your incomplete picture, but if you see "permissive=1" that mean your selinux is in permissive mode and not block things, in that case your dmesg avc lines is just warning and selinux not blocking your operation. And I have no idea why things not wrok. Here is one example how to check if problem is related to partitions or problem is related to protections -> https://xdaforums.com/t/tool-win-li...s-rw-in-super-partition.4120963/post-85312415 . The easiest way to check is with git tool! So if you compare filesystem before and after modification by git tool you can clearly know if problem is deleted files or problem is some protections.

One example how can you know if your selinux is in permissive or enforcing mode:

[*]<5>[ 26.318721] type=1400 audit(1408990262.431:5): avc: denied { getattr } for pid=1229 comm="ogle.android.gm" path="/data/app" dev="mmcblk0p12" ino=32770 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=1

you can see permissive=1 at the end. In this case selinux not block anything! If you see permissive=0 that mean selinux is in enforcing mode and block things.
[Miscellaneous Android Development] munjeni:
Hi, when you get time do this:

before superrepack:

find / -exec ls -l >>/data/local/tmp/ls_before.log {} \;

after superrepack:

find / -exec ls -l >>/data/local/tmp/ls_after.log {} \;

send me ls_before.log and ls_after.log and I will try find whats going on ok? I'm still believing that some files is deleted after partition repair!
[Miscellaneous Android Development] bobbyp1086:
Ok I'm back after 3 new phones, unrelated, waiting on 4th and last insurance claim for this line. Still got the 5g Ace, only now I'm running with Lineage, Android version 11. I have read and write access. I also believe I found your solution by accident.

When flashing for the first time, you have to flash something that looks like it copies the partition and then deleted non copied then expanded it to fill up the void, giving the partition extra space to say.

If the partition was copied and then deleted, it's not a hardware thing. Now if I have rw access it's not Android thing. It's Motorola. So I got to snooping, moto actually has security in place to roll back changes it sees as dangerous, unneeded, malicious. I don't think it's fec, maybe, but I do know those roll backs are only when 1 the phone dies 2 recovery mode is booted and 3 bootloader booted.

I can't confirm any other times but those are the ones I did take notes of.

It's an app pretty much that's stopping moto.
[Miscellaneous Android Development] munjeni:
Since we don't know if problem might be deleted files after partition repair, so first thing to do is https://xdaforums.com/t/tool-win-li...s-rw-in-super-partition.4120963/post-85320641 , without that I not going to comment and gues further.
[Miscellaneous Android Development] daemonspudguy:
I couldn't get it to work on my Pixel 4a. The log just says that it aborts.
[Miscellaneous Android Development] munjeni:
ofcourse without log we have nothing to do
[Miscellaneous Android Development] svoc:
Moto g play 2021 no errors stuck on boot screen and if I do product_a I get boot but no settings page and lot of system apps don't work
[Miscellaneous Android Development] svoc:
Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

/: 3520/3584 files (34.7% non-contiguous), 209394/210597 blocks

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

/: 3520/3584 files (34.7% non-contiguous), 209394/210597 blocks
[Miscellaneous Android Development] munjeni:
When you guys complete this step -> https://xdaforums.com/t/tool-win-li...s-rw-in-super-partition.4120963/post-85320641 (post 316) than I will comment further, until that I don't care.
[Miscellaneous Android Development] achakian0000:
how to pack super?
[Miscellaneous Android Development] munjeni:
Google know that better thn me so google it "how to create android super img"
[Miscellaneous Android Development] Pachacouti:
You dont diasble vbmeta to change system properties, messin with vbmeta causes the ro when tampered with needing this or that, instead, use boot-debug.img from android 10 which allows read write cause it's your debug, if you've android 10. Simple. No root. Mount rw works.

Only works with no magisk, and vbmeta best bein legit..
[Miscellaneous Android Development] munjeni:
If I understand right you say RW works without need for any tool? Just installing boot debug image to get rw? Can you post your boot debug image?