FORUMS
Remove All Ads from XDA

Sonim XP8 (Root?)

25 posts
Thanks Meter: 2
 
By ctradio, Junior Member on 7th October 2018, 02:36 AM
Post Reply Email Thread
24th November 2019, 05:58 AM |#121  
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by uberdude420

ok c:\flashtools>fh_loader.exe --port=\\.\COM11 --sendxml=xmlfile.xml --lun=0 --memoryname=emmc --noprompt --reset

Base Version: 17.07.28.15.44
Binary build date: Jul 28 2017 @ 18:08:54
Incremental Build version: 17.07.28.18.08.54

20:19:38: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
fh_loader.exe --port=\\.\COM11 --sendxml=xmlfile.xml --lun=0 --memoryname=emmc --noprompt --reset
************************************************

20:19:38: INFO: Current working dir (cwd): c:\flashtools\
20:19:38: INFO: Showing network mappings to allow debugging
20:19:38: INFO:



20:19:38: INFO: Trying to store 'xmlfile.xml' in string table
20:19:38: INFO: Looking for file 'xmlfile.xml'
20:19:38: INFO: User wants to talk to port '\\.\COM11'
20:19:38: INFO: Took 0.00000000 seconds to open port
20:19:38: INFO: Sorting TAGS to ensure order is <configure>,<erase>, others, <patch>,<power>
20:19:38: INFO: If you don't want this, use --dontsorttags

20:19:38: INFO: Sending <configure>

20:19:38: INFO: TARGET SAID: 'Binary build date: Aug 6 2018 @ 20:55:38'

20:19:38: INFO: TARGET SAID: 'Chip serial num: 0 (0x0)'

20:19:38: INFO: TARGET SAID: 'Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase peek poke '

20:19:38: INFO: TARGET SAID: 'Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1''
20:19:38: INFO: fh.attrs.MaxPayloadSizeToTargetInBytes = 1048576
20:19:38: INFO: fh.attrs.MaxPayloadSizeToTargetInBytesSupported = 1048576
20:19:38: INFO: In handleProgram('boot_b.img')
20:19:38: INFO: Looking for file 'boot_b.img'
20:19:38: INFO: ================================================== =====
20:19:38: INFO: {<program> FILE: 'boot_b.img'}
20:19:38: INFO: {<program> (64.00 MB) 131072 sectors needed at location 393216 on LUN 0}
20:19:38: INFO: ================================================== =====


20:19:38: INFO: TARGET SAID: 'start 393216, num 131072'

20:19:40: INFO: Overall to target 2.016 seconds (29.27 MBps)
20:19:40: INFO: Overall to target 2.219 seconds (28.84 MBps)

20:19:40: INFO: TARGET SAID: 'Finished programming start_sector 524288 and TotalSectorsToProgram 131072'
20:19:40: INFO:
20:19:40: INFO: ================================================== =====
20:19:40: INFO: ==================== {SUCCESS} ========================
20:19:40: INFO: ================================================== =====


20:19:40: INFO: Sending <power>

20:19:40: INFO: TARGET SAID: 'Inside handlePower() - Requested POWER_RESET'

20:19:40: INFO: TARGET SAID: 'Issuing bsp_target_reset() after 10 seconds, if this hangs, do you have WATCHDOG enabled?'
20:19:40: INFO: ================================================== ============
20:19:40: INFO: Files used and their paths
20:19:40: INFO: 1 'c:\flashtools\port_trace.txt'
20:19:40: INFO: 2 'c:\flashtools\xmlfile.xml'
20:19:40: INFO: 3 'c:\flashtools\boot_b.img'

20:19:40: INFO: _ (done)
20:19:40: INFO: | |
20:19:40: INFO: __| | ___ _ __ ___
20:19:40: INFO: / _` |/ _ \| '_ \ / _ \
20:19:40: INFO: | (_| | (_) | | | | __/
20:19:40: INFO: \__,_|\___/|_| |_|\___|
20:19:40: INFO: {All Finished Successfully}

20:19:40: INFO: Overall to target 2.453 seconds (26.09 MBps)

Writing log to 'c:\flashtools\port_trace.txt', might take a minute


Log is 'c:\flashtools\port_trace.txt'


c:\flashtools>


that from re flashing from this xml

<?xml version="1.0"?>
<data>
<program filename="boot_b.img" label="boot_b" num_partition_sectors="131072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" sparse="false" start_sector="393216" file_sector_offset="0" SECTOR_SIZE_IN_BYTES="512"/>

</data>


i re downloaded the boot. re patched it from the already installed magisk and re downloaded it to flash thru the terminal wich showed success above.... still no root ;| i had to install magisk from in android aswell.. the adb returned me an invalid apk but it installed in android

That looks like we re-flashed the original boot_b?
24th November 2019, 06:02 AM |#122  
Junior Member
Thanks Meter: 0
 
More
actually just seen that and re did with

<?xml version="1.0"?>
<data>
<program start_sector="262144" sparse="false" readbackverify="false" physical_partition_number="0" partofsingleimage="false" num_partition_sectors="131072" label="boot_b" filename="magisk_patched.img" file_sector_offset="0" SECTOR_SIZE_IN_BYTES="512"/>
</data>


succeeded.... still no root :/ lol

c:\flashtools>fh_loader.exe --port=\\.\COM11 --sendxml=xmlfile1.xml --lun=0 --memoryname=emmc --noprompt --reset

Base Version: 17.07.28.15.44
Binary build date: Jul 28 2017 @ 18:08:54
Incremental Build version: 17.07.28.18.08.54

20:58:16: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
fh_loader.exe --port=\\.\COM11 --sendxml=xmlfile1.xml --lun=0 --memoryname=emmc --noprompt --reset
************************************************

20:58:16: INFO: Current working dir (cwd): c:\flashtools\
20:58:16: INFO: Showing network mappings to allow debugging
20:58:16: INFO:



20:58:16: INFO: Trying to store 'xmlfile1.xml' in string table
20:58:16: INFO: Looking for file 'xmlfile1.xml'
20:58:16: INFO: User wants to talk to port '\\.\COM11'
20:58:16: INFO: Took 0.00000000 seconds to open port
20:58:16: INFO: Sorting TAGS to ensure order is <configure>,<erase>, others, <patch>,<power>
20:58:16: INFO: If you don't want this, use --dontsorttags

20:58:16: INFO: Sending <configure>

20:58:16: INFO: TARGET SAID: 'Binary build date: Aug 6 2018 @ 20:55:38'

20:58:16: INFO: TARGET SAID: 'Chip serial num: 0 (0x0)'

20:58:16: INFO: TARGET SAID: 'Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase peek poke '

20:58:16: INFO: TARGET SAID: 'Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1''
20:58:16: INFO: fh.attrs.MaxPayloadSizeToTargetInBytes = 1048576
20:58:16: INFO: fh.attrs.MaxPayloadSizeToTargetInBytesSupported = 1048576
20:58:16: INFO: In handleProgram('magisk_patched.img')
20:58:16: INFO: Looking for file 'magisk_patched.img'
20:58:16: INFO: ================================================== =====
20:58:16: INFO: {<program> FILE: 'magisk_patched.img'}
20:58:16: INFO: {<program> (47.31 MB) 96883 sectors needed at location 262144 on LUN 0}
20:58:16: INFO: ================================================== =====


20:58:16: INFO: TARGET SAID: 'start 262144, num 96883'

20:58:18: INFO: Overall to target 2.031 seconds (19.20 MBps)
20:58:18: INFO: Overall to target 2.531 seconds (18.69 MBps)

20:58:18: INFO: TARGET SAID: 'Finished programming start_sector 359027 and TotalSectorsToProgram 96883'
20:58:18: INFO:
20:58:18: INFO: ================================================== =====
20:58:18: INFO: ==================== {SUCCESS} ========================
20:58:18: INFO: ================================================== =====


20:58:18: INFO: Sending <power>

20:58:18: INFO: TARGET SAID: 'Inside handlePower() - Requested POWER_RESET'

20:58:18: INFO: TARGET SAID: 'Issuing bsp_target_reset() after 10 seconds, if this hangs, do you have WATCHDOG enabled?'
20:58:18: INFO: ================================================== ============
20:58:18: INFO: Files used and their paths
20:58:18: INFO: 1 'c:\flashtools\port_trace.txt'
20:58:18: INFO: 2 'c:\flashtools\xmlfile1.xml'
20:58:18: INFO: 3 'c:\flashtools\magisk_patched.img'

20:58:18: INFO: _ (done)
20:58:18: INFO: | |
20:58:18: INFO: __| | ___ _ __ ___
20:58:18: INFO: / _` |/ _ \| '_ \ / _ \
20:58:18: INFO: | (_| | (_) | | | | __/
20:58:18: INFO: \__,_|\___/|_| |_|\___|
20:58:18: INFO: {All Finished Successfully}

20:58:18: INFO: Overall to target 2.750 seconds (17.20 MBps)

Writing log to 'c:\flashtools\port_trace.txt', might take a minute


Log is 'c:\flashtools\port_trace.txt'


c:\flashtools>
24th November 2019, 10:13 PM |#123  
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by uberdude420

actually just seen that and re did with

<?xml version="1.0"?>
<data>
<program start_sector="262144" sparse="false" readbackverify="false" physical_partition_number="0" partofsingleimage="false" num_partition_sectors="131072" label="boot_b" filename="magisk_patched.img" file_sector_offset="0" SECTOR_SIZE_IN_BYTES="512"/>
</data>


succeeded.... still no root :/ lol

c:\flashtools>fh_loader.exe --port=\\.\COM11 --sendxml=xmlfile1.xml --lun=0 --memoryname=emmc --noprompt --reset

Base Version: 17.07.28.15.44
Binary build date: Jul 28 2017 @ 18:08:54
Incremental Build version: 17.07.28.18.08.54

20:58:16: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
fh_loader.exe --port=\\.\COM11 --sendxml=xmlfile1.xml --lun=0 --memoryname=emmc --noprompt --reset
************************************************

20:58:16: INFO: Current working dir (cwd): c:\flashtools\
20:58:16: INFO: Showing network mappings to allow debugging
20:58:16: INFO:



20:58:16: INFO: Trying to store 'xmlfile1.xml' in string table
20:58:16: INFO: Looking for file 'xmlfile1.xml'
20:58:16: INFO: User wants to talk to port '\\.\COM11'
20:58:16: INFO: Took 0.00000000 seconds to open port
20:58:16: INFO: Sorting TAGS to ensure order is <configure>,<erase>, others, <patch>,<power>
20:58:16: INFO: If you don't want this, use --dontsorttags

20:58:16: INFO: Sending <configure>

20:58:16: INFO: TARGET SAID: 'Binary build date: Aug 6 2018 @ 20:55:38'

20:58:16: INFO: TARGET SAID: 'Chip serial num: 0 (0x0)'

20:58:16: INFO: TARGET SAID: 'Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase peek poke '

20:58:16: INFO: TARGET SAID: 'Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1''
20:58:16: INFO: fh.attrs.MaxPayloadSizeToTargetInBytes = 1048576
20:58:16: INFO: fh.attrs.MaxPayloadSizeToTargetInBytesSupported = 1048576
20:58:16: INFO: In handleProgram('magisk_patched.img')
20:58:16: INFO: Looking for file 'magisk_patched.img'
20:58:16: INFO: ================================================== =====
20:58:16: INFO: {<program> FILE: 'magisk_patched.img'}
20:58:16: INFO: {<program> (47.31 MB) 96883 sectors needed at location 262144 on LUN 0}
20:58:16: INFO: ================================================== =====


20:58:16: INFO: TARGET SAID: 'start 262144, num 96883'

20:58:18: INFO: Overall to target 2.031 seconds (19.20 MBps)
20:58:18: INFO: Overall to target 2.531 seconds (18.69 MBps)

20:58:18: INFO: TARGET SAID: 'Finished programming start_sector 359027 and TotalSectorsToProgram 96883'
20:58:18: INFO:
20:58:18: INFO: ================================================== =====
20:58:18: INFO: ==================== {SUCCESS} ========================
20:58:18: INFO: ================================================== =====


20:58:18: INFO: Sending <power>

20:58:18: INFO: TARGET SAID: 'Inside handlePower() - Requested POWER_RESET'

20:58:18: INFO: TARGET SAID: 'Issuing bsp_target_reset() after 10 seconds, if this hangs, do you have WATCHDOG enabled?'
20:58:18: INFO: ================================================== ============
20:58:18: INFO: Files used and their paths
20:58:18: INFO: 1 'c:\flashtools\port_trace.txt'
20:58:18: INFO: 2 'c:\flashtools\xmlfile1.xml'
20:58:18: INFO: 3 'c:\flashtools\magisk_patched.img'

