Google API 26, MIT AI2 release (nb170) & AppToMarket 4.1

451 views
Skip to first unread message

Boban Stojmenovic

unread,
Aug 31, 2018, 12:22:22 PM8/31/18
to AppToMarket
It's still possible to decompile the latest version with some changes to AppToMarket, I will publish the solution what will be needed to make it work on my page http://baasapps.com/tips-and-tricks/

However, I will need some time for that.

/Boban


BodyMindPower

unread,
Sep 1, 2018, 1:52:39 PM9/1/18
to AppToMarket
As others have posted here, when you decompile an APK via AppToMarket 4.1 that was compiled with "App for Google Play," an error message appears:
"can not compile your apk".

Your solution works perfect for me.
As always, excellent. Thank you.

Anke

CCMUSAVideo

unread,
Sep 18, 2018, 5:50:17 PM9/18/18
to AppToMarket
Hi Boban,
I am in the same boat. I have read the solution on your site but don't quite understand these steps:
----

* Make a copy of the downloaded file (same folder)

What is purpose of making a copy?


* Name one file to apktool.jar and the other one to apktool_2.1.1.jar

Do you mean rename apktool-org.jar back to apktool.jar and apktool_2.1.1-org.jar back to apktool_2.1.1.jar?

That means we will now have three files in the folder: apktool.jar, apktool_2.1.1.jar, and apktool_2.3.3.jar. Actually there will be four files if we include the copy of apktool_2.3.3.jar made in previous step.

----

Please clarify. Thanks.


--Hon

Message has been deleted
Message has been deleted
Message has been deleted

BodyMindPower

unread,
Sep 19, 2018, 3:10:47 AM9/19/18
to AppToMarket
Hello,

after downloading the new apktool.jar (ver 2.3.3 or 2.3.4) rename the old apktool files to apktool-org.jar and apktool_2.1.1-org.jar (or something else) and copy the new file in the AppToMarket folder (make another copy of it and rename them):

After that you are able to decompile your APK with AppToMarket compiled with the Build option: " App for Google Play" AI2 nb170.

(The purpose of renaming the old apktool files might be that you can return later to the old version if necessary.)

Anke
image.png

CCMUSAVideo

unread,
Sep 19, 2018, 6:37:45 PM9/19/18
to AppToMarket
Got it (I thought it was two different steps but it actually is "two-in-one"). I am very happy to report that the solution works for me with Apktool 2.3.4. Thank you, and of course big thank you to Boban.
--Hon 

Angelo Orabona

unread,
Sep 27, 2018, 8:59:30 AM9/27/18
to AppToMarket
Ciao Boban, con l'aggiornamento delle app.  al api 26 sto avendo dei problemi con le mie app ne ho pubblicato circa 50 tutte guide turistiche. Quando faccio l'aggiornamento l'audio delle app. sparisce, non si sente più niente. Da cosa può essere la causa??????. Puoi aiutarmi????. Ciao Angelo.

Angelo Orabona

unread,
Oct 4, 2018, 4:52:32 AM10/4/18
to AppToMarket
Boban, seguito passo passo le tue indicazioni su Tips and Tricks, apptomarket 4.1, funziona, ma problema non risolto, grafica non corretta e audio sparito. Aiuto????


Il giorno venerdì 31 agosto 2018 18:22:22 UTC+2, Boban Stojmenovic ha scritto:

Boban Stojmenovic

unread,
Oct 4, 2018, 8:35:54 PM10/4/18
to AppToMarket
Sorry Angelo as I'm rarely here on AppToMarket forum I didn't see your previous post.

Could you do a small aia project for me to test and description on what I would need to change.


/Boban
Message has been deleted
Message has been deleted
Message has been deleted

Angelo Orabona

unread,
Oct 5, 2018, 5:54:05 AM10/5/18
to AppToMarket
Boban 
Problema: Se scarico da Mit app inventor App for Google Play( save apk to my computer) apk meno di 5 MB lo decompilo con apptomarket  non ci sono grossi problemi, solo la grafica non è corretta.
Ma il problema grosso sorge se apro l'apk e lo modifico. L'apk salvato dal mit è meno di 5 MG, l'apk modificato è 45 MB. Quando lo decompilo con apptomarket l'audio dell'app sparisce e la grafica non è corretta.


Allego link apk progetto piccolo con 3 screen, l'originale ne ha circa 25.


apk scaricato da Mit


 Apk modificato ( QUI NASCE IL PROBLEMA).


apk decodificato con apptomarket 4.1

Boban Stojmenovic

unread,
Oct 6, 2018, 4:58:05 PM10/6/18
to AppToMarket
@Angelo

First of all, it's not easy to mess around in someone else's file, however I think I know what's going on, ex.

When you delete the audio file from your project and build your app, the sound source gets erased (see the image below), you would either need a small dummy file for each audio file or specify your file in blocks (see the image below)..

You may need to do this for all files that you remove from the project such as, sound source, button source image, image source etc.


Regarding the images, as you are using responsive screen sizing, on phones which have high density large images in pixel size can look blurred or that they do not look great, try images with the size of 360x640px..
ex. change its image size to 360x640 and see what happens.


/Boban

Angelo Orabona

unread,
Oct 6, 2018, 6:18:04 PM10/6/18
to AppToMarket
Boban, ti invio il link dell' app guida alla Bella Napoli come era nella versione 2 si vede perfetta e si sente tutto l'audio.



Quando l'ho aggiornata alla versione 3  in data 26/09/2017 (Google API 26, MIT AI2 release (nb170) & AppToMarket 4.1 (API Google 26, versione AI2 MIT (nb170) e AppToMarket 4.1).

I risultati sono pessimi la grafica non è più buona e l'audio è sparito.

Il link sotto fa vedere come è cambiata l'app.



Dimmi tu cosa devo fare, io penso che il problema è tutto in apptomarket 4.1, perchè nella versione 2 l'app andava benissimo, ma con aggiornamnto del Mit api 26, l'app versione 3 non va più bene.
Ciao Angelo

Angelo Orabona

unread,
Oct 15, 2018, 3:21:31 AM10/15/18
to AppToMarket

Boban sto cercando di risolvere il mal funzionamento di Apptomarket 4.1 aggiornato seguendo i tuoi consigli, alla pagina  http://baasapps.com/tips-and-tricks/ ma con le mie app non funziona.
Ho capito dove inizia l'errore: quando si apre l'apk con winzip, scaricato da App Inventor o da Gold Appy Builder,  e si aggiungono dei file, poi si zippa e si rinomina in apk. Dopo la decompilazione, con apptomarket 4.1 aggiornato, all fine con zip lign spariscaono i file audio e la grafica non è corretta.

Quindi vorrei provare in maniera diversa e la domada è questa: 

Cosa si deve fare o cosa si deve inserire perchè un app possa scaricare un file di estensione dell'app stessa caricato su Google Play Store?  E' possibile farlo con App Inventor o Gold Appy Buider?

Ciao Angelo.

Boban Stojmenovic

unread,
Oct 17, 2018, 10:08:23 AM10/17/18
to AppToMarket
I'm having trouble providing you with sensible tips since I do not know how you go about it when you build, decompile your app.

I've downloaded both versions, two and three of your app as I needed to  decompile them to see what's happening inside your files.

Your files are somewhat inconsistent, see images.
Your AndroidManifest.xml file


Your apktool.yml


If I add this to yours apktool.yml version 3 then sound works properly.
compressionType: false
doNotCompress
:
- arsc
- jpg
- JPG
- jpeg
- png
- aac

isFrameworkApk
: false
packageInfo
:
  forcedPackageId
: '127'

Regarding the images, the error is from MIT AI2 when building with Google play, for button images (if set to automatic) that are smaller then default which is width 88 and hight 48 then images looks strange.
You must specify the button image with the real image width and height, attaching a test app.

P.S. I would prefer if you wrote in English because the translation gets distorted and with it I'm somewhat confused what you really mean.

/Boban


buttontest.aia

Angelo Orabona

unread,
Oct 20, 2018, 10:17:46 AM10/20/18
to AppToMarket
Grazie, Boban,problema risolto, grazie in tutte le lingue del mondo. Ciao Angelo prof. Orabona

