fastboot
810 int main(int argc, char **argv) 811 { 919 while (argc > 0) { 920 if(!strcmp(*argv, "getvar")) { 921 require(2); 922 fb_queue_display(argv[1], argv[1]); 923 skip(2); 1016 } else if(!strcmp(*argv, "oem")) { 1017 argc = do_oem_command(argc, argv);
751 int do_oem_command(int argc, char **argv) 752 { 753 int i; 754 char command[256]; 755 if (argc <= 1) return 0; 756 757 command[0] = 0; 758 while(1) { 759 strcat(command,*argv); 760 skip(1); 761 if(argc == 0) break; 762 strcat(command," "); 763 } 764 765 fb_queue_command(command,""); 766 return 0; 767 }
570 void fb_queue_command(const char *cmd, const char *msg) 571 { 572 Action *a = queue_action(OP_COMMAND, cmd); 573 a->msg = msg; 574 }
191 static Action *queue_action(unsigned op, const char *fmt, ...) 192 { 193 Action *a; 194 va_list ap; 195 size_t cmdsize; 196 197 a = calloc(1, sizeof(Action)); 198 if (a == 0) die("out of memory"); 199 200 va_start(ap, fmt); 201 cmdsize = vsnprintf(a->cmd, sizeof(a->cmd), fmt, ap); 202 va_end(ap); 203 204 if (cmdsize >= sizeof(a->cmd)) { 205 free(a); 206 die("Command length (%d) exceeds maximum size (%d)", cmdsize, sizeof(a->cmd)); 207 } 208 209 if (action_last) { 210 action_last->next = a; 211 } else { 212 action_list = a; 213 } 214 action_last = a; 215 a->op = op; 216 a->func = cb_default; 217 218 a->start = -1; 219 220 return a; 221 }
oem unlockのコマンドの実態はどこにあるんだろう?
OEM
OEM commands are proprietary commands created by the device's manufacturer. The most famous of which is fastboot oem unlock which unlocks a Nexus device's bootloader to allow the flashing of partitions, and its opposite, fastboot oem lock which re-locks the bootloader. HTC also uses the fastboot oem command for use with their HTCDev bootloader unlocking program.