[Guide] How to extract payload.bin from OTA - Nokia 7 Plus Guides, News, & Discussion

This is guide for extract payload.bin from OTA zip file
-----------------
Pre-requirement:
- Python3
-----------------
For extract OTA update
Please flow step by step instruction
Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip --> View attachment payload_dumper.zip
Step 3: Unzip payload_dumper.zip
This is list file
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command
Code:
cd "<Path to folder>"
Step 5: Create a python environment with virtualenv
Command:
Code:
virtualenv .py
Step 6: Active python enviroment
Command:
Code:
source .py/bin/activate
Folktroll said:
Works fine. :good:
Step 5 (Windows):
Code:
pip install virtualenv
virtualenv .py
Step 6 (Windows):
Code:
CMD: call .py\Scripts\activate.bat
PS: .py\Scripts\activate.ps1
Click to expand...
Click to collapse
Step 7: Install dependencies with command
Code:
pip install -r requirements.txt
Step 8: Extract OTA.zip file
Step 9: Copy payload.bin file to payload_dumper folder
Step 10: Run command
Code:
python3 payload_dumper.py payload.bin
Step 11: Wait extract...
Step 12: File extracted on out folder in payload_dumper
-----------------
Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv

Thank you very much.
This tool is very useful for me. I can extract boot.img for rooting my phone with magisk every OTA update package.

Works fine. :good:
Step 5 (Windows):
Code:
pip install virtualenv
virtualenv .py
Step 6 (Windows):
Code:
CMD: call .py\Scripts\activate.bat
PS: .py\Scripts\activate.ps1

Help !!!!!!
How do you do?
i want to extract a payload.bin (HTC OTA), i need the boot.img.
Step 1-9 Okay at step 10 I get an error message. :crying:
Do I need other programs?
"python-3.7.0.exe" is installed
Thanks

Did you follow folktroll advises for windows.
I've just installed it in my computer followed all steps and extracted all images in my payload file.

Hollilightman said:
How do you do?
Click to expand...
Click to collapse
I doing in Linux, but maybe try python.exe, no python3.exe

k4sh44 said:
Did you follow folktroll advises for windows.
I've just installed it in my computer followed all steps and extracted all images in my payload file.
Click to expand...
Click to collapse
Thanks,
I know where the mistake is. Step 10 says.
Run command
Code. python3 payload_dumper.py payload.bin
python3 payload_dumper.py payload.bin
with "python3" the "3" must go away, so
python payload_dumper.python payload.bin
---------- Post added at 05:18 PM ---------- Previous post was at 05:00 PM ----------
k3dar7 said:
I doing in Linux, but maybe try python.exe, no python3.exe
Click to expand...
Click to collapse
have seen too late... lol

I am stuck in virtualenv" (See screenshot)

How to package system.img boot.img vendor.img back to payload.bin

Hollilightman said:
How do you do?
i want to extract a payload.bin (HTC OTA), i need the boot.img.
Step 1-9 Okay at step 10 I get an error message. :crying:
Do I need other programs?
"python-3.7.0.exe" is installed
Thanks
View attachment 4605210
View attachment 4605212
View attachment 4605213
Click to expand...
Click to collapse
python payload_dumper.py payload.bin
type this command and you are done :laugh:

und3fined said:
This is guide for extract payload.bin from OTA zip file
-----------------
Pre-requirement:
- Python3
-----------------
For extract OTA update
Please flow step by step instruction
Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip from here
Step 3: Unzip payload_dumper.zip
This is list file
Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command
Code:
cd "<Path to folder>"
Step 5: Create a python environment with virtualenv
Command:
Code:
virtualenv .py
Step 6: Active python enviroment
Command:
Code:
source .py/bin/activate
Step 7: Install dependencies with command
Code:
pip install -r requirements.txt
Step 8: Extract OTA.zip file
Step 9: Copy payload.bin file to payload_dumper folder
Step 10: Run command
Code:
python3 payload_dumper.py payload.bin
Step 11: Wait extract...
Step 12: File extracted on out folder in payload_dumper
-----------------
Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv
Click to expand...
Click to collapse
goodmorning. bro, pls tho i have python3 installed-i dnt know **** bout programming.
is there a walkthrough for noobs to do all this on python3 on windows7.
bcos i have a Mi A2 lite and i need to do all i can to bring it back. thanks

I have this error in step 10:
(.py) imac-3ayload_dumper Eche$ python3 payload_dumper.py payload.bin
Traceback (most recent call last):
File "payload_dumper.py", line 12, in <module>
import update_metadata_pb2 as um
File "/Users/Eche/Downloads/payload_dumper/update_metadata_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'

EMJI79 said:
I have this error in step 10:
(.py) imac-3ayload_dumper Eche$ python3 payload_dumper.py payload.bin
Traceback (most recent call last):
File "payload_dumper.py", line 12, in <module>
import update_metadata_pb2 as um
File "/Users/Eche/Downloads/payload_dumper/update_metadata_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'
Click to expand...
Click to collapse
Try:
Code:
pip3 install -r requirements.txt
instead of:
Code:
pip install -r requirements.txt

