As of now I have all of the sys apps deodexed and about half of the framework deodexed. I'm working to find out why i cannot complete the framework deodex. I will edit this post with downloads as I go. The first edit will be the deodexed apk's and the partial on the framework. just need to get them uploaded first.
Current thanks list is:
abcdjdj- Universal Deodexer V4
Alokbina- Universal Deodexer V4
framework- http://www.androidfilehost.com/?fid=23134718111253137
apps- http://www.androidfilehost.com/?fid=23134718111253138
xkwr27 said:
As of now I have all of the sys apps deodexed and about half of the framework deodexed. I'm working to find out why i cannot complete the framework deodex. I will edit this post with downloads as I go. The first edit will be the deodexed apk's and the partial on the framework. just need to get them uploaded first.
Current thanks list is:
abcdjdj- Universal Deodexer V4
Alokbina- Universal Deodexer V4
framework- http://www.androidfilehost.com/?fid=23134718111253137
apps- http://www.androidfilehost.com/?fid=23134718111253138
Click to expand...
Click to collapse
I managed to fully deodex this ROM: P5200XXUAMG7_P5200OXXAMG4_XEH.zip (it's for P5200 3G model)
Here is the script I wrote for deodexing:
Code:
#!/bin/bash
for f in *.odex; do
no_ext=`echo $f | sed 's/.odex//'`
echo "deodexing $no_ext"
java -Xmx512m -jar /home/android/bin/baksmali-2.0b6.jar -a 17 -d ../system/framework -x $no_ext.odex
java -Xmx512m -jar /home/android/bin/smali-2.0b6.jar -a 17 -o classes.dex out
rm -rf out
if [ -e $no_ext.apk ]
then
zip -r -q $no_ext.apk classes.dex
fi
if [ -e $no_ext.jar ]
then
zip -r -q $no_ext.jar classes.dex
fi
rm -rf classes.dex
done
I used the latest baksmali and smali. It showed some error messages for Dropbox.odex and Magazines.odex files, but these two can be deodexed as well if you remove the -a switch from baksmali and smali lines.
Hope this helps.
Thanks if you have it linked anywhere on here I'll have to look at it to make sure I am not trying to do the same work twice. but in the mean time I'll give that script a try.
I have all deodexed...
But I have a update-binary issue that lets me not install a custom rom.
Status 7
set_perm issue
or
set_symlink issue
xkwr27 said:
As of now I have all of the sys apps deodexed and about half of the framework deodexed. I'm working to find out why i cannot complete the framework deodex. I will edit this post with downloads as I go. The first edit will be the deodexed apk's and the partial on the framework. just need to get them uploaded first.
Current thanks list is:
abcdjdj- Universal Deodexer V4
Alokbina- Universal Deodexer V4
framework- http://www.androidfilehost.com/?fid=23134718111253137
apps- http://www.androidfilehost.com/?fid=23134718111253138
Click to expand...
Click to collapse
i was looking for this.. but i cant downlaod it its telling me " no mirror found" but only with this file
framework- http://www.androidfilehost.com/?fid=23134718111253137
johnso said:
i was looking for this.. but i cant downlaod it its telling me " no mirror found" but only with this file
framework- http://www.androidfilehost.com/?fid=23134718111253137
Click to expand...
Click to collapse
Well I've deleted them now... Dutch dany has them completed up in a post anyway, that's why I never bothered finishing.
Oohh to bad because the one you hsve is for p5200and the one from dutchdanny is for p5210
I just need the framework data ..
Sent from my GT-P5200 using xda app-developers app
xmaczi123 said:
I managed to fully deodex this ROM: P5200XXUAMG7_P5200OXXAMG4_XEH.zip (it's for P5200 3G model)
Here is the script I wrote for deodexing:
Code:
#!/bin/bash
for f in *.odex; do
no_ext=`echo $f | sed 's/.odex//'`
echo "deodexing $no_ext"
java -Xmx512m -jar /home/android/bin/baksmali-2.0b6.jar -a 17 -d ../system/framework -x $no_ext.odex
java -Xmx512m -jar /home/android/bin/smali-2.0b6.jar -a 17 -o classes.dex out
rm -rf out
if [ -e $no_ext.apk ]
then
zip -r -q $no_ext.apk classes.dex
fi
if [ -e $no_ext.jar ]
then
zip -r -q $no_ext.jar classes.dex
fi
rm -rf classes.dex
done
I used the latest baksmali and smali. It showed some error messages for Dropbox.odex and Magazines.odex files, but these two can be deodexed as well if you remove the -a switch from baksmali and smali lines.
Hope this helps.
Click to expand...
Click to collapse
Thanks for the info about the "a" option. Ran in to this dilemma earlier.
Related
Use at your own risk! I am not responsible for any bricked devices. You have been warned.
I have only tested this on a droid 1 so if any brave soul uses it shoot me some feedback.
Theme Loader is a script that installs custom themes for any rooted device. I wrote it because I saw some terrible instructions on how to load themes for devices that didn't have a custom recovery yet. This script should work on any device and I hope it's useful for those who do not yet have a custom recovery or who just choose to use this.
Theme Loader Script:
----------------------
----------------------
(right click and save)
Install the script:
** note: must have busybox installed **
1. Download load_theme
2. Place load_theme on the root of your sdcard
3. Download a terminal emulator app from the market
4. Open terminal and type:
PHP:
su
** mount system read/write here (need command for specific device) **
cp -f /sdcard/load_theme /system/xbin
chmod 0755 /system/xbin/load_theme
Load a theme:
1. Place all the files you want to install in a directory called "new_theme"
** for a template of how it should look like download the zip below **
2. Place the directory new_theme on the root of your sdcard
3. In terminal or adb shell type:
PHP:
su
load_theme [options]
4. Watch as your new theme installs.
load_theme options:
PHP:
Usage: load_theme [-a|-b|-c|-f|-fs|-m|-l|-r|-z|-v|-h]
Options:
-a | --apps Installs themed apps
-b | --backup Backs up current system settings
-c | --complete Installs full theme
-f | --framework Installs framework
-fs | --fonts Installs fonts
-l | --logging Disable logging for this run
-m | --media Installs media files
-r | --restore Restores system backup
-z | --zipalign Zipaligns all apks
-v | --version Print version
-h | --help This help
Always specify options as separate words
e.g. -a -f instead of -af. Its required!
Examples:
This will install the full theme and turn off logging:
PHP:
su
load_theme -l -c
This will zipalign all your apps and backup your system:
PHP:
su
load_theme -z -b
Well, I followed the directions and had a successful backup. Worked perfectly. Excellent job!
Now I just need a theme. Has anyone seen any for the rooted droid 2?????
Droid 2
OS 2.2.20
Rooted following directions in XDA thread
rummy, is does this just copy a framework or copy all images from one into the other? (in other words, does this require a droid 2 specific theme?)
I got this when I tried to load a theme, the only file in the theme was /sdcard/new_theme/framework/framework-res.apk:
Code:
# load_theme -c
load_theme -c
Zipaligning all apks...
find: not found
No themed apps found. Skipping...
No custom fonts found. Skipping...
Media not found. Skipping...
wc: not found
find: not found
-gt: unexpected operatorNo framework found. Skipping...
------------------------------------
___
| |_ _ ._ _ _ | _ _. _| _ ._
| | |(/_| | |(/_ |_(_)(_|(_|(/_|
-JRummy16
------------------------------------
Changes were made to your system requiring a reboot.
Your device will reboot in 5 seconds...
KalenXI said:
I got this when I tried to load a theme, the only file in the theme was /sdcard/new_theme/framework/framework-res.apk:
Code:
# load_theme -c
load_theme -c
Zipaligning all apks...
find: not found
No themed apps found. Skipping...
No custom fonts found. Skipping...
Media not found. Skipping...
wc: not found
find: not found
-gt: unexpected operatorNo framework found. Skipping...
------------------------------------
___
| |_ _ ._ _ _ | _ _. _| _ ._
| | |(/_| | |(/_ |_(_)(_|(_|(/_|
-JRummy16
------------------------------------
Changes were made to your system requiring a reboot.
Your device will reboot in 5 seconds...
Click to expand...
Click to collapse
odd... Looks like you don't have busybox installed because those are all busybox commands that look to be missing. But.... I put a pre-req check in the script to check for busybox so that's weird. Do you have busybox installed?
JRummy, I am getting the same errors and as far as I know busy box is installed. (all the cp commands worked fine as did titanium backup
I was experimenting with bgill55's black ice. unzipped and put each of the components in the appropriate New_theme directory.
Thanks for your help.
marsha12151 said:
JRummy, I am getting the same errors and as far as I know busy box is installed. (all the cp commands worked fine as did titanium backup
I was experimenting with bgill55's black ice. unzipped and put each of the components in the appropriate New_theme directory.
Thanks for your help.
Click to expand...
Click to collapse
ok.. I know what's going on.. Since busybox isn't symlinked it won't work properly because I forget a couple variables in spots. I'll fix it and upload tomorrow.
Could someone explain the method to zipalign please?
Best wishes.
sathkartha said:
Could someone explain the method to zipalign please?
Best wishes.
Click to expand...
Click to collapse
zipalign -f -v <alignment> old.apk new.apk
-f is overwirte old apk file if you want to keep old apk remove the -f
-v is verbose mode
if you want to check an apk to see if it is already been zipaligned
zipalign -c -v <alignment> existing.apk
again
-v for verbose
-c is confirm
THIS IS NEEDED! for the <alignment> you can best choose 4 this will give the best results so the final lines will be
zipalign -f -v 4 old.apk new.apk or ofc zipalign -v 4 old.apk
zipalign -c -v 4 existing.apk
best is to have verbose mode always on to see if there are any errors
also you need to now zipalign file is located in /tools folder from SDK
so if you added it to system32 you can use the lines above otherwise run this command first "cd /path-to-sdk/tools"
when you build apk for 1.6+ android versions you can use Ant this will be used by default when building the apk in debug mode
most apps have this but not all (Ant align and signs the apk)
when you build apk's with eclipse you can use ADT plugin which also will automaticly align and sign the output.apk for you but only if you use the wizard for exporting the apk
and never do align and then sign this will break the align
always sign and then align but this is only when you build an apk and you export it without using the wizard
now you know everything about zipaligning lol
Thank you very much.
Best wishes.
Sent from my X10mini using XDA App
and what is alignment for?
1. purpose just speeding up the system.ext2 file making.I'm lazy....
2. use it in Ubuntu O.S. with root account
3. decompress this auto builder and put it in folder /root or else place
4. put the CWM ROM's zip file in the folder "cwm_rom" and put the kernel modules *.ko files in the folder " kernel"
5.open terminal, cd the folder of this scripts, and execute it.
bash systemext2builder.sh then it will auto build the system.ext2 for SD ROM.
here is a demo how to use http://www.mediafire.com/?3lj5iuiv6ddcppi or http://dl.dbank.com/c0xn7ck608
Code:
#!/bin/bash
####################################################
# HD2 Android SD/MAGLDR ROM system.ext2 Auto builder.
# version 1.0
# By 3dak on 2011-04-29
##################################################
# to get current script's path
script_dir=`dirname $(readlink -f $0)`
extract_dir=$script_dir/extract
mount_dir=/mnt/system
#check the $mount_dir folder and ensure it is unmount and it's a fresh empty folder
if [ -d "$mount_dir" ] ; then
umount $mount_dir
rm -rf $mount_dir
mkdir $mount_dir
else
mkdir $mount_dir
fi
#to ensure there is no old extract folder or system.ext2
if [ -d "$extract_dir" ] ; then
rm -rf $extract_dir
fi
if [ -f $script_dir/system.ext2 ]; then
rm -f $script_dir/system.ext2
fi
#to get the main file name of the latest MIUI CWM ROM (*.zip) and decompress it!
# Please put the latest MIUI CWM ROM in the folder $script_dir/cwm_rom
build=`ls $script_dir/cwm_rom/*.zip | tail -1`
unzip $build -d $extract_dir/
#now change the cwm_rom kernel to SD version's kernel
#Please put all kernel modules *.ko files in the folder $script_dir/kernel
rm $extract_dir/system/lib/modules/*.ko
cp $script_dir/kernel/*.ko $extract_dir/system/lib/modules/
# Now create a fresh empty 250MB system.ext2 image file and format it.
dd if=/dev/zero of=$script_dir/system.ext2 bs=1048576 count=250
mke2fs -F $script_dir/system.ext2
#Now mount this fresh system.ext2
mount -o loop $script_dir/system.ext2 $mount_dir
#Now copy the CWM ROM's system folder to the $mount_dir (/mnt/system )
cp -ar $extract_dir/system/* $mount_dir/
############################################################
# Read CWM ROM's updater-script
# Createa Symlinks and set permissions of folders and files
#############################################################
updater_script=$extract_dir/META-INF/com/google/android/updater-script
# create symbolic links
SYMLINKS=`grep "symlink" $updater_script | cut -d'"' -f2`
for SYMLINK in $SYMLINKS; do
echo "Creating symolic links for $SYMLINK..."
if [ "$SYMLINK" = "busybox" -o "$SYMLINK" = "iwmulticall" ]; then
LINK_DIR='/system/xbin/'
elif [ "$SYMLINK" = "toolbox" ]; then
LINK_DIR='/system/bin/'
fi
MATCHES=`awk '/symlink\(\"'"$SYMLINK"'/,/\);/ {print}' $updater_script | \
sed "s/symlink(\"$SYMLINK\",//g" | \
sed 's/);//g' | \
sed 's/"//g' | \
sed 'N;s/\n//g' | \
sed 's/ //g' | \
sed 's/,/ /g' | \
sed "[email protected][email protected]@g"`
cd /mnt/$LINK_DIR
for LINK in $MATCHES; do
echo -n "Linking $SYMLINK to $LINK... "
ln -sf $SYMLINK $LINK && echo "done"
done
done
# set permissions
grep "set_perm_recursive" $updater_script | grep -v "tmp" | grep -v "recovery" | \
while read LINE; do
PERM=`echo $LINE | sed 's/set_perm_recursive(//g' | sed 's/);//g' | sed 's/"//g' | sed 's/ //g'`
USER=`echo $PERM | cut -d',' -f1`;
GROUP=`echo $PERM | cut -d',' -f2`;
DIR_PERM=`echo $PERM | cut -d',' -f3`;
FILE_PERM=`echo $PERM | cut -d',' -f4`;
TARGET=`echo $PERM | cut -d',' -f5`;
echo -n "Setting permissions for $TARGET... "
chown -R $USER:$GROUP /mnt$TARGET
chmod -R $DIR_PERM /mnt$TARGET
find /mnt$TARGET -type f -exec chmod $FILE_PERM {} \; && echo "done"
done
grep "set_perm" $updater_script | grep -v "recursive" | grep -v "tmp" | grep -v "recovery" | \
while read LINE; do
PERM=`echo $LINE | sed 's/set_perm(//g' | sed 's/);//g' | sed 's/"//g' | sed 's/ //g'`
USER=`echo $PERM | cut -d',' -f1`;
GROUP=`echo $PERM | cut -d',' -f2`;
FILE_PERM=`echo $PERM | cut -d',' -f3`;
TARGET=`echo $PERM | cut -d',' -f4`;
echo -n "Setting permissions for $TARGET... "
chown $USER:$GROUP /mnt$TARGET
chmod $FILE_PERM /mnt$TARGET && echo "done"
done
#now unmount system.ext2
umount $mount_dir
#cleanup
rm -rf $extract_dir
echo " All Done!"
# EOF by 3dak :) 2011-04-29
if you wanna a system.img file too for DAF ROM, add the follwoing line before this line #now unmount system.ext2
Code:
mkyaffs2image $mount_dir $script_dir/system.img
tools.zip is some tools for rom making. put them in the foloer
/usr/local/bin
Wonderful !
Would love to see such an application for Windows OS ....
that's very cool! now we can make new sd builds by ourselves
thanks 3dak!
3dak said:
1. purpose just speeding up the system.ext2 file making.I'm lazy....
Click to expand...
Click to collapse
Man this way you take away all the fun!!
Joking... I'm lazy, too!
great tool, work great to build miui 1.4.29
Thanks 3dak
It's so bad that I don't use Ubuntu OS!
I am looking for some tool like this for a long time but running in Windows OS!
kimquypticc said:
It's so bad that I don't use Ubuntu OS!
I am looking for some tool like this for a long time but running in Windows OS!
Click to expand...
Click to collapse
Use ubuntu.
Just make a live cd or live flash drive. It's worth it
Sent from my HD2 using XDA app
kimquypticc said:
It's so bad that I don't use Ubuntu OS!
I am looking for some tool like this for a long time but running in Windows OS!
Click to expand...
Click to collapse
Or use it in a VirtualBox.
It's rather easy
peter
this is just Awesome!
Awesome, I will test this soon!
Problem for build mimu 1.5.20
It's a good application.
I put the miui_HD2_1.5.20_3nhrpwvbo7_2.3.zip into the cwm_rom folder, and copy all *.ko files that extracted from the system.ext2's \lib\modules folder in the miui_HD2_1.5.20_3dak_SD_2.3.4_ACA_r518.7z into the kernel folder, then a system.ext2 file was built with no errors.
I replaced the origin system.ext2 from the miui_HD2_1.5.20_3dak_SD_2.3.4_ACA_r518 by this file, run it from my HD2 SD card, all was fine expect the GPRS. The origin system.ext2 hasn't this bug.
What's the different?
Ty 3dak for this. Are there no way to do this in Windows?
giveup said:
It's a good application.
I put the miui_HD2_1.5.20_3nhrpwvbo7_2.3.zip into the cwm_rom folder, and copy all *.ko files that extracted from the system.ext2's \lib\modules folder in the miui_HD2_1.5.20_3dak_SD_2.3.4_ACA_r518.7z into the kernel folder, then a system.ext2 file was built with no errors.
I replaced the origin system.ext2 from the miui_HD2_1.5.20_3dak_SD_2.3.4_ACA_r518 by this file, run it from my HD2 SD card, all was fine expect the GPRS. The origin system.ext2 hasn't this bug.
What's the different?
Click to expand...
Click to collapse
the different is my system.ext2 opened PPP mode while official MIUI ROM didn't.
giveup said:
It's a good application.
copy all *.ko files that extracted from the system.ext2's \lib\modules folder in the ?
Click to expand...
Click to collapse
in Ubuntu, how do you extract files from system.ext2?
Any comprehensive step by step?
ketzazu said:
in Ubuntu, how do you extract files from system.ext2?
Any comprehensive step by step?
Click to expand...
Click to collapse
Just mount it :
mkdir /mnt/mysystemext2
mount -t ext2 -o loop system.ext2 /mnt/mysystemext2
then go to /mnt/mysystemext2 folder to copy or modify
Sent from my HTC HD2 using xda premium
3dak said:
Just mount it :
mkdir /mnt/mysystemext2
mount -t ext2 -o loop system.ext2 /mnt/mysystemext2
then go to /mnt/mysystemext2 folder to copy or modify
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
Thanks! I'll try those commands instead.
3dak said:
Just mount it :
mkdir /mnt/mysystemext2
then go to /mnt/mysystemext2 folder to copy or modify
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
No matter what I do the system.ext2 is always missing in action, nowhere to be found even after I "sudo chmod 777" the folders. I always get the error "system.ext2: No such file or directory"
I have ubuntu installed in a different drive than windows 7
This is what I did: BTW, I always have to sudo since I don't login as root
I put this zipped NAND "Runnymede_0.82.401.1_v1.3_Tmous" to the folder as you instructed,
I extract all the ".ko" files from this ziped ROM and put them in the "kernel" folder as instructed.
I go to terminal and i sudo the bash command. It spits out the system.ext2 file with a lot of other files.
I copy the system.ext2 file to the Desktop.
then mkdir /mnt/mystemext2
then mount -t ext2 -o loop system.ext2 /mnt/mysystemext2
I sudo chmod 777 the folders to be able access them. I even drag the system.ext2 from the Desktop to the /nmt and mnt/systemext2.
Still, all is empty.
What am i doing wrong?
When I try to copy directly system.ext2 to /mnt or /mnt/system.ext2 I get "not enough space error" but I don't see anything in the "lost+found" folder or anywhere else.
And also what program to use in Ubuntu to be able to open and see and edit the contents of system.ext2 in the folder?
PS. What are the instructions to use tools.zip for ROM making?
Thanks!
ketzazu said:
No matter what I do the system.ext2 is always missing in action, nowhere to be found even after I "sudo chmod 777" the folders. I always get the error "system.ext2: No such file or directory"
I have ubuntu installed in a different drive than windows 7
This is what I did: BTW, I always have to sudo since I don't login as root
I put this zipped NAND "Runnymede_0.82.401.1_v1.3_Tmous" to the folder as you instructed,
I extract all the ".ko" files from this ziped ROM and put them in the "kernel" folder as instructed.
I go to terminal and i sudo the bash command. It spits out the system.ext2 file with a lot of other files.
I copy the system.ext2 file to the Desktop.
then mkdir /mnt/mystemext2
then mount -t ext2 -o loop system.ext2 /mnt/mysystemext2
I sudo chmod 777 the folders to be able access them. I even drag the system.ext2 from the Desktop to the /nmt and mnt/systemext2.
Still, all is empty.
What am i doing wrong?
When I try to copy directly system.ext2 to /mnt or /mnt/system.ext2 I get "not enough space error" but I don't see anything in the "lost+found" folder or anywhere else.
And also what program to use in Ubuntu to be able to open and see and edit the contents of system.ext2 in the folder?
PS. What are the instructions to use tools.zip for ROM making?
Thanks!
Click to expand...
Click to collapse
put system.ext2 in your home folder,
then open terminal,
cd ~ (this will goto your home folder)
ls (check if you can see system.ext2, if no, you put it at wrong place)
mkdir /mnt/mysystemext2
mount -t ext2 -o loop system.ext2 /mnt/mysystemext2
-----------------
or if you want to keep the created system.ext2 is mounted, just open the 3daksystemext2builder.sh,
#now unmount system.ext2
umount $mount_dir
change to
#now unmount system.ext2
#umount $mount_dir
this will keep the system.ext2 is at MOUNT status after the system.ext2 created. check folder /mnt/system and modify or copy
remember to umount it after you finish your work,
umount /mnt/system
3dak said:
put system.ext2 in your home folder,
then open terminal,
cd ~ (this will goto your home folder)
ls (check if you can see system.ext2, if no, you put it at wrong place)
mkdir /mnt/mysystemext2
mount -t ext2 -o loop system.ext2 /mnt/mysystemext2
-----------------
or if you want to keep the created system.ext2 is mounted, just open the 3daksystemext2builder.sh,
#now unmount system.ext2
umount $mount_dir
change to
#now unmount system.ext2
#umount $mount_dir
this will keep the system.ext2 is at MOUNT status after the system.ext2 created. check folder /mnt/system and modify or copy
remember to umount it after you finish your work,
umount /mnt/system
Click to expand...
Click to collapse
thanks again! I'll give it a try. But first, I have to figure out how to get damsel Ubuntu out of that sudden "Read only" blues madness.
Thank you finally found learning to learn!!!
Hi guys, i am trying to make my first deodex of android.policy but somehow after deodex and reboot, my samsung i8582 (Grand Quattro) never reboots.
Disassembling android.policy.odex ...
java -Xmx512m -jar baksmali.jar -a 16 -d ../framework -x android.policy.odex
Assembling into classes.dex ...
java -Xmx512m -jar smali.jar -a 16 -o classes.dex out
Found android.policy.jar
Removing android.policy.odex ...
Put classes.dex into android.policy.jar ...
My question is: Do i have to deodex ALL files in /system/framework and /system/apps to make it work ? Or can i have a few files odexed and others deodexed ?
source : Note4 Korean Version
apks in /system/app, /system/priv-app, /system/framework folder
All QMG images are converted to PNG
Let's Theme It !!
Have FUN !!
https://www.mediafire.com/?13bircd90fm6xl3
** replace .qmg with same-named .png in apk
- works fine....
Unreal...u r a madman. Downloading now, assuming u r say on all the image extensions originally were .qmg but in the dump they r .PNG so we can use cs6, as we theme each as indivual file resave as .qmg correct?
wally3614 said:
Unreal...u r a madman. Downloading now, assuming u r say on all the image extensions originally were .qmg but in the dump they r .PNG so we can use cs6, as we theme each as indivual file resave as .qmg correct?
Click to expand...
Click to collapse
AGREED!....mind sharing this secret to conversion?!?!?!?!?
converted with my phone
jimmydene84 said:
AGREED!....mind sharing this secret to conversion?!?!?!?!?
Click to expand...
Click to collapse
http://forum.xda-developers.com/chef-central/android/hint-convert-qmg-image-to-png-image-t2903896
qmg image is a kind of png
no decoding codec we can use
but Samsung mobile has the decoding codec
so... my phone can read qmg ( in many gallery apps ) just after renaming .qmg to .png
and QuickPic re-save as .png format...
DISADVANTAGE of convertsion to png
- qmg has smaller size (about 1/2 )
- qmg rapid speed (max - 7 times than png )
BUT using png images, We can theme....
wally3614 said:
Unreal...u r a madman. Downloading now, assuming u r say on all the image extensions originally were .qmg but in the dump they r .PNG so we can use cs6, as we theme each as indivual file resave as .qmg correct?
Click to expand...
Click to collapse
No We can't make .qmg image.
No encoding codec...
But replaced .png images works fine in apk...
So We can use that apk without .qmg images
hansmoon said:
No We can't make .qmg image.
No encoding codec...
But replaced .png images works fine in apk...
So We can use that apk without .qmg images
Click to expand...
Click to collapse
I was dealing with qmg images in my S3 4.4.4 official ROM (yeah, S3 4.4.4 uses QMG because of limited size of system partition).
I found one major difference from PNG - it doesn't use .9. in names of nine-patch images, but still use none-patch images.
It means, you have to find all these converted png images and rename them to .9.png. I even don't know how these nine patches are coded in QMG. Same as in .9.png - black 1-pixel wide lines on the edges?
I appreciate you work but I think that put only PNG instead of Qmg isn't working. For example on my S4 Note 4 stock camera runs, your Png one runs too but you can't see any button so it means that it didn't read the new Png.
sorg said:
I was dealing with qmg images in my S3 4.4.4 official ROM (yeah, S3 4.4.4 uses QMG because of limited size of system partition).
I found one major difference from PNG - it doesn't use .9. in names of nine-patch images, but still use none-patch images.
It means, you have to find all these converted png images and rename them to .9.png. I even don't know how these nine patches are coded in QMG. Same as in .9.png - black 1-pixel wide lines on the edges?
Click to expand...
Click to collapse
my S3
- 9.pmg
- png
- no qmg
S4
- 9.png
- qmg
- no png
Your S3 ???
- png
- qmg
image.9.png in my phone
so I don't have any problem
** .png anf 9.png had same magic file head.
9.png has npTc chunk bytes betweem file header and image data
you can check it in hex editor.
Albe95 said:
I appreciate you work but I think that put only PNG instead of Qmg isn't working. For example on my S4 Note 4 stock camera runs, your Png one runs too but you can't see any button so it means that it didn't read the new Png.
Click to expand...
Click to collapse
aapt list -a file.apk results :
resource 0x7f0201b1 com.google.android.apps.plus:drawable/hp_ll_20: t=0x03 d=0x000000d3 (s=0x0008 r=0x00)
drawable image described without any ext.
So I replaced .qmg with .png
I don't know any difference in Note4
BUT some devices have no problem S3, Note2, S4 ...
I think ... (may be)
Decompile - Replace - Recompile
it Will Works FINE.
** needs RECOMPILE
hansmoon said:
my S3
- 9.pmg
- png
- no qmg
S4
- 9.png
- qmg
- no png
Your S3 ???
- png
- qmg
image.9.png in my phone
so I don't have any problem
** .png anf 9.png had same magic file head.
9.png has npTc chunk bytes betweem file header and image data
you can check it in hex editor.
Click to expand...
Click to collapse
It's very interesting! Can you tell which S3 ROM you've checked?
My ROM is I9305XXUFNI3. There are no *.pmg files in resources (i've checked SecMms, SecSettings, SecContacts, SecPhone). Only *.qmg. And there are no *.9.qmg either. So all images are simply *.qmg. If i want to replace it to .png then i have to discover by myself if it should be simple png or 9.png.
I'm using Apktool v2.0.0-625d04-SNAPSHOT (should be pre-rc2, i've compled by myself). What version of Apktool you're using?
---------- Post added at 09:15 AM ---------- Previous post was at 09:09 AM ----------
Argghhh.. i see where is the problem!
I've just unzipped one of original apk - and i see 9.qmg (not 9.pmg) there.
Thus i need to update Apktool to not let it rename 9.qmg to qmg.
Another interesting thing: android works with 9.qmg as qmg without problem (with correct resizing).
E210SKSUKNI3
E210S - Korean Version I9305, BUT fstab is COMPATIBLE I9300
in my phone No .qmg, 9.qmg
only .png and 9.png
SO~ no any apktool problem
hansmoon said:
E210SKSUKNI3
E210S - Korean Version I9305, BUT fstab is COMPATIBLE I9300
in my phone No .qmg, 9.qmg
only .png and 9.png
SO~ no any apktool problem
Click to expand...
Click to collapse
You can check my signature - my S3 is also E210, but i've made custom ROM from I9305 ROM to get rid of all Korean customizations.
Anyway, we are talking about QMG file format. Now i know where is the problem.
hansmoon said:
so... my phone can read qmg ( in many gallery apps ) just after renaming .qmg to .png
and QuickPic re-save as .png format...
Click to expand...
Click to collapse
can you explain how to mass-re-save the images?
Also, it looks like you will loose 9-patches after re-save. Original 9-patch png (and 9.qmg as well) in apk has special header about patches. Apktool convert it to stripes at the edges of image. But, if you save 9.png (9.qmg originally) then you will loose original header and also image won't have stripes. Thus you cannot use neither directly by re-zipping the APK nor in apktool.
sorg said:
can you explain how to mass-re-save the images?
Also, it looks like you will loose 9-patches after re-save. Original 9-patch png (and 9.qmg as well) in apk has special header about patches. Apktool convert it to stripes at the edges of image. But, if you save 9.png (9.qmg originally) then you will loose original header and also image won't have stripes. Thus you cannot use neither directly by re-zipping the APK nor in apktool.
Click to expand...
Click to collapse
I converted thousands of .qmg images USING shell script.
I made script that extraxt only .qmg ( using 7z binary)
and then send intent QuickPic CropActivity
for...
am start -W -a android.intent.action.VIEW -n com.alensw.PicFolder/.CropActivity -d "file://..........png"
And touch event...
done
like this...
And I converted .qmg to .png ONLY.
There is no .9.qmg in My S3 Firm and Note4 Firm.
(All Nine Patch images are .9.png format filename)
Sorry~
this is my script
(7za zipalign binary needed)
sh - /sdcard/Download/modding
input
app - /sdcard/Download/modding/app
priv-app - /sdcard/Download/modding/priv-app
output
conv_app - /sdcard/Download/modding/app
conv_priv-app - /sdcard/Download/modding/priv-app
(output apk contains only res folder, converted .png images from .qmg)
#!/system/bin/sh
dir=/sdcard/Download/modding
cd $dir
N='\e[0m'
black='\e[0;30m'
green='\e[1;32m'
yellow='\e[1;33m'
purple='\e[1;35m'
cyan='\e[1;36m'
white='\e[1;37m'
bins="busybox 7za zipalign"
for binary in $bins ; do
bin=`which $binary`
if [ -z $bin ]
then
echo
echo ${yellow}"No $binary Binary."
echo "Needs : "$bins${N}
exit
fi
done
clear
echo
ltup="┌" ; rtup="┐"
ltlo="└" ; rtlo="┘"
hori="─" ; vert="│"
box() {
isko=
msg=$1
isko=$2
msglen=${#msg}
if [ "$isko" = "k" ] ; then
msglen=$(( msglen * 2 / 3 ))
elif [ "$isko" -gt 0 ] ; then
msglen=$isko
fi
boxwidth=$((msglen+2))
echo -n $ltup
for i in `seq 1 $boxwidth` ; do
echo -n $hori
done
echo $rtup
echo $vert" "$msg" "$vert
echo -n $ltlo
for i in `seq 1 $boxwidth` ; do
echo -n $hori
done
echo $rtlo
}
echo ${cyan}"╔══════════════════════════════╗"
echo "║ QMG Image Converter. - MELFY ║"
echo "╚══════════════════════════════╝"${N}
echo
conv_qmg() {
echo ${yellow}"APK : "$apkname${N}
echo
isqmg=$( 7za l -tzip $apkname | grep ".qmg" )
if [ -z "$isqmg" ] ; then
echo ${purple}"No qmg image in APK."${N}
echo
return 1
fi
rm -rf res
7za x -tzip $apkname res/*.qmg -r -y > /dev/null 2>&1
qmgs=$( find ./res -iname "*.qmg" )
qcnt=$( echo $qmgs | wc -w )
tqcnt=0
for j in $qmgs ; do
echo ${green}${j##*/}${N}
echo
(( tqcnt += 1 ))
echo ${cyan}$tqcnt" / "$qcnt${N}
pngname=${j/.qmg/.png}
tmpname=${pngname/.png/~01.png}
fpath=${j%/*}
fname=${j##*/}
onlyname=${fname%.*}
mv $j $fpath"/"$onlyname".png"
fullpath=$( echo $fpath | sed "s/^.//" )
fullpath=$dir"/"$fullpath
am start -W -a android.intent.action.VIEW -n com.alensw.PicFolder/.CropActivity -d "file://"$fullpath"/"$onlyname".png" > /dev/null 2>&1
input tap 700 100
#pid_jobs=`jobs -p`
#pid_jobs=$!
#sleep 3
#rm -f $pngname
wait #$pid_jobs
if [[ $tqcnt -le 3 ]] ;
then
sleep 2
fi
mv $tmpname $pngname
rm -f $tmpname
echo $tmpname
echo
done
#7za d -tzip $apkname res/*.qmg -r -y > /dev/null 2>&1
7za a -tzip $apkname".tmp" res -y > /dev/null 2>&1
mv $apkname".tmp" $apkname
zipalign -f 4 $apkname aligned_$apkname
mv aligned_$apkname $apkname
touch $apkname
(( cnt += 1 ))
echo ${yellow}" $cnt / $tcnt"
rm -rf res
cp $apkname $fol
#rm -f $apk
}
count_qmg() {
echo
echo $1
cnt_qmg=$( 7za l -tzip $1 | grep ".qmg" | wc -l )
total_qmg=$((total_qmg+cnt_qmg))
#echo $cnt_qmg
#echo $total_qmg
}
out="/dev/null"
quickpic="/data/app/com.alensw.PicFolder*.apk"
isapp=$( ls $quickpic )
if [ -z "$isapp" ] ; then
echo
echo ${purple}"Quickpic app Must Be Installed."${N}
exit
fi
rm -rf res
mkdir -p conv_app
mkdir -p conv_priv-app
applist=$( find $dir/app -type f -iname "*.apk" | sort )
papplist=$( find $dir/priv-app -type f -iname "*.apk" | sort )
tapplist=$applist" "$papplist
acnt=$( echo $applist | wc -w )
pacnt=$( echo $papplist | wc -w )
tcnt=$((acnt+pacnt))
total_qmg=0
cnt_qmg=0
for cqmg in $tapplist ; do
count_qmg $cqmg
echo -n " Total : "$total_qmg" : "$cnt_qmg" "\\r
done
echo
echo
echo ${green}"APK LIST"${N}
echo
echo "APK in app folder : "$acnt
echo "APK in priv-app folder : "$pacnt
echo "Total APKs COUNT : "$tcnt
echo
echo "Total qmg images : "$total_qmg
echo
echo -n "OK? (y/n)" ; read ok
if [ "$ok" != "y" ] ; then
echo
echo ${purple}"Canceled..."${N}
echo
exit
fi
cnt=0
for sa in $applist; do
fol="./conv_app/"
apk=$sa
apkname=${apk##*/}
cp $apk .
conv_qmg $apkname
rm -f $apkname
done
echo
for spa in $papplist; do
fol="./conv_priv-app/"
apk=$spa
apkname=${apk##*/}
cp $apk .
conv_qmg $apkname
rm -f $apkname
done
echo
echo
echo ${cyan}"Finished."${N}
echo
echo ${cyan}"════════════════════════════════"${N}
exit
Well... I think it's better to write small app for android which will simply load picture and save it back. For 9-patch pics need to check aapt source and simply copy the header (it looks like 9-patch qmg header is the same as in png). Or just produce png with stripes like apktool does.
Can anybody send me the system/APP/CoverService.apk?
Sent from my SM-N910C using XDA Premium HD app
without RE-compile
Replacing .qmg file with .png
RENAME converted & modified your own .png to same named .qmg
THROW into apk & Replace ORIGINAL .qmg
Sent from my SHV-E210S using XDA Free mobile app
I've posted simple converter http://forum.xda-developers.com/note-4/themes-apps/tool-converter-qmg-png-t2916486
thanks
Sent from my SHV-E210S using XDA Free mobile app