Commit graph mbbpatch/MBCPApp/common.sh
Message SHA1
chore: move some patch specific functions from common.sh to separate patches
i have no idea why it was put to `common.sh`

maybe bcz im too dumb

Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 04:14:08 +07:00
2e8ab1b1fe
fix: common.sh: getvar: reset i
usually not a problem though?

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 04:07:36 +07:00
d393998582
[1/2] feat: {parse.sh, common.sh}: "y2k" support
parse whole version, avoid potential patches leak when, for example, 6.5.0 lands

get_mb_ver now must have an argument,
for any usage outside of what ive grep'd, to retain the previous behavior, pass '2'

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 04:07:36 +07:00
aa5fa10055
feat: notice with extract assets for v6.4.86+
find `libvcm1.so` because it only exists as of v6.4.86+

not effective ig

Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 04:06:48 +07:00
1891b7b2ae
fix: common.sh: usage guide
count

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 04:05:35 +07:00
492fec1724
feat: patches: new fix_tian37 patch
Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 04:01:54 +07:00
888ac5c0d4
feat: patches: remove_mbai: adapt with new changes for v6.4.84+
MB forced the ugly search logo

This commit will override it once again.

Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 04:01:54 +07:00
b94bda41e3
fix: modify_app_theme.sh: wrong function location
it must be in common.sh instead

also some syntax ahh moment

Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 03:59:07 +07:00
e96ab6b05e
feat: misc: check for [libZDefend.so] before requiring app resources extraction
app resources only encrypted inside [mbshield.szip] for v6.4.47 or older, which uses [libZDefend.so]

from v6.4.48 and above, the app resources no longer fully encrypted, and the old [libZDefend.so] is moved to [libdesignersactivists.so]

this will notice whether app resources extraction is required or not

Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 03:33:55 +07:00
c2d2eea626
feat: common.sh: pblock()
Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 02:42:34 +07:00
2a69fef125
{patches, common}: fry checkVtap
not effective: parser uses script name for .inf outputting, to correctly detect this, use the script name

also, it would be more effective to apply this directly to the parser for most/all patches

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 02:41:12 +07:00
41fdf1a28b
common.sh: introduce confirm()
bypass_checksum tends to be mistakenly applied

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 02:34:07 +07:00
ffb3a842fa
[HACK] [2/2] Revert "feat(func)!: common.sh: temporarily disable manifest_remove function"
now its back to one line, though dirty and also needs an additional dependency
ideally we should have some apkeditor flag to unpack apktool-like ones

This reverts commit a89d47e280fa257b2499a82948902713e2486a30.

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   authored and   Cuynu   commited 2026-03-16 02:19:47 +07:00
19377a394c
[HACK] [1/2] mbcpapp.sh: reformat AndroidManifest.xml upon unpacking
restore one-line format used in apktool for easier sedding

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   authored and   Cuynu   commited 2026-03-16 02:19:35 +07:00
68d7fea1a6
common.sh: restore get_mb_ver
directly fetch from AndroidManifest.xml
imported strip_all from dylanaraps/pure-bash-bible

couldve been more elegant

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 02:17:50 +07:00
3a036195f5
feat(func)!: common.sh: temporarily disable manifest_remove function
Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 02:13:46 +07:00
7b9d3ada2f
feat: partially move to apkeditor (1/2)
MB server-side now enforcing checksum checks, omehow it also make app doesn't work with GW934 error when logging in after compiled with apktool

Signed-off-by: Cuynu <cuynu@proton.me>

Cuynu   commited 2026-03-16 02:11:24 +07:00
e4c15802b0
chore: common.sh: sed_*: operate both file in one invocation
Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 01:21:04 +07:00
f3c6385e55
[SQUASH] refactor: treewide: separate patches, provide common common, refactor change_app_logo, commonize and enhance logging
adding new patches is now trivial:

  cd patches
  cp TEMPLATE patch_name_whatever.sh
  # then just fill in patch name and ver clamp if desired

this gets rid of the need for excessive if-elses and not-so-pleasing indents

for logging, instead of using pure echo, 4 new "levels" can be utilized
- `info` : normal
- `good` : info but have green color?
- `warn` : warning
- `err` : error

Signed-off-by: fukiame <fukiame@proton.me>

fukiame   commited 2026-03-16 01:14:26 +07:00
0a89bce342