Android Custom APK

Ok I finally fixed this issue bWWd please download my brach and test but save your game to "app\src\main\assets\bor.pak" please report back if it is working now and the maximum file size is 100mb.
 
OK ill test it but my mod is 175MB so it wont work with it but im glad it works up to 100.
 
bWWd I tested it on a 195mb pak file and it compiled fine and copied to the android phone as expected but the mod crashed also other mods also crashed it seems the engine is not fully functional yet.  I suggest to download a older version of the source code and patch it by deleting the android folder and replace it with the android folder from my branch then test and get back to me.

You will not be able to publish to google play store if the apk is larger then 100mb but for any other file host it should be fine.
 
msmalik681    Downloaded your brancjh ( openbor maliks updates), created raw folder, placed O Ilu avenegrs bor.pak in there that was about 80MB , still getting invalid block even with debug compile
Code:
ECHO jest wyłączone.

> Task :app:externalNativeBuildCleanDebug
Clean cpufeatures armeabi-v7a,openbor armeabi-v7a
[armeabi-v7a] Clean          : SDL2 [armeabi-v7a]
[armeabi-v7a] Clean          : cpufeatures [armeabi-v7a]
[armeabi-v7a] Clean          : ogg [armeabi-v7a]
[armeabi-v7a] Clean          : openbor [armeabi-v7a]
[armeabi-v7a] Clean          : png [armeabi-v7a]
[armeabi-v7a] Clean          : stdc++ [armeabi-v7a]
[armeabi-v7a] Clean          : vorbisidec [armeabi-v7a]
[armeabi-v7a] Clean          : vpx [armeabi-v7a]
Clean cpufeatures arm64-v8a,openbor arm64-v8a
[arm64-v8a] Clean          : SDL2 [arm64-v8a]
[arm64-v8a] Clean          : cpufeatures [arm64-v8a]
[arm64-v8a] Clean          : ogg [arm64-v8a]
[arm64-v8a] Clean          : openbor [arm64-v8a]
[arm64-v8a] Clean          : png [arm64-v8a]
[arm64-v8a] Clean          : stdc++ [arm64-v8a]
[arm64-v8a] Clean          : vorbisidec [arm64-v8a]
[arm64-v8a] Clean          : vpx [arm64-v8a]

BUILD SUCCESSFUL in 1s
4 actionable tasks: 3 executed, 1 up-to-date

> Task :app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\openbor.git\branches\openbor-Maliks_Updates\engine\android\app\src\main
\java\org\libsdl\app\SDLActivity.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:externalNativeBuildDebug
Build openbor arm64-v8a
[arm64-v8a] Compile        : openbor <= control.c
[arm64-v8a] Compile        : openbor <= joysticks.c
[arm64-v8a] Compile        : openbor <= loadgl.c
[arm64-v8a] Compile        : openbor <= menu.c
[arm64-v8a] Compile        : openbor <= opengl.c
[arm64-v8a] Compile        : openbor <= sblaster.c
[arm64-v8a] Compile        : openbor <= sdlport.c
[arm64-v8a] Compile        : openbor <= threads.c
[arm64-v8a] Compile        : openbor <= timer.c
[arm64-v8a] Compile        : openbor <= video.c
[arm64-v8a] Compile        : openbor <= videocommon.c
[arm64-v8a] Compile        : openbor <= openbor.c
[arm64-v8a] Compile        : openbor <= openborscript.c
[arm64-v8a] Compile        : openbor <= omath.c
[arm64-v8a] Compile        : openbor <= stringptr.c
[arm64-v8a] Compile        : openbor <= stristr.c
[arm64-v8a] Compile        : openbor <= utils.c
[arm64-v8a] Compile        : openbor <= adpcm.c
[arm64-v8a] Compile        : openbor <= anigif.c
[arm64-v8a] Compile        : openbor <= bitmap.c
[arm64-v8a] Compile        : openbor <= draw.c
[arm64-v8a] Compile        : openbor <= draw16.c
[arm64-v8a] Compile        : openbor <= draw32.c
[arm64-v8a] Compile        : openbor <= filecache.c
[arm64-v8a] Compile        : openbor <= filters.c
[arm64-v8a] Compile        : openbor <= font.c
[arm64-v8a] Compile        : openbor <= loadimg.c
[arm64-v8a] Compile        : openbor <= models.c
[arm64-v8a] Compile        : openbor <= packfile.c
[arm64-v8a] Compile        : openbor <= palette.c
[arm64-v8a] Compile        : openbor <= pixelformat.c
[arm64-v8a] Compile        : openbor <= screen.c
[arm64-v8a] Compile        : openbor <= screen16.c
[arm64-v8a] Compile        : openbor <= screen32.c
[arm64-v8a] Compile        : openbor <= soundmix.c
[arm64-v8a] Compile        : openbor <= sprite.c
[arm64-v8a] Compile        : openbor <= spriteq.c
[arm64-v8a] Compile        : openbor <= spritex8p16.c
[arm64-v8a] Compile        : openbor <= spritex8p32.c
[arm64-v8a] Compile        : openbor <= transform.c
[arm64-v8a] Compile        : openbor <= translation.c
[arm64-v8a] Compile        : openbor <= 2xSaI.c
[arm64-v8a] Compile        : openbor <= bilinear.c
[arm64-v8a] Compile        : openbor <= dotmatrix.c
[arm64-v8a] Compile        : openbor <= gfx.c
[arm64-v8a] Compile        : openbor <= hq2x.c
[arm64-v8a] Compile        : openbor <= scale2x.c
[arm64-v8a] Compile        : openbor <= scanline.c
[arm64-v8a] Compile        : openbor <= simple2x.c
[arm64-v8a] Compile        : openbor <= tv2x.c
[arm64-v8a] Compile        : openbor <= pngdec.c
[arm64-v8a] Compile        : openbor <= savepng.c
[arm64-v8a] Compile        : openbor <= pp_expr.c
[arm64-v8a] Compile        : openbor <= pp_lexer.c
[arm64-v8a] Compile        : openbor <= pp_parser.c
[arm64-v8a] Compile        : openbor <= ram.c
[arm64-v8a] Compile        : openbor <= rand32.c
[arm64-v8a] Compile        : openbor <= ImportCache.c
[arm64-v8a] Compile        : openbor <= Instruction.c
[arm64-v8a] Compile        : openbor <= Interpreter.c
[arm64-v8a] Compile        : openbor <= Lexer.c
[arm64-v8a] Compile        : openbor <= List.c
[arm64-v8a] Compile        : openbor <= List_unittest.c
[arm64-v8a] Compile        : openbor <= Parser.c
[arm64-v8a] Compile        : openbor <= ParserSet.c
[arm64-v8a] Compile        : openbor <= ScriptVariant.c
[arm64-v8a] Compile        : openbor <= Stack.c
[arm64-v8a] Compile        : openbor <= StackedSymbolTable.c
[arm64-v8a] Compile        : openbor <= SymbolTable.c
[arm64-v8a] Compile        : openbor <= animation.c
[arm64-v8a] Compile        : openbor <= axis.c
[arm64-v8a] Compile        : openbor <= binding.c
[arm64-v8a] Compile        : openbor <= collision_attack.c
[arm64-v8a] Compile        : openbor <= collision_body.c
[arm64-v8a] Compile        : openbor <= collision_coordinates.c
[arm64-v8a] Compile        : openbor <= collision_entity.c
[arm64-v8a] Compile        : openbor <= commands.c
[arm64-v8a] Compile        : openbor <= constants.c
[arm64-v8a] Compile        : openbor <= drawmethod.c
[arm64-v8a] Compile        : openbor <= entity.c
[arm64-v8a] Compile        : openbor <= index.c
[arm64-v8a] Compile        : openbor <= layer.c
[arm64-v8a] Compile        : openbor <= level.c
[arm64-v8a] Compile        : openbor <= math.c
[arm64-v8a] Compile        : openbor <= recursive_damage.c
[arm64-v8a] Compile        : openbor <= string.c
[arm64-v8a] Compile        : openbor <= samplecvt.c
[arm64-v8a] Compile        : openbor <= vidplay.c
[arm64-v8a] Compile        : openbor <= vorbis.c
[arm64-v8a] Compile        : openbor <= yuv.c
[arm64-v8a] Compile        : openbor <= halloc.c
[arm64-v8a] Compile        : openbor <= nestegg.c
[arm64-v8a] Compile++      : openbor <= jniutils.cpp
[arm64-v8a] Compile++      : openbor <= SDL_android_main.cpp
[arm64-v8a] Prebuilt       : libSDL2.so <= C:/openbor.git/branches/openbor-Malik
s_Updates/engine/android/app/jni/openbor/lib/arm64-v8a/
[arm64-v8a] StaticLibrary  : libstdc++.a
[arm64-v8a] Compile        : cpufeatures <= cpu-features.c
[arm64-v8a] StaticLibrary  : libcpufeatures.a
[arm64-v8a] SharedLibrary  : libopenbor.so
Build openbor armeabi-v7a
[armeabi-v7a] Compile thumb  : openbor <= control.c
[armeabi-v7a] Compile thumb  : openbor <= joysticks.c
[armeabi-v7a] Compile thumb  : openbor <= loadgl.c
[armeabi-v7a] Compile thumb  : openbor <= menu.c
[armeabi-v7a] Compile thumb  : openbor <= opengl.c
[armeabi-v7a] Compile thumb  : openbor <= sblaster.c
[armeabi-v7a] Compile thumb  : openbor <= sdlport.c
[armeabi-v7a] Compile thumb  : openbor <= threads.c
[armeabi-v7a] Compile thumb  : openbor <= timer.c
[armeabi-v7a] Compile thumb  : openbor <= video.c
[armeabi-v7a] Compile thumb  : openbor <= videocommon.c
[armeabi-v7a] Compile thumb  : openbor <= openbor.c
[armeabi-v7a] Compile thumb  : openbor <= openborscript.c
[armeabi-v7a] Compile thumb  : openbor <= omath.c
[armeabi-v7a] Compile thumb  : openbor <= stringptr.c
[armeabi-v7a] Compile thumb  : openbor <= stristr.c
[armeabi-v7a] Compile thumb  : openbor <= utils.c
[armeabi-v7a] Compile thumb  : openbor <= adpcm.c
[armeabi-v7a] Compile thumb  : openbor <= anigif.c
[armeabi-v7a] Compile thumb  : openbor <= bitmap.c
[armeabi-v7a] Compile thumb  : openbor <= draw.c
[armeabi-v7a] Compile thumb  : openbor <= draw16.c
[armeabi-v7a] Compile thumb  : openbor <= draw32.c
[armeabi-v7a] Compile thumb  : openbor <= filecache.c
[armeabi-v7a] Compile thumb  : openbor <= filters.c
[armeabi-v7a] Compile thumb  : openbor <= font.c
[armeabi-v7a] Compile thumb  : openbor <= loadimg.c
[armeabi-v7a] Compile thumb  : openbor <= models.c
[armeabi-v7a] Compile thumb  : openbor <= packfile.c
[armeabi-v7a] Compile thumb  : openbor <= palette.c
[armeabi-v7a] Compile thumb  : openbor <= pixelformat.c
[armeabi-v7a] Compile thumb  : openbor <= screen.c
[armeabi-v7a] Compile thumb  : openbor <= screen16.c
[armeabi-v7a] Compile thumb  : openbor <= screen32.c
[armeabi-v7a] Compile thumb  : openbor <= soundmix.c
[armeabi-v7a] Compile thumb  : openbor <= sprite.c
[armeabi-v7a] Compile thumb  : openbor <= spriteq.c
[armeabi-v7a] Compile thumb  : openbor <= spritex8p16.c
[armeabi-v7a] Compile thumb  : openbor <= spritex8p32.c
[armeabi-v7a] Compile thumb  : openbor <= transform.c
[armeabi-v7a] Compile thumb  : openbor <= translation.c
[armeabi-v7a] Compile thumb  : openbor <= 2xSaI.c
[armeabi-v7a] Compile thumb  : openbor <= bilinear.c
[armeabi-v7a] Compile thumb  : openbor <= dotmatrix.c
[armeabi-v7a] Compile thumb  : openbor <= gfx.c
[armeabi-v7a] Compile thumb  : openbor <= hq2x.c
[armeabi-v7a] Compile thumb  : openbor <= scale2x.c
[armeabi-v7a] Compile thumb  : openbor <= scanline.c
[armeabi-v7a] Compile thumb  : openbor <= simple2x.c
[armeabi-v7a] Compile thumb  : openbor <= tv2x.c
[armeabi-v7a] Compile thumb  : openbor <= pngdec.c
[armeabi-v7a] Compile thumb  : openbor <= savepng.c
[armeabi-v7a] Compile thumb  : openbor <= pp_expr.c
[armeabi-v7a] Compile thumb  : openbor <= pp_lexer.c
[armeabi-v7a] Compile thumb  : openbor <= pp_parser.c
[armeabi-v7a] Compile thumb  : openbor <= ram.c
[armeabi-v7a] Compile thumb  : openbor <= rand32.c
[armeabi-v7a] Compile thumb  : openbor <= ImportCache.c
[armeabi-v7a] Compile thumb  : openbor <= Instruction.c
[armeabi-v7a] Compile thumb  : openbor <= Interpreter.c
[armeabi-v7a] Compile thumb  : openbor <= Lexer.c
[armeabi-v7a] Compile thumb  : openbor <= List.c
[armeabi-v7a] Compile thumb  : openbor <= List_unittest.c
[armeabi-v7a] Compile thumb  : openbor <= Parser.c
[armeabi-v7a] Compile thumb  : openbor <= ParserSet.c
[armeabi-v7a] Compile thumb  : openbor <= ScriptVariant.c
[armeabi-v7a] Compile thumb  : openbor <= Stack.c
[armeabi-v7a] Compile thumb  : openbor <= StackedSymbolTable.c
[armeabi-v7a] Compile thumb  : openbor <= SymbolTable.c
[armeabi-v7a] Compile thumb  : openbor <= animation.c
[armeabi-v7a] Compile thumb  : openbor <= axis.c
[armeabi-v7a] Compile thumb  : openbor <= binding.c
[armeabi-v7a] Compile thumb  : openbor <= collision_attack.c
[armeabi-v7a] Compile thumb  : openbor <= collision_body.c
[armeabi-v7a] Compile thumb  : openbor <= collision_coordinates.c
[armeabi-v7a] Compile thumb  : openbor <= collision_entity.c
[armeabi-v7a] Compile thumb  : openbor <= commands.c
[armeabi-v7a] Compile thumb  : openbor <= constants.c
[armeabi-v7a] Compile thumb  : openbor <= drawmethod.c
[armeabi-v7a] Compile thumb  : openbor <= entity.c
[armeabi-v7a] Compile thumb  : openbor <= index.c
[armeabi-v7a] Compile thumb  : openbor <= layer.c
[armeabi-v7a] Compile thumb  : openbor <= level.c
[armeabi-v7a] Compile thumb  : openbor <= math.c
[armeabi-v7a] Compile thumb  : openbor <= recursive_damage.c
[armeabi-v7a] Compile thumb  : openbor <= string.c
[armeabi-v7a] Compile thumb  : openbor <= samplecvt.c
[armeabi-v7a] Compile thumb  : openbor <= vidplay.c
[armeabi-v7a] Compile thumb  : openbor <= vorbis.c
[armeabi-v7a] Compile thumb  : openbor <= yuv.c
[armeabi-v7a] Compile thumb  : openbor <= halloc.c
[armeabi-v7a] Compile thumb  : openbor <= nestegg.c
[armeabi-v7a] Compile++ thumb: openbor <= jniutils.cpp
[armeabi-v7a] Compile++ thumb: openbor <= SDL_android_main.cpp
[armeabi-v7a] Prebuilt       : libSDL2.so <= C:/openbor.git/branches/openbor-Mal
iks_Updates/engine/android/app/jni/openbor/lib/armeabi-v7a/
[armeabi-v7a] StaticLibrary  : libstdc++.a
[armeabi-v7a] Compile thumb  : cpufeatures <= cpu-features.c
[armeabi-v7a] StaticLibrary  : libcpufeatures.a
[armeabi-v7a] SharedLibrary  : libopenbor.so

> Task :app:packageDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> invalid stored block lengths

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 17s
30 actionable tasks: 28 executed, 2 up-to-date

C:\openbor.git\branches\openbor-Maliks_Updates\engine\android>
---
But wait, i zipped it, changed zip to bor.pak and it compiled with 63MB pak... will test bigger.
my 175mb mod failed, unpacked bor, and packed 154 zip changed to bor.

Or did i got old branch ?
-
Ok i just actually read your comment on that branch that location was changed for bor.pak. will recompile again...
--
Success! Now i will merge working build ( older one)with this one...
---
WORKS !!!! AMAZING ! Big apk file, 158MB and it works and installs pak file, custom icon and all that, had to place bor.pak in assets folder and all went perfectly fine !!!
I owe you big time Mohammed ! Thank You for help !  ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
 
Glad that is fixed.  I still need to come up with a new way to control version while retaining save data but for now we are ok.
 
Yes and its pretty big milestone for android port IMO, theres no limit to the size of the game now , unless you want it on playstore, but ive seen games that said 1.60GB and it was downloading that file from playstore, not by ingame download manager.
 
Im kinda lucky i had only small issues when migratin to recent versions because engine pretty much crashed and i had to do the changes to use new features.
Andrew im using kinda old build that i downloaded when making first signed apk for playstore.
Also after i succesfully compiled apk for playstore then i burned sourcecode with all branches to bluray disc with all my other data , im glad i did that cause i needed it later.
I dont know if most recent android build works or not, i didnt even tried to run it and did as msmalik suggested (merged old and new).
Its really great to have working Android build that can use big pak files , installs in own folder ,touch overlay buttons and with own icon .
 
Just remember the bigger the pak file the longer it will take to install !

On my last test the toast messages were not working maybe it was just my phone ?
 
Install time is not an issue, some apks i had installed longer, i had some comments about game crashing when selecting character, i cant reproduce it on my smartphones and on Nox emulator, does it work fine for You guys ?
https://gamejolt.com/games/he-man/19434
 
bWWd it installed very quickly on my s7.

There was a crash on select screen when i press right from shera or left from the purple cat. Also crshed if I pressed jump while the game is loading.
 
THanks, does the log say anything at all ?
I think ill comment battlecat and panthor from the game then see how it goes.Too bad i dont have it crashing on my phones.
 
bWWd

Code:
Script function 'openborvariant' returned an exception, check the manual for details.
 parameters: <VT_EMPTY>   Unitialized,  
 
********** An Error Occurred **********
*            Shutting Down            *

There's an exception while executing script 'he-man' data/chars/heman/heman.txt
Total Ram:  3709669376 Bytes (  3537 MB )
 Free Ram:    58552320 Bytes (    55 MB )

Heman.txt caused a crash when i selected him and started a new game.
 
msmalik681  ok i guess i have to remoev some stuff, its when checking elapsed time, no clue that android port was so sensitive and windows never gave me any log info or crash.
The worst thing is that i dont have any way to test this, it doesnt crash for me at all on android and windows...

