[Android General] adfree:
asus@asusEEE:~/imj$ ./imjtool super.img extract
Sparse image v1.0 detected, 1310720 blocks of 4096 bytes
1310720 blocks of 4096 bytes compressed into 39 chunks (71% compressed)
0 - Extracted image is in extracted/image.img
asus@asusEEE:~/imj$ ./imjtool image.img extract
liblp dynamic partition (super.img) - Blocksize 0x1000, 2 slots
LP MD Header @0x3000, version 10.0, with 4 logical partitions on block device of 2560 GB, at partition super, first sector: 0x800
Partitions @0x3080 in 2 groups:
Group 0: default
Group 1: group_basic
Name: system (read-only, Linux Ext2/3/4/? Filesystem Image, @0x100000 spanning 1 extents and 1 GB) - extracted
Name: vendor (read-only, Linux Ext2/3/4/? Filesystem Image, @0x55800000 spanning 1 extents and 88 MB) - extracted
Name: product (read-only, Linux Ext2/3/4/? Filesystem Image, @0x5b100000 spanning 1 extents and 77 MB) - extracted
Name: odm (read-only, Linux Ext2/3/4/? Filesystem Image, @0x5ff00000 spanning 1 extents and 4 MB) - extracted
asus@asusEEE:~/imj$ cd extracted
asus@asusEEE:~/imj/extracted$ gzip -c system_raw.img > system_raw.gz

Tiny progress GSI attempt related...

So I have the system.img pulled from super.img of:

COMBINATION_FAC_FBR0_R875FSQU1AVI4_FACFAC_CL25207558_QB57036605_REV00_user_mid_noship_MULTI_CERT.tar

gzipped as mentioned in this Link:

Dynamic System Updates (DSU) | Platform | Android Developers

Dynamic System Updates (DSU) lets developers install a GSI side by side with the device's system image on a DSU-supported device that runs Android 10 or higher.

developer.android.com

Now I will push the *.gz file to my SM-R875F...

adb push system_raw.gz /storage/emulated/0/Download/

700 MB over WiFi...

Hmm. adb push ... /sdcard should be the same...

Edit 1.

Result of attempt 1 with system shell... in "normal way"...

D:\Android\adb>adb shell
freshul:/ $ cd /sdcard
freshul:/sdcard $ ls -a1l
total 40
drwx------ 2 u0_a113 u0_a113 3452 2023-01-27 06:09 Alarms
drwxrws--x 5 media_rw media_rw 3452 2023-01-27 06:08 Android
drwx------ 2 u0_a113 u0_a113 3452 2023-01-27 06:09 Audiobooks
drwx------ 3 u0_a113 u0_a113 3452 2023-01-27 13:21 DCIM
drwx------ 2 u0_a113 u0_a113 3452 2023-01-27 06:09 Documents
drwx------ 2 u0_a113 u0_a113 3452 2023-01-27 06:09 Download
drwx------ 3 u0_a113 u0_a113 3452 2023-01-27 06:09 Movies
drwxrwxr-x 4 media_rw media_rw 3452 2023-01-27 06:09 Music
drwx------ 2 u0_a113 u0_a113 3452 2023-01-27 06:09 Notifications
drwx------ 3 u0_a113 u0_a113 3452 2023-01-27 06:09 Pictures
drwx------ 2 u0_a113 u0_a113 3452 2023-01-27 06:09 Podcasts
drwx------ 2 u0_a113 u0_a113 3452 2023-01-27 06:09 Ringtones
-rw------- 1 u0_a113 u0_a113 3 2023-01-27 08:46 mps_code.dat
freshul:/sdcard $ rm -mps_code.dat
rm: Unknown option 'mps_code.dat' (see "rm --help")
1|freshul:/sdcard $ rm mps_code.dat
freshul:/sdcard $ cd Download
freshul:/sdcard/Download $ ls -a1l
total 0
freshul:/sdcard/Download $ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 646M 1.2M 645M 1% /dev
tmpfs 646M 0 646M 0% /mnt
/dev/block/dm-4 3.4G 3.4G 1.0M 100% /
/dev/block/dm-5 84M 81M 1.3M 99% /vendor
/dev/block/dm-6 169M 169M 0 100% /product
/dev/block/dm-7 3.9M 984K 2.9M 25% /odm
/dev/block/dm-8 581M 179M 390M 32% /prism
/dev/block/dm-9 39M 500K 37M 2% /optics
tmpfs 646M 0 646M 0% /apex
/dev/block/mmcblk0p34 16M 24K 15M 1% /omr
/dev/block/mmcblk0p33 193M 4.5M 184M 3% /cache
/dev/block/mmcblk0p2 3.8M 1.3M 2.3M 37% /efs
/dev/block/dm-10 8.3G 763M 7.5G 10% /data
/dev/fuse 8.3G 763M 7.5G 10% /storage/emulated
freshul:/sdcard/Download $ exit

D:\Android\adb>adb push system_raw.gz /storage/emulated/0/Download/
system_raw.gz: 1 file pushed, 0 skipped. 1.8 MB/s (716177691 bytes in 375.507s)

D:\Android\adb>
D:\Android\adb>adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system_raw.gz \
--el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1) \
--el KEY_USERDATA_SIZE 2000000000
Exception occurred while executing 'start-activity':
java.lang.IllegalArgumentException: No intent supplied
at android.content.Intent.parseCommandArgs(Intent.java:7849)
at com.android.server.am.ActivityManagerShellCommand.makeIntent(ActivityManagerShellCommand.java:337)
at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:434)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:185)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10983)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5104)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2993)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

No idea if reduced user size is good idea... but I have only 7 GB...

Now will check same Command on system shell...

Edit 2.

System Shell Exploit spit little bit more...

S/system/bin/sh: can't find tty fd: No such device or address
/system/bin/sh: warning: won't have full job control
:/ $ am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system_raw.gz \
--el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1) \
--el KEY_USERDATA_SIZE 2000000000> > > > >
du: Unknown option 'b' (see "du --help")

Exception occurred while executing 'start-activity':
java.lang.NumberFormatException: For input string: "--el"
at java.lang.Long.parseLong(Long.java:594)
at java.lang.Long.valueOf(Long.java:808)
at android.content.Intent.parseCommandArgs(Intent.java:7564)
at com.android.server.am.ActivityManagerShellCommand.makeIntent(ActivityManagerShellCommand.java:337)
at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:434)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:185)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10983)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5104)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2993)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)
255|:/ $

?

du: Unknown option 'b' (see "du --help")

Edit 3.

But du exists... on my SM-R875F...

D:\Android\adb>adb shell
freshul:/ $ du --help
usage: du [-d N] [-askxHLlmc] [FILE...]

Show disk usage, space consumed by files and directories.

Size in:
-k 1024 byte blocks (default)
-K 512 byte blocks (posix)
-m Megabytes
-h Human readable (e.g., 1K 243M 2G)

What to show:
-a All files, not just directories
-H Follow symlinks on cmdline
-L Follow all symlinks
-s Only total size of each argument
-x Don't leave this filesystem
-c Cumulative total
-d N Only depth < N
-l Disable hardlink filter

Edit 4.

Seems i have really no -b parameter in du...

Edit 5.

Puh...

255|:/ $
am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system_raw.gz \
--el KEY_SYSTEM_SIZE $(du system_raw.img|cut -f1) \
--el KEY_USERDATA_SIZE 2000000000255|:/ $ > > > > >
du: system_raw.img: No such file or directory

Exception occurred while executing 'start-activity':
java.lang.NumberFormatException: For input string: "--el"
at java.lang.Long.parseLong(Long.java:594)
at java.lang.Long.valueOf(Long.java:808)
at android.content.Intent.parseCommandArgs(Intent.java:7564)
at com.android.server.am.ActivityManagerShellCommand.makeIntent(ActivityManagerShellCommand.java:337)
at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:434)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:185)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10983)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5104)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2993)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

Edit 6.

Okidoki. I think I should go to Root and try first here... to prevent my exploding head...

Edit 7.

No on Root...

13|freshul:/ $ su
freshul:/ # adb shell am start-activity \
> -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
> -a android.os.image.action.START_INSTALL \
\> -d file:///storage/emulated/0/Download/system_raw.gz \
> --el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1) \
> --el KEY_USERDATA_SIZE 2000000000
du: Unknown option 'b' (see "du --help")
/system/bin/sh: adb: inaccessible or not found
127|freshul:/ # am start-activity \
n> -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
> -a android.os.image.action.START_INSTALL \
o> -d file:///storage/emulated/0/Download/system_raw.gz \
.img|cut -f1) > --el KEY_SYSTEM_SIZE $(du system_raw.img|cut -f1) \
> --el KEY_USERDATA_SIZE 2000000000
du: system_raw.img: No such file or directory

Exception occurred while executing 'start-activity':
java.lang.NumberFormatException: For input string: "--el"
at java.lang.Long.parseLong(Long.java:594)
at java.lang.Long.valueOf(Long.java:808)
at android.content.Intent.parseCommandArgs(Intent.java:7564)
at com.android.server.am.ActivityManagerShellCommand.makeIntent(ActivityManagerShellCommand.java:337)
at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:434)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:185)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10983)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5104)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2993)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

Edit 8.

short tried this way...

D:\Android\adb>adb shell
freshul:/ $ su
freshul:/ # am start -n com.android.dynsystem/.VerificationActivity
D:\Android\adb>
D:\Android\adb>adb shell
freshul:/ $ su
freshul:/ # am start -n com.android.settings/.development.DSULoader
Starting: Intent { cmp=com.android.settings/.development.DSULoader }
Error type 3
Error: Activity class {com.android.settings/com.android.settings.development.DSULoader} does not exist.

Edit 9.

Found something but still no success...

freshul:/ # am start-activity \
> -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
> -a android.os.image.action.START_INSTALL \
> -d file:///sdcard/Download/system_raw.gz \
> --el KEY_SYSTEM_SIZE 1433051136 \
> --el KEY_USERDATA_SIZE 2000000000
Starting: Intent { act=android.os.image.action.START_INSTALL dat=file:///sdcard/Download/system_raw.gz cmp=com.android.dynsystem/.VerificationActivity (has extras) }
freshul:/ #

the du -b thingie... found here:

Google Issue Tracker

issuetracker.google.com