Shop Mobile More Submit  Join Login
About Other / Artist Member bermarteUnknown Group :icongfxcoders: gfxcoders
(x ^ y) & 0xff;
Recent Activity
Deviant for 6 Years
Needs Premium Membership
Statistics 1,153 Deviations 2,438 Comments 28,748 Pageviews

Newest Deviations

forever cobol

Activity


EGAF+Quiz by bermarte
EGAF+Quiz
Driver's education quiz in Italian language [quiz per la patente in italiano] for Android platform.

This is a mini guide how to modify an application for android created online using AppsGeyser.
I have used a mac but there are no big changes if you are using another OS, Phonegap could be used as well.
I wanted to create an html-quiz to be used on an android tablet, and I found that AppsGeyser suits for that job , so I have created one with it.
After the quiz was created online, downloaded offline and installed on the tablet (Quiz.apk), I have found I could not play with it like was meant to.
I have discovered that my problem was I could not use an internet connection on the tablet that I borrowed, and the quiz created used external links to work.
The quiz did not start at all.
I have asked to people at AppsGeyser but I did not receive any answers, so I have decided to execute the app locally,  simply changing some links and files internally, it's a matter of copying a library locally.
I am trying to explain here, the steps I followed.
**
Once I have downloaded ADT plugin for Eclipse (Android Development Tools), I was ready to start.
I renamed the .apk file to .zip , and unzipped , revealing the files. After having done such, I could see the tree structure contained:

AndroidManifest.xml
assets folder
classes.dex
res folder
resources.arsc

After a quick research, I have found that I needed to change the link of the file contained in assets folder
assets/content_0.html from <script src="ajax.googleapis.com/ajax/libs/…"></script> to <script src="jquery.min.js"></script>.
To get things working, I downloaded and copied the script jquery.min.js locally and added it to assets folder, like required. imho after that the quiz is finished for the first time, you should be able to start it again, like it should be; thus it should show 'Next question' message instead of 'Finish Quiz', once the test is over and you started the test a second time, you have answered the first question and you want to continue the test.
I need to be able to start the quiz again when the quiz is over.
so I added $('.next-question').val('next-question') to the function try-again:

$('.try-again').click(function(){
    question = 0;
    score = 0;
    answered = false;
    $('.outer-wrapper').show();
    $('.results-page').hide();
    startGame();
    $('.next-question').val('next-question');
});

At this point , I had to repack my tree-folder previously modified , first as a single .zip file and then renaming it as .apk file. Eventually I made it ​​executable:

chmod +x Quiz.apk

Because OSX automatically creates always some hidden files, I removed them by doing:

zip -d Quiz.apk "META-INF*"

At this point I had to sign the application (otherwise one cannot install the app on the device) using an utility called keytool. To sign the app one needs a signature file. Usually is done without no particular parameters, using the command keytool -genkey -v -keystore android-test.keystore. A file needed for the signature, a key - android-test.keystore, is created alongside the new. apk previously created. The .apk file is then optimized by another utility, zipalign.
Actually the precise command given was:

keytool -genkey -v -keystore debug.keystore -alias mykey -keyalg RSA -keysize 2048 -validity 20000

Android keystore RSA key has generally validity for only 6 months by default, if I am not mistaken. I choose 20000 days for validity, meaning that after the app is signed, the signer certificate will expire roughly within 657 months.
Then, as I stated, I have used again the command line.

/Applications/adt-bundle-mac-x86_64-20130729/sdk/tools/zipalign -f -v 4 /Users/me/Documents/Quiz.apk /Users/me/Documents/Quiz_new.apk

Jarsigner and some of these other utilities used here, like zipalign, are found inside ADT - Android Developer Tools IDE.
Quiz_new.apk is the name for the newly archive created with zipalign, an alignment tool used to optimize Android files (.apk).
Was time to sign, first deleting the old .apk and renaming the new one (
EGAF+Quiz.apk).

jarsigner -verbose -keystore debug.keystore
EGAF+Quiz.apk mykey