CCMUSAVideo

unread,
Nov 14, 2018, 6:30:36 PM11/14/18
to AppToMarket
Hi Boban,

While I have been successful decompiling/repackaging my AI2 apps using your solution, I have had a problem with the ListPicker: When user hit the "hardware" Back key without picking any item from the list, there will be an error message "Unfortunately, [App Name] has stopped." This didn't happen before. Greatly appreciate if you could help. 

ListPicker.jpg

--Hon


On Friday, August 31, 2018 at 9:22:22 AM UTC-7, Boban Stojmenovic wrote:

Boban Stojmenovic

unread,
Nov 16, 2018, 5:57:58 AM11/16/18
to AppToMarket
Hi Hon

Try by removing this part when you edit manifest.

From this
<activity android:name="com.google.appinventor.components.runtime.ListPickerActivity" android:screenOrientation="behind" android:configChanges="keyboardHidden|orientation"  android:theme="@android:style/Theme.Black" />

To this
<activity android:name="com.google.appinventor.components.runtime.ListPickerActivity" android:screenOrientation="behind" android:configChanges="keyboardHidden|orientation" />

Depends on what you choose here it will contain different android:theme part.


/Boban

CCMUSAVideo

unread,
Nov 16, 2018, 1:27:01 PM11/16/18
to AppToMarket
Hi Boban,

Just tried. Works! Big thank you again.

--Hon

Saad Omer

unread,
Apr 15, 2019, 5:11:16 AM4/15/19
to AppToMarket
Hi Boban,

Thanks, its a very handy tool. I am playing around with pumping up the video size in the AI2 app. I am getting stuck on signing the app, getting this error:

15Apr2019_1406.26:  BUTTON CLICKED: 4> Sign
15Apr2019_1406.26:  Signing the application...
15Apr2019_1406.26:  jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format
15Apr2019_1406.26:  ERROR: There was error in signing your app

Any idea what is going on, and what's the fix? 

Thanks,
Saad

BodyMindPower

unread,
Apr 15, 2019, 5:43:43 AM4/15/19
to AppToMarket
To help other you should also post your question on the MIT forum, where you are starting with your problem.
 

Boban Stojmenovic

unread,
Apr 15, 2019, 7:25:09 AM4/15/19
to AppToMarket
15Apr2019_1406.26:  BUTTON CLICKED: 4> Sign
15Apr2019_1406.26:  Signing the application...
15Apr2019_1406.26:  jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format
15Apr2019_1406.26:  ERROR: There was error in signing your app

I'm not at home at the moment however, A2M only supports .ks and .keystore file format, so what's yours, if it is .jks then just rename it to .keystore in that case

/Boban

Saad Omer

unread,
Apr 15, 2019, 9:54:31 AM4/15/19
to Boban Stojmenovic, AppToMarket
Hi,

My keystore file is .ks since I generated it via apktool (tab 1, and just changed the name to john doe - saw somewhere in your tut video. no other change). 

I did some google search and one of the solutions said jarsigner is incompatible. I have java 12 installed on windows 10. I noticed that A2M also has a java 1.6 version folder provided with it. I tried to use it as main java source to initiate A2M app, but getting following error:

***************
Exception in thread "main" java.lang.UnsatisfiedLinkError: no awt in java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.<clinit>(Unknown Source)
        at java.awt.Component.<clinit>(Unknown Source)
Could not find the main class: com.amerkashi.android.AppToMarketMdi. Program will exit.
**************

Still trying to figure out the issue. Let me know if someone could help.

Regards,
Saad


--
For Java Bridge (sdkBridger), visit http://code.google.com/p/apptomarket/
---
You received this message because you are subscribed to the Google Groups "AppToMarket" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apptomarket...@googlegroups.com.
Visit this group at https://groups.google.com/group/apptomarket.
For more options, visit https://groups.google.com/d/optout.

Saad Omer

unread,
Apr 15, 2019, 9:58:47 AM4/15/19
to Boban Stojmenovic, AppToMarket
Perhaps this info is also useful that I am not modifying anything in the app, yet. When i started having issues, i tried to fall back and for now just trying to take the unmodified app through the A2M successfully first, before making any changes (meaning decompiling the app, and then trying to recompile the same thing, with only modification being the step EDIT MANIFEST to remove android:theme tip as the tut said).

Saad Omer

unread,
Apr 15, 2019, 10:01:33 AM4/15/19
to BodyMindPower, AppToMarket
Yes, i will surely post a complete solution there, instead of queries (since it is a bit off-topic there). Let's reach to a fix first :-)

--

Saad Omer

unread,
Apr 15, 2019, 10:13:09 AM4/15/19
to BodyMindPower, AppToMarket
Just an idea: Do I need to EXPORT KEYSTORE from AI2 and use it here in A2M?

BodyMindPower

unread,
Apr 15, 2019, 12:17:29 PM4/15/19
to AppToMarket
If your app is already published in the Play Store, you'll need to use the same keystore and you must import it (from AI2) to A2M.

Anke

Saad Omer

unread,
Apr 15, 2019, 12:31:43 PM4/15/19
to BodyMindPower, AppToMarket
No it's not published. 

On Mon, Apr 15, 2019, 9:17 PM 'BodyMindPower' via AppToMarket <appto...@googlegroups.com> wrote:
If your app is already published in the Play Store, you'll need to use the same keystore and you must import it (from AI2) to A2M.

Anke

--

BodyMindPower

unread,
Apr 15, 2019, 12:41:52 PM4/15/19
to AppToMarket
then you can take every keystore: C:\AppToMarket_v41\myKeystores\xxxxx.ks

e.g. export it from AI2 to desktop, rename it to "keystoreAI2.ks" and ...


Anke

Boban Stojmenovic

unread,
Apr 15, 2019, 1:06:47 PM4/15/19
to AppToMarket
I have java 12 installed on windows 10
 
I wonder if this is the case why it doesn't work for you, as I'm still using Java8 I'm unable to reproduce your issue

@Anke actually you don't need to rename it

Btw @Saad Omer, you mentioned some video tutorial but I don't recall having any

/Boban

BodyMindPower

unread,
Apr 15, 2019, 1:37:00 PM4/15/19
to AppToMarket
Hi Boban, right you can rename it to xxx.ks

Anke

Boban Stojmenovic

unread,
Apr 15, 2019, 2:38:51 PM4/15/19
to AppToMarket
I meant that you didn't have to change to .ks

/Boban

BodyMindPower

unread,
Apr 15, 2019, 3:09:03 PM4/15/19
to AppToMarket
yes, but again: you can rename it to xxx.ks

Saad Omer

unread,
Apr 15, 2019, 3:18:50 PM4/15/19
to BodyMindPower, AppToMarket
Hi,

So I used another laptop with Java 1.8 installed, and everything went ahead OK. I guess the culprit was Java 12 (for app SIGN part, as yet)! It says keystore file is invalid (when in actual it is not!).
 
Effectively, I have been able to put a high size video clip inside the decompiled APK, replacing the smaller file of the same name. The final APK gets installed on Android and works perfectly fine with the new heavy video. The final APK file size is around 18MB. Also note that I am directly installing on the phone (not publishing via Playstore).

Thanks Boban, Anke and everyone! 

Cheers,
Saad



On Tue, Apr 16, 2019 at 12:09 AM 'BodyMindPower' via AppToMarket <appto...@googlegroups.com> wrote:
yes, but again: you can rename it to xxx.ks

--

ekt...@gmail.com

unread,
May 3, 2019, 12:38:48 AM5/3/19
to AppToMarket
Hello sir. I have a question. I am able to decompile my app without issues. However, using apptomarket to set the min and target SDK version does not seem to work at all.

apk is made using mit app inventor then decompiled using apptomarket.

BodyMindPower

unread,
May 3, 2019, 3:37:46 AM5/3/19
to AppToMarket

 declare in the Manifest e.g.:

      ...

   <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

   <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />


https://developer.android.com/guide/topics/manifest/uses-sdk-element

minimum targetSdkVersion has to be 26

 

Anke

Reply all
Reply to author
Forward
0 new messages