{"id":18981,"date":"2026-10-06T11:14:53","date_gmt":"2026-10-06T18:14:53","guid":{"rendered":"https:\/\/jasonsblog.ddns.net\/?p=18981"},"modified":"2026-10-06T11:21:31","modified_gmt":"2026-10-06T18:21:31","slug":"how-to-flash-motorola-firmware-via-flashfile-xml-or-servicefile-xml-motorola-stylus-5g-2023","status":"publish","type":"post","link":"https:\/\/jasonsblog.ddns.net\/index.php\/2026\/10\/06\/how-to-flash-motorola-firmware-via-flashfile-xml-or-servicefile-xml-motorola-stylus-5g-2023\/","title":{"rendered":"How to Flash Motorola Firmware via Flashfile.xml or Servicefile.xml (Motorola Stylus 5G 2023)"},"content":{"rendered":"\n<figure class=\"wp-block-image alignright size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"401\" height=\"500\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2026\/10\/image-8.png\" alt=\"\" class=\"wp-image-18987\" style=\"width:280px;height:auto\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2026\/10\/image-8.png 401w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2026\/10\/image-8-241x300.png 241w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(Headline link at bottom) Checking back in on <a href=\"https:\/\/wiki.lineageos.org\/devices\/\" target=\"_blank\" rel=\"noopener\">LineageOS supported devices<\/a>, I noticed they added my old <a href=\"https:\/\/wiki.lineageos.org\/devices\/genevn\/\" target=\"_blank\" rel=\"noopener\">Motorola Stylus 5G 2023<\/a> phone to the supported list. Currently I&#8217;m using a <a href=\"https:\/\/wiki.lineageos.org\/devices\/fogo\/\" target=\"_blank\" rel=\"noopener\">Motorola G 5G 2024<\/a> I put LineageOS on, but though having a couple years of battery wear the Motorola Stylus 5G 2023 is a higher end phone with better screen and processor. So having messed up and left the Google account active on it triggering an Android security feature, I needed to install the stock ROM on the device before installing LineageOS again (stock ROMs for Motorola can be found on <a href=\"https:\/\/mirrors.lolinet.com\/\" target=\"_blank\" rel=\"noopener\">lolinet<\/a>). and this article below was a great help. You still have to manually write the script and pay close attention to the instructions, but I was able to get it installed and make sure there was no Google account before upgrading to LineageOS. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\nfastboot getvar max-sparse-size\nfastboot oem fb_mode_set\nfastboot flash partition gpt.bin\nfastboot flash bootloader bootloader.img\nfastboot flash vbmeta vbmeta.img\nfastboot flash vbmeta_system vbmeta_system.img\nfastboot flash modem_a NON-HLOS.bin\nfastboot flash modem_b NON-HLOS.bin\nfastboot flash fsg_a fsg.mbn\nfastboot flash fsg_b fsg.mbn\nfastboot erase modemst1\nfastboot erase modemst2\nfastboot flash bluetooth_a BTFM.bin\nfastboot flash bluetooth_b BTFM.bin\nfastboot flash dsp_a dspso.bin\nfastboot flash dsp_b dspso.bin\nfastboot flash logo logo.bin\nfastboot flash boot boot.img\nfastboot flash vendor_boot vendor_boot.img\nfastboot flash dtbo_a dtbo.img\nfastboot flash dtbo_b dtbo.img\nfastboot flash recovery_a recovery.img\nfastboot flash recovery_b recovery.img\nfastboot flash super super.img_sparsechunk.0\nfastboot flash super super.img_sparsechunk.1\nfastboot flash super super.img_sparsechunk.2\nfastboot flash super super.img_sparsechunk.3\nfastboot flash super super.img_sparsechunk.4\nfastboot flash super super.img_sparsechunk.5\nfastboot flash super super.img_sparsechunk.6\nfastboot flash super super.img_sparsechunk.7\nfastboot flash super super.img_sparsechunk.8\nfastboot flash super super.img_sparsechunk.9\nfastboot flash super super.img_sparsechunk.10\nfastboot flash super super.img_sparsechunk.11\nfastboot flash super super.img_sparsechunk.12\nfastboot flash super super.img_sparsechunk.13\nfastboot flash super super.img_sparsechunk.14\nfastboot flash super super.img_sparsechunk.15\nfastboot flash super super.img_sparsechunk.16\nfastboot flash super super.img_sparsechunk.17\nfastboot erase apdp\nfastboot erase apdpb\nfastboot erase carrier\nfastboot erase userdata\nfastboot erase metadata\nfastboot erase ddr\nfastboot oem fb_mode_clear<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After running the above script I was able to setup the device without a Google account and then install LineageOS and get the phone working properly. I used the LineageOS Seedvault backup from my primary device saved to a USB thumb drive to restore on the Motorola Stylus 5G, and it mostly worked. I still need to manually setup some apps for install sources (F-Droid, Obtainium and Accrescent) and put in my crypto wallet seeds as the app data didn&#8217;t carry over for those. But it did cut down on most of the initial setup. At least I have solid backup phone with LineageOS limiting Google tracking, which would also be good for an international trip and wiping the device before border checks where they might want you to unlock the device so they can peruse it violating my fourth amendment rights&#8230; And with LineageOS you have updates every Thursday even though Google is limiting Android source code updates and you still need to depend on Motorola for their device firmware releases&#8230; But opensource Android security and bugfixes from the community still wil reach your phone weekly as incorporated by LineageOS. Hopefully the Nura Linux phone operating system (formerly postmarketOS) will advance in case Google further restricts Android source code releases going forward. Or perhaps, there will be significant Android opensource development maybe forking it from Google&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/droidwin.com\/how-to-flash-motorola-firmware-via-flashfile-xml-or-servicefile-xml\/\" target=\"_blank\" rel=\"noopener\">https:\/\/droidwin.com\/how-to-flash-motorola-firmware-via-flashfile-xml-or-servicefile-xml\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>(Headline link at bottom) Checking back in on LineageOS supported devices, I noticed they added my old Motorola Stylus 5G 2023 phone to the supported list. Currently I&#8217;m using a Motorola G 5G 2024 I put LineageOS on, but though having a couple years of battery wear the Motorola Stylus 5G 2023 is a higher [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-18981","post","type-post","status-publish","format-standard","hentry","category-tech"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"featured_image_src":null,"author_info":{"display_name":"Jason","author_link":"https:\/\/jasonsblog.ddns.net\/index.php\/author\/jturning\/"},"_links":{"self":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/18981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=18981"}],"version-history":[{"count":3,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/18981\/revisions"}],"predecessor-version":[{"id":18990,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/18981\/revisions\/18990"}],"wp:attachment":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=18981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/categories?post=18981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/tags?post=18981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}