our company bought 50 Samsung Galaxy Tabs for corporate use.
Before these can be delivered to users we must install some company labeled programs in to them.
We thought the easiest way to do this would be through ADB but it needs the USB debugging to be enabled. Is there a better and faster way to do it than enable it on each device one by one? Is it possible to enable USB debugging from PC using some program or piece of code while connected with USB cable?
The ideal solution would be that we connect multiple devices via USB to one PC and run installation script that enables USB debugging, runs installations, disables USB debugging and finally shuts down the devices. How would you do this?
Br,
Tupe
Is there a better and faster way to do it than enable it on each device one by one?
Have several people enable it on each device one by one in parallel.
Is it possible to enable USB debugging from PC using some program or piece of code while connected with USB cable?
Fortunately, no, as that would be a security hole.
The ideal solution would be that we connect multiple devices via USB to one PC and run installation script that enables USB debugging, runs installations, disables USB debugging and finally shuts down the devices.
Under your plan, a piece of Windows malware could detect that an Android device is plugged in and install Android malware on that device. After all, if your "installation script" can do it, so can the malware.
How would you do this?
Host the APK on an internal Web server, generate a short URL to it, check the "allow non-Market installs" on the device, and fire up that URL in the browser on the device. This presumes that you plan on updating the app (e.g., bug fixes) and that you aren't planning on going through your whole USB cable process for each of those updates. In that case, you need to get the Web server configured for APK files and have the "allow non-Market installs" checkbox checked anyway, so you may as well do that as part of the initial device setup.
Is it possible to enable USB debugging from PC using some program or piece of code while connected with USB cable?
Hopefully not. If this were possible any piece of hardware that you plugged your device into could do some very nasty things to it without any chance for you to intervene.
I've done some large installs like that. I've not found one technique to be the end all be all.
I would suggest host your apk file online somewhere make a shortened (easy to type) url to it.
Then on the devices open up browser and type the url. That will download your apk, when you click the download complete in the notifications it will start the install.
Note: You will have to turn on "Allow install from unknown" in settings. The fastest way I think is just do the download and press the apk, this will throw up a dialog that has a button you can press to take you right to the correct settings page to turn this on. But bad news is that after you turn it on the install won't resume automatically. So you either have to find the apk with file explorer, or go back to browser and download a new copy of it. I would guess the latter might be quicker, albeit messier.
Related
I was trying to enable USB debugging option on my Samsung Galaxy J1 Ace (SM-J110H) handset. As you already know that the screen is black/dead but except that the cellphone is working just fine. Somehow I managed to enable the USB debugging option by using an OTG cable and a USB keyboard(and off-course a lot of screenshots). But still unable to authorize USB debugging for my pc as I'm not able to click always allow from this computer.
So how do I allow/ authorize USB debugging from my pc? TIA
Ι would write it here as a comment, because answer is not based on facts, however on black screens I try to remember the basic buttons and can use some of my phones even blindfolded.
However when I was having a similar problem, I used a tool called ADB that made it possible to access some of my Lenovo A390's shell features via Windows CMD and managed to turn on USB-Debugging and even download some backup files from a password-holder app I used in that time.
https://www.androidphonesoft.com/resources/enable-usb-debugging-android-broken-screen.html
There was also a stack exchange topic that helped me run through the process.
https://android.stackexchange.com/questions/112040/how-to-enable-usb-debugging-in-android-if-forgotten-pattern-for-screen-unlock
Hope that helped.
Have two phones. The one with the dead screen and a working one. Download any app that can mirror an Android to another. Use the mouse to download it. Install it in the two phones. You can download apps like airdoid. Create account on the good phone, then login into the same account on both phones. U will be able to control the other phone with the working phone so that you accept the debugging prompt when it appears
I'am trying to automate some tests and for that I need to launch some ADB commands. The problem is that I need to do a Factory Data Reset during the tests, and after that the USB Debugging option is disabled.
Do you guys know a way to turn it on without touching the device?
When your development process has progressed to the point of using automated tests - it's a good idea to start using a dedicated development device for testing - the one with an unlocked bootloader and a development Android build loaded.
You can customize such device so it would have USB Debugging enabled by default after FDR and even have your public RSA key preloaded (so your PC will be automatically authenticated by your device).
For obvious security reasons, you can't force-enable USB Debugging on a device.
Plus, if there were a "command" to enable USB Debugging, it would require USB Debugging to be executed.
We are doing experiments with mobile phones in a shielded box.
No wireless/radio communication is possible, so we need to use an USB cable.
"androidscreencast" is working great to remote control an android device via USB.
Now it is necessary to get the sound of the device too while remote controlling it.
Is there any software available for this purpose?
The device is rooted.
In the worst case we'd have to use the headset port of the device.
Check this one: ShareKM
It has beta expired issue, but a xda developer released fixed version, here
And this one: MyMobiler
I have not tried audio as you need, but you may give a try.
I'm writing an application which is supposed to dump data on the SD card and then another application on a pc which should read the data when the device is connected to the pc (in disc drive mode).
On my HTC Legend there is a dialog to choose between: Charge only, HTC Sync, Disk drive..
Is there a possibility to set the mode with which the device is connecting to the pc
or at least an intent to ask the user to switch the mode?
I haven't found a way of setting the mode programmatically, but I believe you can bring up the settings menu programmatically by invoking the same activity that the system invokes from the notification area. Unfortunately this appears to be manufacturer-specific: on my phone it is com.htc.android.psclient.SwitchUsbSettings.
On HTC devices, open the ConnectToPC service (whilst USB is not plugged in) in Manage Apps (ICS - probably applies to Gingerbread too; don't remember), and hit Clear Data. Then, plug the USB back again, and you should have the option to "Don't ask again" available. Select your desired mode, check the box, and accept.
CompanionLink does this when you request a USB sync in their android app: it flushes data to SD, then exports the SD as storage (a "disk drive") on the USB, then waits for the user to manually signal the android app when the PC is finished using the SD, and then undoes the SD export to USB again. Though the CompanionLink app can be very frustrating to use, at least this part of it is (largely) reliable.
Unfortunately I don't know the technical details, may well need to figure them out myself one of these months. If you can't get any traction with android docs, perhaps you could study what CompanionLink does on android to implement this. The sequence I describe above is when it is configured to sync over USB against a (PC-based) Palm Desktop.
As an aside, it appears that the reason for this highly-convoluted process is that the SD card's FS is accessed directly and at least the presently-used card FAT FS can only support a single client: the phone itself or USB. imo it would be extremely helpful if concurrent shared access to the SD were possible, but this would likely require deep android changes.
For anyone having this issue with an HTC One M8, this is a bit off the wall, but makes the point to think outside the box. A USB connection resulted in the device charging, that was it.
The solution was the combination of a different USB cable, uninstalling an application called Battery Doctor (which apparently likes to manage everything around your battery), AND USB Network Setting - turn ON Smart Network Sharing...Seemingly unrelated...but this combination got my connected with MobileGo for Android to manage and back up files,contacts and settings.
Hope this helps someone.
Yes .In Android there is a way to change the behaviour of the devices`s USB mode when the device is connected with the PC.
I used a Motorola Milestone[running 2.1] and i was able to switch between the following modes :
PC Suite[developed by Motorola],MemoryCardAccess and Charge alone.
If you need to access phone memory I think you should turn ON "USB Debugging Mode " in your device.Am not sure about it though,I feel it may be handy !!
I've been able to find a few posts on StackOverflow about how to control USB devices using an Android phone -- which I understand is impossible (The Android being a USB device and all.)
However, I would be perfectly happy to set up my application to communicate with the other computer (a Linux host) as a USB device. (Like a really expensive mouse...)
Does anybody have information about how to set up an Android app/phone to use the USB connection and exchange data with a host computer. Obviously, it already works at some level -- it's how Eclipse and Android SDK/debugger do what they do, but I'm still looking for some way to do this in an application.
(My current phone, BTW, is a Droid Incredible.)
Thanks,
R.
Basically you'd need to install the USB device driver and the ADB toolsuite from the SDK, either that or reverse engineer their functionality and build it into something else.
Then you enable USB debugging on the phone.
And then you can do something like an adb port forward to allow an application on the pc to connect to a network socket listener on the phone. Note that connections cannot be made in the other direction, but once a connection is made it is bidirectional.
If your version of android supports tethering over USB, you could also leverage that to implicitly create a network between the PC and the phone, at which point you can make connections in either direction. Just make sure nothing starts accidentally pumping lots of data through the phone's mobile network!
(Many android phones actually can experimentally function as USB hosts, but you have to compile new drivers into the kernel, install the new version, and make up a cable to provide USB power to the device as the phone cannot. Also you lose the ADB over USB channel which makes debugging a pain)