20:58:18: INFO: _ (done)
20:58:18: INFO: | |
20:58:18: INFO: __| | ___ _ __ ___
20:58:18: INFO: / _` |/ _ \| '_ \ / _ \
20:58:18: INFO: | (_| | (_) | | | | __/
20:58:18: INFO: \__,_|\___/|_| |_|\___|
20:58:18: INFO: {All Finished Successfully}

20:58:18: INFO: Overall to target 2.750 seconds (17.20 MBps)

Writing log to 'c:\flashtools\port_trace.txt', might take a minute


Log is 'c:\flashtools\port_trace.txt'


c:\flashtools>

I thought we had validated the Telus images. Or we did have 1 success reported however I'm not sure what build version the guy was running.

This seems to be an issue on the return side. If Telus used a different GPT layout for example then Magisk manager would fail patching - so we know it's a valid image at least.

We can try to erase boot_a & boot_b before flash back. If that fails I would probably ask if you could send over an image backup for testing.

Code:
<?xml version="1.0"?>
<data>
<erase SECTOR_SIZE_IN_BYTES="512" num_partition_sectors="131072" start_sector="262144" physical_partition_number="0" label="boot_a"/>
<erase SECTOR_SIZE_IN_BYTES="512" num_partition_sectors="131072" start_sector="393216" physical_partition_number="0" label="boot_b"/>
</data>
25th November 2019, 01:21 AM |#124  
Member
Thanks Meter: 29
 
More
Quote:
Originally Posted by smokeyou

I thought we had validated the Telus images. Or we did have 1 success reported however I'm not sure what build version the guy was running.

This seems to be an issue on the return side. If Telus used a different GPT layout for example then Magisk manager would fail patching - so we know it's a valid image at least.

We can try to erase boot_a & boot_b before flash back. If that fails I would probably ask if you could send over an image backup for testing.

Code:
<?xml version="1.0"?>
<data>
<erase SECTOR_SIZE_IN_BYTES="512" num_partition_sectors="131072" start_sector="262144" physical_partition_number="0" label="boot_a"/>
<erase SECTOR_SIZE_IN_BYTES="512" num_partition_sectors="131072" start_sector="393216" physical_partition_number="0" label="boot_b"/>
</data>

No XP5S Debug Images? XP8 battery baffle is too broken
25th November 2019, 03:40 AM |#125  
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by eleotk

No XP5S Debug Images? XP8 battery baffle is too broken

I have not seen any debug images for the XP5s myself. Magisk patching works for a root option but that's all I have found so far.
26th November 2019, 04:04 AM |#126  
Member
Thanks Meter: 2
 
More
@smokeyou, thank you for sharing AT&T android 8.1.0 userdebug build. I have my phone now flashed with AT&T 7.1.1 userdebug build and testing it. Android 8.1.0 gave me alot of grieve, since many customizations I got used to don't work anymore and developers don;t have any desire to port them to Oreo.

-albertr
26th November 2019, 01:40 PM |#127  
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by albert.r

@smokeyou, thank you for sharing AT&T android 8.1.0 userdebug build. I have my phone now flashed with AT&T 7.1.1 userdebug build and testing it. Android 8.1.0 gave me alot of grieve, since many customizations I got used to don't work anymore and developers don;t have any desire to port them to Oreo.

-albertr

There we go!! I haven't done much testing on that early AT&T image so this is good news.

I wont try to talk you out of running on such an old security patch level . It's good that your making a contentious decision between vulnerabilities and customization even if not recommended.
26th November 2019, 06:15 PM |#128  
Member
Thanks Meter: 2
 
More
So what would be a "good" way to install SuperSU on top of userdebug build?

Should I use magisk to massage the boot image and then flash it back via fastboot?

adb reboot bootloader
fastboot flash boot magisk_patched.img
fastboot reboot

I'm on 7.1.1, so I don't think I have dual boot partitions...

-albertr
26th November 2019, 11:17 PM |#129  
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by albert.r

So what would be a "good" way to install SuperSU on top of userdebug build?

Should I use magisk to massage the boot image and then flash it back via fastboot?

adb reboot bootloader
fastboot flash boot magisk_patched.img
fastboot reboot

I'm on 7.1.1, so I don't think I have dual boot partitions...

-albertr


The tested way is essentially the same as applying magisk to a standard user image. It feels like we would give up main the benefits of having userdebug though because userdebug contains native su binaries tied to adb root.

Fastboot may work also if your unlocked. I personally had mixed results where some would flash and some would fail. You can also move back to a user build and retain the unlock.
27th November 2019, 08:40 AM |#130  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by smokeyou

I thought we had validated the Telus images. Or we did have 1 success reported however I'm not sure what build version the guy was running.

This seems to be an issue on the return side. If Telus used a different GPT layout for example then Magisk manager would fail patching - so we know it's a valid image at least.

We can try to erase boot_a & boot_b before flash back. If that fails I would probably ask if you could send over an image backup for testing.

Code:
<?xml version="1.0"?>
<data>
<erase SECTOR_SIZE_IN_BYTES="512" num_partition_sectors="131072" start_sector="262144" physical_partition_number="0" label="boot_a"/>
<erase SECTOR_SIZE_IN_BYTES="512" num_partition_sectors="131072" start_sector="393216" physical_partition_number="0" label="boot_b"/>
</data>




well it flashed.... but.......
now i seem to be hanging on loading the firehose to re install boots :/ c:\flashtools>QSaharaServer.exe -p \\.\COM11 -s 13rog_emmc_ufs_firehose_Sdm660_ddr.elf
Binary build date: Jul 28 2017 @ 18:09:01
QSAHARASERVER CALLED LIKE THIS: 'QSaharaServer.ex'Current working dir: c:\flashtools
Sahara mappings:
2: amss.mbn
6: apps.mbn
8: dsp1.mbn
10: dbl.mbn
11: osbl.mbn
12: dsp2.mbn
16: efs1.mbn
17: efs2.mbn
20: efs3.mbn
21: sbl1.mbn
22: sbl2.mbn
23: rpm.mbn
25: tz.mbn
28: dsp3.mbn
29: acdb.mbn
30: wdt.mbn
31: mba.mbn
13: prog_emmc_ufs_firehose_Sdm660_ddr.elf

23:45:22: ERROR: function: sahara_rx_data:237 Unable to read packet header. Only read 0 bytes.

23:45:22: ERROR: function: sahara_main:924 Sahara protocol error

23:45:22: ERROR: function: main:303 Uploading Image using Sahara protocol failed




no boot

edit

i got it restored from my origonal full backup... should i send you that? if so wich img files are needed or do you need my whole backup folder zipped?

also i tried flashing the magisk boot. one at a time on each partition... both times i came up un able to boot with a boot warning of system being corrupted and nothing passed it.
27th November 2019, 10:27 PM |#131  
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by uberdude420

well it flashed.... but.......
now i seem to be hanging on loading the firehose to re install boots :/ c:\flashtools>QSaharaServer.exe -p \\.\COM11 -s 13rog_emmc_ufs_firehose_Sdm660_ddr.elf
Binary build date: Jul 28 2017 @ 18:09:01
QSAHARASERVER CALLED LIKE THIS: 'QSaharaServer.ex'Current working dir: c:\flashtools
Sahara mappings:
2: amss.mbn
6: apps.mbn
8: dsp1.mbn
10: dbl.mbn
11: osbl.mbn
12: dsp2.mbn
16: efs1.mbn
17: efs2.mbn
20: efs3.mbn
21: sbl1.mbn
22: sbl2.mbn
23: rpm.mbn
25: tz.mbn
28: dsp3.mbn
29: acdb.mbn
30: wdt.mbn
31: mba.mbn
13: prog_emmc_ufs_firehose_Sdm660_ddr.elf

23:45:22: ERROR: function: sahara_rx_data:237 Unable to read packet header. Only read 0 bytes.

23:45:22: ERROR: function: sahara_main:924 Sahara protocol error

23:45:22: ERROR: function: main:303 Uploading Image using Sahara protocol failed




no boot

edit

i got it restored from my origonal full backup... should i send you that? if so wich img files are needed or do you need my whole backup folder zipped?

also i tried flashing the magisk boot. one at a time on each partition... both times i came up un able to boot with a boot warning of system being corrupted and nothing passed it.

Pretty much everything aside from userdata. The files produced are large as they include all free space however they should zip up to a fairly reasonable size.

Typically we would provide all XML's in a single command or incrementally without rebooting until all actions are complete. For example "--sendxml=erase.xml,rawprogram0.xml".

Generally speaking it's not a good idea to leave EDL without having all critical partitions populated. I'm glad we were able to restore!!
Post Reply Subscribe to Thread

Tags
sonim-xp8

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes