Visualizzazione stampabile
-
Debug col dispositivo.
Buongiorno Ragazzi,
Avrei un piccolo problema. Voglio andare in DEBUG su Eclipse utilizzando il mio dispotivio. Nello smartphone sono andato su “Opzione sviluppatore” e ho attivo la modalità “DEBUG”. Con l’HTC non ho alcun tipo di problema, funziona tutto a meraviglia. Col mio Galaxy S4 invece non posso dire la stessa cosa :D. Il primo problema l’ho risolto (non riconosceva il dispositivo e ho dovuto aggiornare i driver). Il secondo problema invece no. Praticamente quando faccio partire il debug (senza aprire l’applicazione dal cellulare) mi scrive una marea di log (non riuscendo così a vedere quelli inseriti nella mia Activity). I Log non si fermano mai eh-_- e come se andasse in loop.
Codice PHP:
05-15 10:16:05.525: E/MTPRx(15826): Sd-Card path/storage/extSdCard
05-15 10:16:05.525: E/MTPRx(15826): Status for mount/Unmount :removed
05-15 10:16:05.525: E/MTPRx(15826): SDcard is not available
05-15 10:16:05.525: W/MTPRx(15826): value of connected istrue
05-15 10:16:05.525: W/MTPRx(15826): value of configured isfalse
05-15 10:16:05.525: W/MTPRx(15826): value of mtpEnabled istrue
05-15 10:16:05.525: W/MTPRx(15826): value of ptpEnabled isfalse
05-15 10:16:05.525: E/MTPRx(15826): Received USB_STATE with sdCardLaunch = 0
05-15 10:16:05.525: E/MTPRx(15826): configured is false
05-15 10:16:05.535: E/MTPRx(15826): In MtpReceiverandroid.hardware.usb.action.USB_STATE
05-15 10:16:05.535: E/MTPRx(15826): check value of boot_completed is1
05-15 10:16:05.535: E/MTPRx(15826): check booting is completed_sys.boot_completed
05-15 10:16:05.535: E/MTPRx(15826): Sd-Card path/storage/extSdCard
05-15 10:16:05.535: E/MTPRx(15826): Status for mount/Unmount :removed
05-15 10:16:05.535: E/MTPRx(15826): SDcard is not available
05-15 10:16:05.535: W/MTPRx(15826): value of connected istrue
05-15 10:16:05.535: W/MTPRx(15826): value of configured istrue
05-15 10:16:05.535: W/MTPRx(15826): value of mtpEnabled istrue
05-15 10:16:05.535: W/MTPRx(15826): value of ptpEnabled isfalse
05-15 10:16:05.535: E/MTPRx(15826): Received USB_STATE with sdCardLaunch = 0
05-15 10:16:05.535: E/MTPRx(15826): mFirstTime: false
05-15 10:16:05.535: E/MTPRx(15826): currentUserId is 0
05-15 10:16:05.535: W/ActivityManager(820): destPackageName = null
05-15 10:16:05.545: E/MP-Decision(2039): num online cores: 4 reqd : 3 available : 4 rq_depth:2.000000 hotplug_avg_load_dw: 153
05-15 10:16:05.545: E/MP-Decision(2039): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 rq:2.000000 seq:245.000000
05-15 10:16:05.545: E/MTPRx(15826): Start observing USB_STATE_MATCH
05-15 10:16:05.545: E/MTPRx(15826): cannot open file : /sys/class/android_usb/android0/bcdUSB
05-15 10:16:05.555: E/MTPRx(15826): is_secretmode is NOT 1
05-15 10:16:05.555: D/EnterpriseDeviceManager(15826): ContainerId: 0
05-15 10:16:05.555: E/MTPRx(15826): sending MTP_ICON_ENABLED to stack
05-15 10:16:05.565: W/ActivityManager(820): destPackageName = null
05-15 10:16:05.575: E/MTPRx(15826): else part ... so first time!!!
05-15 10:16:05.575: E/MTPPlaObsrvr(15826): inside setContext()
05-15 10:16:05.575: E/MTPPlaObsrvr(15826): inside createplafiles
05-15 10:16:05.585: E/MTPPlaObsrvr(15826): playlist count is1
05-15 10:16:05.585: E/MTPPlaObsrvr(15826): inside try branch createplafiles
05-15 10:16:05.585: E/MTPPlaObsrvr(15826): inside deleteing plas createplafiles
05-15 10:16:05.605: D/(15826): MTP: reading debug level property
05-15 10:16:05.605: E/MTPPlaObsrvr(15826): Ignore Quick list.pla
05-15 10:16:05.605: E/MTPPlaObsrvr(15826): Inside registerContentObserver
05-15 10:16:05.615: E/MtpAdbObserver(15826): inside setContext()
05-15 10:16:05.615: E/MtpAdbObserver(15826): Inside registerContentObserver
05-15 10:16:05.615: W/Settings(15826): Setting adb_enabled has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only global URI.
05-15 10:16:05.615: E/MtpService(15826): onCreate.
05-15 10:16:05.615: E/MtpService(15826): < MTP > Registering BroadCast receiver :::::
05-15 10:16:05.615: W/ActivityManager(820): destPackageName = null
05-15 10:16:05.625: E/MtpService(15826): < MTP > Registering BroadCast registerBroadCastPolicyRec :::::
05-15 10:16:05.625: E/MtpService(15826): < MTP > Registering BroadCast registerBroadCastEmergencyRec :::::
05-15 10:16:05.625: W/ActivityManager(820): destPackageName = null
05-15 10:16:05.625: W/ActivityManager(820): destPackageName = null
05-15 10:16:05.635: E/MtpService(15826): onStartCommand.
05-15 10:16:05.635: W/MTPRx(15826): calling native method
05-15 10:16:05.635: E/MTPJNIInterface(15826): < MTP > Registering BroadCast receiver :::::
05-15 10:16:05.635: E/MTPJNIInterface(15826): < MTP > Registering BroadCast receiver :::::::
05-15 10:16:05.635: E/MtpService(15826): handleMessage. msg= { when=-1ms what=0 arg1=1 obj=Intent { cmp=com.samsung.android.MtpApplication/.MtpService } target=com.samsung.android.MtpApplication.MtpService$ServiceHandler }
05-15 10:16:05.635: E/MTPJNIInterface(15826): noti = 10
05-15 10:16:05.635: D/MtpService(12422): addStorageLocked 65537 /storage/emulated/0
05-15 10:16:05.645: E/MtpService(15826): onStartCommand.
05-15 10:16:05.645: E/MtpService(15826): handleMessage. msg= { when=0 what=0 arg1=2 obj=Intent { cmp=com.samsung.android.MtpApplication/.MtpService } target=com.samsung.android.MtpApplication.MtpService$ServiceHandler }
05-15 10:16:05.645: W/MTPRx(15826): calling native method
05-15 10:16:05.645: E/MTPRx(15826): Checking the driver time out
05-15 10:16:05.645: D/EnterpriseDeviceManager(12422): ContainerId: 0
05-15 10:16:05.645: D/MtpService(12422): starting MTP server in MTP mode
05-15 10:16:05.645: E/MTPJNIInterface(15826): noti = 2
05-15 10:16:05.645: D/(15826): deleting sockets before message queue initialization
05-15 10:16:05.645: D/MediaScanner(12422): MediaScanner - mSkipList ()
05-15 10:16:05.645: D/(15826): event handler thread is created, so set the flag
05-15 10:16:05.645: E/MTPRx(15826): called native method
05-15 10:16:05.645: E/MTPJNIInterface(15826): setting Media scanner status0
05-15 10:16:05.645: E/MTPJNIInterface(15826): After setting Media scanner status0
05-15 10:16:05.645: W/MTPRx(15826): notification from stack 1
05-15 10:16:05.645: E/MtpServerJNI(12422): could not open MTP driver, errno: 2
05-15 10:16:05.645: D/MtpService(12422): addStorageLocked 65537 /storage/emulated/0
05-15 10:16:05.645: E/MTPJNIInterface(15826): Getting media scanner status0
05-15 10:16:05.645: E/MtpServerJNI(12422): server is null in add_storage
05-15 10:16:05.645: E/MtpServerJNI(12422): server is null in run
05-15 10:16:05.645: E/MtpServerJNI(12422): server is null in cleanup
05-15 10:16:05.645: E/MTPJNIInterface(15826): DeviceName is Salvatore Urso (Galaxy
05-15 10:16:06.015: D/dalvikvm(12422): GC_CONCURRENT freed 696K, 27% free 19372K/26436K, paused 3ms+5ms, total 61ms
05-15 10:16:06.015: D/dalvikvm(12422): WAIT_FOR_CONCURRENT_GC blocked 21ms
05-15 10:16:06.245: D/dalvikvm(820): GC_EXPLICIT freed 3616K, 16% free 85262K/101300K, paused 7ms+22ms, total 302ms
05-15 10:16:06.336: W/EDMNativeHelper(266): EDMNativeHelperService is published
05-15 10:16:06.346: V/MediaScanner(12422): processDirectory : /storage/emulated/0
05-15 10:16:06.376: D/MediaScanner(12422): Skipping:
05-15 10:16:06.376: D/MediaScanner(12422): 7klwibgf7fvntblfd7(7Budiwrd7dblb7
05-15 10:16:06.386: D/MediaScanner(12422): Skipping:
05-15 10:16:06.386: D/MediaScanner(12422): 7klwibgf7fvntblfd7(75ebcf7
05-15 10:16:06.466: D/MediaScanner(12422): Skipping:
05-15 10:16:06.466: D/MediaScanner(12422): 7klwibgf7fvntblfd7(7DCRV75lpnvaubrtk7
05-15 10:16:06.636: E/MTPJNIInterface(15826): Status for mount/Unmount :removed
05-15 10:16:06.636: E/MTPJNIInterface(15826): SDcard is not available
05-15 10:16:06.666: E/MTPJNIInterface(15826): Status for mount/Unmount :removed
05-15 10:16:06.666: E/MTPJNIInterface(15826): SDcard is not available
05-15 10:16:06.666: E/SQLiteLog(15826): (21) API call with NULL database connection pointer
05-15 10:16:06.666: E/SQLiteLog(15826): (21) misuse at line 96852 of [00bb9c9ce4]
05-15 10:16:06.666: E/SQLiteLog(15826): (21) API call with NULL database connection pointer
05-15 10:16:06.666: E/SQLiteLog(15826): (21) misuse at line 93317 of [00bb9c9ce4]
05-15 10:16:06.666: E/SQLiteLog(15826): (21) API call with NULL database connection pointer
05-15 10:16:06.666: E/SQLiteLog(15826): (21) misuse at line 93317 of [00bb9c9ce4]
05-15 10:16:06.666: E/SQLiteLog(15826): (21) API call with NULL database connection pointer
05-15 10:16:06.666: E/SQLiteLog(15826): (21) misuse at line 96852 of [00bb9c9ce4]
05-15 10:16:06.666: W/MTPRx(15826): notification from stack 2
05-15 10:16:06.666: D/(15826): [mtp_init_device] Going to open(): /dev/usb_mtp_gadget
05-15 10:16:06.666: E/(15826): [mtp_init_device] After open the MTP fd = 55 and line = 678...
05-15 10:16:06.666: D/(15826): [mtp_init_device] IOCTL SET_MTP_USER_PID Sucesss
05-15 10:16:06.666: D/(15826): *****Starting mtp_io()
05-15 10:16:06.666: W/MTPRx(15826): notification from stack 3
05-15 10:16:06.666: D/(15826): [mtp_start_io] source_thread Creation
05-15 10:16:06.666: D/(15826): [mtp_start_io] sink_thread Creation
05-15 10:16:06.666: D/(15826): [mtp_start_io:360] sink thread created so set th_sink
05-15 10:16:06.666: W/MTPRx(15826): notification from stack 14
05-15 10:16:06.666: E/MTPRx(15826): Open session has come remove the Message false
05-15 10:16:06.686: W/MTPRx(15826): notification from stack 3
05-15 10:16:06.686: W/MTPRx(15826): notification from stack 14
05-15 10:16:06.686: E/MTPRx(15826): Open session has come remove the Message false
05-15 10:16:06.686: W/MTPRx(15826): notification from stack 3
05-15 10:16:06.946: E/MP-Decision(2039): num online cores: 3 reqd : 2 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 72
05-15 10:16:06.946: E/MP-Decision(2039): DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 rq:1.000000 seq:245.000000
05-15 10:16:07.036: D/dalvikvm(12422): GC_CONCURRENT freed 1455K, 25% free 19864K/26436K, paused 4ms+6ms, total 39ms
05-15 10:16:07.337: W/EDMNativeHelper(266): EDMNativeHelperService is published
05-15 10:16:07.347: D/MediaScanner(12422): Skipping:
05-15 10:16:07.347: D/MediaScanner(12422): 7klwibgf7fvntblfd7(75lpnvaubrtk7
05-15 10:16:07.347: D/MediaScanner(12422): Skipping:
05-15 10:16:07.347: D/MediaScanner(12422): 7klwibgf7fvntblfd7(7cwv5ebcfawws5wicb7
05-15 10:16:07.357: D/MediaScanner(12422): Skipping:
05-15 10:16:07.357: D/MediaScanner(12422): 7klwibgf7fvntblfd7(7cwv5ebcfawws5sblbub7
-
ciao, il debug che vedi non è un loop. ma è il lavoro che il sistema stà facendo in quel momento. Alcuni produttori quando compilano rimuovono o disabilitano le istruzioni di log altri invece le lasciano attive e quindi ecco perchè vedi tutto quel mondo di testo.
E' da parecchio che non uso più Eclipse e ti consiglio di investire un paio di giorni per conoscere android studio che è oramai l'ambiente di sviluppo standard per il robottino verde.
In ogni caso, dovresti avere nel pannello dove vedi il debug una opzione per filtrare il log che arriva dal dispositivo. inserisci il tuo applicationId/package name o gli altri filtri che ritieni ti possano aiutare maggiormente e bon. Stai a cavallo