Notices


Reply
Thread Tools
Posts: 28 | Thanked: 4 times | Joined on Dec 2010 @ Viterbo (Italy)
#471
Originally Posted by PIDk View Post
For everyone who interested.
New version of script to launch .apk's with config auto save/load feature. I got rid of unnecessary file operations - now config remains in /home/user/.apkenv untill different .apk is loaded. All operations with config files are made before loading .apk. Also added mechanism to search for .apk's in specific folder (apk_dir variable). As in previous version, apkenv directory is stored in apkenv_dir.
Code:
#!/bin/sh

apkenv_dir="/opt/apkenv"
apkenvwrp_dir="/home/user/.apkenvwrp"
apk_dir="/home/user/MyDocs/apk"

process_backup() {
	if [ -f $apkenvwrp_dir/current_apk.save ]; then
		save_name=$(cat "$apkenvwrp_dir/current_apk.save")
		
		if [ $1 != $save_name ]; then
			cp -rf /home/user/.apkenv/. $apkenvwrp_dir/$save_name/
			rm -rf /home/user/.apkenv/*
			
			if [ -d $apkenvwrp_dir/$1 ]; then
				cp -rf $apkenvwrp_dir/$1/. /home/user/.apkenv/
			fi
			
			echo $1 > $apkenvwrp_dir/current_apk.save
		fi
	else
		mkdir -p $apkenvwrp_dir
		echo $1 > $apkenvwrp_dir/current_apk.save
	fi
}

if [ ! $1 ]; then
	echo "Usage: apkenvwrp.sh application.apk"
	echo "Do not run under root!"
	exit 0
fi

if [ $(whoami) != "user" ]; then
	echo "User rights required!"
	exit 0
fi

if [ -f $1 ]; then
	apk_path=$(readlink -f "$1")
else
	if [ -f $apk_dir/$1 ]; then
		apk_path=$apk_dir/$1
	else
		echo "File '"$1"' doesn't exist!"
		exit 0
	fi
fi

backup_name=$(basename "$1" ".apk")

process_backup $backup_name

cd $apkenv_dir

./apkenv $apk_path

exit 0
hi PIDk this script doesn't work for me..it say
Code:
line 57: syntax error: unexpected end of file (exèecting "then")
p.s. i use it on my n900
 
Posts: 78 | Thanked: 84 times | Joined on Dec 2009 @ Moscow, Russia
#472
Originally Posted by imo View Post
Can some one do this where we can uninstall/delete a game from with in the apkenv-qml application ? I have installed a game twice with 2 different .jpg files.So if i want to get rid of them ,i have already seen the solution here on the thread but couldnt get rid of them even after purging the whole apkenv.It still shows in the apkenv manu . thanks in advance .
You have to install apkenv-qml and remove apk by long press on the appropriate icon.
__________________
MaemoWorld.ru is MeeGo/Maemo russian speaking community.
QKit is a set of QML elements, usefull to create cross-platform interfaces.
 

The Following User Says Thank You to KiRiK For This Useful Post:
Posts: 78 | Thanked: 84 times | Joined on Dec 2009 @ Moscow, Russia
#473
I have uploaded a new version of apkenv-qml: https://github.com/QKit/apkenv-qml/downloads
Version 0.2.* functional:
- selecting the path to the executable apkenv file
- data storage for each application in its own folder (do not run more than one at the same time)
- creation of icons to launch applications
- removal of applications by long pressing the icon in the program window (data is removed too)
__________________
MaemoWorld.ru is MeeGo/Maemo russian speaking community.
QKit is a set of QML elements, usefull to create cross-platform interfaces.
 

The Following 9 Users Say Thank You to KiRiK For This Useful Post:
Posts: 3 | Thanked: 0 times | Joined on Sep 2012
#474
KIRIK
File was not found.
 
Posts: 78 | Thanked: 84 times | Joined on Dec 2009 @ Moscow, Russia
#475
Some kind of bug at github.
I have reuploaded harmattan build.
__________________
MaemoWorld.ru is MeeGo/Maemo russian speaking community.
QKit is a set of QML elements, usefull to create cross-platform interfaces.
 
Posts: 120 | Thanked: 83 times | Joined on May 2012
#476
Originally Posted by gm90_blackmamba View Post
hi PIDk this script doesn't work for me..it say
Code:
line 57: syntax error: unexpected end of file (exèecting "then")
p.s. i use it on my n900
In script all if clauses are conform to syntax if-then-else-fi. You can see it by yourself.

My only guess is that you didn't copy it properly. I have N9 and the script is working perfectly fine for me. And I don't think that there is difference between N900's and N9's shells. Also, you may check line termination (they must be terminated with LF).
 

The Following User Says Thank You to PIDk For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#477
PIDk, your new script work perfectly on n9 like one before. I added new one to the next version of N9QT, thank you!
 
Posts: 78 | Thanked: 84 times | Joined on Dec 2009 @ Moscow, Russia
#478
I had an idea of an intelligent extract icon and application name from apk-files.
But the name and the path are stored in resources.arsc - resource file in apk-file.
I looked through code that compiles this with aapt .. I looked at the implementation of the parser in apktool .. and I understood that I didn't want to realize that.
So if anyone knows of ready solutions for Qt/C++ or want to help - you are welcome.
__________________
MaemoWorld.ru is MeeGo/Maemo russian speaking community.
QKit is a set of QML elements, usefull to create cross-platform interfaces.
 

The Following 2 Users Say Thank You to KiRiK For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#479
You wasting too many time to make ULTRA UNLIMITED GRAND APK LAUNCHER for 5 games. I think.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 2 Users Say Thank You to coderus For This Useful Post:
Posts: 104 | Thanked: 16 times | Joined on Sep 2012 @ german (cologne)
#480
I have tried to get it with Tweak 7, the games not to run, unfortunately. I do not know what I did wrong. The games from the list I have also tried and renamed. Unfortunately without success.

Last edited by warypopp; 2012-10-29 at 09:02.
 
Reply

Tags
android, emu_layer, new_whazapp, orphanenv, sfdroid, thp ole ole ole, thp's up, y u disobey thp

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:22.