[Q] What's happening? - Asus Transformer TF700

Exactly what is going on when you flash a rom and it says "Android is starting, Optimizing app XXX of XXX" and why is it necessary if all resident apps are current?

lmmohr4 said:
Exactly what is going on when you flash a rom and it says "Android is starting, Optimizing app XXX of XXX" and why is it necessary if all resident apps are current?
Click to expand...
Click to collapse
Android is converting the Dalvik bytecode stored in classes.dex inside the apk files to slightly better optimized bytecode (with Dalvik VM) or to executable machine code (with ART). The result is in both cases stored in dalvik-cache.
It is necessary to redo this whenever the Android framework changes (i.e. you flash a new ROM), because the apps depend on functions in the framework.

Related

[Q] what is the process for upgrade pre-installed app?

Hi,
In my understand, the pre-installed apps are placed on path /system/app, and the /system partition should be read-only partition without rooted, right?
So how the pre-installed apps can be upgraded?
For example, the pre-installed Google Maps app can be updated from Android Market. How it can replace the old Google Maps app with a new one on /system/app? What is the process?
Can someone help me to understand it?
They're installed normally to /data/app, then system uses them instead of files from /system/app. You could have checked this out by yourself.
what is the details about Google maps upgrade?
Hi, Brut
Thank you.
But could you please explain more details? I'm using Motorola ME600, no built-in Google Maps and Android Market. I can't check it by myself.
If the updated apps are installed in /data/app, how can they do that? I mean they should not be installed successfully if the updated apps used the same package name as the olds. It should fail due to the old one still exist. And how about the signature of updated app? Should it same as the old one?
Even the update apps can be installed, how does the system use them to replace the built-ins? I think we should find 2 icons in the Lanucher if they have same main entry. But in fact, there is only one icon. Why?
PS: Sorry, I have no way to find the details by myself. Please give me a hand. Thanks in advance.
I think Android OS treats system apps differently. It knows these apps can't be overwritten directly, so it uses above technique for updating them. It permits to have these apps installed twice and then it ignores system ones. Of course both files have to be signed by the same key.
If you have root, then you could check this by yourself without Market or Maps.
Remount /system .
If you have 0 free space on this partition, then remove something to have at least 100KB.
Create empty app, build it and sign.
"adb push YourApp.apk /system/app/" - Android OS should detect this and install your app. You could see this in the logcat.
"adb install -r YourApp.apk" - Android will install it to /data and use it instead of version installed to /system .
Maybe Android not always prefers /data app, but one with greater versionCode. I don't know, didn't test this.
Thanks, Brut
I followed your suggestion and tried. Yes, system replace the /system one with /data one.
Thank you help me to know this behavior of Android system.

[Q] Installing and re-installing android applications

When we download an application from Google Play Store, it downloads and then magically installs on the Android device.
But supposing we do a Factory Reset, or that we upload a new firmware or simply suppose we have another Android device at home and we would like the same application to be installed there too.
Is it possible to somehow maintain the installation files and be able to copy these files off the Android device and then use them on another device?
Yes. An app comes as an 'apk' installer file that can be transferred to another device and installed or re-installed on the same device. But to get the apks of apps installed via Playstore, you will need an app like "App Backup and Restore".
P.S. Sharing apks of paid apps is illegal and not recommended. :good:
immortalneo said:
Yes. An app comes as an 'apk' installer file that can be transferred to another device and installed or re-installed on the same device. But to get the apks of apps installed via Playstore, you will need an app like "App Backup and Restore".
P.S. Sharing apks of paid apps is illegal and not recommended. :good:
Click to expand...
Click to collapse
I have this "App Backup" but I am trying to understand the mechanism a bit more.
The apk file is not the end of the story. Try the game "Yesterday". It is a 1GB download, however the .apk is only a few MBs and the rest is the actual game. However this 1GB file comes straight from the app store, so there is a mechanism that App Backup does not cover.
I managed to restore this game by saving the data myself, but every application is different.

