• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Write Lock Block command for NfcV

I am trying to lock data to a NXP ICODE SLIX SL2S2002 tag type 5 (ISO 15693) to make it readonly by using the WRITE SINGLE BLOCKS command through the NfcV object in an ionic based app:

JavaScript:
   private readonly cmdISO15693 = {
   READ_SINGLE_BLOCK: 0x20,
   WRITE_SINGLE_BLOCK: 0x21,
   LOCK_BLOCK: 0x22
};

this.nfc.connect('android.nfc.tech.NfcV', 500)
     .then(
       (data) => {
           console.log('connected to', this.nfc.bytesToHexString(tag.id.reverse()).toUpperCase());
           console.log('maxTransceiveLength: ', data);

           const offset = 0; // offset of first block to read
           const blocks = 8; // number of blocks to read
           const bytesOfText: number[] = this.nfc.stringToBytes(text);
           console.log('bytesOfText: ', bytesOfText);
           console.log('hex string: ', this.nfc.bytesToHexString(bytesOfText));

           let cmd = new Int8Array([
               0x60, // 0: flags: addressed (= UID field present) or 0x90 0x60 0x40 0x20??
               this.cmdISO15693.READ_SINGLE_BLOCK, // 1: command
               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // 2-9 placeholder for tag UID
               0x00  // 10: block number
               // 0x00, 0x00, 0x00, 0x00  // 11- DATA
               // ((blocks - 1) & 0x0ff)  // number of blocks (-1 as 0x00 means one block)
           ]);
           console.log('cmd: ', [...cmd]);

           // tag uid in which direction
           cmd = arrayCopy(tag.id.reverse(), 0, cmd, 2, 8);
           console.log('cmd new: ', [...cmd]);
           console.log('cmd buffer: ', cmd.buffer);
           // arrayCopy(bytesOfText, 0, cmd, 11, 4);

           this.nfc.transceive(cmd.buffer)
             .then((res: ArrayBuffer) => {
                 console.log('transceive result:', res);
                 try {
                     console.log(Utf8ArrayToStr(res));
                 } catch (e) {
                     console.log('Utf8ArrayToStr not possible', e);
                 }

                 this.nfc.close().then(() => console.log('closed connection'))
                   .catch((err) => console.log('error closing', err));
             })
             .catch((err) => {
                 console.log('error while transceive', err);
                 this.displayToast('Error to write the RFID-Chips.', 'warning');
             });
}


I don't know which bytes I have to pass for each block. I use the phoneGap-NFC plugin for ionic. Every time I try to set it readonly I get the answer 'Tag was lost' and by the READ_SINGLE_BLOCK command, too. The Ionic method makeReadOnly() does not work because this is blocked by the tag. I have to set it by means of the bytes. I dont know do I have to use Int8Array or Unit8Array, do I have to use reverse() on the tagId because the hex is mirrored or do I just pass the UID bytestring instead of the hexstring?

Help Bootloop, but I can't access the Fastboot

Hello anonymous citizen!

In an attempt that didn't work to install a GSI, during fastboot I removed the recovery.img and vbmeta.img and gave fastboot reboot fastboot to acess fastbootd and I can no longer do any action on the device, being pressed the (+) and (-) and power buttons, but it remains in an infinite loop on the loading screen.

How to fix?
Head over to the android with the triangle, you know already how to do FDR right? Here is what ocnbrz stated a bit ago:

https://androidforums.com/threads/moto-e4-plus-xt1772-infinite-boot-loop.1326249/ Try that link.

Update an android device by flashing stock rom?

ok, fair enough but i have 2 questions

1 what if the phone comes in only one single version? Moreover, I distinctly remember that it came with android 6 out of the box, which seemed strange to me after a while, i mean every device should get an update (at least once), it can't just come with android 6 and never get an update, i mean ever, right?

2 the manufacturer controls which updates should be pushed out to which model, right? How do they do that? I mean do they use IMEI for that purpose or something?
1. there really no such device right now. manufacturers will come out with their latest phone and then they will have to market it for the various parts of the world. each place will get its own version of the new phone.....thus creating various models of the same phone. so unless you buy on off brand phone that only markets to one place in the world, you will not see just one model of a phone being produced.

2. its a combination of the manufacturer and your provider. it usually is done over the air and i have no idea how they determine when and who gets the update........most likely by imei, but who knows.

Filter

Back
Top Bottom