yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy M02s] Mohtasin_Nur_Raiyan:
View attachment 5917947

AUTO-PATCH FILE FOR SAMSUNG M022G

​

​

​

​

​

Installations:

1) Install ODIN on windows

2) Extract the Auto-Patch zip file after download it

3) Add AP,CP,CSC,BL in ODIN

4) Unlock the bootloader of phone (Phone will reset)

5) Then, go to the download mode (A message will show added in ODIN)

6) Then, Click Start on ODIN

7) After complete, 'Pass' will appear in ODIN

8) After a few seconds, unplug the USB cable and during every restart, a warning message will appear, just click on the power button to continue it

9) After setuping the phone, you have to install magisk apk

​

XDA:DevDB Information

Auto-Patch File for Samsung M022G

​

Contributors

@Moh_Tasin_Nur_RAIYAN (me)

Source Code: Stock Rom

ROM OS Version: Android 11

ROM Kernel: Stock

ROM Firmware Required: Bootloader unlocked

Version Information

Status: Stable

Stable Release Date: 2023-5-25

Created: 2023-5-25

Last Updated: 2023-5-25

View attachment 5917921
[Off-topic] HTC Touch HD:
hello all!

just thoguht id introduce myself and say hello

just upgraded to one of those new fandagled HTC Touch HDs. had is for just over a week now (free upgrade from Orange) and i havent got bored of it yet! usually a good sign!!

im usually ok with these devices as i do love to fiddle with gadgets, and have stubbled across a few of the features so getting to know the phone lot, but im looking forward to harrasing you all for your knowledge too.

cheers guys!
[Off-topic] -PiLoT-:
u dont come here to harress for knowledge thats whats the manual is for. this is a community for developers

other than that welcome
[Off-topic] -PiLoT-:
do i have to ask why ur not using the new cast
[Off-topic] galaxys:
has a lot to do with Mike's age :D
[Off-topic] -PiLoT-:
ha ha. well the artheritis isnt hampering his typing skills:D:D
[Off-topic] the-equinoxe:
Not bad if you onsider he has to type like this:

but the medication has some side effects as you noticed ;)
[Off-topic] the-equinoxe:
You promised you wouldn't post the picture where I was scratching my behind :(
[Off-topic] HTC Touch HD:
thanks for the warm welcome chap! :rolleyes::p

i do realise i maybe a little in over my head here, but in order to learn good stuff, i tend to ask people who actually know what they are talking about (even if i dont....)

regards

T
[Off-topic] -PiLoT-:
nah nah i didnt mean it as brash i meant as long as you read info and make the effort to search and only post when really stuck you cant go wrong
[Nokia G10 / G20 / G21] dkmoore:
Hello,

I have the following situation. A friend attempted an Android 13 sideload update on a Nokia G10 (TA-1334) using the package provided here: https://www.theupdatebox.com/nokia-g10-and-nokia-g20-get-android-13-update-download/ .

Unfortunately he didn't backup the phone first and as far as he told me he neither had Google sync turned on. The update failed.

Now the phone doesn't boot anymore and displays the standard message: Your device is corrupt. It can't be trusted and may not work properly.

I managed to enter recovery mode and retried the same sideload update, with the same package. The update seems to progress ok up to verifying the package, but after fails with the same result. The detailed log displayed on the phone screen is:

Supported API: 3

Finding update package...

Verifying update package...

Update package verification took 216.6 s (result 0).

Installing update...

E: Package is for product ROGA|ROGA_sprout but expected ROGA_sprout

I don't have much experience with ADB, sideload updates and Android in general, but since the verification looks like passing and the failure is immediately after, my assumption is that this is simply a string mismatch with the package metadata. There is this field in the metadata file "pre-device=ROGA|ROGA_sprout", which I assume it indicates that the update fits for both types of devices ROGA and ROGA_sprout but I guess this is not interpreted correctly. I removed the "ROGA" part and left only "ROGA_sprout", but obviously the update then fails with a signature error.

So, my questions are:

1) Does somebody know where we could get another sideload update only for ROGA_sprout? Or maybe any way to "fix" the referenced update to pass the thrown error. It would be fine also with an older version of Android if possible to recover.

2) It looks possible to do a factory reset from the recovery mode, but as I mentioned, unfortunately nothing was backed up. In case there's no chance to find another sideload update that could install properly, is there any way to try saving something from the phone in the current state? AFAIK the factory reset wipes out everything.

Again, I don't have much experience with sideload updates for Android phones, so sorry if I got anything wrong above.

Thank you in advance for any advice.
[Nokia G10 / G20 / G21] mvikrant97:
You should not have done that.

Nokia does not allow sideloading on this device. Please check your PM.
[Xiaomi Poco F1 Questions & Answers] Diego19891989:
Has anyone tried a rom with android 13 and Miui 14 for the F1? I'm thinking about flashing the Poco Os rom, but there isn't any thread here about that rom. Why? Is it a reliable rom?
[Xiaomi Poco F1 Questions & Answers] amn1987:
It's a ported ROM I guess. Best not to mess with MIUI or it's ports. Custom ROMs are way better.
[Motorola One Questions & Answers] ogruendel:
I have a Motorola XT1941-4, which I have from some time ago which is currently not able to be used. I wanted to try and fix it but cannot get any progress done. The problem I'm having is as follows: Whenever I boot the phone it goes right into the bootloader and at the bottom it says flashing_locked. I' able to communicate with the phone via fastboot and am able to boot into TWRP with fastboot boot twrp.img and when I am in TWRP the phone is also recognized in ADB. However I cannot get the phone to boot into Android. Is there anything I can do to fix this?
[Motorola One Questions & Answers] FilipeET:
Have you tried to blankflash it?
[Motorola One Questions & Answers] ogruendel:
How would I go about doing that?
[Motorola One Questions & Answers] FilipeET:
I'll leave the Motorola qboot utility in this reply.

Start device in fastboot mode, and

run the following command:

fastboot oem blankflash

fastboot oem blankflash

after that, extract and run the Unbrick.bat that I'll leave in this reply, your phone should be on a black screen when running the command, but after running the "Unbrick.bat" it should restart to the unlocked bootloader!

but before running it, verify if your phone codename is "deen"
[Motorola One Questions & Answers] ogruendel:
Sorry for the late reply, I had issues with my computer and then forgot about this... I've tried running the command fastboot oem blankflash but I get

(bootloader) command restricted
FAILED (remote: '')
fastboot: error: Command failed
[Motorola One Questions & Answers] FilipeET:
Try to switch the slot,

fastboot set_active other
[Motorola One Questions & Answers] ogruendel:
I've tried this command, however this also fails with the message

Setting current slot to 'a' (bootloader) Command is not allowed
FAILED (remote: '')
fastboot: error: Command failed
[Motorola One Questions & Answers] FilipeET:
What appears when you start the phone? could you send me a picture? Have you tried starting the recovery? Tried to use Lenovo Moto Smart Assistant?

have you tried unlocking the bootloader again?
[Motorola One Questions & Answers] FilipeET:
What appears when you start the phone? could you send me a picture? Have you tried starting the recovery? Tried to use Lenovo Moto Smart Assistant?

have you tried unlocking the bootloader again?

I saw that you put in the post that you can start twrp, try changing the slot there in Reboot > Switch to slot B,

if it is in slot b: Reboot > Switch to slot A.
[Motorola One Questions & Answers] ogruendel:
Yes, however when I start the program it detects that a phone is connected but tells me "RSA detected, that your device flash is locked. [...]"

Yes, I have. I remember when trying this before and following the steps on the official Motorola website, I would receive a new unlock code, however when I run fastboot oem get_unlock_data now and enter the output into the Motorola website it comes up with an error telling me that my device does not qualify for bootloader unlocking.

