use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

Post by sphere » Sun Dec 14, 2014 10:20 pm

Hello,
does anybody use the APKtool ?
I created a simple app with a button, just to see if it could work.
I build the apk with Livecode and set it to Froyo 2.2.
Now decompiling with apktool gives a bunch of folders and files and i can find 3x AndroidManifest.xml--->1 in the root of the folder where all folders and files are extracted.
1 in folder build-->apk and 1 in folder Original.
They all have different sizes.

Now would it be enough to add this line <uses-sdk android:minSdkVersion="3" /> to the androidmanifest.xml ? To be able to rebuild for adroid 1.5.1 ?
In which of the 3 manifests must it be added?

I have the packages for this adroid version installed with the Android sdk manager.
So i tried it only in the root manifest but the adroid 1.5.1 device says: Could not parse blabla

Thanks for any help on this.

ps this probably goes way beyond my understanding but it's worth giving it a try. It would be a lot easier to create a simple app. in LC than in Android Studio.


***edit** ok unpacking an apk goes even simpler, just rename .apk to .zip. and the i only find 1 manifest.
but......it seems no editor can open the manifest correctly, not even XML Notepad of Microsoft on Notepad++, getting all weird characters and NULL like this
minSdkVersionNULLFF

anyone an idea?

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

Post by dave.kilroy » Sun Dec 21, 2014 12:26 pm

Hi sphere

Sorry I can't advise on this as I haven't used Android for almost a year - but there are Android experts here...

Did you find a solution or are you still stuck?

Kind regards

Dave
"...this is not the code you are looking for..."

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

Post by sphere » Sun Dec 21, 2014 1:28 pm

Hi Dave,

still a bit stuck.
I followed some tuts on youtube by tim kipp, so this helps a lot in understanding Android Studio.
But there a still issues as it is still not stable, so creating a simple test apk did not work yet, not able to build yet, some errors in Android Studio.

As it would be a very simple app, 1 button to manual refresh (but this has to go auto like every minute or so.
1 button to set which device it is, like this is device nr 5, so the correct txt for that device would be read.
3 line of text, that's it.

Another problem is probably that reading a text file form a local network drive is probably not possible with android cupcake.
So if that's also the case then it stops and they better buy something new to display the text. (its just for a workshop were on every workbench one can see which project is worked on and who the worker is who is handling it.) Just an eye catcher.

Thanks!

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

Post by dave.kilroy » Sun Dec 21, 2014 5:46 pm

I know that the minimum Android version LiveCode will build to is froyo - I've never used apktool so it may be that using it to convert a LiveCode-built Android apk to cupcake (which is what it sounds like you want to do) will be a step too far...

It looks like from other threads (e.g. http://forums.livecode.com/viewtopic.ph ... 53#p114553) that you are getting LiveCode to build for froyo ok - and the problem is getting apktool to convert it to cupcake - so as you've been getting no replies to this thread (apart from me) it sounds like you might be better off looking for support from other apktool users?

Kind regards

Dave
"...this is not the code you are looking for..."

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

Post by sphere » Sun Dec 21, 2014 7:17 pm

I also put the question on stackoverflow.com and had some tips there.
Like changing the manifest afterwards, so the minimumsdk="3" to support cupcake.
But the manifest is encrypted thus raising other issues.

To me it seemed like if that was possible then apktool could rebuild it then for cupcake, hopefully without erros but that's maybe a nice dream :)

I have to try a bit more on android studio and see if it brings me further, so maybe i get lucky.
another possible problem is the access to the network drive, so have to investigate some more.

Best regards,
Jerry

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

Post by dave.kilroy » Sun Dec 21, 2014 7:41 pm

Jerry

I'm assuming that because the RunRev engineers specified a minimum of froyo, they used froyo to test while developing their code - and quite likely made use of calls/features available in froyo but not in cupcake - so it could well be that unless apktool is clever enough to parse the code and deal with non-cupcake-friendly code that it would produce something that would never run on cupcake...

Is apktool supposed to be able to do parsing like this?

Dave
"...this is not the code you are looking for..."

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: use apktool to rebuild from Froyo2.2 to Cupcake1.5.1

Post by sphere » Sun Dec 21, 2014 9:55 pm

Hi Dave,

i don't really think that apktool is ment for this. Probably more for some minor changes and building to the same/original sdk the apk was previous build.
But i thought maybe it is a way.
After all it is easier to program in Livecode than Android Studio, but following these tutorials on youtube it is getting more understandable what to do and how things structured. Livecode is of course very nice packed and does the difficult parts for you.

I really love Livecode, but for this tiny app. i thought i could give i a try to get a little grip on Android Studio. Also you can see what Livecode does for you while creating the packages. Then you can see what a hard work the people of livecode do to get us creating our ideas and get them to light.

Regards,
Jerry

Post Reply

Return to “Android Deployment”