Copy 'Installed apps' issue

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
BBB
Junior Member
Junior Member
Posts: 17
Joined: 2005-06-03, 06:21 UTC
Contact:

Copy 'Installed apps' issue

Post by *BBB »

still present issue through to 2.02beta2

some apps copy a zip file with some of the apk files present. But incomplete. Perhaps this info below can help. :)

bionic 4.1.2 - tested issue with both SD located and internal installs (function to move apps present)

maxx hd 4.1.2 - seems to be just SD located installs (function to move apps between SD and internal memory is not present)

Examples. App Size.
Installed Apps List
Electric Plasma Live Wallpaper Plus 2.5.2 SD.zip 77.8k
Eufloria HD 1.0.11 SD.zip 49.5M
FoxFi Key 1.02 SD.zip 34.2k
OfficeSuite 7.1.1237 SD.zip 32.4M
Plants Vs Zombies 4.9.8 SD.zip 1.8M

Copy Results
Electric Plasma Live Wallpaper Plus 2.5.2 SD.zip 20.9k
Eufloria HD 1.0.11 SD.zip 365.2k
FoxFi Key 1.02 SD.zip 9.5k
OfficeSuite 7.1.1237 SD.zip 8.0M
Plants Vs Zombies 4.9.8 SD.zip 83.9k

Also, seems to be only apps that are in the data\app-asec
com.foxfi.key-1.asec 2.0M
com.mobisystems.editor.office_registered-1.asec 44.6M
com.omnilabs.eufloria-1.asec 69.0M
com.popcap.pvz_na-1.asec 4.0M
mjp.android.wallpaper.plasma.plus-1.asec 2.0M


Thanks,
BBB
Sinking blown-up stars.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC just copies the APK files which are returned by the app enumeration functions. TC cannot know whether there are any custom downloads by that app.
Author of Total Commander
https://www.ghisler.com
BBB
Junior Member
Junior Member
Posts: 17
Joined: 2005-06-03, 06:21 UTC
Contact:

Post by *BBB »

That is the problem. The apk it is getting is not the valid apk to reinstall. I can often manually locate the apk file and copy it over and that one installs just fine.


BBB
Wood is as wooden as a shoe.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

So how should TC "know" that? It is just asking the system for the installed packages, and then uses applicationInfo.packageName.
Author of Total Commander
https://www.ghisler.com
BBB
Junior Member
Junior Member
Posts: 17
Joined: 2005-06-03, 06:21 UTC
Contact:

Post by *BBB »

https://docs.google.com/file/d/0B4EW3G6W16GBNjltbXFnNXhadnc/edit?usp=sharing
Notice "Perry? 1.5.0 SD" in ///Apps

https://docs.google.com/file/d/0B4EW3G6W16GBOTlabHZVN3ZjVkE/edit?usp=sharing
'pkg.apk' is the correct package. 'res.zip' is the package it grabs with total commanders method.

https://docs.google.com/file/d/0B4EW3G6W16GBbkhHeUhIZGF4bUU/edit?usp=sharing
The result of copy from ///Apps. Not what is needed to reinstall.

Would like it to copy the apk file that would allow for reinstallation.


Thanks,
BBB
Bubbling Magnetism.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't know why Android reports a ZIP instead of the APK for some apps. Maybe some kind of copy protection.
Author of Total Commander
https://www.ghisler.com
hadi_rena
Junior Member
Junior Member
Posts: 12
Joined: 2012-11-08, 08:19 UTC
Location: Bandung, Indonesia

Post by *hadi_rena »

I have a little issue when copying from '///Apps': Is it designed to have apk name with these format :

Code: Select all

'[app name]  [version no].apk'
there is two space between app name and version no. Bug ?
jazzruby
Junior Member
Junior Member
Posts: 8
Joined: 2013-07-10, 05:09 UTC

Post by *jazzruby »

