Android Question B4A Bridge - Code Download Problem

AndyW999

Member
Licensed User
Longtime User
Hi All...

I have B4A v6.8 installed, I can always connect to my Red Note 3 phone with B4A Bridge but some days I can download debug code, some days I cannot and it is really frustrating!

Log is below, any ideas?

Thanks

Andy.


B4A version: 6.80
.Net version: 4.0.30319.42000
Ini folder: C:\Users\Andy\AppData\Roaming\Anywhere Software\Basic4android
UDP server: 10.0.0.14, broadcast: 10.0.0.255
B4XClassifer created
B4XErrorTagger created
B4XClassifer created
B4XErrorTagger created
Gui: 1002
Failed to get scroller
Gui: 1010
*** no reuse ***
*** no reuse ***
Gui: 858
Gui: 57
Gui: 63
B4XClassifer created
B4XErrorTagger created
B4XClassifer created
B4XErrorTagger created
B4XClassifer created
B4XErrorTagger created
*** no reuse ***
*** no reuse ***
*** no reuse ***
Gui: 510
Compilation task: 325.0185
ExitCode: 0
Output:
jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2054-12-23) or after any future revocation date.

Error:

ManagerSpecialLibraries: building jar - C:\Program Files (x86)\Anywhere Software\Basic4android\Projects\TWM\Objects\bin\extra\opt.jar
Gui: 52

Trying to connect to port: 6789
Connected!
Installed designer version: 20
Gui: 271
ManagerSpecialLibraries: building jar - C:\Program Files (x86)\Anywhere Software\Basic4android\Projects\TWM\Objects\bin\extra\stan.jar
optimizedDex receive: 33
OptimizedDexer exitCode=0
Optimized worked...
System.Exception: Process timed out.
You can change the timeout value under Tools - IDE Options.
at az.a(Boolean A_0, String A_1, Int32 A_2, Window A_3)
at az.f.b()
at a7.a(Object A_0)
 

AndyW999

Member
Licensed User
Longtime User
Of course...

B4A version: 6.80
Parsing code. (0.01s)
Compiling code. (0.38s)
Compiling layouts code. (0.18s)
Organizing libraries. (0.01s)
Generating R file. (0.04s)
Compiling generated Java code. (1.68s)
Convert byte code - optimized dex. (0.58s)
Packaging files. (0.15s)
Copying libraries resources (0.02s)
Signing package file (debug key). (1.19s)
ZipAlign file. (0.02s)
Installing file to device. Error
Process timed out.
You can change the timeout value under Tools - IDE Options.

Thanks

Andy.
 
Upvote 0

AndyW999

Member
Licensed User
Longtime User
Yes, it is a minute or so.

I am running W7, there are 4 adb.exe showing in task manager and if I do Tools -> Restart ADB Server I get another one.

After a while I get the 'Process is running longer than usual - cancel'

Will look to do the re-install when I find out how!

Thanks

Andy.
 
Upvote 0

AndyW999

Member
Licensed User
Longtime User
That's how I installed it in the first place...

But in the SDK Manager I have installed :-
SDK 25.2.5
Platform Tools 25.0.4
Build Tools 25.0.2
All API 25 except for Wear
All API 22
All API 19
Support Repository
Google Repository
Google USB Driver

Is there anything else I need or should I remove the Platform and Build Tools and re-install them?
 
Upvote 0

AndyW999

Member
Licensed User
Longtime User
There is something badly wrong in adb.

set ADB_TRACE=1

C:\Android\android-sdk\platform-tools>adb kill-server
adb I 04-05 17:31:18 6048 6112 adb_trace.cpp:178] Android Debug Bridge version
1.0.39
adb I 04-05 17:31:18 6048 6112 adb_trace.cpp:178] Revision 5943271ace17-androi
d
adb I 04-05 17:31:18 6048 6112 adb_trace.cpp:178]
adb I 04-05 17:31:18 6048 6112 adb_client.cpp:124] _adb_connect: host:kill
adb I 04-05 17:31:18 6048 6112 sysdeps_win32.cpp:750] port 5037 type tcp => fd
2048
adb I 04-05 17:31:18 6048 6112 adb_io.cpp:101] writex: fd=2048 len=13 30303039
686f73743a6b696c6c 0009host:kill
adb I 04-05 17:31:18 6048 6112 adb_io.cpp:75] readx: fd=2048 wanted=4
^C
C:\Android\android-sdk\platform-tools>

It just hangs until ^C even if you have killed off any existing adb and Java process in Task Manager first.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Such an option might be added in the future.

Workaround:

- Go to C:\Windows\System32
- Copy rundll32.exe (explanation: https://superuser.com/questions/381103/is-there-a-windows-exe-that-does-nothing)
- Delete adb.exe from <android sdk>\platform-tools
- Paste rundll32.exe and rename it to adb.exe

The IDE will call the new adb.exe program that does nothing. This will allow you to use B4A-Bridge without adb.
 
Upvote 0

AndyW999

Member
Licensed User
Longtime User
Yes!

It worked - and the solution appeals to my sense of humour as well, as if there was ever a windows exe that did nothing ;)

Thanks

Andy.
 
Upvote 0

AndyW999

Member
Licensed User
Longtime User
Sorry to be back so soon...

I don't appear to be able to watch any variables, if I right-click on a variable the Add Watch option is greyed out and if I manually add something to the Watch text box nothing happens. If I then click the Remove All Watches then I get 'An Error Occurred Object Reference not set to an instance of an object.

And the Ctl-S option to update code does not appear in the Debug Window.

Makes debugging rather difficult!

Thanks

Andy.
 
Upvote 0
Top