question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some Features Implementation

See original GitHub issue

Hello adb_shell developers,

  • 1. Interactive shell.

I would like to ask about adding interactive shell to adb_shell project. I think it will be good for people who does not want to send commands manually through device.shell().

device.interact()

result:

android@localhost # pwd
/sdcard
android@localhost #
  • 2. Ability to install/uninstall .apk files on devices.
device.install('/path/to/apk')
# device.uninstall('bundle identifier')
  • 3. Reboot device.
device.reboot()

Regards, Ivan Nikolsky (@enty8080)

P.S. I am using your python package and it is very good 😃, so it will be good to see this features.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JeffLIrioncommented, Aug 17, 2021

This should accomplish reboot:

device._open(b'reboot:', transport_timeout_s, read_timeout_s, timeout_s)

Can you please confirm that it works.

0reactions
JeffLIrioncommented, Aug 20, 2021

OK, I’ll merge the corresponding pull request.

I don’t intend to implement items 1 and 2, as the scope of this package is to implement the ADB protocol, not to provide utilities and helper functions. I don’t want to clutter the AdbDevice and AdbDeviceAsync classes. That said, I think the following approach would be reasonable, if you’d like to contribute it.

  1. Implement an AdbDeviceUtils class that looks like:
    class AdbDeviceUtils:
        def __init__(self, adb_device):
            self._adb_device = adb_device
    
        def install(self, apk, ...):
            self._adb_device.shell("<install command>", ...)
    
  2. Add a property to the AdbDevice class:
    @property
    def utils(self):
        return AdbDeviceUtils(self)
    

Then you could do device.utils.install(...).

And do the same for the AdbDeviceAsync class.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Implement a New Feature? - Sara Khandaker - Medium
Feature Implementation Process · Step 1- Feature Design · Step 2- Build and Test · Step 3- Implement Phased Release · Step 4-...
Read more >
What is Implementation? - TechTarget
Implementation is the execution or practice of a plan, a method or any design, idea, model, specification, standard or policy for doing something....
Read more >
Deciding what features to implement | Successful Software
Here are some tips on choosing which features to implement. Does your product really need new features? This question might be surprising, but ......
Read more >
Feature Implementation Modeling Based Product Derivation in ...
The feature implementation model captures feature interactions (including cross-cutting interactions) in the finer role level, and help to clarify the complex ...
Read more >
Process for Feature Design and Implementation
Once the idea has been accepted and iterated on, the design process starts by creating UI wireframes. · Publish a new post on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found