今天想在模拟器上测试以下接听电话相关的功能,通过telnet连接模拟器成功后,输入命令时却出现错误
$ telnet localhost 5554Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.Android Console: Authentication requiredAndroid Console: type 'auth' to authenticateAndroid Console: you can find your in '/home/username/.emulator_console_auth_token'OKgsm call 111111KO: unknown command, try 'help'
然后按照提示输入help:
helpAndroid console command help: help|h|? print a list of commands avd control virtual device execution auth user authentication for the emulator console quit|exit quit control session
真是不看不知道,一看吓一跳,居然就剩这么几个可用命令了。
再回头看最开始的错误信息,发现原来是"auth"在作怪,查看其说明,需要输入"auth_token"才能解锁其它命令。
help authuse 'auth' to get extended console functionality
根据提示,auth_token是存储在/home/username/.emulator_console_auth_token中。
接下来执行: 'auth <auth_token>'
然后再来看看help命令:
helpAndroid console command help: help|h|? print a list of commands event simulate hardware events geo Geo-location commands gsm GSM related commands cdma CDMA related commands crash crash the emulator instance kill kill the emulator instance network manage network settings power power related commands quit|exit quit control session redir manage port redirections sms SMS related commands avd control virtual device execution qemu QEMU-specific commands sensor manage emulator sensors finger manage emulator finger printtry 'help' for command-specific help
我们需要的命令又回来了。
然后就可以通过"gsm call 123456789"给模拟器打电话了。
G
M
T
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu | | AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu | | | | | |
Text-to-speech function is limited to 200 characters
| Options : History : Feedback : | Close |