Post Reply

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

15th September 2014, 01:01 AM   |  #31  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 900
 
1,086 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Quote:
Originally Posted by WindyCityRockr

How does this project compare to AndroidLib? I currently use AndroidLib in my toolkits, but I'd be open to switching to this if it offers more capabilities.

I've also noticed that the documentation and support for this is better for those who need a kick start.
The Following 2 Users Say Thank You to squabbi For This Useful Post: [ View ]
21st September 2014, 04:08 PM   |  #32  
Junior Member
Thanks Meter: 2
 
16 posts
Join Date:Joined: Jan 2008
More
Thumbs up
Hello guys,

Thanks for this lib! I want to develop a sync tool for my devices. Seeing how the MTP lib is built, I understand why I can't find a damn soft working correctly. It made me not wanting to work on my soft anymore...

But I can find in this lib everything I need. So I'll give it a try, and a feedback for sure

Thanks again!
22nd September 2014, 10:52 AM   |  #33  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 93
 
128 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by Krystanos

Hello guys,

Thanks for this lib! I want to develop a sync tool for my devices. Seeing how the MTP lib is built, I understand why I can't find a damn soft working correctly. It made me not wanting to work on my soft anymore...

But I can find in this lib everything I need. So I'll give it a try, and a feedback for sure

Thanks again!

Hey there,

THX for giving this dll a try!

But, u found an MTP lib outside there?
Can u pls provide a link or send me a pm? Coz i searched also for this, so i can eventually write an MTP .NET wrapper part in my dll.

Also, if need some help or some examples let me know, i'll do my best to help u!

Regards,
Sebastian
22nd September 2014, 11:05 AM   |  #34  
Junior Member
Thanks Meter: 2
 
16 posts
Join Date:Joined: Jan 2008
More
Quote:
Originally Posted by k1ll3r8e

Hey there,

THX for giving this dll a try!

But, u found an MTP lib outside there?

Nope. Only lib you can use is the MTP lib in the Windows API. Good old COM, and version not updated since Vista has been released. Also, this lib has bugs (which could explain why so many MTP sync tools fails very hard).

Quote:

Can u pls provide a link or send me a pm? Coz i searched also for this, so i can eventually write an MTP .NET wrapper part in my dll.

That would be awesome! I wanted to do this MTP .NET wrapper, but for the reasons I gave before, I didn't want anymore. Having to patch the DLL and so... Having to use COM. I'm not the low layer dev I used to be, I like pretty much working on arch matters instead of inter-technology communication
But if you want some help, somewhere on the path, I can give a hand...

Here are a few links I saved for further study when I would work on MTP:

http://blogs.msdn.com/b/dimeby8/arch...ices-in-c.aspx
http://channel9.msdn.com/coding4fun/...or-fun-and-fun
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
http://www.andrewt.com/blog/post/201...-MTP-in-C.aspx

Some important articles are linked in these articles, like the one explaining the bug in the MTP API, and how to patch it.

Quote:

Also, if need some help or some examples let me know, i'll do my best to help u!

Regards,
Sebastian

Good job and good spirit. Nice to meet you
The Following User Says Thank You to Krystanos For This Useful Post: [ View ]
22nd September 2014, 03:49 PM   |  #35  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 93
 
128 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by Krystanos

Nope. Only lib you can use is the MTP lib in the Windows API. Good old COM, and version not updated since Vista has been released. Also, this lib has bugs (which could explain why so many MTP sync tools fails very hard).

Hey there,

yup, i also read about that issue... Damn MS^^

Thought u had found a dll which is based on the Windows-Management API
(I experimented a bit with it, but, i hate statements similar to SQL, coz... i hate SQL - But, i'll try it again, so no guarantee that i get it work but i'll try.)

Quote:

That would be awesome! I wanted to do this MTP .NET wrapper, but for the reasons I gave before, I didn't want anymore. Having to patch the DLL and so... Having to use COM. I'm not the low layer dev I used to be, I like pretty much working on arch matters instead of inter-technology communication
But if you want some help, somewhere on the path, I can give a hand...

Here are a few links I saved for further study when I would work on MTP:

http://blogs.msdn.com/b/dimeby8/arch...ices-in-c.aspx
http://channel9.msdn.com/coding4fun/...or-fun-and-fun
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
http://www.andrewt.com/blog/post/201...-MTP-in-C.aspx

Some important articles are linked in these articles, like the one explaining the bug in the MTP API, and how to patch it.

THX a LOT!
I'll read it for sure! But on first view most articles describe how to reassemble the dll... I think that's not a really clean way... So i'll try it 1st via Windows-Management API.

Quote:

Good job and good spirit. Nice to meet you

THX dude, i try my best to help where i can!

Nice to meet u too!

Regards,
Sebastian
28th September 2014, 12:53 PM   |  #36  
Junior Member
Thanks Meter: 2
 
16 posts
Join Date:Joined: Jan 2008
More
Thumbs up
Hello there,

I've been giving it a shot this morning. At first I could not see my device, but it was because I had not yet ADB driver on this desktop, and USB debug mode was not enabled. Now I can see them.

Just a small question: when the DeviceMonitor detect a new device, I can only see the Serial. Model and Product are empty with my Nexus 5.
Another question: would it be possible to have an IOC oriented lib, instead of the static stuff? It would also help to Mock the lib... I know this is not a priority, but it costs nothing to ask
And last one: What is the JRE for in the requirements list?

I'll continue testing all the lib, but it seems pretty cool for now. Thanks for this job
Last edited by Krystanos; 28th September 2014 at 02:04 PM.
The Following User Says Thank You to Krystanos For This Useful Post: [ View ]
28th September 2014, 02:06 PM   |  #37  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 93
 
128 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by Krystanos

Hello there,

I've been giving it a shot this morning. At first I could not see my device, but it was because I had not yet ADB driver on this desktop, and USB debug mode was not enabled. Now I can see them.

Just a small question: when the DeviceMonitor detect a new device, I can only see the Serial. Model and Product are empty with my Nexus 5.
Another question: would it be possible to have an IOC oriented lib, instead of the static stuff? It would also help to Mock the lib... I know this is not a priority, but it costs nothing to ask

I'll continue testing all the lib, but it seems pretty cool for now. Thanks for this job

Hey there,

About the DeviceMonitor, so far i can say, it depends on the device ADB registration. Simple test, open cmd and type "adb devices -l" and check the output.

This is my output...
Code:
List of devices attached
192.168.2.3:5555       device product:htc_pyramid model:HTC_Sensation device:pyramid
    ip/serial          state          product            model         device

// just as info i use this line to parse the items (I use only regex's to filter and parse in my dll's.)
public const string devices_line = @"^(?<SERIAL>.*?)\s{1,}(?<STATE>.*?)(\s{1,}product:\s{0,}(?<PRODUCT>.*?))?(\s{1,}model:\s{0,}(?<MODEL>.*?))?(\s{1,}device:\s{0,}(?<DEVICE>.*?))?$";
This values are shown in DeviceMonitor, if ur device dun show them in "adb devices -l" my code can't find them.

About the "IOC", i'll remove today the most "sealed" statements. But in a few classes i can't remove it (just as info). Also i dun know if i break eventually the "Thread-Safety" if i unseal some "[MethodImpl(MethodImplOptions.Synchronized)]" invoked instances. But i'll check it out!

Hope this helps!

And T H X for UR feedback!

Regards,
Sebastian
Last edited by k1ll3r8e; 28th September 2014 at 02:09 PM.
28th September 2014, 02:23 PM   |  #38  
Junior Member
Thanks Meter: 2
 
16 posts
Join Date:Joined: Jan 2008
More
Indeed, the ADB command gives nothing either:

Code:
List of devices attached
06efa3500c47dae       unauthorized
About the IOC concern, you could bypass the issue by using interfaces, and keeping the Instance property in the implementation to return the interface, which would be registred in the IOC container. You could keep the sealed class if they all implement interfaces. But I know this is a difficult step for an API. Being IOC compliant will make the API more complicated for non IOC apps.
And it won't save your thread safety, but neither will the static stuff
You could just tell that your lib is not thread safe, and this is the custody of the developper to be sure it's not accessed in an not thread safe environment...
Last edited by Krystanos; 28th September 2014 at 02:25 PM.
28th September 2014, 03:31 PM   |  #39  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 93
 
128 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by Krystanos

Indeed, the ADB command gives nothing either:

Code:
List of devices attached
xxxxxxxxxxxxx       unauthorized
About the IOC concern, you could bypass the issue by using interfaces, and keeping the Instance property in the implementation to return the interface, which would be registred in the IOC container. You could keep the sealed class if they all implement interfaces. But I know this is a difficult step for an API. Being IOC compliant will make the API more complicated for non IOC apps.
And it won't save your thread safety, but neither will the static stuff
You could just tell that your lib is not thread safe, and this is the custody of the developper to be sure it's not accessed in an not thread safe environment...

Hey there,

about the DeviceMonitor info, just auth ur device! - Then u'll see more. (Never show ur real serial in the public i-net! pls, edit and remove ur serial!)

About the "IOC", i'm nearly done. - Nearly all classes are no longer sealed. Now u have now 2 ways to get an class instance, 1st) just use the way like before, 2cnd) call the needed class with "ADB = null" will tell the class to use the Instance() "selected" device or pass "ADB = Ur.Instance()" will tell the class to use the given instance.

How ever... - Now u can now extend nearly all classes like "public class MyNewClass : ADB.Device.Device {}" for example.

Hope this helps.

PS: About the "Interfaces" i hate to code those!!!

PPS: Update goes online tonight!

Regards,
Sebastian
28th September 2014, 05:58 PM   |  #40  
Junior Member
Thanks Meter: 2
 
16 posts
Join Date:Joined: Jan 2008
More
Quote:
Originally Posted by k1ll3r8e

about the DeviceMonitor info, just auth ur device! - Then u'll see more. (Never show ur real serial in the public i-net! pls, edit and remove ur serial!)

I have seen the control on my phone just about half an hour ago, I've been working on other concerns for the app
Now I can see every properties.
And nothing to worry, the device ID I have written is of course randomly generated, and not the real one.

Too bad for the interfaces, but at least, I can wrap your wrapper and create interfaces to be able to use IOC

Post Reply Subscribe to Thread

Tags
adb, androidctrl.dll, dll, fastboot, framework
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Android Software and Hacking General [Developers Only] by ThreadRank