Issue on CM 11 Android kitkat 4.4 Link2sd inefficiency to link dex files

(i had to recreate my account on xda, because i forgot my password, that's why forced to post in Q&A section, instead of replying to the main thread)
I tried cm 11 alpha 3&4 by yajnab and since the ROM is alpha, there are some bugs, but the one which bothers me most is:
Link2sd links all three (apk,lib&dex) files to sd-ext, after linking successfully i got some 70+ MB free internal storage, but after a reboot at startup android says "Android is upgrading app xx of xx" and by doing so the system copies the linked dex (dalvik cache) files of user apps again into /data/dalvik-cache though they've been linked to sd card and shortcuts were already there to point to the intended dex files, android just plain ignores the shortcut links of link2sd and recreates the whole goddamn dalvik cache for user apps, causing a severe memory shortage, i don't exactly know what causes this problem, maybe improper int.d support maybe jenkins kernal issue ?
other bugs include (for cm 11 alpha 4 by yajnab):
*Lock screen clock needs a resizing
*dialer needs a resizing
*kernal doesnt support swap (therefore RAM expander/swapper ain't working)
*ART runtime option aint working, after selecting ART and after rebooting system agian swithces to dalvik runtime
*should include inbuilt gapps to save more space
*while playing music in a music app, if you do multitasking the music experiances glitches (So kernal needs a tweaking i guess), this effect is more pronounced in alpha 3 (alpha 4 is a bit better)
rest everything is working fine and smooth (as far as i discovered)
any fix for the link2sd thing ???
any update the ROM might require ?
or its not possible in CM 11 to prevent system from "unrecognizing" linked dex files ?
pritishp333 said:
(i had to recreate my account on xda, because i forgot my password, that's why forced to post in Q&A section, instead of replying to the main thread)
I tried cm 11 alpha 3&4 by yajnab and since the ROM is alpha, there are some bugs, but the one which bothers me most is:
Link2sd links all three (apk,lib&dex) files to sd-ext, after linking successfully i got some 70+ MB free internal storage, but after a reboot at startup android says "Android is upgrading app xx of xx" and by doing so the system copies the linked dex (dalvik cache) files of user apps again into /data/dalvik-cache though they've been linked to sd card and shortcuts were already there to point to the intended dex files, android just plain ignores the shortcut links of link2sd and recreates the whole goddamn dalvik cache for user apps, causing a severe memory shortage, i don't exactly know what causes this problem, maybe improper int.d support maybe jenkins kernal issue ?
other bugs include (for cm 11 alpha 4 by yajnab):
*Lock screen clock needs a resizing
*dialer needs a resizing
*kernal doesnt support swap (therefore RAM expander/swapper ain't working)
*ART runtime option aint working, after selecting ART and after rebooting system agian swithces to dalvik runtime
*should include inbuilt gapps to save more space
*while playing music in a music app, if you do multitasking the music experiances glitches (So kernal needs a tweaking i guess), this effect is more pronounced in alpha 3 (alpha 4 is a bit better)
rest everything is working fine and smooth (as far as i discovered)
any fix for the link2sd thing ???
any update the ROM might require ?
or its not possible in CM 11 to prevent system from "unrecognizing" linked dex files ?
Click to expand...
Click to collapse
I have installed Gapps by ZordanKV on this ROM and its worked fine. ıf you need test it you can use also gapps
link http://forum.xda-developers.com/showthread.php?t=2240652
that is fine
ahmetakin said:
I have installed Gapps by ZordanKV on this ROM and its worked fine. ıf you need test it you can use also gapps
link http://forum.xda-developers.com/showthread.php?t=2240652
Click to expand...
Click to collapse
That is good work. it Works fine on galaxy fit.
just I need air fm radio. Is there any advise about it?
Halilkomurcu said:
That is good work. it Works fine on galaxy fit.
just I need air fm radio. Is there any advise about it?
Click to expand...
Click to collapse
Halil kardeş you can downloading thirdparty fm radio app
ahmetakin said:
Halil kardeş you can downloading thirdparty fm radio app
Click to expand...
Click to collapse
sağol. Actualy ı used spirit on others Jwm, but I couldn't activate on KitKat4. it gives error.(there is no FM access etc...)
all others require Internet connection.
I'm facing this issue(since months) on android 4.2 . When I link dex to sd-ext, most apps start force closing.
pritishp333 said:
(i had to recreate my account on xda, because i forgot my password, that's why forced to post in Q&A section, instead of replying to the main thread)
I tried cm 11 alpha 3&4 by yajnab and since the ROM is alpha, there are some bugs, but the one which bothers me most is:
Link2sd links all three (apk,lib&dex) files to sd-ext, after linking successfully i got some 70+ MB free internal storage, but after a reboot at startup android says "Android is upgrading app xx of xx" and by doing so the system copies the linked dex (dalvik cache) files of user apps again into /data/dalvik-cache though they've been linked to sd card and shortcuts were already there to point to the intended dex files, android just plain ignores the shortcut links of link2sd and recreates the whole goddamn dalvik cache for user apps, causing a severe memory shortage, i don't exactly know what causes this problem, maybe improper int.d support maybe jenkins kernal issue ?
other bugs include (for cm 11 alpha 4 by yajnab):
*Lock screen clock needs a resizing
*dialer needs a resizing
*kernal doesnt support swap (therefore RAM expander/swapper ain't working)
*ART runtime option aint working, after selecting ART and after rebooting system agian swithces to dalvik runtime
*should include inbuilt gapps to save more space
*while playing music in a music app, if you do multitasking the music experiances glitches (So kernal needs a tweaking i guess), this effect is more pronounced in alpha 3 (alpha 4 is a bit better)
rest everything is working fine and smooth (as far as i discovered)
any fix for the link2sd thing ???
any update the ROM might require ?
or its not possible in CM 11 to prevent system from "unrecognizing" linked dex files ?
Click to expand...
Click to collapse
concerning dialer resizing it should hep you..
Original link http://forum.xda-developers.com/showpost.php?p=48834033&postcount=24
Galaxy_Rohit said:
I'm facing this issue(since months) on android 4.2 . When I link dex to sd-ext, most apps start force closing.
Click to expand...
Click to collapse
Yeah, should inform the developer yajnab in the main cm11 thread, he might know whats wrong about this dex thing in cm11 and in cm 10.1 as you mentioned, please someone post this problem in the main thread, i can't post since my account is new
Halilkomurcu said:
That is good work. it Works fine on galaxy fit.
just I need air fm radio. Is there any advise about it?
Click to expand...
Click to collapse
hey but gapps has no problem with this rom, iam just talking mainly about that link2sd thing...someone please stop that GODDAMN "Android is Upgrading" Thing :silly:
Regarding FM Radio, you can download "spirit FM" from playstore
pritishp333 said:
any fix for the link2sd thing ???
any update the ROM might require ?
or its not possible in CM 11 to prevent system from "unrecognizing" linked dex files ?
Click to expand...
Click to collapse
try http://goo.gl/rDlYBg
pritishp333 said:
hey but gapps has no problem with this rom, iam just talking mainly about that link2sd thing...someone please stop that GODDAMN "Android is Upgrading" Thing :silly:
Regarding FM Radio, you can download "spirit FM" from playstore
Click to expand...
Click to collapse
which spirit fm support fit?
pritishp333 said:
(i had to recreate my account on xda, because i forgot my password, that's why forced to post in Q&A section, instead of replying to the main thread)
I tried cm 11 alpha 3&4 by yajnab and since the ROM is alpha, there are some bugs, but the one which bothers me most is:
Link2sd links all three (apk,lib&dex) files to sd-ext, after linking successfully i got some 70+ MB free internal storage, but after a reboot at startup android says "Android is upgrading app xx of xx" and by doing so the system copies the linked dex (dalvik cache) files of user apps again into /data/dalvik-cache though they've been linked to sd card and shortcuts were already there to point to the intended dex files, android just plain ignores the shortcut links of link2sd and recreates the whole goddamn dalvik cache for user apps, causing a severe memory shortage, i don't exactly know what causes this problem, maybe improper int.d support maybe jenkins kernal issue ?
other bugs include (for cm 11 alpha 4 by yajnab):
*Lock screen clock needs a resizing
*dialer needs a resizing
*kernal doesnt support swap (therefore RAM expander/swapper ain't working)
*ART runtime option aint working, after selecting ART and after rebooting system agian swithces to dalvik runtime
*should include inbuilt gapps to save more space
*while playing music in a music app, if you do multitasking the music experiances glitches (So kernal needs a tweaking i guess), this effect is more pronounced in alpha 3 (alpha 4 is a bit better)
rest everything is working fine and smooth (as far as i discovered)
any fix for the link2sd thing ???
any update the ROM might require ?
or its not possible in CM 11 to prevent system from "unrecognizing" linked dex files ?
Click to expand...
Click to collapse
Have you create 2nd partition on FAT 32 ? Re-check your config, need set FAT32 to.

Clear specific app data at boot

Hey all. I have a init.d script that does several things at boot up. What I am trying to accomplish to to clear app data for a specific application at boot up. In the init.d script, I wrote:
Code:
pm clear com.application.app
This does not appear to be working. Everything else in the script works as it should. Is there a way to get this to work so that pm clear com.application.app work either at boot up/shutdown/reboot?
Thanks for your time.
Running cyanogenmod 11. I am unable to update the ROM to a more current version due to specific requirements.
I can get this to work using Script Manager, however I am not allowed to install 3rd party applications.

How could I update system apps ?

Hello, I am currently making a few software modifications on my rooted Galaxy S9 on which I installed Noble ROM from AlexisXDA to be able to use one ui 4.1 with android 12. Now I’m trying to install One UI 5 apps on it, so I already installed Samsung Messages, Contacts, Phone dialer and Gallery as system apps using Lucky Patcher and everything worked as expected, and these apps simply replaced the old ones. Though, now I am struggling to install One UI 5 files app (aka Samsung My Files 14.x). This app is only supposed to be compatible with android 12L and more recent, but I managed to change the min SDK requirement to make it run on android 12. After I changed the min SDK I installed it as system app using Lucky Patcher and now everything is working until I long press a file which makes the app crash. Digging into android files, I noticed in the system/priv-app folder that the original version of MyFiles was still installed and I can’t delete it. Second thing I noticed, in the original MyFiles folder (in private app) there’s a file with the same name as the apk but the extension .prof is added next to it. I don’t know what this file is but I’m pretty sure this is what makes the original version work fine. So, can anyone tell me what this prof file is, and how I could make one for my custom My Files App please ?
Only for clarity:
Apps stored in /system/app are APKs what are indispensable part of Android OS - user apps has nothing to do there
whereas
apps stored in /system/priv-apps are APKs to be granted system permissions, regardless of the app signature: they at any time can get removed - mostly without any harm but requires Android is got rooted
jwoegerbauer said:
Only for clarity:
Apps stored in /system/app are APKs what are indispensable part of Android OS - user apps has nothing to do there
whereas
apps stored in /system/priv-apps are APKs to be granted system permissions, regardless of the app signature: they at any time can get removed - mostly without any harm but requires Android is got rooted
Click to expand...
Click to collapse
So, if I understand it correctly it means my version of the app gets rejected every time by the priv-app folder right ? Unlike the preinstalled My Files app which is granted system permissions ?

Categories

Resources