yashsingh1/xdaforums huggingface dataset:
[General Questions and Answers] WoKoschekk:
No, that is not true. You should get more information about dynamic partitions and how to handle them:

OTA for non-A/B devices with dynamic partitions | Android Open Source Project

source.android.com

It's not possible to flash any dynamic partition by just using a dd command (what TWRP actually does when executing "install"). A dynamic partition is not a block device (/dev/block/mmcblk0p*) and TWRP can't handle them like any other partition. Have a look into the link above and how to update dynamic partitions. First of all you have to build the basic layout of /super and you must determine the size of each dynamic partition. Followed by some other steps.

All that is considered when using ADB sideload because that's the only way to make TWRP process the update-script inside the installer.zip. This script tells the system's update-engine what to do. The twrp install command does not do that and tries to execute a simple dd command. Therefore this command won't flash those dynamic partitions correctly.

Long story short: Let's see what the Devs of TWRP are saying

Spoiler content hidden.

source: twrp.me/xiaomi/xiaomipocox3pro.html
[General Questions and Answers] alecxs:
Again twrp install update.zip does exactly same as TWRP > Install > in GUI, same as adb sideload update.zip the zip is extracted to /tmp and executed. btw some custom rom installers don't use META-INF/com/google/android/updater-script but have a shell script replacement for META-INF/com/google/android/update-binary instead. whatever is executed behaves exactly the same, the only difference between that three methods is, adb sideload loads the zip from PC instead from phone.

I didn't say anything about dynamic partitions, but of course it's possible to install custom ROM as usual if the installer flashes whole super.img, which is still a block partition.

It's even possible to flash single partitions inside super partition, because recent TWRP comes with dynamic partition support. This is unofficial TWRP on Poco M3 stock ROM MIUI V12.0.9.0.QJFEUXM with modified super partition:

Spoiler content hidden.

The warning you have quoted from official TWRP site is regarding ext4-dedup feature (deduplicated blocks in partition) that makes partitions read-only. That is independently of dynamic partitions, it can also apply to regular block partitions. And opposite, super partition can also contain regular partitions without shared blocks feature, therefore can mounted read-write as usual (most custom ROMs)
[General Questions and Answers] peoro:
Thank you fo rthe replies guys! I really appreciate that you're trying to assist me with this.

I could try to install the stock ROM if you think that could be better in any way. I've just never installed that one before (while I have installed a few custom ROMs), so I was trusting myself better with the custom ones.

I have installed a couple custom ROMs on this phone: dotOS and crDroid. I installed them using the UI of TWRP and OrangeFox and it worked.

I believe that `twrp install` executes `META-INF/com/google/android/updater-script`, at least for crDroid, because I could see the crDroid ASCII-art logo in the stdout of `twrp install`, and it looks like that' printed by the updater-script.

Anyways, I will try to sideload a ROM too. I've never done it before, but you explained to me how to do it, so I'll give it a shot and keep my fingers crossed.

I haven't tried to mess with the init rc scripts yet either, but will try to do that now too.
[General Questions and Answers] peoro:
I still didn't manage to dump dmesg from the live Android.

This is what I tried:

- I mounted the system partition: `twrp mount system` which mounted it in `/system_root`

- I found the doc for the Android Init Language, wrote a shell script to dump `dmesg` and a couple of init scripts, then pushed everything to the right place:

$ cat dump_dmesg # the script to dump `dmesg`
dmesg > $1

$ adb push dump_dmesg /cache # pushing the dump script

$ cat z_boot.rc # init script for the `boot` trigger
on boot
exec -- sh /cache/dump_dmesg /cache/dmesg.boot

$ cat z_init.rc # init script for the `init` trigger
on init
exec -- sh /cache/dump_dmesg /cache/dmesg.init

$ adb push z_boot.rc z_init.rc /system_root/etc/init # push the init scripts

If I run e.g. `sh /cache/dump_dmesg /cache/dmesg.init` from the custom recovery, it does create the `/cache/dmesg.init` file. And Android seems to have the `sh` binary (in `/bin/sh`), so I would expect everything to work the same way...

...Except it doesn't. I booted Android (without success: I simply waited a minute then rebooted the phone) and then went back to the recovery. I can't see any `dmesg.init` or `dmesg.boot` files in `/cache/`.
[General Questions and Answers] alecxs:
on init is too early, cache is mounted first during that state, can't work.

on boot didn't work for me either without proper path and secontext (avc denied)

this worked to me because my phone is rooted.

/system_root/system/etc/init/z_boot.rc

on boot
exec u:r:magisk:s0 root root -- /system/bin/sh /cache/dump_dmesg /cache/dmesg.boot

you can install Magisk from recovery.

adb push Magisk-v26.1.apk /tmp/Magisk-v26.1.zip
adb shell
# echo KEEPVERITY=false > /cache/.magisk
# echo KEEPFORCEENCRYPT=true >> /cache/.magisk
# echo PATCHVBMETAFLAG=true >> /cache/.magisk
# twrp install /tmp/Magisk-v26.1.zip

* PATCHVBMETAFLAG depends on phone, it's the flag for "Patch vbmeta in boot image" (whatever that means)
[General Questions and Answers] peoro:
I installed Magisk as you described and now I see a `/cache/magisk.log`:

01-19 09:15:54.820 682 682 I : Magisk 26.1(26100) daemon started
01-19 09:15:54.820 682 682 I : * Device API level: 32
01-19 09:15:54.831 682 684 I : ** post-fs-data mode running
01-19 09:15:54.832 682 684 I : * Mounting mirrors
01-19 09:15:54.867 682 684 I : * Initializing Magisk environment
01-19 09:15:54.868 682 684 W : pkg: cannot find com.topjohnwu.magisk for user=[0]
01-19 09:15:54.882 682 684 I : * Running post-fs-data.d scripts
01-19 09:15:54.889 682 684 I : * Running module post-fs-data scripts
01-19 09:15:54.889 682 684 I : * Loading modules
01-19 16:45:55.972 682 684 I : ** late_start service mode running
01-19 16:45:55.973 682 684 I : * Running service.d scripts
01-19 16:45:55.973 682 684 I : * Running module service scripts

Your init script isn't working either... But I just noticed something weird: after going back to recovery and mounting `system`, my init scripts are not in `/system_root/etc/init/`.

vayu:/ # twrp mount system
Mounted '/system_root'
Done processing script file
vayu:/ # ls /system_root/etc/init
android.hardware.health@2.0-service.rc android.hardware.health@2.1-service.rc hw hwservicemanager.rc keystore2.rc lpdumpd.rc nano.rc servicemanager.rc vndservicemanager.rc

They are there if I push them, umount and then re-mount `system` from recovery though...

I made sure to mount system in RW before pushing the files (`twrp remountrw system`), but it doesn't seem to make any difference. (I could write to that directory even when it was monted in RO, to add to the weirdness...)

By the way, in a previous message you wrote this, which I didn't address:

I don't see any ADB device when I try to run Android. I only see it when the phone is running the custom recovery.
[General Questions and Answers] alecxs:
/system_root/etc is a symlink to -> system/etc - might be this accidentally pointed to /system/etc instead (which only exist in recovery ramdisk)

try again with proper location

adb shell mount -w /system_root
adb push z_boot.rc /system_root/system/etc/init

Or, now as you have magisk, you can also place a shell script in /data/adb/service.d instead (if accessable) - but requires proper shebang and executive permissions (chmod 0755)

/data/adb/service.d/40dmesg

#!/system/bin/sh
/system/bin/toybox dmesg -w > /cache/dmesg.log &

for usb-debugging place your ~/.android/adbkey.pub of PC into phone /data/misc/adb/adb_keys and

modify /data/system/users/0/settings_global.xml

(example, differs from yours)

