[Change CID and MID][S-ON]An interesting way to modify cid and mid on s-on devices

handsome_hell

Senior Member
Jun 18, 2017
88
20
0
Guang dong
WARINING!!!!
Flashing TWRP before doing anything, or you may lose your phone!
And NEVER flash ENTIRE SDE and SDF parititions from OTHER phone!
------------------------------------
In sdf1, there are some information after the IMEI2
After I bricked my phone, I think these information is unlock code
------------------------------------
Hello guys!
After the last time I successfully downgraded by modifying /dev/sde1, I tried to modify cid and mid in the same way. I successfully done this today, but I encountered some problems while flashing the RUU pack.
FAILED 14 android_info.txt missing or malformed
It seems that HTC has some cryptographic verifications for this, so I cannot modify everything.
The following is the method of modification. I hope people who are familiar with these can find things that I didn’t notice.
-------------------------------------
Changing mid:
1.Get image of sdf2 partition by
dd if=/dev/block/sdf2 of=/sdcard/sdf2.img
and then pull it to your computer by
adb pull /sdcard/sdf2.img
2.Open the image file by hex editor, find the mid of your phone. For me, it is
2.Q.4.D.2.0.0.0.0
change it to the mid you want.
3.Push the image back to your phone by
adb push ./sdf2.img /sdcard/sdf2.img
the flash it back to the sdf2 partition by
dd if=/sdcard/sdf2.img of=/dev/block/sdf2
4.Done. You can check it by
fastboot getvar mid
-------------------------------------
Changing cid:
1.Get image of sdf1 partition by
dd if=/dev/block/sdf1 of=/sdcard/sdf1.img
and then pull it to your computer by
adb pull /sdcard/sdf1.img
2.Open the image file by text editor, find the cid of your phone. For me, it is
change it to the cid you want.
3.Push the image back to your phone by
adb push ./sdf1.img /sdcard/sdf1.img
the flash it back to the sdf1 partition by
dd if=/sdcard/sdf1.img of=/dev/block/sdf1
4.Done. You can check it by
fastboot getvar cid
(Yes, I copied the above :) )
-------------------------------------
For changing version number to downgrade, here is the link:
https://forum.xda-developers.com/htc-u11/how-to/downgrade-downgrade-flashing-version-t3762172
I noticed that there is also a cid in sde1, but modifying it does not make me to pass the checking of HTC.
-------------------------------------
After I failed on flashing the other RUU pack, I restore cid, mid and version number, and I pass the checking this time, so I don't think modifying them will cause trouble.
There are many things in the extracted image, maybe some encrypted data is hidden inside.

Hope this can help you.
 
Last edited:

handsome_hell

Senior Member
Jun 18, 2017
88
20
0
Guang dong
Those are images of my sde and sdf (entire partition). The IMEI and MEID after CID in sdf.img have been deleted. You should fill in your ID. If you want to test the entire partition flashing from other phones, you can try it. Backup your data and original partitions before flashing!!!
https://drive.google.com/open?id=1P1hxH4hI9BC8qNRzodMC298I3dZhpTs1
China mainland version.
CID:HTCCN701
MID:2Q4D20000
version number:1.24.1405.7
Hopefully you can share your partition images too.
 
Last edited:

handsome_hell

Senior Member
Jun 18, 2017
88
20
0
Guang dong

newyesor

Senior Member
Jul 27, 2014
606
226
0
Bangkok
I was pull file sdf1.img,sdf2,img from my devices but it's smaller than your file.
adb shell "dd if=/dev/block/sdf1 of=/sdcard/sdf1.img"
adb pull /sdcard/sdf1.img

adb shell "dd if=/dev/block/sdf2 of=/sdcard/sdf2.img"
adb pull /sdcard/sdf2.img

sdf1.img size=16 kb
sdf2.img size=256 kb
 
  • Like
Reactions: handsome_hell

handsome_hell

Senior Member
Jun 18, 2017
88
20
0
Guang dong
I was pull file sdf1.img,sdf2,img from my devices but it's smaller than your file.
adb shell "dd if=/dev/block/sdf1 of=/sdcard/sdf1.img"
adb pull /sdcard/sdf1.img

adb shell "dd if=/dev/block/sdf2 of=/sdcard/sdf2.img"
adb pull /sdcard/sdf2.img

sdf1.img size=16 kb
sdf2.img size=256 kb
Of course, I extract the entire sdf and sde partitions by
dd if=/dev/block/sdf of=/sdcard/sdf.img
and
dd if=/dev/block/sde of=/sdcard/sde.img
Because I think the data may not only exist in sdf1 and sdf2.
If you want to test my image, you should type
dd if=/sdcard/sdf.img of=/dev/block/sdf
and
dd if=/sdcard/sde.img of=/dev/block/sde
Remember to backup your data.
 