I did this but the behaviour is the same. Commands come back with the same errors etc.
[Motorola One Questions & Answers] FilipeET:
I saw the image, your phone can be unlocked, its says flashing_unlocked, so, he got unlocked 1 time, Just run "fastboot flashing unlock" ir "fastboot oem unlock"
[Motorola One Questions & Answers] ogruendel:
When running

fastboot flashing unlock

two times (adb tells me to) it comes back with

(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer
(bootloader) Options.
OKAY [ 0.002s]
Finished. Total time: 0.002s

Although the first part looks like the command failed, the OKAY in the end kind of contradicts that. The problem here is that I obviously cannot access the OS to enable OEM Unlocking in the Developer settings.

When running

fastboot oem unlock

the output says

(bootloader) invalid boot state
OKAY [ 0.001s]
Finished. Total time: 0.002s
[Motorola One Questions & Answers] FilipeET:
Can you start the recovery?
[Motorola One Questions & Answers] ogruendel:
If by starting the recovery you mean using the Motorola Smart Assistant, then no. The behaviour is the same as it was before. If you mean something else, please let me know
[Motorola One Questions & Answers] FilipeET:
Try this:

fastboot flash partition gpt.bin
[Motorola One Questions & Answers] ogruendel:
When running this the output again looks kind of weird, both looking like it failed and it working.

(bootloader) is-logical:partition: not found
(bootloader) is-logical:partition: not found
(bootloader) is-logical:partition: not found
Warning: skip copying partition image avb footer (partition partition size: 0, partition image size: 46592).
Sending 'partition' (45 KB) OKAY [ 0.168s]
Writing 'partition' (bootloader) Validating 'gpt.default.xml'
(bootloader) Committing 'gpt.default.xml'
(bootloader) - flashing 'gpt_main0.bin' to 'partition:0'
(bootloader) Flashing primary GPT image...
(bootloader) Flashing backup GPT image...
OKAY [ 0.081s]
Finished. Total time: 0.591s
[Motorola One Questions & Answers] FilipeET:
try to start the phone now
[Motorola One Questions & Answers] ogruendel:
When trying to start it now, it bootloops on this screen for a while.

View attachment 5936813

I left it on there and went to do something else and when I came back it showed this.

View attachment 5936815
[Motorola One Questions & Answers] FilipeET:
Oh!!! Flash the stock rom now!

If it doesn't flash the stock rom, blank flash it.

You flashed the partition scheme, so it needs to be "UnHardBricked"
[Motorola One Questions & Answers] ogruendel:
Is there some central place for stock roms that I can trust or do I have to look for them on various different websites?

Edit: I think I was able to download the stock ROM directly from the Rescue Assistant. Also which commands do I need to run in order to flash the stock rom?
[Motorola One Questions & Answers] FilipeET:
On lolinet mirrors, but lolinet second mirror isn't working for now, blank flash it first and say me if you can access the system
[Motorola One Questions & Answers] FilipeET:
use the rescue assistant to flash
[Motorola One Questions & Answers] ogruendel:
Blankflashing still doesn't work apparently. It comes back with this error

(bootloader) command restricted
FAILED (remote: '')
fastboot: error: Command failed

This also still says that it detects that flashing is locked. When proceedingit just stops at ~37%
[Motorola One Questions & Answers] FilipeET:
can you send me an image of bootloader? (Press VolumeDown to go to normal screen)
[Motorola One Questions & Answers] WoKoschekk:
That's a known issue. The Motorola's website seems to have problems with verifying the unlock ability of all their devices. But there's a workaround for this issue, see this post:

https://xdaforums.com/t/guide-un-locking-motorola-bootloader.4079111/post-88653223

I can confirm that this method works fine:
[Motorola One Questions & Answers] FilipeET:
Flash that:

"fastboot flash boot_a boot.img"

"fastboot flash boot_b boot.img"

"fastboot flash bootloader_a bootloader.img"

"fastboot flash bootloader_b bootloader.img"
[Motorola One Questions & Answers] FilipeET:
i can't send boot.img from here, i will send a mediafire link

Edit: Here https://www.mediafire.com/file/9sm30vt7b4dz76c/boot.img/file
[Motorola One Questions & Answers] ogruendel:
Thanks for the info. I was able to get an unlock code from the UK website, however when running

fastboot oem unlock <code>

it comes back with

(bootloader) invalid boot state
OKAY [ 0.002s]
Finished. Total time: 0.002s
[Motorola One Questions & Answers] ogruendel:
These commands come back with

(bootloader) is-logical:boot_a: not found
(bootloader) is-logical:boot_a: not found
Sending 'boot_a' (65536 KB) OKAY [ 1.629s]
Writing 'boot_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

And

(bootloader) is-logical:bootloader_a: not found
(bootloader) is-logical:bootloader_a: not found
(bootloader) is-logical:bootloader_a: not found
Warning: skip copying bootloader_a image avb footer (bootloader_a partition size: 0, bootloader_a image size: 7597568).
Sending 'bootloader_a' (7419 KB) OKAY [ 0.346s]
Writing 'bootloader_a' (bootloader) Validating 'bootloader.default.xml'
(bootloader) Committing 'bootloader.default.xml'
(bootloader) - flashing 'emmc_appsboot.mbn' to 'aboot'
(bootloader) - flashing 'rpm.mbn' to 'rpm'
(bootloader) - flashing 'tz.mbn' to 'tz'
(bootloader) - flashing 'devcfg.mbn' to 'devcfg'
(bootloader) - flashing 'cmnlib.mbn' to 'cmnlib'
(bootloader) - flashing 'cmnlib64.mbn' to 'cmnlib64'
(bootloader) - flashing 'keymaster.mbn' to 'keymaster'
(bootloader) - flashing 'prov.mbn' to 'prov'
(bootloader) - flashing 'sbl1.mbn' to 'sbl1'
OKAY [ 0.308s]
Finished. Total time: 1.009s

When trying to boot now the device shows the Bootloader logs immediately with the message

Boot up failed
[Motorola One Questions & Answers] FilipeET:
try this: "fastboot boot boot.img"
[Motorola One Questions & Answers] ogruendel:
Ok so this is some progress. When executing this command the phone briefly shows the regular Android One boot screen but after ~5 seconds it goes back to the Bootloader logs.
[Motorola One Questions & Answers] FilipeET:
t

try to go to lolinet second mirror and download firmware, if u can't, i will make an upload of a brazilian version (i don't have other rom, and it's for test)
[Motorola One Questions & Answers] ogruendel:
What am I looking for on lolinet? I am currently in the firmware > motorola folder but find it kind of confusing
[Motorola One Questions & Answers] FilipeET:
if you are in first mirror, you will see obsoleted, so click on it and click on https://mirrors-obs-2.lolinet.com/ and click on "deen" adn you you see the firmware!
[Motorola One Questions & Answers] ogruendel:
This website gives me a Cloudflare error. Might have to try tomorrow
[Motorola One Questions & Answers] FilipeET:
ops, i can send you an system archive, do you want?
[Motorola One Questions & Answers] ogruendel:
Yeah sure. Thanks a lot
[Motorola One Questions & Answers] FilipeET:
I'm compacting to a zip, i will edit this reply when i finish.

edit: Run the "Moto One.bat" to flash archives

edit 2: bro, do you receive the archive in this reply?
[Motorola One Questions & Answers] ogruendel:
No I don't see the archive
[Motorola One Questions & Answers] FilipeET:
Here:
[Motorola One Questions & Answers] FilipeET:
I can't upload the files! i will upload one per one
[Motorola One Questions & Answers] FilipeET:
i will leave in this reply other zip, if it doesn't work, tomorrow we check the lolinet mirror, i will leave the Batch archive too (on Flash.zip).

edit: i can't upload oem.img: https://www.mediafire.com/file/2bixjzhp1zzu6xy/oem.img/file
[Motorola One Questions & Answers] ogruendel:
This time I see all the files but somehow I cannot download the system.img_sparsechunk files.zip. Could you upload this file on mediafire as well? I will also check lolinet a couple times today and see if it comes back up
[Motorola One Questions & Answers] WoKoschekk:
stop it and wait
[Motorola One Questions & Answers] ogruendel:
I just had to retry for some time
[Motorola One Questions & Answers] ogruendel:
Okay so when running Flash.bat all commands still shows them failing because flasing is disabled and it won't turn on. Also when trying to boot now I still only get the Bootloader logs with 'No bootalbe A/B slot'
[Motorola One Questions & Answers] WoKoschekk:
First of all, you should know how to fix that issue because it seems that you already did before:

https://xdaforums.com/t/phone-stuck-on-bootloader.4401761/

But here's your current firmware build:

DEEN_RETEU_QPKS30.54_22_13_15_cid50_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml.zip

drive.google.com

SHA-256: e73a517d108c8a5c70a70b39397af888e79ccfa5b6b174646b6bb81020621d17

Copy and extract it into your ADB/fastboot folder on your PC.

Attached you'll find the corresponding flash file as a batch script. Copy that batch script also into your ADB/Fastboot folder. Then boot into fastboot mode, connect your device to the PC and execute the batch script by double clicking it.

For any errors please post a screenshot of the cmd output (WINDOWS+SHIFT+S).
[Motorola One Questions & Answers] ogruendel:
I did try to fix it back then but never managed to, which is why I am trying here. This is still the same issue. As for flashing the firmware, there are a lot of errors in the output and the device is still bootlooping on that one screen.

Attached is the console output
[Motorola One Questions & Answers] WoKoschekk:
what does fastboot oem partition say?
[Motorola One Questions & Answers] ogruendel:
(bootloader) sbl1_a: offset=128KB, size=512KB
(bootloader) sbl1_b: offset=640KB, size=512KB
(bootloader) rpm_a: offset=1152KB, size=256KB
(bootloader) rpm_b: offset=1664KB, size=256KB
(bootloader) tz_a: offset=2176KB, size=1792KB
(bootloader) tz_b: offset=4224KB, size=1792KB
(bootloader) devcfg_a: offset=6272KB, size=64KB
(bootloader) devcfg_b: offset=6528KB, size=64KB
(bootloader) aboot_a: offset=6784KB, size=1536KB
(bootloader) aboot_b: offset=8320KB, size=1536KB
(bootloader) cmnlib_a: offset=9856KB, size=1024KB
(bootloader) cmnlib_b: offset=10880KB, size=1024KB
(bootloader) cmnlib64_a: offset=11904KB, size=1024KB
(bootloader) cmnlib64_b: offset=12928KB, size=1024KB
(bootloader) keymaster_a: offset=13952KB, size=1024KB
(bootloader) keymaster_b: offset=14976KB, size=1024KB
(bootloader) prov_a: offset=16000KB, size=192KB
(bootloader) prov_b: offset=16256KB, size=192KB
(bootloader) modem_a: offset=16512KB, size=102400KB
(bootloader) modem_b: offset=118912KB, size=102400KB
(bootloader) fsc: offset=221312KB, size=4KB
(bootloader) ssd: offset=221316KB, size=8KB
(bootloader) dsp_a: offset=221324KB, size=16384KB
(bootloader) dsp_b: offset=237708KB, size=16384KB
(bootloader) DDR: offset=254208KB, size=32KB
(bootloader) utags: offset=254336KB, size=512KB
(bootloader) utagsBackup: offset=254848KB, size=512KB
(bootloader) modemst1: offset=255360KB, size=2048KB
(bootloader) modemst2: offset=257408KB, size=2048KB
(bootloader) fsg_a: offset=259456KB, size=12288KB
(bootloader) fsg_b: offset=271744KB, size=12288KB
(bootloader) persist: offset=284032KB, size=32768KB
(bootloader) frp: offset=316800KB, size=512KB
(bootloader) cid: offset=317312KB, size=128KB
(bootloader) logo_a: offset=317440KB, size=16384KB
(bootloader) logo_b: offset=333824KB, size=16384KB
(bootloader) carrier: offset=350208KB, size=16384KB
(bootloader) metadata: offset=366592KB, size=512KB
(bootloader) kpan: offset=367104KB, size=8192KB
(bootloader) boot_a: offset=375296KB, size=65536KB
(bootloader) boot_b: offset=440832KB, size=65536KB
(bootloader) dto_a: offset=506368KB, size=16384KB
(bootloader) dto_b: offset=522752KB, size=16384KB
(bootloader) misc: offset=539136KB, size=1024KB
(bootloader) mota: offset=540160KB, size=512KB
(bootloader) syscfg: offset=540672KB, size=512KB
(bootloader) logs: offset=541184KB, size=2048KB
(bootloader) apdp: offset=543232KB, size=256KB
(bootloader) msadp: offset=543488KB, size=256KB
(bootloader) dpo: offset=543744KB, size=8KB
(bootloader) vbmeta_a: offset=543752KB, size=64KB
(bootloader) vbmeta_b: offset=543816KB, size=64KB
(bootloader) padA: offset=544000KB, size=13056KB
(bootloader) hw: offset=557056KB, size=8192KB
(bootloader) sp: offset=565248KB, size=8192KB
(bootloader) oem_a: offset=573440KB, size=196608KB
(bootloader) oem_b: offset=770048KB, size=196608KB
(bootloader) vendor_a: offset=966656KB, size=524288KB
(bootloader) vendor_b: offset=1490944KB, size=524288KB
(bootloader) system_a: offset=2015232KB, size=2621440KB
(bootloader) system_b: offset=4636672KB, size=2621440KB
(bootloader) userdata: offset=7258112KB, size=53813231KB
OKAY [ 0.038s]
[Motorola One Questions & Answers] FilipeET:
Try flashing slot b, my moto one get this error when flashing the slot b, so, your slot a probably is danified. Can you boot TWRP? If yes, just go to TWRP > Reboot > Download Mode/EDL, if your phone gets a black screen, run the unbrick.bat on the blankflash file I leave on the second reply, if your phone goes to fastboot, it's probably your emmc isn't working fine.
[Motorola One Questions & Answers] ogruendel:
When booting into TWRP, all i see in the reboot menu is System, Power Off, Recovery, Bootloader and Slot A and B
[Motorola One Questions & Answers] WoKoschekk:
ok, it matches with gpt.bin.

Did you ever try to boot TWRP and switch to the inactive slot? I guess it would be _b but better run getprop ro.boot.slot_suffix to be sure. Then repeat the whole procedure (try booting into system and try flashing the firmware if needed). if it still fails we'll flash the firmware images via TWRP. Therefore we need to unpack the bootloader.img and unsparse the other images to make them flashable. But first try to switch the boot slot.
[Motorola One Questions & Answers] ogruendel:
I tried switching to both slots via TWRP and flashing using the previously provided files but the behaviour is the same no matter the slot I selected. How exactly would I go about flashing the firmware using TWRP?
[Motorola One Questions & Answers] FilipeET:
Flash the system modifying the bat using: example: fastboot flash system_b system.image_sparsechunk.0, right?

To flash firmware with TWRP you need an img of system, its more easy flashing a custom ROM. Can you flash the TWRP.zip to boot.img?
[Motorola One Questions & Answers] ogruendel:
Can I get the ROM from lolinet as well or is there some other place and which OS would you recommend?
[Motorola One Questions & Answers] FilipeET:
I

you don't have the rom file that WoKoschekk gave you? If you want a flash slot b archive and you can't modify the bat, I have
[Motorola One Questions & Answers] WoKoschekk:
I would recommend you my linked ROM above. That's the last build version. Your bootloader is LOCKED and it's not possible to flash any other ROM. That's the meaning of LOCKED.

Do you know how to unsparse the system.img_sparsechunks with simg2img? Or how to unpack the bootloader.img with the star.exe binary from a blankflash file?