Can someone fix my ****ing ZIP for me? - Magisk

No matter what I do, it won't flash. Magisk will flash it but it does not function and creates two directories under /Magisk, Magisk-SSH? and Magisk-SSH??, and in TWRP it produces a new error no matter what I do. Even leaving the config.sh and module.prop completly alone and only adding the files to the directory the ****ing zip wont flash.
Download link

Pls upload to another site man,,can't download the file because of adfly..
Sent from my 2014813 using Tapatalk

try changing the permission to 755 instead of 777 for the binaries on your config.sh ... and zip it on sub folder of your module, dont do it on the root folder ... it wont be flashed that way bcoz wrong root folder. attached some ss for how to zip it.
Code:
set_perm $MODPATH/system/bin/scp 0 2000 0755 u:object_r:zygote_exec:s0
set_perm <filename> <owner> <group> <permission> <contexts> (default: u:object_r:system_file:s0)
or
set_perm_recursive $MODPATH/system/bin 0 0 0755 0755
set_perm_recursive <dirname> <owner> <group> <dirpermission> <filepermission> <contexts> (default: u:object_r:system_file:s0)
hope that help :good:

adewisman said:
try changing the permission to 755 instead of 777 for the binaries on your config.sh ... and zip it on sub folder of your module, dont do it on the root folder ... it wont be flashed that way bcoz wrong root folder. attached some ss for how to zip it.
Code:
set_perm $MODPATH/system/bin/scp 0 2000 0755 u:object_r:zygote_exec:s0
set_perm <filename> <owner> <group> <permission> <contexts> (default: u:object_r:system_file:s0)
or
set_perm_recursive $MODPATH/system/bin 0 0 0755 0755
set_perm_recursive <dirname> <owner> <group> <dirpermission> <filepermission> <contexts> (default: u:object_r:system_file:s0)
hope that help :good:
Click to expand...
Click to collapse
I dropped the project because the binaries don't work anyway. I placed them into /Magisk manually (basically doing the zip's job manually) along with the module.prop but calling them produces various errors. I cross-compiled them for ARM64 so they are the correct architecture.

Related

Assistance required in recovery creation

