raburton / evoplus_cid Goto Github PK
View Code? Open in Web Editor NEWSamsung Evo Plus CID changer
License: GNU General Public License v3.0
Samsung Evo Plus CID changer
License: GNU General Public License v3.0
Used the same card, on the same laptop, it worked 2 years ago, now it doesn't. Should I use specific Ubuntu version?
Thank you
Any idea why I got this error ? I am not that good with C.. 😞
➜ evoplus_cid git:(master) gcc ./jni/evoplus_cid.c -o evoplus_cid git:(master|)
./jni/evoplus_cid.c: In function ‘parse_serial’:
./jni/evoplus_cid.c:107:14: error: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
107 | if ((strlen(str) > 2) && (str[0] == '0') &&
| ^~~~~~
./jni/evoplus_cid.c:6:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
5 | #include "mmc.h"
+++ |+#include <string.h>
6 |
./jni/evoplus_cid.c:107:14: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
107 | if ((strlen(str) > 2) && (str[0] == '0') &&
| ^~~~~~
./jni/evoplus_cid.c:107:14: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
./jni/evoplus_cid.c:109:23: error: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
109 | val = strtol(str, NULL, 16);
| ^~~~~~
./jni/evoplus_cid.c: In function ‘main’:
./jni/evoplus_cid.c:135:15: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
135 | len = strlen(argv[2]);
| ^~~~~~
./jni/evoplus_cid.c:135:15: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
./jni/evoplus_cid.c:179:9: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
179 | close(fd);
| ^~~~~
| pclose
I decided to try it on my Samsung Evo Plus 32gb microsd, but I always get "Failed to enter vendor mode. Genuine Samsung Evo Plus?". Does that mean the card isn't supported or am I doing something wrong with the program?
Hi, just wanted to say a huge thanks!
evoplus_cid worked perfectly for me, running on Arch linux laptop with build in SD card - I just manually ran gcc evoplus_cid.c -o evoplus_cid
and used the compiled tool.
Like an idiot I forgot to make a backup of the original CID so no longer have that as reference, but the new one I used seems to have stuck first go.
I decided to try it on my Samsung Plus 16gb microsd, but I always get "unlock command failed". Does that mean the card isn't supported or am I doing something wrong with the program?
Depending on the model of Apple Mac, the SD card reader is either mapped to USB or PCIE interface (in this case in System Information it will show in card reader with speed measured in GT/s).
https://support.apple.com/en-gb/HT204384
On my Early-2013 Retina MacBook Pro the SD card reader is PCIE. So I wondered if I could do any investigation to see whether CID can be changed?
Any ideas?
Hi,
I have a 2015 Samsung EVO SD card that the program tries to write to and ends with success, but the cid remains unchanged. Only indication of an error is the fact that there is a line in dmesg as the subject line (error -84 IIRC is Media Write Failed)
Do you have any information on that? Is there something else I can try?
Thank you!
For compile under pure linux (NOT Android) is needed three additional includes:
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
I see following in my dmesg:
[655174.290234] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: __mmc_blk_ioctl_cmd: cmd error -22
[655177.428399] mmcblk0: p1
It's printed after calling:
ret = ioctl(fd, MMC_IOC_CMD, &idata);
so I've added some debug printf:
printf("write ret: %d\n", ret);
and the value is:
Writing new CID: 5d53424c32424d31013917ca53010459
write ret: -1
Success! Remove and reinsert SD card to check new CID.
But my CID is not changed.
What is the correct ret val for that ioctl?
Hello
When i try to run the file in android file explorer i get the message : "No app was found to run this file"
sudo -s
apt-get update
apt-get upgrade
apt-get install git-core
cd /usr/local/src/
git clone https://github.com/raburton/evoplus_cid.git
cd /usr/local/src/evoplus_cid/jni
gcc evoplus_cid.c -o evoplus_cid
find /sys -name cid
more <RESULT_OF_LAST_COMMAND>
or
cat /sys/block/<DEVICE_NAME>/device/cid
./evoplus_cid <DEVICE> <CID>
<DEVICE_NAME>
= mmcblk0<DEVICE>
= /dev/mmcblk0Hi,
how to build under Mac OS (if possible)?
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.