<setting id="14218" name="adb_enabled" value="1" package="android" defaultValue="1" defaultSysSet="true" />

or set the properties from magisk resetprop or init.rc directly (have a look into overlay.d.zip linked in post #24)
[General Questions and Answers] peoro:
That did it! Finally!

You're right. The system partition is in `/system_root/system` and now your latest init script worked perfectly.

Here is the output of `dmesg` from Android: https://pastebin.com/uBFTrBT7

EDIT: Alternative link, as the pastebin doesn't seem to work? https://paste.rs/cne

I'm not able to tell whether any of the errors it reports are about Hardware issues...

If I had to guess though, I would suspect that the camera module might be broken (the camera is very close to where the screen broke, by falling).

While I'm not sure about DS28E16. The custom recovery was reporting those errors too, but after googling it I convinced myself that it might have been just some software issue...

About Magisk, it did create `/cache/dmesg.log`, but that file is empty.
[General Questions and Answers] peoro:
Now I wish to try to enable ADB and see whether I manage to get scrcpy to work.

But it's late at night already and need to postpone this until tomorrow after work, because both ways to achieve that (modifying the Android Binary XML file `/data/system/users/0/settings_global.xml`, or using Magisk's `overlay.d`) sound like would take quite a bit of work.

Thanks again for all the support, and good night!
[General Questions and Answers] alecxs:
Have had a quick look into dmesg, it's only 7 seconds but I didn't read the reason for killing. data is mounted and surfaceflinger started. No clue about DS28E16 but as your research revealed that can probably be ignored. Could be the pid was killed by zygisk during the two state init, so you may need to restart dmesg for continuing log.

another user did that with loop for 30 seconds. not sure why dmesg -w was empty, maybe output was not line buffered and lost when process was killed.

forget what I wrote about settings_global.xml I didn't realize that files are binaries (one more reason to stay on android 10) although it's possible to set path and invoke abx2xml from /system/bin/sh it's not worth it, there is easier way to enable usb-debugging by property.

you can use the files of overlay.d.zip and place it in init or service.d directory instead, no need for overlay.d in boot.
[General Questions and Answers] peoro:
I didn't manage to work on this yesterday, but now I'm back.

Your files in overlay.d.zip managed to start ADB, and with that one (and after pushing my ADB key) I could finally `scrcpy` into android! Yay!

I'm not sure what I'm seeing. I saw the LineageOS welcome screen for a bit, but then it went back to the boot animation... `scrcpy` didn't die in all of this, which I guess it means Android didn't reboot?

Then I tried to reboot it again, `scrcpy`d into it, but the boot animation never stopped.

Even though I can now ADB into Android, I can neither run `dmesg` nor look at the files in `/cache`, since I'm not root...

Is there any simple way to install a `su` binary and let my user become root without confirmation?

A couple new small weirdnesses (but they're not a problem at this point; just puzzle me a bit)...

1. I modified the script to dump `dmesg` to do this:

#!/system/bin/sh
dmesg > $1.oneshot.$(date +"%F_%X")
dmesg -w > $1.w.$(date +"%F_%X") &
while true; do dmesg > $1.loop.$(date +"%F_%X"); sleep 5; done &

But it doesn't work. It only creates a `dmesg.oneshot.*`; it doesn't create the `.w.*` and `.loop.*` files.

If I had to guess, I'd say this shellscript is not allowed to spawn child processes?

2. Few seconds after I enter the custom recovery, TWRP (3.7.0_12-0-vayu) kicks me out of ADB and doesn't let me back in (I'm unauthorized, it says). I have no idea why it happens; it didn't happen the past days.

This doesn't happen with OrangeFox (vayu-stable@R11.1_3_A12) which is the recovery flashed on my boot partition. So I'm using that one to ADB into the custom recovery.
[General Questions and Answers] alecxs:
it's possible to hot reboot android without losing adb connection, most likely LineageOS somehow crashes. you can hot reboot from adb shell stop, start commands.

you can set property ro.secure=0 to get root shell. It's also possible to get su working, requires sqlite3 binary so you can add com.android.shell to magisk.db (see userinit.sh).

1. I figured path is not set during boot, use full path prefix /system/bin/toybox for dmesg applet (I have updated my post #35)

2. TWRP/OrangeFox will start MTP after ~30 seconds when userdata partition is decrypted successfully and /data/media/0 bind mounted to /sdcard. the adb connection is resetting when MTP comes up, therefore you lose connection. simple adb kill-server should help. another possible reason could be some weird reconnection loop once battery is charged 100%
[General Questions and Answers] peoro:
OK. Thanks to your keywords I made it!

This time I looked at the screen a bit better...

- Around ~70 seconds in, the Lineage boot animation went away and I could see the welcome screen.

- The welcome screen moved on its own; I guess it's because of the broken touchscreen. It shuffled through the languages, but I'm not sure whether it clicked any...

- Around ~100 seconds in, the welcome screen went away and the boot animation came back.

- After almost 15 minutes I dumped the last `dmesg` and turned the phone off.

This is the `dmesg`: https://peo.ro/data/dmesg.android.txt

For posterity:

I found my `shell` user's ID, `2000`, and added it to android `/data/adb/magisk.db`:

sqlite3 -column -header magisk.db 'INSERT INTO policies (uid,policy,until,logging,notification) values(2000,2,0,1,1);'

Did this using the sqlite3 binary on my computer on the db mounted via `adbfs`. Now I can `su` from the shell.

About `ro.secure=0`, I thought `init.adbguard.rc` from overlay.d would do it:

on post-fs-data
setprop ro.secure 0
setprop ro.adb.secure 0
setprop ro.debuggable 1
setprop persist.service.adb.enable 1
setprop persist.sys.usb.config mtp,adb

But it looks like it doesn't: `getprop ro.secure` prints `1`.
[General Questions and Answers] alecxs:
just a dumb idea, erase dsp partition from fastboot (do a backup of /dev/block/platform/*/*/by-name/dsp with dd beforehand) - that should prevent from loading touchscreen drivers. will have look into dmesg tomorrow.

fastboot erase dsp
[General Questions and Answers] peoro:
Just to make sure I did everything correctly:

twrp # ls -lh /dev/block/platform/*/*/by-name/dsp
lrwxrwxrwx 1 root root 16 1970-01-21 12:10 /dev/block/platform/soc/1d84000.ufshc/by-name/dsp -> /dev/block/sde48

twrp # dd if=/dev/block/sde48 of=/cache/dsp.img

laptop $ adb pull /cache/dsp.img

twrp # reboot # to fastboot

laptop $ fastboot erase dsp
laptop $ fastboot reboot

The ROM is now never leaving the boot animation.

This is not the first time though.

Earlier, after posting the previous message, I tried to reboot it again and it never left the boot animation either.

I also noticed that the directory in `/data/data` now have weird names. `com.android.shell` is now `URH8CDAAAAQpDL5IdFYzFHYxYbECCtetiDdCVk0vyDRHrZFEPvRDXC`. Is that normal? I am sure that it was `com.android.shell` when I saw Lineage's welcome activity: that's where I dumped the `dmesg` in order to `adb pull` it. From recovery, I still see the unencrypted(?) names.

Should I try to flash another ROM and see what happens?

The weird thing is that I haven't reinstalled this ROM recently. I have turned the ROM on and off multiple times while attempting to log `dmesg` and get ADB to work... I'm sure it must have entered the welcome screen other times before.

I'm suspecting that it may be non-deterministic whether the welcome screen is shown: I fear it may depend on misbehaving hardware...

Dmesg of when I saw the welcome screen (same one as posted above): https://peo.ro/data/dmesg.android.txt

Dmesg of after posting the previous message (before erasing `dsp`): https://peo.ro/data/dmesg.android2.txt

Dmesg of after erasing `dsp`: https://peo.ro/data/dmesg.android3.txt
[General Questions and Answers] alecxs:
yes looks fine. It was just a idea, never tested it. at least, in another thread, one of these partitions fixed the touchscreen...

just flash dsp from fastboot to restore it.

yes that is how encryption looks like. you can disable encryption in /vendor/etc/fstab.qcom - just delete the fileencryption= flag for userdata partition line from fs_mgr_flags column. userdata partition requires formatting to remove encryption.
[General Questions and Answers] peoro:
Alright. There's no userdata encryption at the moment. I'm just surprised that once I've seen the encryption on and another time off...

I have to call it a night now. Thanks once again for all your help.

Tomorrow I'll try to install a new ROM, update the firmware and maybe look for a way to prune the dmesgs and diff them.
[General Questions and Answers] alecxs:
try to get a logcat maybe it's more verbose. AI can do the dmesg summarize ;)
[General Questions and Answers] peoro:
Which model would you suggest using for that?

The `dmesg` and `logcat` dumps are way too big for AIs like GPT...

Anyways. I just tried again to run the current Android (without flashing or changing anything) and I saw the welcome menu once again.

Like the last time I saw the welcome menu, the `/data` partition was not encrypted: I could see `/data/data/com.android.shell/` and dumped the logs in there, to be able to `adb pull` them.

Here are the logcat: https://peo.ro/data/logcat.txt

And dmesg: https://peo.ro/data/dmesg.logcat.txt

Of this last run.

I'm trying to look at them by myself, for now, filtering the lines that seem unnecessary or repeat too many times...
[HTC Excalibur] iamanalog:
Well i flashed to the new 1.4 rom and i forgot to copy over my copy of Pure black for smart toolkit and was hoping someone else had it? The e-natives site must of had a database reset or something because their download page is messed up.
[Android Q&A, Help & Troubleshooting] techac:
Hi guys. Can you port android 4.4 to trekstor surfpad 8.0? I will be happy if it will be done.

Here is the nandroid backup

Here is the specs:

Device: MID ST80208-1

Soc: Amlogic Meson6 g04 customer platform

Cores: 2

Clock speed: 48 MHz - 1,51 GHz

GPU: ARM Mali-400 MP

Os: Android jellybean 4.1.1

API level: 16

Display size: 8"

Resolution: 1024x768

Ram size: 877 MB
[Android Q&A, Help & Troubleshooting] Oswald Boelcke:
Thread closed on request of OP @techac

Regards

Oswald Boelcke
[Xiaomi Poco X3 Pro] zalnaR:
When I reboot all bluetooth pairings get removed expect in LineageOS.

I tried to do something with libstorage_secure... But those only work with Samsung phones.

EDIT: Eveloution X doesn't lose pairings too
[MX Player] didida21:
I use mxplayer on the projector, regardless of the theme, and when I select the menu with the remote control, it's hard to see which item I've selected, especially in the light environment. I mean it would be nice to have a brighter background when the menu item is selected.

Thanks
[Samsung Galaxy M33] Shibu Shaji:
Code:
/*
* Your warranty is now void!!!
*
* If sh!t happens, i am not responsible for your bricked device.
* do some research if you have any concerns about features included in this recovery
* before flashing it! YOU are choosing to make these modifications,
* Do at your own risk!!!
*/

V

ersion and device Informatio

n:​

Status: Testing

Device: Samsung m33

Codename: m336BU

Android version: android-12 (M336BUXXS4BWB1)

Release Date: April 15, 2023

INSTALLATION

​

Connect to pc and boot into stock recovery

Factory reset

Reboot into download mode.

flash twrp.tar into the ap slot

reboot to recovery

After that flash samsung multidisabler zip

Reboot to recovery from main menu (not just reboot)

(optional) Backup boot, data, super and dtbo

Reboot to system

D

ownload

s:​

TWRP Image: twrp-12.1_3.7.0-v000-m33-20230408.tar.md5

Multidisabler: multidisabler-samsung-3.1.zip
[Samsung Galaxy M33] fluffyball21:
wud u also be interested to look into working custom roms for m33 cuz my phone overheats really bad even with optimization and root
[Samsung Galaxy M33] fluffyball21:
ok so i tried to flash with odin but didnt reset phone cuz its custom recovery and people say it shudnt be a problem. anyway when i tried to flash the ap file odin just crashes so i dunno what to do. so now im gonna try to uninstall magisk, then patch the firmware back to stockwith home_csc, then install twrp and then reinstall magisk again and hopefully my data doesnt get wiped but i have the pics saved so its just a huge hassle if that happens.
[Samsung Galaxy M33] fluffyball21:
im very happy to say that my data has been wiped and the recovery file keeps crashing odin. pls offer help if theres any to offer asap cuz i dont wanna lose progress again when i installed everything again
[Samsung Galaxy M33] Shibu Shaji:
Okey, i will fix the isuue asap.
[Samsung Galaxy M33] fluffyball21:
hey so i just had to rename the img file inside tar to recovery.img and pack it back to tar.md5 and it flashed. But the phone goes into bootloop after that and cannot be used unless i flash my old recovery file. also im on custom gsi rom android 13 with patched recovery for fastbootd

GitHub - Johx22/Patch-Recovery: CI service that patches recovery.img of Dynamic Samsung devices launched with Android 10 and above to enable fastbootd.

CI service that patches recovery.img of Dynamic Samsung devices launched with Android 10 and above to enable fastbootd. - Johx22/Patch-Recovery

github.com
[Samsung Galaxy M33] fluffyball21:
hey btw im also trying to make my own twrp for the phone but mine also bootloops after installation. i also tried other twrp for phones with exynos 1280 like a33 and a53 and they both recognize my device as a33 or a53 on pc when flashed but twrp shows black screen i dunno what else to do at this point
[Samsung Galaxy M33] sunnypoddar1919:
There is really so much need of a custom Rom for this device.
[Samsung Galaxy M33] sunnypoddar1919:
Please could you tell me the steps to install twrp.. and also share me working twrp and gsi for this Device I'm really tired of this buggy One Ui
[Samsung Galaxy M33] fluffyball21:
There's no working twrp as of now but u can patch the recovery IMG of ur device with the patch recovery link I pasted above. Then u can use fastbootd on ur device then download a working gsi from this list then flash it

Generic System Image (GSI) list

Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.

github.com

Keep in mind if u don't know what ure doing and don't have backup then if bootloop happens u wud have to reset the device and flash stock firmware through bootloader so continue at ur own risk
[Samsung Galaxy M33] sunnypoddar1919:
could you tell me how can i patch my device recovery because it's first time i'm dealing with samsung for custom roms..i have rooted an another samsung device but for that TWRP was already available
[Samsung Galaxy M33] fluffyball21:
U need to have stock firmware for ur device then extract the ap file from that zip file. Then extract recovery.img.lz4 from ap file then follow the tutorial in this guide and do as it says. After all that's done ull get a zip file and u can flash that via odin by putting it in ap file slot

GitHub - Johx22/Patch-Recovery: CI service that patches recovery.img of Dynamic Samsung devices launched with Android 10 and above to enable fastbootd.

CI service that patches recovery.img of Dynamic Samsung devices launched with Android 10 and above to enable fastbootd. - Johx22/Patch-Recovery

github.com
[Samsung Galaxy M33] sunnypoddar1919:
i have flashed the patched recovery by doing all these steps, could you tell me now how can i flash gsi next by the way i have downloaded pixel experince plus (unofficial from your link that you have provided)
[Samsung Galaxy M33] fluffyball21:
Follow this guide

How to Flash a GSI on an Android Device

Follow this guide to flash a GSI on your Android device.

www.makeuseof.com

To get into fastbootd u need to go to recovery mode then select enter fastbootd