ghisler(Author) wrote:I don't know why Android reports a ZIP instead of the APK for some apps. Maybe some kind of copy protection.
Starting (I believe) with Android 4.1 'Priced' (purchased) apps that are either installed or updated from the Play Store are indeed encrypted and stored in a different location (actually 2) than 'Normal' apps.

Android does provide a res.zip for themeing, etc.. and this is what TC is parsing/copying; albeit with the 'friendly' pkg name.

I posted a reply to a similar issue in the ES File Explorer thread at XDA explaining the app file locations and (root) access needed for copying/backing up these 'Priced' apps.

Here's a copy/past from that post:
Hi Shyuan,

This may or may not be relevant to your issue but I'll post anyway as it may help others.

In later versions of Android (4.x), 'Purchased' apps downloaded/updated from the Google Play Store are stored in an 'encrypted' manner and in a different location than 'Normal' apps.

Normal apps are stored at [/data/app]
Purchased apps are stored in 2 locations
[/data/app-asec] - encrypted compilation
[mnt/asec/xxx.package.name] - pkg.apk, lib and res.zip
pkg.apk - This is the application that will be backed up (root user only)
lib - Folder containing libraries extracted/installed to be used by the app/system
res.zip - Resources and AndroidManifest provided for developers of theming

Purchased apps can not be accessed for backup by 'Normal' (non-root) user, however Android makes available the resources for theming by extracting the resources from the apk and providing as a 'res.zip'

In 'Normal' (non-root) mode, ES 3 will show success on copy/backup with no error, to spite actually failing the copy/backup; this should be reported as a bug. IIRC it did/does show 'failure' on ES 1.6

If your device is rooted, you must enable root (su) in order to backup the APK/DATA for 'Purchased' apps
Fast Access > Tools > Root Explorer

Note: If your device is not rooted and you have a Backup App/Manager that is backing up 'Purchased' apps in Android 4.x; it's possible that it is only backing up the 'Resources' (res.zip) provided by the Android system for theming.

HTH,

-JR-
Notes:
TC reports these 'Priced' apps as being stored on SD, however this is not the case.
There is indeed 1 extra space (read: 2 spaces) between app name and version.
PLEASE remove the extra space and incorrect appended SD from filename when copying.
I have no doubt and much faith you will figure all this out and be able to copy the pkg.apk allowing us to backup our purchased apps.

THANK YOU for Total Commander - Android | Windows

-JR-
jazzruby
Junior Member
Junior Member
Posts: 8
Joined: 2013-07-10, 05:09 UTC

Post by *jazzruby »

Dug up a write-up by Nikolay Elenkov from a ~year ago regarding app encryption/copy protection (Forward locking) in Android which might prove helpful in this matter; in particular, 'Forward locking' and 'Jelly Bean implementation'

-JR-
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for the additional info!
2jazzruby
If I understand you correctly, it wouldn't help to copy these APK files from /data/app-asec and /mnt/asec/xxx.package.name even in root mode, because their content is encrypted. Is this correct?

Regarding the "SD", TC shows this for apps which are not stored in /data/app. I will change it.
Author of Total Commander
https://www.ghisler.com
jazzruby
Junior Member
Junior Member
Posts: 8
Joined: 2013-07-10, 05:09 UTC

Post by *jazzruby »

Hi Christian, sorry for the late reply; my email is not receiving alerts to spite having "Always notify me of replies" checked.

The files in /data/app-asec are the encrypted compilation.

The folders in the directory /mnt/asec are named after the programs pkg name and each contain a 'lib' folder, pkg.apk (the actual APK) and res.zip (AndroidManifest.xml and resources) all UNencrypted.

Currently, TC is copying the res.zip using the 'Friendly' pkg name/version.

What we want to copy is pkg.apk using the 'Friendly' pkg name.

The pkg.apk file perms are 640 rw-r--r--

Thanks,

-JR-
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I will try that!
Author of Total Commander
https://www.ghisler.com
Post Reply