Install applications on /system

T

The Matrix

Ambitioniertes Mitglied
18
Hi,
[sorry, i don't speak deutch]
i have a problem. i'm interested on install a applications (terminal emulator, google earth, and some others) in /system/app.
but when i install in /system/app and next i make a hardreset on my milestone, the applications are correctly showed at launcher-menu, but if i try to execute, a error is triggered and the applications don't work.
if i install in /data/app i don't have problems.
with other applications the /system/app install works without problems.
why?
thank's for the answer
 
sorry, my english is very very bad :D
some apps have problems by installing to /system/app, the apps store there settings to /data/data, after a hardreset the /data patition is clean
also the htc_ime.apk have problem when the datas vom /data/data a away

when you install an app in normal way by the market or an filemanager, the app will create the file in /data/data, but when you only copy the akp to /data/app or /system/app die files in /data/data are missing and the apps don't work...


i hope you understand what i try to explain ;) but i think an other user can explain it better :D because my english ist more then only bad ;)
 
ok.
if i make a backup of the /data/data/[APPLICATION] files and i make a script that
copies the backup to /data/data[APPLICATION] after a reset, the application that
works? is that?
 
install the app normally to /data/app/ then the app should create the folders in /data/data/ and after this you can just move the app from /data/app/ to /system/app/
I think this should work. :)
 
hi,
i'm interested on create a process that make any basic applications available after a HardReset (withouf none install).
 
The Matrix schrieb:
hi,
i'm interested on create a process that make any basic applications available after a HardReset (withouf none install).

do you mean something like gscript?
 
hi,
i'm interested on make a (basic) applications (like oi-file-explorer, terminal emulator) available after a hardreset via create the basic archives with a shell script on boot time
(including the sh code at mot_boot_mode script), and my Q is: the needed files are in
/data/data/APPLICATION (for make my backup)
thank's!!
 
gscript -.- i don't like it :D i love my adbrecovery + sh script ^^
 
i think it was a possibility to install normally via market and move them from /data/app to /system/app - just like mattmaso suggested.
after moving the apps, make a backup of /system/apps and /data/data.

after doing so you should be able to easily write a script (for e.g. gscript or shell-script for recovery console, too. just like you prefer) that moves either just those apps you installed on your own (code for every single app was necessary) or everything in these folders (would result in just two single lines of code, one for /system/app and one for /data/data). the only thing you have to be aware of, is to make and restore backup of those data the apps install into /data/data, too!

example:
- install apps via market
- make backup of /system/app (complete or just installed apps)
- make backup of /data/data (complete or just the data installed by apps)

- write script for restoring /system/app and /data/data (complete or just installed apps and data)
- you´re done :)

if you do so, it wouldn´t be a problem if updates for the apps appear, you could easily update via market. the "clean" way was making backup of just the apps (and installed data in /data/data!) you installed yourself. if some other stuff was in /data/data you would also restore these old data, if you make a complete backup.

hope this helps :)
sorry if there are some or more errors.. my english is a little rusty, i think ;)
 
ok,
i have another problem.
the directories in /data/data are ownered by the user app_X
and X is a number.
how assign the system this number? (i assume the user owner is rellevant).
thanks
 
good.
solved.

the problem of push any application to /system/app directory PERMANENTLY exists if the application uses a specific library.

the specific library is created at /data/data/[APPLICATION]/lib
after a hardReset, the /data is recreated and the libraries for the market downloaded applications are not correcly recreated.

to prevent this, you have to keep the libraries installed in applications /system and do not want to re-download.
backup, put it in /system/etc/sysapps_initial_libs/[APPLICATION]

[APPLICATION is the /data/data/DIRECTORY]

and run to start a shell (automatically via include in /system/bin/mot_boot_mode) to copy from the backup to the correct location if the libraries do not exist, which makes applications work correctly.
I attached the script, if it helps you.

#!/system/bin/sh

SOURCE_DIR="/system/etc/sysapps_initial_libs"
DESTINATION_DIR="/data/data"

for application_path in ${SOURCE_DIR}/*; do
if [ -d "$application_path" ]; then
application_name=${application_path#${SOURCE_DIR}/}
application_dest="${DESTINATION_DIR}/${application_name}/lib"
mkdir "$application_dest"
chown "system.system" "$application_dest"
chmod 755 "$application_dest"
for application_lib_path in ${SOURCE_DIR}/${application_name}/*; do
application_lib_name=${application_lib_path#${SOURCE_DIR}/${application_name}/}
if [ ! -e "${application_dest}/${application_lib_name}" ]; then
cp "$application_lib_path" "${application_dest}/${application_lib_name}"
chown "system.system" "${application_dest}/${application_lib_name}"
chmod 644 "${application_dest}/${application_lib_name}"
fi
done
fi
done

note: i'm not responsible of damages....
 
Zuletzt bearbeitet:
  • Danke
Reaktionen: KisteBier
thanks for the good job and sharing your solution with other users!

i´ll give it a try when i´ve got the time to do so.

just for understatement:
if i got it correctly, your script "just" restores the defined data, so we have to backup /system/app and /data/data first?
 
Zuletzt bearbeitet:
Hi! Is this script needed for all apps that are to be pushed to /system/app? Or only the problematic ones?
 

Ähnliche Themen

T
Antworten
1
Aufrufe
1.231
-FuFu-
-FuFu-
Boogie
Antworten
23
Aufrufe
5.873
-FuFu-
-FuFu-
-FuFu-
Antworten
234
Aufrufe
28.204
-FuFu-
-FuFu-
Zurück
Oben Unten