But i rememenbr comments sayint that older openbor apk was not crashing like this( the one i used for bears months ago), only this new version.So what i should copy from older android version folder so it wont crash? cause i still have it.
I copied jni folder from old version and trying to compile.
--
  compiled fine but id like to move as much as possible from old version whil retaining all changes that allow packing large paks
--
copied java folder in src and trying to compile
--
compiled fine,  but after installing its crashing on android before it shows any logo
 
bWWd
Here is a source code you can use to compile your mod for non playstore use: https://www.mediafire.com/file/73cxrzf0k0fv427/openbor-3f4bdd9_x86.zip/file

It supports large pak files from the assets directory.  Here is what I think happened when haxpor updated to x64 support something went wrong as my old phones run your mod just fine they may be using x86 but my new phone crashes a lot sometimes the mod will not even start maybe it uses the x64 libraries.  I got this source code from just before haxpor added the x64 update.
 
Got this when trying to compile
Code:
ECHO jest wyłączone.

BUILD SUCCESSFUL in 2s
4 actionable tasks: 3 executed, 1 up-to-date

> Task :app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\openbor.git\branches\openbor-3f4bdd9 x86\engine\android\app\src\main\ja
va\org\libsdl\app\SDLActivity.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:generateJsonModelDebug FAILED
process_begin: CreateProcess(NULL, "", ...) failed.
C:/android/SDK/ndk-bundle/build//../build/core/add-application.mk:49: C:\openbor
.git\branches\openbor-3f4bdd9: No such file or directory
C:/android/SDK/ndk-bundle/build//../build/core/add-application.mk:49: x86\engine
\android\app\jni\Application.mk: No such file or directory
C:/android/SDK/ndk-bundle/build//../build/core/add-application.mk:88: *** Androi
d NDK: Aborting...    .  Stop.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:generateJsonModelDebug'.
> Build command failed.
  Error while executing process C:\android\SDK\ndk-bundle\ndk-build.cmd with arg
uments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\openbor.git\branches\openbor-3
f4bdd9 x86\engine\android\app\jni\Android.mk NDK_APPLICATION_MK=C:\openbor.git\b
ranches\openbor-3f4bdd9 x86\engine\android\app\jni\Application.mk APP_ABI=armeab
i-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-19 NDK_OUT=C:/op
enbor.git/branches/openbor-3f4bdd9 x86/engine/android/app/build/intermediates/nd
kBuild/debug/obj NDK_LIBS_OUT=C:\openbor.git\branches\openbor-3f4bdd9 x86\engine
\android\app\build\intermediates\ndkBuild\debug\lib APP_PLATFORM=android-19 APP_
SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
  process_begin: CreateProcess(NULL, "", ...) failed.
  C:/android/SDK/ndk-bundle/build//../build/core/add-application.mk:49: C:\openb
or.git\branches\openbor-3f4bdd9: No such file or directory
  C:/android/SDK/ndk-bundle/build//../build/core/add-application.mk:49: x86\engi
ne\android\app\jni\Application.mk: No such file or directory
  Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: C:\openbor.git\b
ranches\openbor-3f4bdd9 x86\engine\android\app\jni\Android.mk
  C:/android/SDK/ndk-bundle/build//../build/core/add-application.mk:88: *** Andr
oid NDK: Aborting...    .  Stop.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
16 actionable tasks: 15 executed, 1 up-to-date

C:\openbor.git\branches\openbor-3f4bdd9 x86\engine\android>
---
Ill try to paste it over previous version with all the tools downloaded when gradle does its setup
--
OK it compiled fine, ill edit icons and manifest etc for he-man and try it.
--
worked, ill upload so people could test.
--
Uploaded to gamejolt.
 
Back
Top Bottom