handsome_hell

Senior Member
Jun 18, 2017
88
20
0
Guang dong
I was pull file sdf1.img,sdf2,img from my devices but it's smaller than your file.
adb shell "dd if=/dev/block/sdf1 of=/sdcard/sdf1.img"
adb pull /sdcard/sdf1.img

adb shell "dd if=/dev/block/sdf2 of=/sdcard/sdf2.img"
adb pull /sdcard/sdf2.img

sdf1.img size=16 kb
sdf2.img size=256 kb

I want to find out what is the difference between our partitions. Perhaps comparing your files will reveal some interesting things to help us to change CID and MID. So if you agree, I want your partition images.
Thanks :)
 

Ba Duc

Member
Feb 28, 2018
46
9
0
Hai Duong
Hello guys!
After the last time I successfully downgraded by modifying /dev/sde1, I tried to modify cid and mid in the same way. I successfully done this today, but I encountered some problems while flashing the RUU pack.

It seems that HTC has some cryptographic verifications for this, so I cannot modify everything.
The following is the method of modification. I hope people who are familiar with these can find things that I didn’t notice.
-------------------------------------
Changing mid:
1.Get image of sdf2 partition by

and then pull it to your computer by

2.Open the image file by hex editor, find the mid of your phone. For me, it is

change it to the mid you want.
3.Push the image back to your phone by

the flash it back to the sdf2 partition by

4.Done. You can check it by

-------------------------------------
Changing cid:
1.Get image of sdf1 partition by

and then pull it to your computer by

2.Open the image file by text editor, find the cid of your phone. For me, it is

change it to the cid you want.
3.Push the image back to your phone by

the flash it back to the sdf1 partition by

4.Done. You can check it by

(Yes, I copied the above :) )
-------------------------------------
For changing version number to downgrade, here is the link:
I noticed that there is also a cid in sde1, but modifying it does not make me to pass the checking of HTC.
-------------------------------------
After I failed on flashing the other RUU pack, I restore cid, mid and version number, and I pass the checking this time, so I don't think modifying them will cause trouble.
There are many things in the extracted image, maybe some encrypted data is hidden inside.

Hope this can help you.
Hello
I try get file sde1 but error
Code:
remote object '/dev/block/sde1' not a file or directory
What should I do?
and how do you modify the sde1 file? "what is software?"
 

Ba Duc

Member
Feb 28, 2018
46
9
0
Hai Duong
Try it in recovery mode, or try
dd if=/dev/block/sde1 of=/sdcard/sde1.img
then
adb pull /sdcard/sde1.img
yep !
I have "sde1" by way copy "sde1" to forder "system" and "pull" it.
but I edit "sed1" by "notepad" and save
Then I "push" it to the forder "system" and copy it to "/dev/block"
and "reboot dowload" with 2Q4DIMG.zip (not 2Q4DIMG.zip.zip) but it reboot to operating system, not install firmwave
 

handsome_hell

Senior Member
Jun 18, 2017
88
20
0
Guang dong
yep !
I have "sde1" by way copy "sde1" to forder "system" and "pull" it.
but I edit "sed1" by "notepad" and save
Then I "push" it to the forder "system" and copy it to "/dev/block"
and "reboot dowload" with 2Q4DIMG.zip (not 2Q4DIMG.zip.zip) but it reboot to operating system, not install firmwave
It's not a problem of sde1, did you use
adb reboot dowload ?
If yes, you should type
adb reboot download
instead of it
dowload -> download

If you type the right command, you can try pressing and holding the volume up button during startup, which can also let you enter the download mode.

BTW, what do you mean by "copy"? Did you mean the command "dd"?
 
  • Like
Reactions: Ba Duc

Ba Duc

Member
Feb 28, 2018
46
9
0
Hai Duong
It's not a problem of sde1, did you use
adb reboot dowload ?
If yes, you should type
adb reboot download
instead of it
dowload -> download

If you type the right command, you can try pressing and holding the volume up button during startup, which can also let you enter the download mode.

BTW, what do you mean by "copy"? Did you mean the command "dd"?
hi Handsome_hell, Thanks for your enthusiasm
I used "HTC_Version_Tool" and changed it.
 
  • Like
Reactions: h_jaguar

newyesor

Senior Member
Jul 27, 2014
606
226
0
Bangkok
Hi mate, I have a question about edit cid and mid.
I want to change cid and mid on my devices ,i must to edit file sdf.img and sde.img.
I must to edit sdf1.img and sdf2.img ?