EMJI79 said:
I have this error in step 10:
(.py) imac-3ayload_dumper Eche$ python3 payload_dumper.py payload.bin
Traceback (most recent call last):
File "payload_dumper.py", line 12, in <module>
import update_metadata_pb2 as um
File "/Users/Eche/Downloads/payload_dumper/update_metadata_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'
Click to expand...
Click to collapse
use
Code:
pip install -r requirements.txt
outside the virutalenv environment

I added support for incremental(differential) OTA
https://forum.xda-developers.com/android/development/extract-files-ota-payload-bin-diff-t3959161
https://github.com/vm03/payload_dumper

und3fined said:
This is guide for extract payload.bin from OTA zip file
-----------------
Pre-requirement:
- Python3
-----------------
For extract OTA update
Please flow step by step instruction
Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip -->
Step 3: Unzip payload_dumper.zip
This is list file
Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command
Step 5: Create a python environment with virtualenv
Command:
Step 6: Active python enviroment
Command:
Works fine. :good:
Step 5 (Windows):
Step 6 (Windows):
Step 7: Install dependencies with command
Step 8: Extract OTA.zip file
Step 9: Copy payload.bin file to payload_dumper folder
Step 10: Run command
Step 11: Wait extract...
Step 12: File extracted on out folder in payload_dumper
-----------------
Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv
Click to expand...
Click to collapse
for what is payload.bin needed? What is this turtorial for?

2gg1 said:
for what is payload.bin needed? What is this turtorial for?
Click to expand...
Click to collapse
in "ota update".zip is payload.bin, contain many img flashed in ota update proces, if you need change(with unlocked bootloader only) example boot.img then use payload_dumper to extract from payload.bin...

k3dar7 said:
in "ota update".zip is payload.bin, contain many img flashed in ota update proces, if you need change(with unlocked bootloader only) example boot.img then use payload_dumper to extract from payload.bin...
Click to expand...
Click to collapse
thx

und3fined said:
This is guide for extract payload.bin from OTA zip file
-----------------
Pre-requirement:
- Python3
-----------------
For extract OTA update
Please flow step by step instruction
Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip --> View attachment 4760222
Step 3: Unzip payload_dumper.zip
This is list file
Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command
Code:
cd "<Path to folder>"
Step 5: Create a python environment with virtualenv
Command:
Code:
virtualenv .py
Step 6: Active python enviroment
Command:
Code:
source .py/bin/activate
Step 7: Install dependencies with command
Code:
pip install -r requirements.txt
Step 8: Extract OTA.zip file
Step 9: Copy payload.bin file to payload_dumper folder
Step 10: Run command
Code:
python3 payload_dumper.py payload.bin
Step 11: Wait extract...
Step 12: File extracted on out folder in payload_dumper
-----------------
Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv
Click to expand...
Click to collapse
A very helpful guide! Tried it with OnePlus 8 OTA

:good::good:

Related

[DEV][GUIDE] Building Qualcomm modem from sources (msm8626)

