Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
View Poll Results: What does u want in the next version?
Ability to read/write the device contacts? 1 50.00%
Ability to read/write device sms/mms? 1 50.00%
Voters: 2. You may not vote on this poll

Post Reply

[DEV] AndroidCtrl.dll [0.0.0.6] (AAPT/ADB/Fastboot/(apk/zip) Signer - Framework)

OP k1ll3r8e

5th November 2014, 12:47 PM   |  #61  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 940
 
1,134 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Hey there dude! Long time no speak! how are u?

I would like to ask if it's possible to have a live output of the commands.

Thanks!
6th November 2014, 04:01 PM   |  #62  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 100
 
156 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by squabbi

Hey there dude! Long time no speak! how are u?

I would like to ask if it's possible to have a live output of the commands.

Thanks!

Hey bro
-
I'm fine - And u?

What does u mean with live outputs?

U can use for example:

Code:
...
using AndroidCtrl;
using AndroidCtrl.ADB;
...

// Get the shell instance
ShellRT _shell = ADB.Instance().ShellRT;

// or a superuser shell
// AndroidCtrl.ADB.Device.SuShellRT _shell = ADB.Instance().Device.Su.ShellRT;

// define the callback for shell response
_shell.Callback += OutputCallback;

// sending an command
_shell.SendCMD("ur command");

// Callback for shell response
public void OutputCallback(object sender, ProcessResponseArgs e)
{
    if (String.IsNullOrEmpty(e.Response) == false)
    {
        App.Current.Dispatcher.Invoke((Action)delegate
        {
            // do what u want with "e.Response"
        });
    }
}
On other hand u can use Logging.Logger{}.

Hope this helps u

EDIT:
For understanding,
ShellRT, SuShellRT and a few other classes inherit RealTimeBG. This will mean u can also directly call RealTimeBG, like this (untested) example:
Code:
...
using AndroidCtrl;
using AndroidCtrl.ADB;
using AndroidCtrl.ProcessModels;
...

public class StatusWindow : RealTimeBG
{
    public StatusWindow()
    {
        Exe = ADB.PATH_ADB;
        Args = "status-window";
        Start();
    }
}

// instance of StatusWindow
StatusWindow test = new StatusWindow();

// define the callback for shell response
test.Callback += OutputCallback;

// sending an command
test.SendCMD("ur command");

// Callback for shell response
public void OutputCallback(object sender, ProcessResponseArgs e)
{
    if (String.IsNullOrEmpty(e.Response) == false)
    {
        App.Current.Dispatcher.Invoke((Action)delegate
        {
            // do what u want with "e.Response"
        });
    }
}
Last edited by k1ll3r8e; 6th November 2014 at 05:40 PM.
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ]
27th November 2014, 09:29 PM   |  #63  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 100
 
156 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Info 2 Contacts & MMS/SMS
Hey all together,

this is only an status update!

The next build includes:

1. SQLite3 database connector | ADB.Instance().Device.SQLite3{}
2. Contacts viewer (The writer will take a bit more time and a few testers, coz the table structure is different between each ROM...)
3. MMS/SMS viewer (For the writer goes here the same as for the contacts, the tables are different between each ROM...)
4. A few fixes, mainly on ProcessModels.General{}, coz there is a bug inside the ExecuteBGStack() method.

------------------------------------------------------------------------------------------------------------------------------------------
New build is out!

About the sms/mms & contact reader, all classes require root access on the device!
-
About the writer, i have currently a very alfa-state writer which i test currently on some AVD's... Hopefully the next version will include it!

And as always, if u find some bugs pls report them!

Regards,
Sebastian
Last edited by k1ll3r8e; Yesterday at 06:48 PM.
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
adb, androidctrl.dll, dll, fastboot, framework
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes