yashsingh1/xdaforums huggingface dataset:
[Android General] AlaskaLinuxUser:
Now, if you have your OTA zip, as we gathered from post #9, you can use dumpyara to extract it, and then aospdtgen to create a LineageOS tree for it:

$ pip3 install aospdtgen

$ mkdir aospdtgen

$ python3 -m aospdtgen -o ./aospdtgen/ ./cf1f7c3fa1596c87f045cee1508823c98667fa06/

Android device tree generator

Version 1.0.0

[INFO] Figuring out partitions scheme

[WARNING] Unknown HAL type native

[INFO] Parsing build props and device info

[INFO] Parsing fstab

[INFO] Extracting boot image

[INFO] Cloning AIK...

[INFO] Getting list of rootdir files

[INFO] Generating proprietary files list

Done! You can find the device tree in aospdtgen

And then you have a LineageOS device tree, ready to build! Typically you would use it to build the same version of Android your OTA zip file was for.
[Android General] AlaskaLinuxUser:
And, if you are following along, here are the device trees:

TWRP with twrpdtgen:

AlaskaLinuxUser / device_cat_S42G · GitLab

GitLab.com

gitlab.com

LineageOS with aospdtgen:

AlaskaLinuxUser / aosp_device_cat_s42 · GitLab

GitLab.com

gitlab.com
[Android General] Ernes :^):
i already tried that, just fails with a veryyy long list of errors. i built twrp 11 but without decryption support its basically useless
[Android General] qwertyuiop1289:
I have a LG K50. It has no fastboot, but I used mtkclient to unlock bootloader and extract the boot image (and then write it). The built image boots, but it is stuck on the TWRP logo and the screen is powering on and off (like in a bootloop, but it is not a bootloop because there is no LG logo). What am I doing wrong?

My device tree is: https://codeberg.org/tomasz-k/android_device_lge_mmh4p

Some time ago I ported TWRP and it boots, but is unstable and some partitions are not mounted properly. It's attached to this post, maybe it will be helpful.
[Android General] AlaskaLinuxUser:
My first thought would be to check the board config file of the ported recovery verses your compiled recoveries board config file.
[Android General] qwertyuiop1289:
BoardConfig is a part of source code and is not included in unpacked image...
[Android General] AlaskaLinuxUser:
Very true, however, you said you ported it from another phone, look up the TWRP board config file for that phone, and use that to compare.
[Android General] itzgrv7:
I had successfully generated recovery tree but in compiling I'm getting error-

FAILED: out/target/product/a03/obj/PACKAGING/recovery_intermediates/ramdisk_files-timestamp

/bin/bash -c "(mkdir -p out/target/product/a03/recovery ) && (mkdir -p out/target/product/a03/recovery/root/sdcard out/target/product/a03/recovery/root/tmp ) && (rsync -a --exclude=sdcard --exclude=/root/sepolicy --exclude=/root/plat_file_contexts --exclude=/root/plat_property_contexts --exclude=/root/system_ext_file_contexts --exclude=/root/system_ext_property_contexts --exclude=/root/vendor_file_contexts --exclude=/root/vendor_property_contexts --exclude=/root/odm_file_contexts --exclude=/root/odm_property_contexts --exclude=/root/product_file_contexts --exclude=/root/product_property_contexts --exclude=cache out/target/product/a03/root out/target/product/a03/recovery ) && (ln -sf /system/bin/init out/target/product/a03/recovery/root/init ) && (find out/target/product/a03/recovery/root -maxdepth 1 -name 'init*.rc' -type f -not -name \"init.recovery.*.rc\" | xargs rm -f ) && (cp out/target/product/a03/root/init.recovery.*.rc out/target/product/a03/recovery/root/ 2> /dev/null || true ) && (mkdir -p out/target/product/a03/recovery/root/res ) && (rm -rf out/target/product/a03/recovery/root/res/* ) && (cp -rf bootable/recovery/res-xhdpi/* out/target/product/a03/recovery/root/res ) && (true ) && (cp -f bootable/recovery/fonts/18x32.png out/target/product/a03/recovery/root/res/images/font.png ) && (cp -rf device/samsung/a03/recovery/root out/target/product/a03/recovery/ ) && (cp -f device/samsung/a03/recovery.fstab out/target/product/a03/recovery/root/system/etc/recovery.fstab ) && (ln -sf prop.default out/target/product/a03/recovery/root/default.prop ) && (cd out/target/product/a03/recovery/root && touch ramdisk-files.txt && touch ramdisk-files.sha256sum &

#### failed to build some targets (53 seconds) ####

