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

Search This thread

remittor

Member
Jul 19, 2015
30
61
Moscow
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:
modem_jsr_speedtest_01.png
 
Last edited:

remittor

Member
Jul 19, 2015
30
61
Moscow
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.
 
Last edited:
  • Like
Reactions: faizauthar12

BigCountry907

Senior Member
Oct 15, 2015
508
682

redfeast

Senior Member
Feb 19, 2015
271
105
hyderabad
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.

if the chip suports ,can we enable LTE using this?
 

ahwei

New member
May 17, 2008
1
1
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
#-------------------------------------------------------------------------------
 
  • Like
Reactions: bd467913

mfavilac

New member
Apr 14, 2018
1
0
Lima
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.
 

remittor

Member
Jul 19, 2015
30
61
Moscow
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
 
Last edited:

Ju5t3nC4s3

Senior Member
Dec 29, 2007
284
1
138
t.me
Xiaomi Poco F1
OnePlus 7 Pro
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.
 

jurek23452

Member
Feb 1, 2017
8
1
Hello, I'm trying to build msm8916 modem for Lenovo A6000 using this guide http://syshwid.blogspot.com/2016/08/build-qualcomm-modem.html
Image variant is EAAAANUZ and Entry point is 0x86800000.
I compiled it and it runs on phone, but phone is not trying to connect to network.
Phone has imei number and is detecting sim card, but it doesn't try to connect to network, I dont see any packets in diag. Anybody here compiled modem for msm8916 or have similar issue?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    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:
    modem_jsr_speedtest_01.png
    3
    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.
    2
    where you got those files?
    Chinese Internet contains a lot of closed sources (qcom & MTK).
    2
    @bugerxXx
    Check this thread. Post # 3.
    Rename the file to .gz or .zip to get it to extract right.

    https://xdaforums.com/desire-526/orig-development/wip-rom-msm8909-service-rom-source-qpst-t3544178

    Code-8916.gz is the link you are looking for.

    Dont forget to hit the thanks button.
    2
    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