rumplestilzken / mksuper Goto Github PK
View Code? Open in Web Editor NEWGuide and Scripts to help unmake and make a super partition for Unihertz Devices
Guide and Scripts to help unmake and make a super partition for Unihertz Devices
My working directory:
drwxr-xr-x 1 dk dk 122 Sep 24 15:01 2022091419_g83v71c2k_dfl_eea/
-rw-r--r-- 1 dk dk 2077496712 Sep 24 15:01 2022091419_g83v71c2k_dfl_eea.zip
-rw-r--r-- 1 dk dk 1435 Sep 24 14:57 README.md
-rwxr-xr-x 1 dk dk 4468 Sep 24 14:57 extract.py*
-rwxr-xr-x 1 dk dk 1771 Sep 24 14:57 install-dependencies.py*
-rw-r--r-- 1 dk dk 2340311040 Jun 2 14:27 lineage-20.0-20230602-UNOFFICIAL-gargoyle_slim_bvN.img
-rw-r--r-- 1 dk dk 1052069941 Sep 24 15:04 lineage-20.0-20230602-UNOFFICIAL-gargoyle_slim_bvN.img.tar.gz
drwxr-xr-x 1 dk dk 82 Sep 24 14:58 lpunpack_and_lpmake/
-rwxr-xr-x 1 dk dk 12157 Sep 24 14:57 mksuper.py*
drwxr-xr-x 1 dk dk 870 Sep 24 14:58 simg2img/
drwxr-xr-x 1 dk dk 22 Sep 24 15:05 super/
output of adb devices
> adb devices
List of devices attached
TITANSLIM0007327 device
output of python install-dependencies.py
> python install-dependencies.py
Starting Script
There are several dependencies needed.
Would you like to try to install them?(Y,n):y
You need to manually install git libc++-dev, clang, g++, make and libz-dev to continue with the process
Are these already installed?(Y,n):
Installing lpunpack_and_lpmake
Building lpunpack_and_lpmake
+ mkdir -p lib/lib bin
+ CC=clang
+ CPP=clang++
+ AR=ar
+ STRIP=strip
+ CFLAGS=-static
+ cd lib
+ cd liblog
+ case "$OSTYPE" in
+ src=event_tag_map.cpp
+ clang -std=c++17 -stdlib=libc++ -I../include -Iinclude -I../base/include -DLIBLOG_LOG_TAG=1006 -DSNET_EVENT_LOG_TAG=1397638484 -static -c log_event_list.cpp log_event_write.cpp logger_name.cpp logger_read.cpp logger_write.cpp logprint.cpp properties.cpp event_tag_map.cpp
logger_name.cpp:25:3: warning: array designators are a C99 extension [-Wc99-designator]
[LOG_ID_MAIN] = "main",
^~~~~~~~~~~~~
1 warning generated.
event_tag_map.cpp:91:19: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
: public std::unary_function<const MapString&, size_t> {
~~~~~^~~~~~~~~~~~~~
__unary_function
/usr/bin/../include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
event_tag_map.cpp:101:40: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct std::hash<TagFmt> : public std::unary_function<const TagFmt&, size_t> {
~~~~~^~~~~~~~~~~~~~
__unary_function
/usr/bin/../include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
2 errors generated.
chmod: cannot access 'lpunpack_and_lpmake/bin/*': No such file or directory
Installing simg2img
Building simg2img
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -c backed_block.cpp -o backed_block.o
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -c output_file.cpp -o output_file.o
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -c sparse.cpp -o sparse.o
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -c sparse_crc32.cpp -o sparse_crc32.o
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -c sparse_err.cpp -o sparse_err.o
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -c sparse_read.cpp -o sparse_read.o
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -c android-base/stringprintf.cpp -o android-base/stringprintf.o
ar rc libsparse.a backed_block.o output_file.o sparse.o sparse_crc32.o sparse_err.o sparse_read.o android-base/stringprintf.o
ranlib libsparse.a
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -o simg2img simg2img.cpp -L. -lsparse -lm -lz
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -o simg2simg simg2simg.cpp -L. -lsparse -lm -lz
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -o img2simg img2simg.cpp -L. -lsparse -lm -lz
g++ -std=gnu++17 -O2 -W -Wall -Werror -Wextra -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude -Iandroid-base/include -o append2simg append2simg.cpp -L. -lsparse -lm -lz
Script Complete
output of python extract.py
> python extract.py
extract.py
-stock: extracted stock image location
-out : extracted super contents location
Stock Rom Found:'2022091419_g83v71c2k_dfl_eea.zip'
Unzipping Stock rom to 2022091419_g83v71c2k_dfl_eea
Copying super to super/stock
Unpacking super.img to ext4.img
Unpacking super.ext4.img
sh: line 1: /var/home/dk/Build/gargoyle/mksuper/lpunpack_and_lpmake/bin/lpunpack: No such file or directory
Copying images to super/custom
Traceback (most recent call last):
File "/var/home/dk/Build/gargoyle/mksuper/extract.py", line 139, in <module>
main()
File "/var/home/dk/Build/gargoyle/mksuper/extract.py", line 95, in main
shutil.copyfile("super/stock/vendor.img", "super/custom/vendor.img")
File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
Support gargoyle.img.tar.gz as input for the gargoyle image.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.