My recovery tree is here - https://github.com/gauravv-x1/recovery_samsung_a03
[Android General] AlaskaLinuxUser:
Could you send or link to the entire output log?

This shows what failed, but not why.
[G1 Android Development] richbayliss:
All,

I currently own a stock RC30 UK T-Mobile Dream phone. I have come to terms with the fact that I dont have root access (yet) and have purchased a new ADP1, which hopefully will arrive next year.

When it does finally arrive I plan to make a generic build of RC30/RC8 firmware without all the T-Mobile junk in the ROM (web'n'walk etc) and no default APN's/MMS/etc. I have read through the re-packing sections etc and it seems possible to do without a lot of effort.

My question is; would this be something that other users would be interested in using? If so would you like to see it posted on these forums? Also, please post any comments with any functionality you would like to see added (default apps etc).
[G1 Android Development] mack:
i think if you can incorporate new features into the rom such as auto rotate browser or any other tweaks to improve the G1, I'd think it'll be extremely popular. Case in point custom cooked Windows Mobile roms on this forum.

default apps is probably a hit or miss situation. I would stick to the only essentials (ie: Klaxon for alarm clock).
[G1 Android Development] Datruesurfer:
Good idea. We need to start building custom ROM's like all the other WM phones... Here's how I would go about building an Android ROM:

1. Start off with a generic build of android from source. Obviously include all the drivers for the dream.

2. Make a nice, clean skin. If you have knowledge of C/Java, don't be afraid to mess with visual structure of the platform,.

3. Add all the proprietary Google APK's (GMail, Calender, Amazon MP3 etc).

4. Add some 3rd party APK's based on user popularity. (Steel, Power Manager, Locale etc)

5. Add some hacks that require root (auto-rotate, improved tethering functionality)
[G1 Android Development] veda_sticks:
Yes this will be very interested. All i need is to get bloody root!!! Soon though. Theres alot of smart cookies here
[G1 Android Development] diabolical28:
And rework the basic features such as sms's mms's picture viewer. contacts section ( add more input data points. like WM offers )

i guess as any rom you will never please everybody but i agree with "Datruesurfer" steel is a great app.

Onscreen keyboard like in steel or such its not to big and small. but a system wide onscreen keyboard. working in a very dirty industry the onscreen keyboard comes in.

Some other programs i find invaluable and should be an option in the default Android or i at least i really thinks so. are Smspopup, Missed call, Dgaway,Dgprefs, Rings Extender.

Power Manager as well is a good program to help better manage the battery and default network settings.

if there is a way to rework those and remove the default browser and add such options into the android rom itself i would be very pleased.
[General Topics] AlaskaLinuxUser:
There was no custom recovery (TWRP) built for my new phone, the CAT S42G, so I decided to build one. To God be the glory, it even works. Since I built one, I thought I'd share. Since there is not a forum for CAT S42G phones, I am posting it here.

This is an unofficial build of TWRP for the S42G, it *may* work on the S42H or S42H+, but I've never tried it. World ending or other bad things may happen when you flash custom recoveries to your phone. I'm not responsible for what happens to you or your phone. Best of luck.

Device tree: https://gitlab.com/alaskalinuxuser/device_cat_s42g

Download custom recovery boot image:

https://www.mediafire.com/file/h5k6juq7tu9gush/recovery_catS42_sd_TWRP.img/file

OLD: https://www.mediafire.com/file/gnmskdej7m8jdvf/recovery_catS42_TWRP.img/file

Download the Android 10 stock boot image, in case you messed yours up flashing the recovery boot image: https://www.mediafire.com/file/tyir19amut950mu/boot_catS42_stock10.img/file

Download a backup of Android 10, with flashing instructions:

https://xdaforums.com/t/twrp-cat-s42g-custom-recovery.4627811/post-89189415

Hope that helps someone. Please keep in mind if your device is encrypted, TWRP will not be able to read the userdata partition, and every file will look like garbled file names.
[General Topics] AlaskaLinuxUser:
Update,

I added the sdcard option, so if you have an external sdcard, it will read it now. This allows you to do complete Super partition backups from the phone to the sdcard.

NOTE: if your card is formatted as vfat, it will error when backing up the super partition. That is because your super partition is bigger than vfat's allowed 4 gb file size. Format your external sdcard to f2fs, or similar to allow for a full backup of the super partition.

You can download the new TWRP image here:

recovery_catS42_sd_TWRP

MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.

www.mediafire.com
[General Topics] AlaskaLinuxUser:
Backup of the Android 10 stock firmware for the CAT S42G phone.