When everything is 
done, the .apk file needs to be installed on the tablet (a Mediacom model, available in Italy).
**
USB debugging was enabled on tablet,  and an USB cable provided by Mediacom was used to connect the tablet to the laptop.
I had some problems but nothing really unpleasant. As many other people before me, I had to manually update ADB (Android Debug Bridge) to support the USB device, although did not work at first sight:

/Applications/adt-bundle-mac-x86_64-20130729/sdk/tools/android update adb
/Applications/adt-bundle-mac-x86_64-20130729/sdk/platform-tools/adb kill-server
/Applications/adt-bundle-mac-x86_64-20130729/sdk/platform-tools/adb start-server

It did eventually work, adding manually its Vendor-id to /Users/me/.android/adb_usb.ini before restarting again ADB server. This task is done again using terminal, or just using a text editor.

echo 0x2207 >> ~/.android/adb_usb.ini

Finally

/Applications/adt-bundle-mac-x86_64-20130729/sdk/platform-tools/adb install /Users/me/Documents/Quiz_new.apk
**
www.appsgeyser.com/

developer.android.com/tools/he…

stackoverflow.com/questions/71…
**
Please Tell me if you find errors, English is not my mother language.
Loading...
echoplex by bermarte
echoplex
ref.x86asm.net/coder32.html <- this is a reference for me

test using previous formula + Julia
Loading...
Blobby by bermarte
Blobby
This is my test using mandelbulb3d, I was curious about the method used to create formulas  in assembler (better: assembly) ;D
What was interesting to me was the method and not the formula itself (it's rather meaningless).
I took a formula and I have used www2.onlinedisassembler.com/od… to disassemble the existing code.
Then I have modified the most basic _FlipXY.m3f formula like that (it's just a test, just trying out things):

push ebp
mov ebp,esp
fld QWORD PTR [ecx]
fld QWORD PTR [eax]
fsin
fcos
fstp QWORD PTR [ecx]
fstp QWORD PTR [eax]
pop ebp
ret 0x8

Latest step was using defuse.ca/online-x86-assembler… to assemble back in Hex code (for x86) the assembler code (assembly), to obtain
5589E5DD01DD00D9FED9FFDD19DD185DC20800

For my image first I have used the modifier I did and then I have added a formula called 'Integer Power' (here is 4).
Loading...

Quick Nikon D90 Video test - Piacenza 24/10/2014, bar L'angolo
  • Listening to: While 1 less than 2 Deadmau5
  • Reading: Lettera al padre (Brief an den Vater) F.Kafka

deviantID

bermarte
bermarte
Artist | Other

............................................
Browsing:
youtube =>www.youtube.com/bermarte
blabla vimeo.com/24566039
flickr =>www.flickr.com/bermarte
myspace =>www.myspace.com/cardiosalma
snd.sc/vUJIdT
............................................

AdCast - Ads from the Community

Groups

Comments


Add a Comment:
 
:icondrugtito:
drugTito Featured By Owner Apr 27, 2015
thanks for watching, stranger! :ahoy:
Reply
:iconbernardumaine:
Bernardumaine Featured By Owner Apr 21, 2015  Professional Traditional Artist
Thank you for faving :D
Reply
:iconetanist:
etanist Featured By Owner Apr 8, 2015  Hobbyist Filmographer
thanks so much!
Reply
:iconhiram67:
hiram67 Featured By Owner Apr 4, 2015  Hobbyist Digital Artist
Thanks for the watch :) (Smile)
Reply
:iconcanalus:
Canalus Featured By Owner Apr 3, 2015
Thanks for the watch and the faves!
Reply
:iconrck015:
Rck015 Featured By Owner Apr 2, 2015  Student Artist
Thanks for the watch! :)
Reply
:iconmarikzero:
MarikZero Featured By Owner Mar 31, 2015  Professional Traditional Artist
Thank you for the watch!
Reply
:iconmagical525:
Magical525 Featured By Owner Mar 28, 2015  Hobbyist Artisan Crafter
Thank you for the watch and faves :love:
Reply
:iconskellingtonloc:
SkellingtonLoc Featured By Owner Mar 27, 2015  New member Professional Digital Artist
Thanks for the favoritism.
Reply
:icontap69:
tap69 Featured By Owner Mar 25, 2015
thanks for the fav mate
Reply
Add a Comment: