yashsingh1/xdaforums huggingface dataset:
[General Topics] SwedishForenger:
.

ALL apps that exist in your mobile, whether they are hidden or not, can be seen in a root scan of the phone.

Scan the phone:

View attachment 5501081
​

Find the apps you want to delete....

Let's say I want to delete my phones Recorder.

The name of this file is: com.google.android.apps.recorder

To permanently delete that file, will I tell ADB to look up that file in the phone and delete it

Ore

.
[General Topics] lolvatveo:
this uninstallation is only temporary for the user, i checked the system partition again and was surprised to notice that all my junk delete modifications are stock restored. which contains a whole list of junk apps will be installed if i select india country because it has indian letters which i deleted as root, and many bloatware, junk subfolders are also restored in /system, inside system/app priv-app has the bloatware folder recover and the uninstall command is just a command to hide it from the user. maybe you need an itel p15 w5005p like me to understand it clearly. i don't know how it restores and where is this backup file, I have to edit system.img? note I won't be able to find bloatware packages with adb shell as root because they will disappear (delete) with the modification I did. i can only uninstall if i unroot and bloatware they recover up. my phone use system as root and ram disk is in recovery. whenever want to flash an image or modify a file that vbmeta will verify the file must be signed and edited vbmeta otherwise the system will not boot. That's my phone system. When I used the first command without root I got: internal memory error. I tried the second command and it didn't remove the bloatware folder in /system, the apk files were still intact. it just makes the app disappear from the screen.
[General Topics] SwedishForenger:
.

Yes my friend. as I said. you don't have system root. You only have partial root.

But yes, you can deconstruct your phones firmware and make your changes, and compile the rom back together and flash it. It's exactly what a custom rom is. My suggestion is that you find a custom rom you like and flash it over your original. That way, you circumvent the problem.

.
[General Topics] lolvatveo:
is my root just a user instance with more permissions? when i make changes in system is it just fake for "user with multiple permissions" does it have no real impact on the system?
[General Topics] lebigmac:
First disable the annoying bloatware and then reboot your device a couple of times. If no bootloop or other errors then it's safe to delete it with your favorite root file browser app. Make sure to mount your partition as rw before trying to delete files off it (see image below) !

Good luck! (y)
[General Topics] lolvatveo:
like i said, it won't show when i'm in root because i removed it as root before. as above the problem is probably this root still doesn't have full permission to delete or edit anything of the system, simply after deleting the file when booting with root it won't show up anything as if i deleted it. but actually it's still there and will show up without root, i can see though file explorer. in short i don't know how to have REAL full root permission as real root user. current root user is just fake, it's not like real superuser or administrator, any changes are just fake and show as done. and when I remove the folder in system then I certainly won't forget to mount.
[General Topics] blaze2051:
is there away to run this in windows 10 ?
[General Topics] SwedishForenger:
.

Yes. user root is just temp root in factory rom. Think of it all as SAFETY- cards on computers.

When people uses the computers in the library, or in schools or in big office environments,

it would have been IMPOSSIBLE for the administrator to keep track of all computers so that users did not do things like install programs, make personal settings or give computers viruses with their old usb sticks from home etc etc.

View attachment 5501949
​

To prevent the influence of all human factors in a large data system, the administrator installs windows on a SAFETY cards. "an encrypted and locked hard drive", which the computer takes a new copy from to its local hard disk and opens it for you, each time the computer reboots.

This means that the computer starts with a clean copy of windows every day, and regardless of previous settings, programs or errors made by the user the day before.

So if you want to get around the problems of having all your settings and programs removed every computer boot, you just install your own windows on a usb stick and force bios setings on the PC to boot your windows from theusb, instead of the windows from the SAFETY cards.

And that's what custom rom does. Uses the phone's hardware and forces the phone to start an alternative OS, In this alternative environment, you are the administrator and decide what is to be saved or deleted. But as on a computer with SAFETY cards, Remove the usb stick with your windows on, and the computer / your phone will go back to factory stock OS, and back to apps and drivers the other administrator has chosen to be pre-installed on the devise.

.
[General Topics] lolvatveo:
do i lose system.img's key signature after it was edited? how to get that signature key?
[General Topics] blaze2051:
this treads needs update with better instructions
[General Topics] blaze2051:
can you help after i ran command