I need the following directories of a stock phone (no custom recovery/boot applied):
Tar it up and send them my way.
/.info
/lib
/lib/modules
/res
/res/images
/sbin
/sbin/images
Any files found in the / (root) directory.
my phone is stock minus the apps I've removed. I don't know how to copy this info but I will be happy to figure it out and get it done if no one else is already doing this.
If rooted is alright, let me know and I will get you what you need.
What is the best way to get the files to you?
What program can get that information on a stock vibrant? Or would we need root?
Sent from my Vibrant using xda app
I think you need at least root to have busybox installed that gives you the cp function but I could be wrong.
Without root which busybox comes with.. I don't know that the software allows a copy feature.
If nobody gets them to you by the time I get home from work then I will pull them for you.
Sent from my SGH-T959 using XDA App
Koush said:
I need the following directories of a stock phone (no custom recovery/boot applied):
Tar it up and send them my way (ignore the numbers, just note the directory name).
dir /.info 755 0 0
dir /dev 755 0 0
dir /lib 755 0 0
dir /lib/modules 755 0 0
dir /mnt 755 0 0
dir /mnt/.lfs 755 0 0
dir /proc 755 0 0
dir /res 755 0 0
dir /res/images 755 0 0
dir /sbin 755 0 0
dir /sbin/images 755 0 0
dir /sd-ext 755 0 0
dir /sys 755 0 0
dir /system 755 0 0
dir /system/etc 755 0 0
dir /tmp 755 0 0
dir /tmp/bootchart 755 0 0
Click to expand...
Click to collapse
pulling as I type
EDIT: ok, I was able to pull everything except /mnt, /info, and /sd-ext. I have the .tgz file. where do I send it? it's over 300mb
jroid did you just make a new folder with
mkdir then use cp of those requested folders? Newbie just trying to make sure I'm doing something the best way.
thanks
jroid said:
pulling as I type
EDIT: ok, I was able to pull everything except /mnt, /info, and /sd-ext. I have the .tgz file. where do I send it? it's over 300mb
Click to expand...
Click to collapse
I was having an issue grabbing the /proc directory for some reason. Since he got the others I am attahcing /mnt and /.info.
/sd-ext I could not find......
msw1382 said:
I was having an issue grabbing the /proc directory for some reason. Since he got the others I am attahcing /mnt and /.info.
/sd-ext I could not find......
Click to expand...
Click to collapse
/mnt my terminal said it was pulled, but the folder i extracted it to didn't show anything. so i'm assuming it didn't pull. Thanks
rsfaze said:
jroid did you just make a new folder with
mkdir then use cp of those requested folders? Newbie just trying to make sure I'm doing something the best way.
thanks
Click to expand...
Click to collapse
no I adb pulled everything seperately
Koush,
I can help you. But, when i try to adb pull these things. Esp in proc. the process just stops.
If i remove proc from the list. the it pulls some then just reboots
Is there a special way to do so?
Thanks
I went and trimmed down what I need to just this following list:
/.info
/lib
/lib/modules
/res
/res/images
/sbin
/sbin/images
That should make the resultant package less than 20mb. Let me know!
A raw dump of the boot area would also help (this is completely safe, just type it properly):
dd if=/dev/block/bml7 of=/sdcard/bml7.img
Then send me /sdcard/bml7.img
Koush said:
A raw dump of the boot area would also help (this is completely safe, just type it properly):
dd if=/dev/block/bml7 out=/sdcard/bml7.img
Then send me /sdcard/bml7.img
Click to expand...
Click to collapse
OLD: dd if=/dev/block/bml7 out=/sdcard/bml7.img
NEW: Should be dd if=/dev/block/bml7 of=/sdcard/bml7.img
Here you go.
Don't know if this is what you want but I thought I'd throw you completely stock no root up here... Astro let me copy them no problems.
img of course can't be made without root
daropedia said:
Don't know if this is what you want but I thought I'd throw you completely stock no root up here... Astro let me copy them no problems.
img of course can't be made without root
Click to expand...
Click to collapse
Awesome! Can you also send me the files in the root directory? Ie, init.rc, recovery.rc, and whatever else you find?
here you go
thanks for the hard work.. heres mine
xspeed9190 said:
thanks for the hard work.. heres mine
Click to expand...
Click to collapse
The directory structure isn't preserved in this properly (seems all mashed together). All I need now is the files in the root directory!
Koush said:
The directory structure isn't preserved in this properly (seems all mashed together). All I need now is the files in the root directory!
Click to expand...
Click to collapse
Well, hopefully this helps, here are all the random files I found in my root dir.
Thanks for the hard work.
cheers!

[SCRIPT] Permissions Init Script