This instruction is only valid for modems without a digital signature (or modems with Qualcomm testing signature).
New modem has been tested on my phone Innos D10F (msm8228).
1. Install dependencies:
PHP:
sudo apt-get install p7zip-full
sudo apt-get install lib32z1 lib32ncurses5
sudo apt-get install scons
sudo apt-get install libxml-parser-perl
2. Download all sources:
PHP:
ROOTDIR=$HOME/dev/qcom/msm8626
mkdir -p $ROOTDIR
cd $ROOTDIR
git clone --branch "master" --progress -v "https://v2.pikacode.com/jsr-d10/qcom_msm8626_modem_proc.git" modem_proc
git clone --branch "master" --progress -v "https://v2.pikacode.com/jsr-d10/qcom_msm8626_adsp_proc.git" adsp_proc
git clone --branch "master" --progress -v "https://v2.pikacode.com/jsr-d10/qcom_msm8626_wcnss_proc.git" wcnss_proc
Mirror: magnet:?xt=urn:btih:61e8b8a520181ade801c251e5ec9352e33a7bb8c
3. Copy hexagon_tools_6.4.06.a.7z (this file is present in the torrent) into directory: $HOME/Downloads
4. Install HEXAGON Tools:
PHP:
HEXAGON_ROOT=$HOME/Qualcomm/HEXAGON_Tools
7za x -y -o$HEXAGON_ROOT $HOME/Downloads/hexagon_tools_6.4.06.a.7z
5. Start modem build:
PHP:
ROOTDIR=$HOME/dev/qcom/msm8626
cd $ROOTDIR/modem_proc/build/ms/
./build.sh 8626.gen.prod BUILD_ID=AAAAANAZ -k
For clean repo type:
PHP:
ROOTDIR=$HOME/dev/qcom/msm8626
cd $ROOTDIR/modem_proc/build/ms/
./build.sh 8626.gen.prod BUILD_ID=AAAAANAZ --clean
6. Start ADSP build:
PHP:
ROOTDIR=$HOME/dev/qcom/msm8626
cd $ROOTDIR/adsp_proc/build/ms/
./build.sh msm8x26 msm8x26_MPD BUILD_VER=1234 -k
7. WCNSS module is distributed without sources.
8. Download pil-splitter.py :
PHP:
ROOTDIR=$HOME/dev/qcom/msm8626
cd $ROOTDIR
wget http://github.com/remittor/qcom-mbn-tools/raw/master/pil-splitter.py
9. Copy NON-HLOS.bin image from stock ROM to ROOTDIR directory. Rename NON-HLOS.bin to NON-HLOS-BASE.bin
10. Create file makeimg.sh into ROOTDIR directory and insert following content:
PHP:
cd `dirname $0`
ROOTDIR=$(pwd)
TMPDIR=mbn_images
rm -rf $ROOTDIR/$TMPDIR
mkdir -p $ROOTDIR/$TMPDIR
cd $ROOTDIR/$TMPDIR
MODEM_STK=$ROOTDIR/NON-HLOS-BASE.bin
MODEM_NEW=$ROOTDIR/NON-HLOS.bin
BUILD_ID=AAAAANAZ
IMAGE_DIR=$ROOTDIR/modem_proc/build/ms/bin/$BUILD_ID
python $ROOTDIR/pil-splitter.py $IMAGE_DIR/qdsp6sw.mbn modem
python $ROOTDIR/pil-splitter.py $IMAGE_DIR/mba.mbn mba
BUILD_ID=AAAAAAAA
IMAGE_DIR=$ROOTDIR/adsp_proc/build/ms/bin/$BUILD_ID
python $ROOTDIR/pil-splitter.py $IMAGE_DIR/dsp2.mbn adsp
BUILD_ID=8x26
IMAGE_DIR=$ROOTDIR/wcnss_proc/build/ms/bin/$BUILD_ID
python $ROOTDIR/pil-splitter.py $IMAGE_DIR/wcnss.mbn wcnss
MODEMVERSTR=`grep -aohPz "QC_IMAGE_VERSION_STRING=.*" ./modem.*`
MODEMVER=`echo $MODEMVERSTR | cut -d "=" -f 2`
echo $MODEMVER > $ROOTDIR/ver_info.txt
MODEM_VDISK=/media/vdisk
cp -f $MODEM_STK $MODEM_NEW
sudo mkdir -p $MODEM_VDISK
sudo mount -t vfat $MODEM_NEW -o rw,umask=0000,shortname=lower $MODEM_VDISK
rm -f $MODEM_VDISK/image/modem.*
rm -f $MODEM_VDISK/image/mba.*
rm -f $MODEM_VDISK/image/adsp.*
rm -f $MODEM_VDISK/image/wcnss.*
cp -f ./* $MODEM_VDISK/image/
rm -f $MODEM_VDISK/verinfo/ver_info.txt
mkdir -p $MODEM_VDISK/verinfo
cp -f $ROOTDIR/ver_info.txt $MODEM_VDISK/verinfo/
sudo umount $MODEM_NEW
cd $ROOTDIR
11. Run script makeimg.sh (result: NON-HLOS.bin)
12. New image NON-HLOS.bin should flash in the relevant section of eMMC.
My test result:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
BONUS
Qualcomm Developers Tools (2016)
QXDM 3.14.1144 (76 MB) (with license and patch)
After installation, you must do:
1) Copy qlms.txt to a directory %PUBLIC%\Documents\Qualcomm\QXDM
2) Replace QXDM.exe file to the patched version
QCAT 6.30.30 (140 MB) (with license and patch)
After installation, replace QCAT.exe to the patched version.
wow
you came back with another great thread :fingers-crossed:
thank you for sharing
i have a question
i still confused, where you got those files?
faizauthar12 said:
where you got those files?
Click to expand...
Click to collapse
Chinese Internet contains a lot of closed sources (qcom & MTK).
Sir, can I have source for msm8916 ?
Btw, greet guide sir
@bugerxXx
Check this thread. Post # 3.
Rename the file to .gz or .zip to get it to extract right.
https://forum.xda-developers.com/de...-rom-msm8909-service-rom-source-qpst-t3544178
Code-8916.gz is the link you are looking for.
Dont forget to hit the thanks button.
BigCountry907 said:
@bugerxXx
Check this thread. Post # 3.
Rename the file to .gz or .zip to get it to extract right.
https://forum.xda-developers.com/de...-rom-msm8909-service-rom-source-qpst-t3544178
Code-8916.gz is the link you are looking for.
Dont forget to hit the thanks button.
Click to expand...
Click to collapse
Thank you sir :highfive:
Sir, I need your help
How to solve this ?
Error : tools are untested for QuRT, please contact qurt.support
I'm try to build 8916 modem_proc
The method and instruction can be found here.
https://translate.google.com/transl.../2016/08/build-qualcomm-modem.html&edit-text=
The original page is in russian.
Use google translate.
http://syshwid.blogspot.com/2016/08/build-qualcomm-modem.html
You will need the untranslated page to see the "code" that is in code boxes.
And the translated page to read the instruction.
Dont forget to hit the thanks button.
This stuff is hard to find.
BigCountry907 said:
The method and instruction can be found here.
https://translate.google.com/transl.../2016/08/build-qualcomm-modem.html&edit-text=
The original page is in russian.
Use google translate.
http://syshwid.blogspot.com/2016/08/build-qualcomm-modem.html
You will need the untranslated page to see the "code" that is in code boxes.
And the translated page to read the instruction.
Dont forget to hit the thanks button.
This stuff is hard to find.
Click to expand...
Click to collapse
if the chip suports ,can we enable LTE using this?
redfeast said:
if the chip suports ,can we enable LTE using this?
Click to expand...
Click to collapse
I would lean more towards thinking that to enable LTE would require the driver to be included in the kernel.
Secondary to that some of the NV Items may need switched.
Install file: "/home/test/dev/qcom/msm8626/modem_proc/core/bsp/mba_img/build/AAAAANAZ/MBA_CORE_IMG_AAAAANAZQ.mbn" as "/home/test/dev/qcom/msm8626/modem_proc/core/bsp/mba_img/build/mba.mbn"
=== Generating mba/qdsp6/AAAAANAZ/MBA_CORE_IMG_AAAAANAZQ_wrap.elf
=== Generating mba/qdsp6/AAAAANAZ/MBA_CORE_IMG_AAAAANAZQ_wrap.elf
=== Generating mba/qdsp6/AAAAANAZ/MBA_CORE_IMG_AAAAANAZQ_wrap_reloc.elf
Install file: "/home/test/dev/qcom/msm8626/modem_proc/core/bsp/mba_img/build/AAAAANAZ/wp/MBA_CORE_IMG_AAAAANAZQ_wrap.elf" as "bin/AAAAANAZ/wp/mba.mbn"
Install file: "/home/test/dev/qcom/msm8626/modem_proc/core/bsp/mba_img/build/AAAAANAZ/MBA_CORE_IMG_AAAAANAZQ_wrap_reloc.elf" as "bin/AAAAANAZ/reloc/mba.mbn"
Install file: "/home/test/dev/qcom/msm8626/modem_proc/core/bsp/mba_img/build/AAAAANAZ/MBA_CORE_IMG_AAAAANAZQ_wrap.elf" as "bin/AAAAANAZ/mba.mbn"
scons: done building targets (errors occurred during build).
scons: *** Found dependency cycle(s):
Internal Error: no cycle found for node /home/test/dev/qcom/msm8626/modem_proc/core/bsp/devcfg_img/build/devcfg_img/qdsp6/AAAAANAZ/M8x26AAAAANAZQ00772_relocflags.elf (<SCons.Node.FS.File object at 0x14ece610>) in state pending
Internal Error: no cycle found for node /home/test/dev/qcom/msm8626/modem_proc/core/bsp/devcfg_img/build/devcfg_img/qdsp6/AAAAANAZ/M8x26AAAAANAZQ00772_reloc.elf (<SCons.Node.FS.File object at 0x14ecd960>) in state pending
Internal Error: no cycle found for node /home/test/dev/qcom/msm8626/modem_proc/core/bsp/devcfg_img/build/devcfg_img/qdsp6/AAAAANAZ/devcfg_def.h (<SCons.Node.FS.File object at 0x15aedf30>) in state pending
File "/usr/lib/scons/SCons/Taskmaster.py", line 1043, in cleanup
==============================================================================
SCons build summary
==============================================================================
** Build errors...
/home/test/dev/qcom/msm8626/modem_proc/build/bsp/modem_proc_img/build/AAAAANAZ/MODEM_PROC_IMG_AAAAANAZQ.elf failed: Error 126
** Build time...
Build start : Wed Jan 3 10:57:20 2018
Build end : Wed Jan 3 11:07:50 2018
Elapsed time : 0:10:30
/home/test/dev/qcom/msm8626/modem_proc/tools/build/scons/SCons/scons command returned error: 2
#-------------------------------------------------------------------------------
# BUILD END: AAAAANAZ
#-------------------------------------------------------------------------------
Build AAAAANAZ: Start Time: Wed Jan 3 10:57:20 2018, End Time: Wed Jan 3 11:07:52 2018
Build AAAAANAZ: Delta Time: 10 minutes, 31 seconds
#-------------------------------------------------------------------------------
Overall Start Time: Wed Jan 3 10:57:20 2018, Overall End Time: Wed Jan 3 11:07:52 2018
Overall Delta Time: 10 minutes, 31 seconds
#-------------------------------------------------------------------------------
Hi!
Thanks for these tools, Do you have the last version patched? QXDM 4.0? With 3.14.1144 version, some message shown "unknown" and I can read the information.
Thanks in advance!
Marco.
Update links in first post:
1) qcom_msm8x26_modem: magnet:?xt=urn:btih:61e8b8a520181ade801c251e5ec9352e33a7bb8c&dn=qcom_msm8x26_modem
2) qcom_msm8x26_vendor: magnet:?xt=urn:btih:313a2f9bc1f2b1fe3ad830e9dfbf4d4432fea384&dn=qcom_msm8x26_vendor
remittor said:
Update links in first post:
1) qcom_msm8x26_modem: magnet:?xt=urn:btih:61e8b8a520181ade801c251e5ec9352e33a7bb8c&dn=qcom_msm8x26_modem
2) qcom_msm8x26_vendor: magnet:?xt=urn:btih:313a2f9bc1f2b1fe3ad830e9dfbf4d4432fea384&dn=qcom_msm8x26_vendor
Click to expand...
Click to collapse
Thank you.
Big question about building a image. I know the plmn are in the image.im looking for a way to bypass the simlock check. I proven with a Dev build there are no plmn's and this in turn locks all sim cards. Even one's that should be carrier unlocked for the phone. If this can be accomplished we can just flash the modem.img to simunlock like back in the day.

[Guide] Enable Signature Spoofing on S7 Edge

**Root access required**
**Rom should be deodexed**
Download Tingle-Master
1. Install JDK & Python 3
2. Reboot PC
3. Extract framework.jar from system/framework and place it in the input directory. Double Click main.py
4. Take modded framework.jar from output directory and replace it with the one in your phone at system/framework
5. Reboot your phone.
6. Done
TheMaanda said:
**Root access required**
**Rom should be deodexed**
Download Tingle-Master
1. Install JDK & Python 3
2. Reboot PC
3. Extract framework.jar from system/framework and place it in the input directory. Double Click main.py
4. Take modded framework.jar from output directory and replace it with the one in your phone at system/framework
5. Reboot your phone.
6. Done
Click to expand...
Click to collapse
How do i go about deodexing android 5.1? I have a full firmware upgrade dump as well as the ability to unpack and edit the boot.img. my end goal is stock rom with microG compatability
Tried this under Ubuntu 18.04. Result:
Code:
$ python ./main.py
MENU
1 - Patch file from a device (adb)
2 - Patch file from the input folder
> 2
*** OS: Linux 4.15.0-58-generic (linux)
*** Mode: 2
*** Working dir: /tmp/Tingle-vl7r7T
*** Decompressing framework...
DEBUG: Decompressing framework.jar
*** Disassembling classes...
DEBUG: Disassembling framework/classes.dex
Exception in thread "main" org.jf.util.ExceptionWithContext: framework/classes.dex is not an apk, dex, odex or oat file.
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:186)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:78)
at org.jf.baksmali.main.main(main.java:292)
Traceback (most recent call last):
File "./main.py", line 404, in <module>
smali_folder, dex_filename, dex_filename_last = find_smali(smali_to_search, "framework/")
File "./main.py", line 346, in find_smali
disassemble(dir+filename, out_dir)
File "./main.py", line 315, in disassemble
subprocess.check_call(disass_cmd)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/java', '-jar', '$PROJECT_DIR$/tingle-master/tools/baksmali.jar', '-lsx', '-o./smali-classes/', 'framework/classes.dex']' returned non-zero exit status 1

[Guide] How to Unpack Or Repack Boot.img For Android [Don't Miss]

Hello!!!
Today i gonna show you How to unpack Or Repack any boot img on any android phone.
Requirements:
1. Busybox
2. Root Explorer
3. Material Terminal
4. Mk booting tools
5. Any file manager as you like best.
6. Brain.......
At first install all things that are say in requirement......
See this video for set tools & permission...
Video: How to Unpack Or Repack Boot.img
Link: Tap to play
Tools: Mk Booting tools
Link: Download
In material terminal typical words:
1. Su then enter.
2. cd data/local/tmp/ARM then press enter.
3. For Unpack type ./mkboot boot.img bootfolder
4. For Unpack ramdisk at first type cd bootfolder press enter and then type gunzip -dc ramdisk.gz | cpio -i and press enter.
5. At last For Repack Boot.img type ./mkboot bootfolder boot.img
Done √
Thanks for watching.
Follow us:
Web: www.Sudroid.cf
Wordpress: www.Su-droid.cf
Fb Group: SU Droid Community
Fb Page: SU Droid
Follow me on facebook: Md Jahid Hasan
To any help comment below on this video or ask our group..
Tutorial by: Md Jahid Hasan
Powered by: SU Droid
Yeasir-ya said:
Hello!!!
Today i gonna show you How to unpack Or Repack any boot img on any android phone.
Requirements:
1. Busybox
2. Root Explorer
3. Material Terminal
4. Mk booting tools
5. Any file manager as you like best.
6. Brain.......
At first install all things that are say in requirement......
See this video for set tools & permission...
Video: How to Unpack Or Repack Boot.img
Link: Tap to play
Tools: Mk Booting tools
Link: Download
In material terminal typical words:
1. Su then enter.
2. cd data/local/tmp/ARM then press enter.
3. For Unpack type ./mkboot boot.img bootfolder
4. For Unpack ramdisk at first type cd bootfolder press enter and then type gunzip -dc ramdisk.gz | cpio -i and press enter.
5. At last For Repack Boot.img type ./mkboot bootfolder boot.img
Done √
Thanks for watching.
Follow us:
Web: www.Sudroid.cf
Wordpress: www.Su-droid.cf
Fb Group: SU Droid Community
Fb Page: SU Droid
Follow me on facebook: Md Jahid Hasan
To any help comment below on this video or ask our group..
Tutorial by: Md Jahid Hasan
Powered by: SU Droid
Click to expand...
Click to collapse
Or someone can use any terminal emulator of their choice
Sent from my GT-S7580 using Tapatalk

[Tutorial] Android OTA payload dumper on Android

Introduction
This tutorial will teach you how to specifically extract the boot.img from your OTA/ROM's payload.bin on your Android device, rather than a computer.
In addition to this, you will also have the ability to access all other img files that are packaged with the payload.bin.
The boot partition contains a kernel image and a RAM disk combined via mkbootimg.
You would generally want to keep a copy of your current OTA/ROM's boot.img in the event that you want to recover your devices boot partition when you want to switch kernels, or repairing a corrupted device due to kernel/RAM disk issues.
Prerequisites
Termux Installed: Official Play Store Link | Official F-Droid Link
payload_dumper: Official GitHub Link
To get started
Code:
# Extract payload_dumper folder contents to: /storage/emulated/0/payload_dumper/
# Extract payload.bin from your OTA/ROM to: /storage/emulated/0/payload_dumper/
$ pkg install python -y
$ pip install --upgrade pip
$ apt update && apt upgrade -y
$ termux-setup-storage
# Allow Termux access photos, media and files on your device
$ cd storage/shared/payload_dumper
$ pip install -r requirements.txt
$ python payload_dumper.py payload.bin
# You will find the dumped payload in /storage/emulated/0/payload_dumper/output
Sources
https://explainshell.com/explain?cmd=sudo+apt-get+update+&&+sudo+apt-get+upgrade
https://github.com/python/cpython
https://packaging.python.org/tutorials/installing-packages/
https://github.com/vm03/payload_dumper
https://termux.com/
https://wiki.termux.com/wiki/Python
https://source.android.com/devices/bootloader/partitions-images
https://wiki.termux.com/wiki/Internal_and_external_storage
Nice!
I am getting the following error and I cannot figure out how to fix it:
Code:
Processing LOGO partitionTraceback (most recent call last):
File "payload_dumper.py", line 157, in <module>
dump_part(part)
File "payload_dumper.py", line 100, in dump_part
out_file = open('%s/%s.img' % (args.out, part.partition_name), 'wb')
FileNotFoundError: [Errno 2] No such file or directory: 'output/LOGO.img'
Thank you a lot Man!
This method working great with OnePlus 7 pro. Extracted system.img from Hydrogen, will try reflash it to Oxygen rom.
GuestK00376 said:
Introduction
This tutorial will teach you how to specifically extract the boot.img from your OTA/ROM's payload.bin on your Android device, rather than a computer.
In addition to this, you will also have the ability to access all other img files that are packaged with the payload.bin.
The boot partition contains a kernel image and a RAM disk combined via mkbootimg.
You would generally want to keep a copy of your current OTA/ROM's boot.img in the event that you want to recover your devices boot partition when you want to switch kernels, or repairing a corrupted device due to kernel/RAM disk issues.
Prerequisites
Termux Installed: Official Play Store Link | Official F-Droid Link
payload_dumper: Official GitHub Link
To get started
Code:
# Extract payload_dumper folder contents to: /storage/emulated/0/payload_dumper/
# Extract payload.bin from your OTA/ROM to: /storage/emulated/0/payload_dumper/
$ pkg install python -y
$ pip install --upgrade pip
$ apt update && apt upgrade -y
$ termux-setup-storage
# Allow Termux access photos, media a
[QUOTE="GuestK00376, post: 81933401"]
Introduction
This tutorial will teach you how to specifically extract the boot.img from your OTA/ROM's payload.bin on your Android device, rather than a computer.
In addition to this, you will also have the ability to access all other img files that are packaged with the payload.bin.
The boot partition contains a kernel image and a RAM disk combined via mkbootimg.
You would generally want to keep a copy of your current OTA/ROM's boot.img in the event that you want to recover your devices boot partition when you want to switch kernels, or repairing a corrupted device due to kernel/RAM disk issues.
Prerequisites
Termux Installed: Official Play Store Link | Official F-Droid Link
payload_dumper: Official GitHub Link
To get started
[CODE]# Extract payload_dumper folder contents to: /storage/emulated/0/payload_dumper/
# Extract payload.bin from your OTA/ROM to: /storage/emulated/0/payload_dumper/
$ pkg install python -y
$ pip install --upgrade pip
$ apt update && apt upgrade -y
$ termux-setup-storage
# Allow Termux access photos, media and files on your device
$ cd storage/shared/payload_dumper
$ pip install -r requirements.txt
$ python payload_dumper.py payload.bin
# You will find the dumped payload in /storage/emulated/0/payload_dumper/output
Sources
https://explainshell.com/explain?cmd=sudo+apt-get+update+&&+sudo+apt-get+upgrade
https://github.com/python/cpython
https://packaging.python.org/tutorials/installing-packages/
https://github.com/vm03/payload_dumper
https://termux.com/
https://wiki.termux.com/wiki/Python
https://source.android.com/devices/bootloader/partitions-images
https://wiki.termux.com/wiki/Internal_and_external_storage
Click to expand...
Click to collapse
nd files on your device
$ cd storage/shared/payload_dumper
$ pip install -r requirements.txt
$ python payload_dumper.py payload.bin
# You will find the dumped payload in /storage/emulated/0/payload_dumper/output[/CODE]
[/QUOTE]
Started with this "$ pkg install python -y" but installing process was ending with ... see my screen shot.
ltth said:
Started with this "$ pkg install python -y" but installing process was ending with ... see my screen shot.
Click to expand...
Click to collapse
Seems that the repo isn't hosted by bintray anymore: https://github.com/termux/science-packages/commit/6485c133c539ec20663cf5807a3d1e5db3c8e917
EDIT: I followed the instructions here to change the repo using the termux-change-repo command.
I'm getting the following
cd: storage/shared/payload_dumper: Permission denied
even when no permissions denied on both termux and ternux api.
What am I doing wrong?
Onrplus 9 pro
hello guys, how to downgrade python, what command?
psychoela said:
View attachment 5508737hello guys, how to downgrade python, what command?
Click to expand...
Click to collapse
Download python 3.7
Had the same error
trying to extract boot.img from a rom, getting the following error...
" MutableMapping = collections.MutableMapping
AttributeError: module 'collections' has no attribute 'MutableMapping' "
any way to fix?
Does this still work
SidneyD said:
Seems that the repo isn't hosted by bintray anymore: https://github.com/termux/science-packages/commit/6485c133c539ec20663cf5807a3d1e5db3c8e917
EDIT: I followed the instructions here to change the repo using the termux-change-repo command.
Click to expand...
Click to collapse
Can you share your steps please
This doesn't work!!
Edit:
This working fine. Just figured out the play Store version of termux is outdated.
This is still working as of Jan 2023. A couple of changes need to be made.
- download Termux from F-droid servers instead.
- install openssl-tool in termux (type openssl and follow instructions)
I was able to extract the payload easily.

[SCRIPT] TWRP device tree generator

Create a TWRP-compatible device tree only from an Android recovery image (or a boot image if the device uses non-dynamic partitions A/B) of your device's stock ROM.
It has been confirmed that this script supports images built starting from Android 4.4 up to Android 12
Installation
Bash:
pip3 install twrpdtgen
The module is supported on Python 3.6 and above.
Linux only: Be sure to have cpio installed in your system (Install cpio using sudo apt install cpio or sudo pacman -S cpio based on what package manager you're using)
Bash:
$ python3 -m twrpdtgen -h
TWRP device tree generator
usage: python3 -m twrpdtgen [-h] [-o OUTPUT] [-k] [--no-git] [--huawei] [--recovery_kernel RECOVERY_KERNEL] [--recovery_ramdisk RECOVERY_RAMDISK]
[--recovery_vendor RECOVERY_VENDOR] [-v]
[recovery_image]
positional arguments:
recovery_image path to a recovery image (or boot image if the device is A/B)
optional arguments:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
custom output folder
-k, --keep-aik keep AIK after the generation
--no-git don't create a git repo after the generation
--huawei Huawei mode (split kernel, ramdisk and vendor)
--recovery_kernel RECOVERY_KERNEL
path to a recovery_kernel file (huawei mode only)
--recovery_ramdisk RECOVERY_RAMDISK
path to a recovery_ramdisk file (huawei mode only)
--recovery_vendor RECOVERY_VENDOR
path to a recovery_vendor file (huawei mode only)
-v, --verbose enable debugging logging
When an image is provided, if everything goes well, there will be a device tree at
Bash:
output/manufacturer/codename
You can find the script source code here: https://github.com/SebaUbuntu/TWRP-device-tree-generator
reserved
Deleted
Noiceee
Hi, trying to use this but I get error Arch not supported on my poco f2 pro. Any idea?
Amazing work, this tool useful for create basic configuration for recovery:good:
Nice work!
but the descriptions says samsung odin tar support.
script accepts only .img files.
Hello Everyone and @SebaUbuntu. How do you think we can extract and make appended DTBs? Most new devices do not make use of a DT.img anymore. Even though the script doesn't support this, I want to do it by hand manually using a recovery.img But how?
---------- Post added at 08:43 AM ---------- Previous post was at 08:41 AM ----------
itzik16 said:
Nice work!
but the descriptions says samsung odin tar support.
script accepts only .img files.
Click to expand...
Click to collapse
do not worry, just rename the .tar.md5 to .tar and extract the recovery image from inside it to use in the script. Easy
NullCode said:
Hello Everyone and @SebaUbuntu. How do you think we can extract and make appended DTBs? Most new devices do not make use of a DT.img anymore. Even though the script doesn't support this, I want to do it by hand manually using a recovery.img But how?
---------- Post added at 08:43 AM ---------- Previous post was at 08:41 AM ----------
do not worry, just rename the .tar.md5 to .tar and extract the recovery image from inside it to use in the script. Easy
Click to expand...
Click to collapse
TWRP supports dt.img, there's no need to append it
Hey there, @SebaUbuntu, I tried to use your latest script as python. I see you use AIK to unpack recovery.img. But it cant unpack my recovery.img and says my image is in unsupported format. But my recovery.img isn't corrupted. And if I clone AIK myself w/o the script, It does unpack my recovery.img successfully. So what is the problem?
Royna said:
Hey there, @SebaUbuntu, I tried to use your latest script as python. I see you use AIK to unpack recovery.img. But it cant unpack my recovery.img and says my image is in unsupported format. But my recovery.img isn't corrupted. And if I clone AIK myself w/o the script, It does unpack my recovery.img successfully. So what is the problem?
Click to expand...
Click to collapse
I think you should remove the generator and clone it again. Because with my recovery images it works perfectly [or remove the aik folder from where it is in the tree gen with your own one]
---------- Post added at 03:40 AM ---------- Previous post was at 03:35 AM ----------
SebaUbuntu said:
TWRP supports dt.img, there's no need to append it
Click to expand...
Click to collapse
thanks a lot for clearing it up!
@SebaUbuntu, is this script not supported in macOS Big Sur (The lastest beta ver.)? Installed the python module using the guide on your Github wiki. Run
Code:
python -m twrpdtgen /Users/roynatech/Desktop/recovery.img
with the terminal pointing at the root of cloned script.
Output:
Code:
TWRP device tree generator
Python Edition
Version 1.0.0
Cloning AIK...
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/roynatech/Downloads/TWRP-device-tree-generator/twrpdtgen/__main__.py", line 6, in <module>
main()
File "/Users/roynatech/Downloads/TWRP-device-tree-generator/twrpdtgen/twrp_dt_gen.py", line 53, in main
aik_ramdisk_path, aik_images_path = aik.extract_recovery(recovery_image)
File "/Users/roynatech/Downloads/TWRP-device-tree-generator/twrpdtgen/aik_manager.py", line 59, in extract_recovery
copyfile(recovery_image, new_recovery_image)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/roynatech/Downloads/TWRP-device-tree-generator/extract/recovery.img'
What's wrong here?
I also had the same error, can anyone help me? I'm using Windows 10 and trying to create my Nokia device tree!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
hey i am trying this out but i got this error
Error: Please clone the script with Git instead of downloading it as a zip
i cloned the repo but it still says this
[INFO] Cloning AIK...
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/data/data/com.termux/files/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/__main__.py", line 28, in <module>
dt = generate_device_tree(args.recovery_image, args.output, no_git=args.no_git, keep_aik=args.keep_aik)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/twrp_dt_gen.py", line 30, in generate_device_tree
aik.extract(recovery_image)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/utils/aik_manager.py", line 64, in extract
self.get_image_infos()
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/utils/aik_manager.py", line 79, in get_image_infos
self.base_address = self.read_recovery_file(self.get_extracted_info("base"))
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/utils/aik_manager.py", line 108, in read_recovery_file
return file.read_text().splitlines()[0]
File "/data/data/com.termux/files/usr/lib/python3.9/pathlib.py", line 1255, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "/data/data/com.termux/files/usr/lib/python3.9/pathlib.py", line 1241, in open
return io.open(self, mode, buffering, encoding, errors, newline,
File "/data/data/com.termux/files/usr/lib/python3.9/pathlib.py", line 1109, in _opener
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/data/data/com.termux/files/usr/tmp/tmpkxqc0gaz/split_img/recovery.img-base'
Can anyone explain the situation here?
Hi. Can anyone give me the steps to get this running in Minimal ADB on windows? Or do I have to use linux? Treat me like a 5 year old. I'm trying to learn. Haven't been able to figure out how to use this on Kali Linux.
braveone1 said:
[INFO] Cloning AIK...
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/data/data/com.termux/files/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/__main__.py", line 28, in <module>
dt = generate_device_tree(args.recovery_image, args.output, no_git=args.no_git, keep_aik=args.keep_aik)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/twrp_dt_gen.py", line 30, in generate_device_tree
aik.extract(recovery_image)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/utils/aik_manager.py", line 64, in extract
self.get_image_infos()
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/utils/aik_manager.py", line 79, in get_image_infos
self.base_address = self.read_recovery_file(self.get_extracted_info("base"))
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/twrpdtgen/utils/aik_manager.py", line 108, in read_recovery_file
return file.read_text().splitlines()[0]
File "/data/data/com.termux/files/usr/lib/python3.9/pathlib.py", line 1255, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "/data/data/com.termux/files/usr/lib/python3.9/pathlib.py", line 1241, in open
return io.open(self, mode, buffering, encoding, errors, newline,
File "/data/data/com.termux/files/usr/lib/python3.9/pathlib.py", line 1109, in _opener
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/data/data/com.termux/files/usr/tmp/tmpkxqc0gaz/split_img/recovery.img-base'
Can anyone explain the situation here?
Click to expand...
Click to collapse
Similar problem here.
Code:
TWRP device tree generator
Version 1.2.6
[INFO] Cloning AIK...
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/marty/.local/lib/python3.8/site-packages/twrpdtgen/__main__.py", line 52, in <module>
dt = DeviceTree(args.output, recovery_image=args.recovery_image,
File "/home/marty/.local/lib/python3.8/site-packages/twrpdtgen/device_tree.py", line 49, in __init__
aik.extract(recovery_image)
File "/home/marty/.local/lib/python3.8/site-packages/twrpdtgen/utils/aik_manager.py", line 79, in extract
raise RuntimeError(f"AIK extraction failed, return code {returncode}")
RuntimeError: AIK extraction failed, return code 1
Normally the image presented in case of Samsung device should be bootimage right, instead of recoveryimage?
how to update twrpdtgen?
I got:
Code:
[WARNING] Platform prop not found! Defaulting to "default"
How can I do a " Platform prop"?

Categories

Resources