Here is a backup of the stock firmware for the CAT S42G super partition. It is gzipped to compress it from 8 GB down to 1.4 GB. I took this backup after doing a fresh wipe of the phone, so it is stock and clean. Make sure you unzip it after download!

MediaFire

MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.

www.mediafire.com

Here is how I got the backup:

Unlocked OEM in developer settings, then reboot to fastboot mode:

$ fastboot flashing unlock
$ fastboot flash boot ./recovery_catS42_sd_TWRP.img

Now that my homebrewed TWRP was installed, I put in a SD card, and formatted it to EXT4 (you could use other file systems, but not the default vFat/FAT, because the super image is too big). Then I jumped onto the phone via adb (note that I first went to mount and disabled MTP, so adb would work).

$ adb shell
S42G:/ # cd /sdcard
S42G:/sdcard # ls
S42G:/sdcard # dd if=/dev/block/by-name/super of=./super_a10.img
16777216+0 records in
16777216+0 records out
8589934592 bytes (8.0 G) copied, 1126.738555 s, 7.2 M/s
S42G:/sdcard # ls
super_a10.img
S42G:/sdcard # ls -lah
total 8.0G
drwxr-xr-x 2 root root 4.0K 2023-10-24 21:04 .
drwxr-xr-x 35 root root 0 2023-10-24 19:35 ..
-rw-rw-rw- 1 root root 8.0G 2023-10-24 21:23 super_a10.img
S42G:/sdcard # exit

Now I pulled that super image to my computer:

$ adb pull /sdcard/super_a10.img ./

This took a while over adb, but eventually came through. I then tested it by installing a GSI, then putting this image back over it. You can use this backup to go back to stock Android 10 as well by following these steps:

If not already done, Unlocked OEM in developer settings, then reboot to fastboot mode:

$ fastboot flashing unlock # if not already done.
$ fastboot flash boot ./recovery_catS42_sd_TWRP.img

Now that my homebrewed TWRP was installed, I put in a SD card, and formatted it to EXT4 (you could use other file systems, but not the default vFat/FAT, because the super image is too big). Then I jumped onto the phone via adb (note that I first went to mount and disabled MTP, so adb would work).

$ adb push ./super_a10.img /sdcard/
$ adb shell
S42G:/ # cd /sdcard
S42G:/sdcard # dd if=./super_a10.img of=/dev/block/by-name/super
16777216+0 records in
16777216+0 records out
8589934592 bytes (8.0 G) copied, 514.753674 s, 16 M/s
S42G:/sdcard # exit

Then, reboot to bootloader, and flash the stock boot image:

$ fastboot flash boot ./boot_catS42_stock10.img

Now your system should be back to the stock Android 10 configuration. Please note that if you updated your phone to Android 12, you probably don't want to flash the Android 10 super image and boot image, as this may not work. I will hopefully put together an Android 12 backup as well in the near future.

Linux - keep it simple.
[General Topics] Davitek_:
Hi, is the stock android works on s42h/h+?
[General Topics] AlaskaLinuxUser:
Great question!

I don't own the 42h or h+, but the hardware is supposedly the same, except for the dual sim, I believe.

So in theory it would, but I have not tried it, and you may lose the second sim option if you use it.
[General Topics] Davitek_:
Thank you for responding.

I don't care about the dual sim,

I would like to try this but I still would like to have a stock image of the system.

How did you make a dump of the rom?

I can share it to you if you want
[General Topics] Davitek_:
also, i saw your blog page, did you get to compile the lineageos image?

if you did, do you think you can upload it somewhere so i can try it?
[General Topics] AlaskaLinuxUser:
In post 3 I mention how to make a backup, but with the Twrp I made, so that may work for you, but if it doesn't, you will be up a creek without a padle.

This thread shows how I got here:

[Guide] Zero to Hero, what to do when your phone has nothing, no TWRP, no custom roms....

Because I created the video series on how to build custom roms and kernels, I get a lot of questions. Most of those questions are exactly the same. One of the most common questions that I get alot in regards to building custom roms for Android...

xdaforums.com

You could follow that method, with a gsi, to get your boot image, but then you will not have an original system partition to backup or dump, unless you are like me with two phones.

Another option is to follow the steps to download or steal your OTA, so you can get the dump that way.
[General Topics] AlaskaLinuxUser:
While messing with my s42g, trying to permanently install twrp into the stock boot image, I somehow screwed up the phone. It bootloops, but cannot go to fastboot or recovery.I remain hopefull that I can fix it, because I can see the preloader. I need to convert a scatter.txt file to an xml file for spflash to fix it.So, a work in progress. 😁
[General Topics] Davitek_:
Oh, ok.

This was actually a phone that my brother gave to me to try and install lineage os because the people that were using cannot see google push notifications or something like that.

I only got today to try and install it on that phone but oh well what can I do now.

I did do a dump of it with mtk tools. Do you need it?
[General Topics] AlaskaLinuxUser:
Sure! I can download it and make a TWRP and device tree specifically for it.
[General Topics] Davitek_:
Ok I'm going to upload it all on a zip with MediaFire, is there any file do in need to exclude that has "sensitive" information? (IMEI, Serial number...)
[General Topics] Davitek_:
(I did the dump after I settled it up)
[General Topics] AlaskaLinuxUser:
You should exclude userdata for sure, if it is already set up.
[General Topics] g12erald:
This will just make your phone boot a .img without writing the partition

I think it runs on RAM when u do that https://19216801.onl/ https://routerlogin.uno/

Also its "fastboot boot recovery TWRP.img" because you need to specify what partition youre booting from, or i am wrong
[General Topics] AlaskaLinuxUser:
Good thoughts, in my phones case, fastboot is not working.
[General Topics] Davitek_:
Hey @AlaskaLinuxUser sorry if I did not respond back but I did not have time to upload the file in these days, maybe tomorrow I will do it.

Sorry again 😅
[General Topics] AlaskaLinuxUser:
No hurry.
[General Topics] Davitek_:
Hey @AlaskaLinuxUser did you try and flash a treble rom to it? And did it work?
[General Topics] AlaskaLinuxUser:
I have flashed several GSIs to my phone, but with fastboot. Only one worked at all, but it seemed that it worked very well.

https://github.com/phhusson/treble_experimentations/releases/download/v300.m/system-roar-arm32_binder64-ab-vndklite-vanilla.img.xz
[General Topics] AlaskaLinuxUser:
BTW, I was able to finally fix the phone with the MTKclient tool. So perhaps now I can resume working on this in my spare time. :)
[General Topics] Davitek_:
I'm happy for you :D
[General Topics] Davitek_:
Hey @AlaskaLinuxUser,

I have uploaded the full dump of the Cat S42H+!

You can download it here.

I hope it's useful for you!

Also, i read how you fixed your phone with mtkclient on your website, pretty cool!
[General Topics] AlaskaLinuxUser:
Thank you, but I have decided to retire from custom ROM development.
[General Topics] Davitek_:
Noooo, oh well you did a good job although.
[General Topics] john0987y6:
While attempting to permanently install TWRP into the stock boot image of my s42g, I inadvertently caused issues with the phone. It now bootloops and is unable to access fastboot or recovery mode. Despite this setback, I'm hopeful that I can resolve the problem, as I can still see the preloader. My current task is to convert a scatter.txt file to an XML file for SPFlash to facilitate the repair process. It's a work in progress, but I'm optimistic. 😁
[General Topics] Davitek_:
Hey, try flashing AlaskaLinuxUser's rom with an old version of SpFlash (like version 2.xxxx.xx) with mediatek drivers and use the scatter that you have. (I suggest doing this on Windows 7)

Or

Try using MTK tool.
[General Topics] ilia3367:
Thanks for the great job!

Can you tell me what program was used to make the backup?

How do I restore this backup if my phone went into a bootloop after installing TWRP?
[General Topics] Davitek_:
I used MTK tool.
[General Topics] ilia3367:
Greetings, thank you again for the backup of the Cat S42 firmware.

After installing TWRP my phone is in bootloop.

Can I use your backup to restore the firmware with SP Flash Tool? Could you please share the scatter.txt file with me?

I would be very grateful to you!
[General Topics] Davitek_:
Hello, i do not have the scatter for it but your can use MTK tool without scatter
[General Topics] Davitek_:
Or do What i said here
[General Topics] ilia3367:
Is it a paid utility? Is it designed for programmer, dongle? Where can I download it?

Do you have a backup of firmware S42_2.017.00?
[General Topics] Davitek_:
You can use this: https://github.com/bkerler/mtkclient

Also i only have that one backup
[General Topics] ilia3367:
MTKClient does not see my phone as connected.

What key combination is needed to connect?
[General Topics] Davitek_:
I Turned off the phone and connected It White holding volume + and volume -
[General Topics] ilia3367:
I got it.

I'm out of the house for the day.

If you don't mind, I'll be asking for your advice.
[General Topics] ilia3367:
Hi, I'm home again and if I may I'd like to continue discussing my problem.

The thing is that I can't turn off my phone completely, it keeps rebooting.

I can only flash preloader and boot.img from your backup with SP Flash Tool and the phone shuts down. The phone shuts down and the computer sees it as an unknown device, no charging either, just a red LED is on.

The bootloader is unlocked.

Here https://alaskalinuxuser3.ddns.net/2024/02/16/fixing-my-phone-with-mtkclient/ and here https://github.com/bkerler/mtkclient there is a link to Live DVD V4, but it is not working. Do you have this img?
[General Topics] Davitek_:
Hi, you can find the iso here https://androidfilehost.com/?fid=15664248565197184488

Also try holding vol down and power for 10 second to shut it down.
[General Topics] ilia3367:
Doesn't work...
[General Topics] Davitek_:
Oh... Well you can try with git for windows https://gitforwindows.org/ with python installed to $PATH (you check it when you open the installer VERY IMPORTANT).

Then, you follow the guide from here https://github.com/bkerler/mtkclient?tab=readme-ov-file#windows

About the phone you could do the last resort method of waiting that the battery fully drains so it shuts down then from there you charge it a bit (while it's turned off) and then you hold volume plus and volume minus and connect it to your PC while having mtk_gui open.
[General Topics] ilia3367:
Yes, or - I can only turn off the phone by pressing three buttons at once and connect it to a PC running SP Flash Tool in “Download” mode with preloader and boot.img partitions selected. The flashing process itself will fail, but the phone will turn off.

I hope that I have made it clear.

That leaves the option of disassembling the phone and disconnecting the battery.
[General Topics] ilia3367:
Hi!

So the phone's dead. I took it apart, disconnected the battery. But MTKClient program installed on Windows still can't see the phone.

I have two options:

1. I need Live DVD V4. But none of the links work...

2. I need a donor with a working motherboard.

Or throw it in the trash....

P.S. After reconnecting the battery, the phone keeps rebooting....
[General Topics] Davitek_:
Hello again.

I have something that you could try.

You could use this scatter with SP Flash Tool v3.1344 (I will leave them attached in this comment)

If you can, try using windows 7 to do all of this, works better than using windows 10.
[General Topics] ilia3367:
Hi!

Thank you very much again for the backup. I was helped by kind people to get a LiveDVD and I restored your backup.

However, I do have questions. If I may.

What build version was the backup taken from? My system was upgraded to S42_2.017.00 and that version is still in my phone info.

Were you able to Root on this phone?
[General Topics] Davitek_:
Hi again!

I'm happy that you got in your hands a copy of the LiveDVD! (I'm still sorry that i could not provide you one)

I acutally don't remember what version it was and i don't have the phone right now because it was from an industry and they had the 3CX App (A VoIP Phone app) that was not working in the background so they gave it to my brother and i tried my best to make it work in the background and it magically worked even without doing any changes to the phone... Weird...

I acutally did not try to root it because the app was working and i did not have much time to try and root it.

But if you get TWRP to work, you could try to install the magisk zip and see if it works!

(You can get the magisk zip by getting the apk from the magisk github and simply change the .apk to .zip)

P.s. sorry again if i have bad English, it's not my native language.
[Samsung Galaxy S23 Ultra] KosInUK:
Suspend Execution for cached apps... which is hidden in developer options as it saves battery life.

standby time has increased dramatically, improve the battery in the background.

Anyone ??
[Samsung Galaxy S23 Ultra] raul6:
Tried it. Didn't like it.
[Samsung Galaxy S23 Ultra] Am100:
I guess it killed every app as soon as leave it when i enabled it. Nightmare for multitasking that's why changed it to device default.
[Samsung Galaxy S23 Ultra] KosInUK:
yes correct but battery life is better
[Samsung Galaxy S23 Ultra] TheMystic:
Interesting and conflicting observations. May be this setting works, but not for everyone depending on usage.

I have just enabled it. I will see how my phone behaves over the next few weeks. If I see meaningful battery life improvements without affecting my usage (I don't like apps getting killed in the background, but would be nice to see idle apps being frozen at their current state), then I'll leave it ON.
[Samsung Galaxy S23 Ultra] TheMystic:
If I have to be that accurate, it would be safe to say that turning on that setting hasn't been of much help, if at all. I'll just see how much SOT I'm getting by the time my battery is around 15%.

Currently, I get about 4.5 to 5 hours on WiFi with a Standby of 12 to 15 hours. On mobile data, it is just about 3 to 3.5 hours.

If I see SOT going up by about 45 minutes to an hour, and/ or Standby time improving by 2 to 3 hours, then I would leave that setting ON. I'll also see what's my overnight battery drain is with all connectivity Settings ON. On top of everything, my apps should not get killed in the background.

My phone is S22U.
[Samsung Galaxy S23 Ultra] TheMystic:
I always charge my phone to 100%. So all measurements/ observations will be from a fully charged device.