Hey guys,
I had a nasty issue with Bi-Winning a couple weeks ago where I pushed custom framework and totally forgot about permissions. Apparently when you don't set the proper permissions it can really slow things down.
So I figured this could easily be avoided. So because of that and our CWM "Fix Permissions" option doesn't really do anything, I wrote this script to fix it!
Upon every boot, it will scan /system/app, /system/framework/, and /data/app and set the proper permissions for all the files in there.
Users
note if you're on Trigger 2.9.1+ or Bi-Winning V1+ you do NOT have to do this. It's built into your ROM already.
Flash the attached zip named "CWM_Flash_Permissions_Script.zip"
Ironically, it may not have the correct permissions after you flash it, so then do either of the following
1) Do these commands in ADB to set the correct permissions
Code:
adb shell
mount -o rw,remount /dev/block/stl9 /system
busybox chmod 777 /system/etc/init.d/*
or
2) Open up Root Explorer (or something similar)
navigate to /system/etc/init.d/
in there find the new file S30edt_perms
long press, and set the permissions
make it look like this
Code:
x x x
x x x
x x x
Here's the init.d script, it's really simple, but also effective
Code:
#!/system/bin/sh
# Permission script
# Written by Einherjar Dev Team
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
mount -o rw,remount /dev/block/stl9 /system
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo " setting permissions (644) for $file" >> $logFile
chmod 644 $file
done
echo "chmodding init.d folder"
chmod 777 /system/etc/init.d
for file in /system/etc/init.d/*; do
echo " setting permissions (777) for $file" >> $logFile
chmod 777 $file
done
echo "Permissions set" >> $logFile
Very cool, thanks roman.
Very cool to post the code too... lets us linux newbs get our learn on!
Poser said:
Very cool, thanks roman.
Very cool to post the code too... lets us linux newbs get our learn on!
Click to expand...
Click to collapse
I'm a Linux noobie myself!
birgertime said:
I'm a Linux noobie myself!
Click to expand...
Click to collapse
[slight OT] Just getting wifi working on an old ideapad y510 in slackware was an epic struggle... (wicd my arse)
[back on topic] I wish more devs would post script contents (though we can easily download and look in vi or notepad)... it helps the learning curve immensely
grateful for all the work EDT and rest of dev community does. We all are.
Question: What does the fix permissions CWM do then?
Poser said:
[slight OT] Just getting wifi working on an old ideapad y510 in slackware was an epic struggle... (wicd my arse)
[back on topic] I wish more devs would post script contents (though we can easily download and look in vi or notepad)... it helps the learning curve immensely
grateful for all the work EDT and rest of dev community does. We all are.
Question: What does the fix permissions CWM do then?
Click to expand...
Click to collapse
I have no clue, lol. Never bothered looking at it
edit: I hate vi.
roman im gonna add S30edt_perms.zip to my rom ..ill add you to credits
birgertime said:
I have no clue, lol. Never bothered looking at it
edit: I hate vi.
Click to expand...
Click to collapse
lol.
Vi is about as stripped down as you can get when it comes to text based editors... (I know its blasphemous... but I dig notepad++, shhh... dont tell)
I get "Bad Mode"
gamefreakgcb said:
I get "Bad Mode"
Click to expand...
Click to collapse
Hmm, ok you might need super user permissions do this and let me knkow if it works:
1) type in "adb shell"
2) type in su (don't press enter yet)
3) turn your screen on & unlock it
4) press enter on the su prompt, then his yes on the screen
then try that chmod command again.
birgertime said:
Hmm, ok you might need super user permissions do this and let me knkow if it works:
1) type in "adb shell"
2) type in su (don't press enter yet)
3) turn your screen on & unlock it
4) press enter on the su prompt, then his yes on the screen
then try that chmod command again.
Click to expand...
Click to collapse
Gave permission, still "Bad Mode"
gamefreakgcb said:
Gave permission, still "Bad Mode"
Click to expand...
Click to collapse
bad mode in the command line? gotta give me something more here
if it' s when you run chmod +x try this one:
Code:
busybox chmod 777 /system/etc/init.d/*
birgertime said:
bad mode in the command line? gotta give me something more here
if it' s when you run chmod +x try this one:
Code:
busybox chmod 777 /system/etc/init.d/*
Click to expand...
Click to collapse
When I do that, I get
chmod: /system/etc/init.d/S01edt_systcl: Read-only file system
chmod: /system/etc/init.d/S20edt_gps: Read-only file system
chmod: /system/etc/init.d/S30edt_perms: Read-only file system
chmod: /system/etc/init.d/S50edt_zipalign: Read-only file system
chmod: /system/etc/init.d/S98edt_tweaks: Read-only file system
chmod: /system/etc/init.d/S99edt_complete: Read-only file system
gamefreakgcb said:
When I do that, I get
chmod: /system/etc/init.d/S01edt_systcl: Read-only file system
chmod: /system/etc/init.d/S20edt_gps: Read-only file system
chmod: /system/etc/init.d/S30edt_perms: Read-only file system
chmod: /system/etc/init.d/S50edt_zipalign: Read-only file system
chmod: /system/etc/init.d/S98edt_tweaks: Read-only file system
chmod: /system/etc/init.d/S99edt_complete: Read-only file system
Click to expand...
Click to collapse
Oh crap, thanks for pointing that out man. Easy fix
do this
Code:
mount -o rw,remount /dev/block/stl9 /system
busybox chmod 777 /system/etc/init.d/*
should work like a charm
by the way, next time you flash a newer edt rom, they already have this fix built in. since you overwrote the file, you'll need to run the above commands to set the correct permissions as they get messed up sometimes when modifying them.
That did the trick, thanks.
The script in the .zip says
Code:
# Permission script
# Written by Roman (birgertime)
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo "setting permissions for $file" >> $logFile
chmod 0644 $file
done
echo "Permissions set" >> $logFile
Which is different than the OP. I'm confused.
MikeyMike01 said:
The script in the .zip says
Code:
# Permission script
# Written by Roman (birgertime)
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo "setting permissions for $file" >> $logFile
chmod 0644 $file
done
echo "Permissions set" >> $logFile
Which is different than the OP. I'm confused.
Click to expand...
Click to collapse
I notice that before... but got side tracked and forgot to mention something... I just pulled the one from in Bi-Winning V2 and have been ADB Push'ing that.
EDIT: Also noticed that the one that's in Dan_Brutal "Metrik Part 1- Pepperkake" is the wrong one.
Does this works on hd2 android? i really need this..
haysnamrip said:
Does this works on hd2 android? i really need this..
Click to expand...
Click to collapse
Should work on any Android that can run scripts
i flashed and its working.. no more changing permission after run fix_permissins on terminal emulator..
Hey Roman, thanks for yet another improvement for this phone!
Simple question: can I just download and push the S30edt_perms.zip to etc/int.d? And is this any good for CM7 based ROMs? I just checked and that file isn't in my init.d folder on Trigger Redux.
Thanks!
Sent from my rough sketch of a Vibrant on a brick.

New rom XWKTQ problem with the root and udpater-script

Hi,
I just learned that there is another rom to Spain and I find that you can not do root, I tested with different but does not work.
Any ideas!
EDIT:
I check inside the smartphone with adb and the Superuser.apk is inside the list of system/app but no view in appdrawer, and the files (su, busybox,...) are not in the folder xbin
23r9i0 said:
Hi,
I just learned that there is another rom to Spain and I find that you can not do root, I tested with different but does not work.
Any ideas!
EDIT:
I check inside the smartphone with adb and the Superuser.apk is inside the list of system/app but no view in appdrawer, and the files (su, busybox,...) are not in the folder xbin
Click to expand...
Click to collapse
Superuser wont be installed on your phone unless its rooted.
I suggest you see this thread:
http://forum.xda-developers.com/showthread.php?t=1034145
Alpha que said:
Superuser wont be installed on your phone unless its rooted.
I suggest you see this thread:
http://forum.xda-developers.com/showthread.php?t=1034145
Click to expand...
Click to collapse
Hi,
The problem is that the rom has no space to add anything more.
I created a zip to change some apk to data, I install superuser.apk and files to folder xbin but I have problems with set_perm on xbin.
Code:
set_perm: chmod of /system/xbin/su to 6755 failed: Operation not permitted
set_perm: chmod of /system/xbin/sqlite3 to 4755 failed: Operation not permitted
set_perm: chmod of /system/xbin/busybox to 4755 failed: Operation not permitted
set_perm: chmod of /system/xbin/sh to 4755 failed: Operation not permitted
And code to updater-script is:
http://pastebin.com/RzPe3bRv
Any Ideas!!!
23r9i0 said:
Hi,
The problem is that the rom has no space to add anything more.
I created a zip to change some apk to data, I install superuser.apk and files to folder xbin but I have problems with set_perm on xbin.
Code:
set_perm: chmod of /system/xbin/su to 6755 failed: Operation not permitted
set_perm: chmod of /system/xbin/sqlite3 to 4755 failed: Operation not permitted
set_perm: chmod of /system/xbin/busybox to 4755 failed: Operation not permitted
set_perm: chmod of /system/xbin/sh to 4755 failed: Operation not permitted
And code to updater-script is:
http://pastebin.com/RzPe3bRv
Any Ideas!!!
Click to expand...
Click to collapse
"rom has no space"?
You mean the SD card? try partitioning.
Are you sure the rom your talking about has both superuser.apk AND superuser.odex in system/app ??
the way I see it, your phone isnt rooted at all.
Root it properly. Make sure its rooted. Thats why your having issues with ADB and superuser.
Follow instructions in here..
http://forum.xda-developers.com/showpost.php?p=30683590&postcount=23

[Q] android.policy.jar is unmodified,but device stay at frame

1.use kitchen extract rom from N7000ZSLO2_N7000OZSLO2_N7000XXLSO_HOME.tar.md5, then deodex rom.
2.copy android.policy.jar to sdcard.(android.policy.jar is unmodified.)
3.use dexopt-wrapper reodex ,get android.policy.odex.
4.copy android.policy.odex to /system/framework/android.policy.odex and set 644 permissions
5.reboot device and stay at samsung logo frame
now,How to deal with this problem? help,thx.
process
Code:
adb shell
su
busybox cp -f /data/local/tmp/odex/dexopt-wrapper /system/bin/dexopt-wrapper
chmod 755 /system/bin/dexopt-wrapper
busybox cp -f /system/framework/android.policy.jar /system/framework/android.policy.jar.bak
busybox cp -f /system/framework/android.policy.odex /system/framework/android.policy.odex.bak
rm /system/framework/android.policy.odex
busybox cp -f /data/local/tmp/odex/android.policy.jar /system/framework/android.policy.jar
dexopt-wrapper /system/framework/android.policy.jar /system/framework/android.policy.odex
busybox dd if=/system/framework/android.policy.odex.bak of= /system/framework/android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
rm /system/framework/android.policy.jar
busybox cp -f /system/framework/android.policy.jar.bak /system/framework/android.policy.jar
rm /system/framework/android.policy.jar.bak
rm /system/framework/android.policy.odex.bak
chmod 644 /system/framework/android.policy.odex
reboot
attach file is logcat information.The log file alway display "DexOpt: Some deps went away"
What Rom are you using?
But more important: Why do you want to do this?
If you using a deodexed rom, you don't need an odexed jar
ThaiDai said:
What Rom are you using?
But more important: Why do you want to do this?
Click to expand...
Click to collapse
offical rom:N7000ZSLO2_N7000OZSLO2_N7000XXLSO_HOME.tar
i want to add a recovery menu item.
now after update file,device status:
framework-res.apk OK
android.policy.jar fail
nokiamodeln91 said:
If you using a deodexed rom, you don't need an odexed jar
Click to expand...
Click to collapse
in framework folder,all is odex.so if i want to modify a jar, must need an odex file.i want to update file as little as possible.
update.
quywz said:
Code:
adb shell
su
busybox cp -f /data/local/tmp/odex/dexopt-wrapper /system/bin/dexopt-wrapper
chmod 755 /system/bin/dexopt-wrapper
busybox cp -f /system/framework/android.policy.jar /system/framework/android.policy.jar.bak
busybox cp -f /system/framework/android.policy.odex /system/framework/android.policy.odex.bak
rm /system/framework/android.policy.odex
busybox cp -f /data/local/tmp/odex/android.policy.jar /system/framework/android.policy.jar
dexopt-wrapper /system/framework/android.policy.jar /system/framework/android.policy.odex
busybox dd if=/system/framework/android.policy.odex.bak of=[COLOR="Red"][B]/data/local/tmp/odex/android.policy.odex[/B][/COLOR] bs=1 count=20 skip=52 seek=52 conv=notrunc
rm /system/framework/android.policy.jar
busybox cp -f /system/framework/android.policy.jar.bak /system/framework/android.policy.jar
rm /system/framework/android.policy.jar.bak
rm /system/framework/android.policy.odex.bak
chmod 644 /system/framework/android.policy.odex
reboot
Click to expand...
Click to collapse
Is there a reason you're copying the .odex signature to /data/local/tmp/odex/android.policy.odex instead of /system/framework/android.policy.odex ? With your script, /system/framework/android.policy.odex remains unsigned.
Einril said:
Is there a reason you're copying the .odex signature to /data/local/tmp/odex/android.policy.odex instead of /system/framework/android.policy.odex ? With your script, /system/framework/android.policy.odex remains unsigned.
Click to expand...
Click to collapse
sorry,In this thread,I write wrong.
The actual operation is "busybox dd if=/system/framework/android.policy.odex.bak of= /system/framework/android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc".but the result is same.
if=/system/framework/android.policy.odex.bak is input file.
of = /system/framework/android.policy.odex is output file.
copy .odex signature from /system/framework/android.policy.odex.bak to /system/framework/android.policy.odex.
quywz said:
sorry,In this thread,I forgot to copy "busybox cp -f /data/local/tmp/odex/android.policy.odex /system/framework/android.policy.odex".
The actual operation don't forgot.but the result is same.
Click to expand...
Click to collapse
So what you're doing is :
1. optimize /system/framework/android.policy.jar to create /system/framework/android.policy.odex
2. copy the signature from /system/framework/android.policy.odex.bak to /data/local/tmp/odex/android.policy.odex
3. copy /data/local/tmp/odex/android.policy.odex to /system/framework/android.policy.odex
Am I right ? If I am, you're deleting the .odex file created from android.policy.jar, and replacing it with another one.
Einril said:
So what you're doing is :
1. optimize /system/framework/android.policy.jar to create /system/framework/android.policy.odex
2. copy the signature from /system/framework/android.policy.odex.bak to /data/local/tmp/odex/android.policy.odex
3. copy /data/local/tmp/odex/android.policy.odex to /system/framework/android.policy.odex
Am I right ? If I am, you're deleting the .odex file created from android.policy.jar, and replacing it with another one.
Click to expand...
Click to collapse
sorry,In this thread,I write wrong.
The actual operation is "busybox dd if=/system/framework/android.policy.odex.bak of= /system/framework/android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc".but the result is same.
if=/system/framework/android.policy.odex.bak is input file.
of = /system/framework/android.policy.odex is output file.
copy .odex signature from /system/framework/android.policy.odex.bak to /system/framework/android.policy.odex.
1.right
2.copy .odex signature from /system/framework/android.policy.odex.bak to /system/framework/android.policy.odex.above is my copy wrong.
3.used new signed /system/framework/android.policy.odex.
4.reboot,device stay at logo frame
edit.invalid context
quywz said:
1.right
2.copy .odex signature from /system/framework/android.policy.odex.bak to /system/framework/android.policy.odex.above is my copy wrong.
3.used new signed /system/framework/android.policy.odex.
4.reboot,device stay at logo frame
Click to expand...
Click to collapse
Is the attached script the entire script ?
If it is, why are you only copying the .odex files from /data/local/tmp/odex/ to /system/framework/, and not android.policy.jar and framework.jar ?
Einril said:
Is the attached script the entire script ?
If it is, why are you only copying the .odex files from /data/local/tmp/odex/ to /system/framework/, and not android.policy.jar and framework.jar ?
Click to expand...
Click to collapse
yes,entire script.
somebody tell me "Pls use original jar".I tried to use new jar.but the result is same.:crying:
quywz said:
yes,entire script.
somebody tell me "Pls use original jar".I tried to use new jar.but the result is same.:crying:
Click to expand...
Click to collapse
You don't set the permissions for the files any longer. Is there a reason for that ? Permissions should be 644 I guess.
Einril said:
You don't set the permissions for the files any longer. Is there a reason for that ? Permissions should be 644 I guess.
Click to expand...
Click to collapse
I tried you said,isnt reason.I had set Permissions 755 and 777,all invalid :crying:
I dont understand why fail.I am finding reason....
quywz said:
I tried you said,isnt reason.I had set Permissions 755 and 777,all invalid :crying:
I dont understand why fail.I am finding reason....
Click to expand...
Click to collapse
Hum, I personally don't find any error in your script then... Maybe this is due to an error in the new files (framework-res.apk, framework.jar or android.policy.jar). I guess you modified them, and maybe you did some mistakes :/
Einril said:
Hum, I personally don't find any error in your script then... Maybe this is due to an error in the new files (framework-res.apk, framework.jar or android.policy.jar). I guess you modified them, and maybe you did some mistakes :/
Click to expand...
Click to collapse
thx.
I tried to update files one by one.after update framework-res.apk is ok.android.policy.jar is fail.so I dont modfiy android.policy.ja.then optimized it. updating android.policy.odex refer to attached script(not including framework part).but device is NG.
I dont find a NG reason.
Einril said:
Hum, I personally don't find any error in your script then... Maybe this is due to an error in the new files (framework-res.apk, framework.jar or android.policy.jar). I guess you modified them, and maybe you did some mistakes :/
Click to expand...
Click to collapse
today ,I found a problem.dexopt-wrapper android.policy.jar and get android.policy.odex.Compare origial android.policy.odex,we fond dex's magic is different.origial android.policy.odex is "dex035", new origial android.policy.odex is "dex036".if i manually modify different,device is still stay.I guss if i manually modify different,odex's checknum is wrong.what do lead to new odex's magic change?is API Level ?
quywz said:
today ,I found a problem.dexopt-wrapper android.policy.jar and get android.policy.odex.Compare origial android.policy.odex,we fond dex's magic is different.origial android.policy.odex is "dex035", new origial android.policy.odex is "dex036".if i manually modify different,device is still stay.I guss if i manually modify different,odex's checknum is wrong.what do lead to new odex's magic change?is API Level ?
Click to expand...
Click to collapse
In dexFile.h :
Code:
/* current version, encoded in 4 bytes of ASCII */
#define DEX_MAGIC_VERS "036\0"
/*
* older but still-recognized version (corresponding to Android API
* levels 13 and earlier
*/
#define DEX_MAGIC_VERS_API_13 "035\0"
So yes, your dexopt-wrapper uses an API level >= 14 (ICS and JB), whereas your original ROM file must be older.
Einril said:
In dexFile.h :
Code:
/* current version, encoded in 4 bytes of ASCII */
#define DEX_MAGIC_VERS "036\0"
/*
* older but still-recognized version (corresponding to Android API
* levels 13 and earlier
*/
#define DEX_MAGIC_VERS_API_13 "035\0"
So yes, your dexopt-wrapper uses an API level >= 14 (ICS and JB), whereas your original ROM file must be older.
Click to expand...
Click to collapse
offical rom version is 4.1.2.so API level should is 16.but extract odex from device is 035.

[Edify question]-piping not working-how to selectively chmod certain files?

I am trying to get my android updater-script to selectively change permissions based on filename. I want all files under a certain subdirectory following the naming pattern "A.xy" set to 0755 and all other files set to 0644
So I first set all of them to 0644, then tried to selectively set the rest to 0755 by piping commands using xargs and exec. However, neither of the following commands worked but neither of them gave an error. Does anyone have a better way of doing this, or have an idea why neither of these worked?
run_program("/sbin/busybox", "find", " /data/app", "-name", "A.xy", "-type", "f", "-print0", "|", "/sbin/busybox", "xargs", "-0", "chmod", "0644");
run_program("/sbin/busybox find /data/app -name A.xy -type f -exec chmod 0644 {} \;");
It seems like update-binary doesn't allow piping? It doesn't give an error though.
Any idea how I can set all files of one type to be one permission, and all files of another type to be a different permission?
Thread closed.
Please see the continuation of this topic here: http://forum.xda-developers.com/android/help/edify-question-how-to-pipe-t3509804
Thanks!

Categories

Resources