Giter Club home page Giter Club logo

evoplus_cid's People

Contributors

gingerbeardman avatar raburton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evoplus_cid's Issues

Compilation error on Linux

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

Failed to enter vendor mode. Genuine Samsung Evo Plus?

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?

Worked perfect on older / different Samsung card

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.

This is the card I used:
IMG_20200716_092739

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.

Unlock Command Failed

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?

macOS support?

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?

__mmc_blk_ioctl_cmd: data error -84 on dmesg and cid unchanged

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!

Missing includes

For compile under pure linux (NOT Android) is needed three additional includes:
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

What is the correct ret val?

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

Hello
When i try to run the file in android file explorer i get the message : "No app was found to run this file"

extend instructions to git repository

install git-core

sudo -s
apt-get update
apt-get upgrade
apt-get install git-core

clone & compile

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

show cid

  • insert sd card
  • first result should end with "mmc0:0001/cid"
find /sys -name cid
more <RESULT_OF_LAST_COMMAND>

or

cat /sys/block/<DEVICE_NAME>/device/cid

write cid

./evoplus_cid <DEVICE> <CID>

var examples

  • <DEVICE_NAME> = mmcblk0
  • <DEVICE> = /dev/mmcblk0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.