./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:3697308624 --group main:2859118592 --partition system:readonly:1970069504:main --image system=./system_a.img --partition vendor:readonly:538230784:main --image vendor=./vendor_a.img --partition system_ext:readonly:350818304:main --image system_ext=./system_ext_a.img --sparse --output ./super.new.img

I keep getting ./lpmake: input/output error.

running on mint 18
[General Topics] diogen78:
Device: Realme GT Explorer Master Edition (rmx3366).

Unlocked bootloader.

Stock ROM - Android 11 or 12 (doesn't matter).

Root (Magisk) or no root (doesn't matter).

I get the backup of super.img in different ways (recovery, ADB, backup tools).

And then.

Without any modifications, I immediately load super.img back via fastboot.

fastboot flash super super.img

Everything passes without any error messages.

After that the phone never boots into the system😭

Have to restore full stock rom flash via fastboot.

Please advise how to flash the super.img correctly.
[General Topics] blaze2051:
can you clear something for me

this part 3)--device super: The size of the “super” partition on the device. It must match exactly, and it must be evenly divisible by the sector size (512 bytes).

so is it the original sparse or non sparse super.img size? that needs to match ?
[General Topics] blaze2051:
care to share your workarounds im having issue with error

block device super size must be multiple of its block size. i dont know why i get that error heres is my command

./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:3697308624 --group main:2859118592 --partition system:readonly:1970069504:main --image system=./system_a.img --partition vendor:readonly:538230784:main --image vendor=./vendor_a.img --partition system_ext:readonly:350818304:main --image system_ext=./system_ext_a.img --sparse --output ./super.new.img

after using the command i noticed my files were raw img instead of sparse img, so i went ahead and ran img2simg to all img files and ran lpmake and i got the same issue even after adjusting the file names and size for the new sparse files. so im stuck
[General Topics] lebigmac:
Wait a second. You dump a raw copy of your super image by using this command

dd if=`ls -l /dev/block/by-name/super | awk '{print $NF}'` of=/sdcard/mysuper.img

and whenever you flash it back to your super partition you get bootloop? That's odd. Your dm-verity and verification is disabled?
[General Topics] diogen78:
1. Yes

2. Yes. Dm-verity and verification are disabled.
[General Topics] blaze2051:
i get boot loop on my unisoc device if i dont use the oem vbmeta.img even if you use command

fastboot --disable-verity --disable-verification flash vbmeta_a vbmeta-sign.img

you have to flash vbmeta.img with out disabling anything , at least on my device
[General Topics] diogen78:
I tried different options to flash the device.

I can't flash super.img separately.
[General Topics] StuartRothrock:
In my case, the partitions have an extra option which mount does not understand mounting it as rw. I was able to mount as ro (android 12).
[General Topics] sdg2005:
Hi, It says system.img is F2FS filesystem. I googled 'how to convert f2fs to ext4' but there was no useful information...
[General Topics] lolvatveo:
I get annoyed when All owner post often don't respond to issues below while they're active elsewhere 😬
[General Topics] V0latyle:
Remember that all of the developers on XDA do this as a hobby on their own free time. None of them are compensated for their time and effort, and they owe absolutely nothing to no one. Don't demand updates or ETAs, and don't be disrespectful to our developers because you're impatient.
[General Topics] lolvatveo:
understood
[General Topics] alecxs:
just skip that step, it's already unsparsed super.img
[General Topics] sdg2005:
I tried fedora linux and it was able to mount f2fs
[General Topics] tbtbtata:
How do you obtain that information?
[General Topics] tbtbtata:
I have asked the question at https://android.stackexchange.com/q/247106/188657
[General Topics] jahsonroy:
mg and modifying system. img inside of it.

unpacking super image: ...

resizing system. img in order to make enough space for modifications. ...

mounting system. img. ...

edit it as you want. ...

umount system. ...

shrink the edit system. img into the minimum possible size. ...

generating new super.image.

30-Nov-2020
[General Topics] NaiimAb10:
Hello,

Thank you for your post. It was really helpful. But I'm having a problem. I'm trying to modify system image for Samsung s22 but I couldn't as the system is f2fs file, I mounted using fedora. The problem is I cannot modify any file as it says it's read-only file system ( I tried all ways I could think about but no luck ). do you have any idea? I also copied files from mounted folder to another folder with rsync and was able to create super.img but when flashed with odin I get bootloop. Not sure what to do
[General Topics] sayazop:
I extracted odm, product, system & vendor from an OTA zip, converted them to sparse and replaced the originals from an older aml_upgrade_package.img (extracted using xVortex kitchen v5). techzpod download mobdro
[General Topics] PTechz:
It is working!!! Thank you so much! You're awesome, you're really awesome!

My device, Redmi 9Activ (Cattail). Thanks bro, you're epic!

;)
[General Topics] PTechz:
Can I make (super.bin) file readwriteable with this? From (read only to read write). Please reply me!

Android 10
[General Topics] Master Santa:
Why would you even want to do that in the first place? No you can't either. I'm sorry, but that was probably the dumbest question I've read on here for a while.🤦
[General Topics] Master Santa:
No you can't. You need to modify the boot image's fstab as fast as I'm concerned.
[General Topics] jacobel640:
i'm stock in the last step, got an error:

lpmake --metadata-size 65536 --super-name super --metadata-slots 1
--device super:4831838208 --group main:3253381856
--partition system:readonly:1470657484:main --image system=./system1.img
--partition vendor:readonly:446656512:main --image vendor=./vendor1.img
--partition product:readonly:1338654504:main --image product=./product1.img --sparse
--output ./super.new.img
lpmake I 07-12 01:01:38 22864 22864 builder.cpp:1012] [liblp]
Partition system will resize from 0 bytes to 1470660608 bytes
lpmake I 07-12 01:01:38 22864 22864 builder.cpp:1012] [liblp]
Partition vendor will resize from 0 bytes to 446656512 bytes
lpmake E 07-12 01:01:38 22864 22864 builder.cpp:599] [liblp]
Partition product is part of group main which does not have enough space free
(1338654720 requested, 1917317120 used out of 3253381856)
Not enough space on device for partition product with size 1338654504

need help!
[General Topics] alecxs:
Partition product is part of group main which does not have enough space free (main:3253381856)
[General Topics] ltk6260:
need help please if someone can take a look

luke@101:~/Test/otatools/bin$ ./lpmake --metadata-size 65536 --super-name super --metadata-slots 1 --device super:2457862144 --group main:2066169856 --partition system:readonly:715890140:main --image system=./system-squeak-arm32_binder64-ab-vndklite-gogapps.img --partition vendor:readonly:212828160:main --image vendor=./vendor.img --sparse --output ./super-new.img

lpmake I 07-23 14:33:51 27743 27743 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 715890688 bytes

lpmake I 07-23 14:33:51 27743 27743 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 212828160 bytes

Invalid sparse file format at header magic

lpmake E 07-23 14:33:52 27743 27743 images.cpp:384] [liblp]read failed: Success
[General Topics] alecxs:
system.img is only 682 MiB can't be true. unsparse system.img with simg2img first
[General Topics] ltk6260:
Hi, I may be a little out of context. I'm trying to flash this system-squeak-arm32_binder64-ab-vndklite-gogapps.img to a Calypso U318AA phone from ATT.

When I checked the size of the ...gogapps.img file I got a size of 715890140 so that's what I put in the command.

Can you help me understand what you were seeing? I'm still new to all of this and have been working from this thread https://xdaforums.com/t/what-is-this-calypso-a318uu.4372081/
[General Topics] alecxs:
unsparse with simg2img first

$ ls -lh
$ file system-*.img
$ simg2img system-squeak-arm32_binder64-ab-vndklite-gogapps.img system2.img
$ file system2.img
$ ls -l
[General Topics] ltk6260:
Hmm here's what i got.

file system-*.img

system-squeak-arm32_binder64-ab-vndklite-gogapps.img: XZ compressed data, checksum CRC64

./simg2img system-squeak-arm32_binder64-ab-vndklite-gogapps.img system2.img

Invalid sparse file format at header magic

Failed to read sparse file

EDIT:this is running in ubuntu in a virtualbox vm on my windows desktop if that matters

EDIT2:also this was a .img.xz file originally when i downloaded it but maybe i didn't uncompress the xz correctly?

Edit3: maybe i'm on to something now. redownloaded the .img.xz and unxz'd it again and now ls-lh is showing:

ls -l system-squeak-arm32_binder64-ab-vndklite-gogapps.img

-rwxrwxrwx 1 luke luke 1853341696 Jul 19 13:54 system-squeak-arm32_binder64-ab-vndklite-gogapps.img

Edit4: Holy crap it works. gosh i feel silly. i didn't unxz the file correctly this whole time. once i redid that i was able to simply 'fastboot flash system' like in the other thread i linked previously. Did a factory reset and phones' already up and running on the new android12.

I have two of these phones, and just use em to play around with and test out different apps. The stock stuff was bloated, slow (hw is trash i know) but they occassionally would lock up on apps for me etc. So my whole goal with playing around was to just try and get something clean/lightweight/stable
[General Topics] irnehhenri:
Run dmesg and it will probably give you a slightly better error message.

If it's because the filesystem has shared blocks (the same issue I had), you should have an error message like this in dmesg (I guess code 4000 refers to the "shared blocks" feature, but I couldn't find anything about this in the e2fsck documentation):

If your device has enough room to fit the filesystem after unsharing (sum of all partition sizes <= device size) you can run e2fsck -E unshare_blocks <your .img file or loop device> and after that you will be able to mount as R/W.

Btw: mounting as R/O should always work (mount -o ro), but then obviously you can't change anything.
[General Topics] PeePotz:
How to fix this?

View attachment 5713335
[General Topics] domluoi5:
It's working. thanks
[General Topics] Mr Hassan:
F
[General Topics] Skorpion96:
I have a strange issue, while I'm creating new super it gives error

Invalid sparse file format at header magic

Invalid sparse file format at header magic

Invalid sparse file format at header magic

Invalid sparse file format at header magic

I checked comments which suggested to convert all images to sparse but simg2img tell me that the images are already sparse (it fails to convert them), I checked with p7zip and the program is able to open all them so I guess these are already sparse, so my question is why I get the "Invalid sparse file format at header magic" error?
[General Topics] lebigmac:
Hi @Skorpion96 it's not error, it's only warning and you can safely ignore it. It's actually a good sign if you see these warnings and there is no point in converting the sub-partitions to sparse format before repacking the super.img. I hope this helps clear up any doubts ;)(y)
[General Topics] Skorpion96:
Oh, if that's so it's fantastic
[General Topics] ChromiumOS-Guy:
I made this automated script that patches super.img with a new GSI system img

Link: https://github.com/ChromiumOS-Guy/SuperPatcherGSI
[General Topics] Erick Pérez:
lpmake --metadata-size 65536 \

--super-name super \

--metadata-slots 2 \

--device super:5081373840 \

--group main:5128224768 \

--partition system:none:3159371776:main \

--image system=./system.img \

--partition vendor:none:638681088:main \

--image vendor=./vendor.img \

--partition product:none:1330171904:main \

--image product=./product.img \

--sparse \

--output ./super_new.img

lpmake E 12-11 07:49:37 12544 12544 builder.cpp:372] [liblp]Block device super size must be a multiple of its block size.

Invalid metadata parameters.

¿whats going on here? i cannot build super partition due to this error

(replacing atrribute "none" with "readonly" shows same thing)
[General Topics] ChromiumOS-Guy:
try my script it should fix your problem give it your super.img and your modifed system .img or GSI

if theres still a problem then you provided corrupt .img files (or i have a bug)

also my script generates the flags in a different way that may be the cause (to why i don't have problems and you do)
[General Topics] vp1117:
Did you try to read lpmake output? Check size of device super. Another thing: If I were you I'd find it funny if I tried to squeeze 5128224768 into lesser size 5081373840.
[General Topics] ZeeVanjul:
can anyone help me about this?

https://xdaforums.com/t/internals-have-different-sizes-when-connected-in-pc.4532093/
[General Topics] Erick Pérez:
already solved it and i i builded a new super.img
[General Topics] Yongsodiq:
All steps worked with no error but at the end while compiling super it give this error: lpmake E 05-22 20:28:19 430 2008 images.cpp:384] [liblp]read failed: No error...

lpmake I 05-22 20:28:15 430 2008 builder.cpp:1093] [liblp]Partition product_a will resize from 0 bytes to 1772527616 bytes

lpmake I 05-22 20:28:15 430 2008 builder.cpp:1093] [liblp]Partition system_a will resize from 0 bytes to 3252461568 bytes

lpmake I 05-22 20:28:15 430 2008 builder.cpp:1093] [liblp]Partition system_ext_a will resize from 0 bytes to 1293340672 bytes

lpmake I 05-22 20:28:15 430 2008 builder.cpp:1093] [liblp]Partition vendor_a will resize from 0 bytes to 522604544 bytes

Invalid sparse file format at header magic

lpmake E 05-22 20:28:19 430 2008 images.cpp:384] [liblp]read failed: No error
[General Topics] ChromiumOS-Guy:
probably permissions it did say (read failed)

also try sparse seeing as this poped up (Invalid sparse file format at header magic) thats fine but if you tell it you don't want sparse maybe it freaked out, so try sparse
[General Topics] harvey186:
Hi, I have problems with you tutorial:

1. How do I know which partitions are inside the super.img ? How to check ?

2. how to know which size in bytes the images do have ?

3. why do you use 'readonly'. No way to use RW ?
[General Topics] ChromiumOS-Guy:
1.I give you a list (one limitation is you can only change one partition at a time with my script I'm planning to remake it sometime)

2. Again I give you that with the list ( also planning in the next version to make the script calculate max size so you don't have to)

3. Good question the answer is I just didn't think on making the script add r/w permissions or read-only I just don't input so is whatever the default of lpmake is (again next version is fixing that)
[General Topics] harvey186:
I'm sorry, which list do you mean ? I haven't gotten any list from you
[General Topics] ChromiumOS-Guy:
when you use the script it gives you a list of all partitions inside

edit:

the script gives you all the info it can (which i thought about)

note, I'm probably dropping support for the windows version mainly because its buggy and outdated binaries,

it will still exist I'm just moving it into a different branch which I'll never touch
[General Topics] harvey186:
OK, seems I'm dumb, I don't see a script. I only see your post with a lot of separate commands with different tools which I have tried.But none of the commands are showing me the information I have ask for.

And yeah, are there rally windows user. I can't believe ;)
[General Topics] ChromiumOS-Guy:
just go to my github,

GitHub - ChromiumOS-Guy/SuperPatcherGSI: Autmated Script to Patch a Super.img with a GSI in python 3

Autmated Script to Patch a Super.img with a GSI in python 3 - ChromiumOS-Guy/SuperPatcherGSI

github.com

download the version for your OS and run the script with python from there you can do whatever if you don't know how to use , use -h for flags or read documentation on readme.md
[General Topics] harvey186:
wow, that's a great tool. Many thx. That's what I was looking for.
[General Topics] harvey186:
I'm sorry, running into an error while repacking :(
[General Topics] ChromiumOS-Guy:
okay this is something i didn't think about , ill fix it i essential remove all "text" after the first dot so all of your partitions that start with version.something .img get cut into version , something.img

so all of those partitions are now named version not there real name so lpmake freaks out because of all the partitions named version i'm fixing now

also I'm working on a couple changes so it will behave a bit different, thanks for letting me know this is entirely my fault here ;)
[General Topics] ChromiumOS-Guy:
okay try now I fixed it redownload the script from main btw there's an AppImage if you didn't notice

edit:

made an official release that way you know what to download (should have done that already)

Releases · ChromiumOS-Guy/SuperPatcherGSI

Autmated Script to Patch a Super.img with a GSI in python 3 - ChromiumOS-Guy/SuperPatcherGSI

github.com
[General Topics] harvey186:
well done. working now :)) Yeah, I know the AppImage, but they never working on my Pop!OS Linux

Edit: But flashed super.img wont boot. Rebooted in recovery. My GSI I have included was working fine on the device. I only want test the super image manipulating.
[General Topics] ChromiumOS-Guy:
the sparse option was on right? (its on by default)

also did you replace the correct partition in the super.img

also you way have used an incompatible super.img like you had an super.img but you did a frimware update by OEM so now you need a new super.img
[General Topics] harvey186:
The parse 'error' was shown, for all 20 partitions which are in the super.img. And sure super image and my system.img are all fine too.

I'm the creator of LeOS-GSI. So I can say for sure, the system image is working (it's arm64-vndklite-bvN). And when flashing the GSI via fastbootd it's booting fine. The device is a Realme C11 (a very sensible device).

In the moment I'm waiting for my smartwatch and I hope that I can flash the new created super.img if there is no fastbootd available. As plan B, you know.