Related
this script is based on the work to Danesham90 and others see link
http://forum.xda-developers.com/showthread.php?t=598026
===============================================================================
Tested on the Samsung Vibrant, Script may need modification for other phones
===============================================================================
===============================================================================
Directions:
===============================================================================
the easy way:
1. turn on USB debugging
2. plug phone in to computer
3. run the script and follow the screen pormpts
the script will download everything needed to make a
signed deodexed clockwork flashable update.zip while also
adding root and the modified 3e recovery in the proccess.
===============================================================================
the hard way:
http://forum.xda-developers.com/showpost.php?p=10986893&postcount=28
================================================== =============================
Code:
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The **** You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details. */
UPDATED 02/03/2010
bug fix to signupdate.jar
clockwork script tweeks
UPDATED 02/02/2011
added upload to ROM to SDCard
added reboot recovery
added test sign all apk's in ROM - see README for details
added pull "/data/app/" and install "/data/app"
UPDATED 02/01/2011
added adb on by default toggle
added data wipe toggle
updated smali/baksmali to 1.2.6
UPDATED 01/31/2011
updated adb
fix similar filename deletion when using delete.txt
added barebones_delete.txt deletes everything that
does not cause phone to crash
UPDATED 01/29/2011
add "symlink dumpstate SYSTEM:bin/dumpmesg" to update-script.
add "symlink debuggerd SYSTEM:bin/csview" to update-script.
completed secondary method to make ROM from extracted Odin files.
see this post for instructions
http://forum.xda-developers.com/showpost.php?p=10986893&postcount=28
UPDATED 01/28/2011
added auto delete apk's (bloat removal), edit bin/example_delete.txt and rename to delete.txt
added auto add apk's (pre-install or update apk's) add apk's to bin/apks directory
UPDATED 01/23/2011
fix path error when space in user name
UPDATED 01/22/2011
updated TempRoot.exe to not trigger anti-virus
updated Superuser.apk
This is fantastic! Thank you for always making things a little less troublesome.
Oooops, last minute change broke something, fixed and re-uploaded.
untermensch said:
Oooops, last minute change broke something, fixed and re-uploaded.
Click to expand...
Click to collapse
Thanks for the heads up. I was just testing this on KA5 for funsies. It looked like it went ok but there was a prob with temp root at the beginning and it looked like a few java errors at the end. I'll re-download and give it another go.
Edit: Ah, looks like it's working now. Temp root worked and it downloaded the modem and kernel.
Edit2: So it looked as though everything worked fine, but when I went to install it I got
E:Can't symlink /system/bin/cat
E:Failure at line15:
symlink toolbox SYSTEM:bin/cat
Installation aborted.
Whitehawkx said:
Thanks for the heads up. I was just testing this on KA5 for funsies. It looked like it went ok but there was a prob with temp root at the beginning and it looked like a few java errors at the end. I'll re-download and give it another go.
Edit: Ah, looks like it's working now. Temp root worked and it downloaded the modem and kernel.
Click to expand...
Click to collapse
I just tested on my laptop and got a java out of memory error
while signing the rom so I increased the heap size which seems
to have fixed it.
untermensch said:
I just tested on my laptop and got a java out of memory error
while signing the rom so I increased the heap size which seems
to have fixed it.
Click to expand...
Click to collapse
Yea I got the same thing as well. Thanks again, will give it another go.
Update: The process was more in-depth when deodexing. Signing went through np and when I flashed through clockwork it worked (goodbye splash screen!). There must be some issue with KA5 though. It got through to the Galaxy S screen and then started vibrating and then blackscreen. T_T
Thank god for this.. (Deodexer)
Thanks untermensch, your the best
Really really appreciate this. Thanks a bunch!
Most useful tool EVAR!
I T W O R K E D~!
My final attempt last night did not shoot out the "signed_ROM.zip" at the end. I ran it again this morning on KA5 and when it finished I had the signed_ROM.zip in the folder. Put that on my internal, flashed through clockwork and viola! Doedexed KA5 with root and modded 3e recovery. I can't thank you enough Untermensch for putting this together for everyone.
"Give a man fish feed him for a day. Provide him with tools to fish and feed him for a lifetime." (Yea I tweaked it but you get the idea!)
I noticed one thing. During the deodexing process I got [null] on one file in the core.odex. After it had all finished up I looked in the framework folder and core.odex was still there. So am I correct in assuming that it did not doedex properly? Other than that everything else looks golden.
Oh this is sick. i was looking for this all day the otherday when i was trying to deodex ka5! you rock and rule. i cant wait to explore the possiblities!
Whitehawkx said:
I noticed one thing. During the deodexing process I got [null] on one file in the core.odex. After it had all finished up I looked in the framework folder and core.odex was still there. So am I correct in assuming that it did not doedex properly? Other than that everything else looks golden.
Click to expand...
Click to collapse
I deleted the core.odex file and rebooted just to see what would happen and it soft bricked and is stuck at the Vibrant screen. So it seems the only issue lies in deodexing the core.jar at this point.
can i use this to port a rom? forgive me if that is a noob question. just wanted to know if i had the right idea...
Whitehawkx said:
I noticed one thing. During the deodexing process I got [null] on one file in the core.odex. After it had all finished up I looked in the framework folder and core.odex was still there. So am I correct in assuming that it did not doedex properly? Other than that everything else looks golden.
Click to expand...
Click to collapse
yep that was an baksmali error, likely you could run the script again and it
would baksmali OK.
this script is a real system stress test, any way I increased the java maxmem
setting for framework files to 1024m added error logging and the script will
now stop if there is an error. hopefully to prevent a broken ROM from being
released.
Whitehawkx said:
I deleted the core.odex file and rebooted just to see what would happen and it soft bricked and is stuck at the Vibrant screen. So it seems the only issue lies in deodexing the core.jar at this point.
Click to expand...
Click to collapse
can you reproduce this error? I have seen it once but cant reproduce it
untermensch said:
yep that was an baksmali error, likely you could run the script again and it
would baksmali OK.
this script is a real system stress test, any way I increased the java maxmem
setting for framework files to 1024m added error logging and the script will
now stop if there is an error. hopefully to prevent a broken ROM from being
released.
Click to expand...
Click to collapse
untermensch said:
can you reproduce this error? I have seen it once but cant reproduce it
Click to expand...
Click to collapse
Pretty sure the core.odex [null] error I got happened every time I ran the program. I ran it once after the 1:25am update and it happened. That is also the time it did not produce the signed_ROM.zip. I ran it again this morning after I saw the OP had been updated and it did produce the signed_ROM.zip but I still got the [null] error on core.odex. I'm going to Odin KA5 and do it again right now. I will let you know how it works out.
On a side note. I flashed the one I recieved this morning with everything being deodexed except the core.jar and it ran great until I deleted the odex file. Anywho, will test now. Also, not sure if this matters but I am running 32-bit Windows 7.
Update1: Initial news is good. Core.jar was deodexed properly with no errors. Will let you know how the entire process fairs once its completed.
Worked perfectly. I got no errors and everything deodexed properly. Flashed it on my phone and it's running just fine. You are awesome.
Thanks for retesting, glad it worked, there are thousands of files being generated
an lots of java processes being spawned so there are bound to be an occasional
error. I have added an automatic retry when there is an error to the next version
should be posted some time tomorrow.
I'm about 3/4 the way through testing this out - it seems to be working just fine with the exception that every command is appended with "ATTRIB" is not recognized as...
Hopefully it will work anyway.
One thing I noticed that might speed the script up in the beginning would be a root check, I have already rooted this rom but it still needed to run rageagainstthecage.
I've been looking for something like this forever now, thanks so much! Can't wait to play with it.
Sent from my SGH-T959 using Tapatalk
Hi guys, I've been wracking my brain on this on for a few hours now and I'm not getting anywhere.
I'm building AOSP from scratch. I've got all my proprietary libs copied over correctly but I'm getting the following error:
Code:
No rule to make target `vendor/htc/__DEVICE__/proprietary/libcamera.so', needed by `out/target/product/inc/obj/lib/libcamera.so'
I've done some extensive google searching, but nothing seems to explain it. I tried copying the library to obj/lib manually as well as system/lib, but it still errors out.
Any suggestions?
Thanks, Matt.
mattwood2000 said:
Hi guys, I've been wracking my brain on this on for a few hours now and I'm not getting anywhere.
I'm building AOSP from scratch. I've got all my proprietary libs copied over correctly but I'm getting the following error:
Code:
No rule to make target `vendor/htc/__DEVICE__/proprietary/libcamera.so', needed by `out/target/product/inc/obj/lib/libcamera.so'
I've done some extensive google searching, but nothing seems to explain it. I tried copying the library to obj/lib manually as well as system/lib, but it still errors out.
Any suggestions?
Thanks, Matt.
Click to expand...
Click to collapse
Out of curiosity, why are you building from scratch and not using an aosp based rom like CyanogenMod 7? I can't help you with your issue, i'm just curious.
When you say you have your proprietary libs, you mean that you ran the extract-files.sh before building?
jermaine151 said:
When you say you have your proprietary libs, you mean that you ran the extract-files.sh before building?
Click to expand...
Click to collapse
Yes and no - I manually copied over some of the files. I'm using this as a learning experience so I purposely didn't copy everything. However, I did grab all the proprietary libs (i.e libcamera.so, libhtc_ril.so, libEGL_adreno200.so, etc.).
I'm just wondering where in the build process it's getting hung up.
Thanks, Matt.
Look in the vendorblobs no rule to make can be missing file or broken path
I would suggest reading the .mk files from the device/vendor tree
But to find where your error comes run a search the text libcamera.so within the files be sure you include the entire project in your search ... it will take a while to search
Sent from my DROID2 using Tapatalk
mattwood2000 said:
Yes and no - I manually copied over some of the files. I'm using this as a learning experience so I purposely didn't copy everything. However, I did grab all the proprietary libs (i.e libcamera.so, libhtc_ril.so, libEGL_adreno200.so, etc.).
I'm just wondering where in the build process it's getting hung up.
Thanks, Matt.
Click to expand...
Click to collapse
Well, the script is there to eliminate user error, so I'd start over, run the script, and see what happens.
Many users are frustrated by 4.0.3+ AOSP ROMs, as from Android ICS & JB AOSP ROMs there is no Facebook Contacts SYNC.
Well after much drooling and browsing I finally found a way to enable this.:victory:
As stated on website --> http://niranjanthilak.com/facebook-sync-for-android-ics-devices/
and on --> http://www.modaco.com/page/news/_/a...sync-in-ice-cream-sandwich-r140#commentsStart
So, go on at these websites and try youself.:good:
Here, I'm Attaching a modded "ContactsProvider.apk" file that i used, in my CM10 ROM (dated:20121014)
FYI :: First rename file "root//system/app/ContactsProvider.apk" to "ContactsProvider.bak", then delete or rename "root//data/data/com.android.provider.contacts/databases/contacts2.db". Now copy provided "ContactsProvider.apk" to "root//system/app" folder, change permission to 644 and restart the device wait some time for data to sync.
P.S. :; I'm not responsible for data loss, do this on your gut.
Thnkx
If one doesnt wanna share their info with third party apps like HaxSync or FBcontactsync.
There is a great app and info about how to make it by Recognized Developer Deadknight.
Here is the link --> http://forum.xda-developers.com/showthread.php?t=1731298
No go for me. How did you modify your apk file? When I baksmali'd mine, I didn't see a res/variables folder at all like was suggested in the original guide on how to do this. Tried adding it, but ended up with the same thing I get from your file - FC's and no contacts
Thanks. I tried both the given file and the steps. No go.
NegativeOne said:
Thanks. I tried both the given file and the steps. No go.
Click to expand...
Click to collapse
Haha I never tried it but yeah ... You should stay here and wait for OP's reply though .
have you changed the permission to 644 thats -rw-r--r--
Sent from my GT-I9100G
Just to be sure .. before doing above step try switching off wifi and data network, and remember to change permission, thn restart
Sent from my GT-I9100G
so:
1) rename original
2) disable all data (airplane mode)
3) delete contacts2.db
4) paste new file in and set permissions.
Sadly, still no good. get FC's in all my apps that use contacts.
You can't just use the modified apk...instead, using the guide and make the necessary changes...the modded apk was not for every ROM...
Ok...to add some details:
For ContactsProvider APK, the file
in question is res/values/arrays.xml
To gain access to this, you must decompile with apktool, not baksmali...
The file provided was for CM10, was it not? I'm running CM10 - the only difference is I'm actually on a Galaxy S3. I've tried with the guide but have met with similar ends.
Only difference is - when I tried manually I did not set my file permissions to 644.
Working like charm mate ...
Thanks a lot ...
I have GT-I9100G
The contacts synchronized smoothly but their pics and birthday aren't synchronized...
ROM : CodeBox 1.6.0 Official
Kernel : Horsepower 3.1.0-Fuss
If you like my post then please hit the button thanks ...
NegativeOne said:
The file provided was for CM10, was it not? I'm running CM10 - the only difference is I'm actually on a Galaxy S3. I've tried with the guide but have met with similar ends.
Only difference is - when I tried manually I did not set my file permissions to 644.
Click to expand...
Click to collapse
Hmm...I'm not sure whether all cm system apps will work on any phone...May have certain dependencies...that's why i asked you too mod yourself...did you modify the database (2nd step) or just merely the first step? And by the way, all system apps must have their permissions set to 644 or rw-r--r--...
I thought this one required you to simply delete your contacts2.db instead of modifying it, no?
NegativeOne said:
I thought this one required you to simply delete your contacts2.db instead of modifying it, no?
Click to expand...
Click to collapse
Nope...the first guide actually taught on how to modify...to me, modifying is better than deleting...
yes thats right
Sent from my GT-I9100G
try doing disassembly through apktool .. and doing whats needed to be done .. wish u luck
http://code.google.com/p/android-apktool/
Sent from my GT-I9100G
for pics .. u can use facebook contact sync app
Sent from my GT-I9100G
s3 system files have different dependencies and so for that u hav to do it yourself.
Sent from my GT-I9100G
well if you .. change the lines in smali codes where columns are first initiated thn thr is no need to modify contacts2.db file
Sent from my GT-I9100G
Thanks guys. I'm going to try this. I've been trying to use the xdaAutoTool wrapper for apktool, and I'm not 100% sure I'm doing it right.
What do I need to do to make sure that it loads the correct framework-res.apk for resource dependencies? I did "install other" and pointed it to the file, but it says "No Framework installed".
If someone could point me to a guide for raw apktool that includes signing the apk (which I understand I must do) and loading a framework dependency, that would work too. Thanks in advance!
I did a new port, see OP
I have bootanimation
Hopefully this helps
When I first saw this the first thing that came to mind was finding all the needed hardware files and putting them in the port. Now I looked over the logcat and sure enough it has hardware errors. You re having gralloc issues and hwcomposor issues. I stopped looking after I saw surfaceflinger as right after that is when the crash starts. In my opinion these are the main two issues stopping boot.
Gralloc issue
Code:
E/HAL ( 176): load: module=/system/lib/hw/gralloc.msm8974.so
E/HAL ( 176): dlopen failed: cannot locate symbol "_ZN13AdrenoMemInfo9getStrideEii" referenced by "gralloc.msm8974.so"...
Hwcomposor issue
Code:
E/HAL ( 176): load: module=/system/lib/hw/hwcomposer.msm8974.so
E/HAL ( 176): dlopen failed: cannot locate symbol "_ZN7overlay6RotMem3Mem12setReleaseFdERKi" referenced by "hwcomposer.msm8974.so"...
Now you have way more issues than those but those should be your focus right now. You will have to get the correct hardware files for hamerhead and use them to replace the hardware files for that are for the Xpeira Z3. But even if you get it booting you will have camera issues along with a lot more stuff. You may even have to decompile the framworks.apk and edit smali files to look for the correct hardware files and to use different strings.
Now I have to say I am not even sure if what you are attempting can even be done. I do wish you luck and hopefully what I posted here will help you move forward some.
T-Macgnolia said:
When I first saw this the first thing that came to mind was finding all the needed hardware files and putting them in the port. Now I looked over the logcat and sure enough it has hardware errors. You re having gralloc issues and hwcomposor issues. I stopped looking after I saw surfaceflinger as right after that is when the crash starts. In my opinion these are the main two issues stopping boot.
Gralloc issue
Code:
E/HAL ( 176): load: module=/system/lib/hw/gralloc.msm8974.so
E/HAL ( 176): dlopen failed: cannot locate symbol "_ZN13AdrenoMemInfo9getStrideEii" referenced by "gralloc.msm8974.so"...
Hwcomposor issue
Code:
E/HAL ( 176): load: module=/system/lib/hw/hwcomposer.msm8974.so
E/HAL ( 176): dlopen failed: cannot locate symbol "_ZN7overlay6RotMem3Mem12setReleaseFdERKi" referenced by "hwcomposer.msm8974.so"...
Now you have way more issues than those but those should be your focus right now. You will have to get the correct hardware files for hamerhead and use them to replace the hardware files for that are for the Xpeira Z3. But even if you get it booting you will have camera issues along with a lot more stuff. You may even have to decompile the framworks.apk and edit smali files to look for the correct hardware files and to use different strings.
Now I have to say I am not even sure if what you are attempting can even be done. I do wish you luck and hopefully what I posted here will help you move forward some.
Click to expand...
Click to collapse
I replaced these files already, from a hammerhead Cm12 nightly :/
dekefake said:
I replaced these files already, from a hammerhead Cm12 nightly :/
Click to expand...
Click to collapse
You may need other files or maybe even need to edit framworkes.apk to allow the files to be used by the system. What I am saying is just because they are present doesn't mean the system will use them. Look closely at the errors I pointed out as it will give you some idea of what to do.it says cannot find symbol blah blah blah. You need to find where that symbol is in the CM ROM and make sure it is in your port.
T-Macgnolia said:
You may need other files or maybe even need to edit framworkes.apk to allow the files to be used by the system. What I am saying is just because they are present doesn't mean the system will use them. Look closely at the errors I pointed out as it will give you some idea of what to do.it says cannot find symbol blah blah blah. You need to find where that symbol is in the CM ROM and make sure it is in your port.
Click to expand...
Click to collapse
Framework-res.apk file from Sony doesnt want to decompile properly. Using latest Apktool for Lollioop
T-Macgnolia said:
You may need other files or maybe even need to edit framworkes.apk to allow the files to be used by the system. What I am saying is just because they are present doesn't mean the system will use them. Look closely at the errors I pointed out as it will give you some idea of what to do.it says cannot find symbol blah blah blah. You need to find where that symbol is in the CM ROM and make sure it is in your port.
Click to expand...
Click to collapse
Sucedded to decompile framework-res.apk..
Replaced storage list by Nexus 5 one, and power profiles, but can't find anything about _ZN* :/
Still sticks to the same on logcat
dekefake said:
Sucedded to decompile framework-res.apk..
Replaced storage list by Nexus 5 one, and power profiles, but can't find anything about _ZN* :/
Still sticks to the same on logcat
Click to expand...
Click to collapse
these are native methods(you wont find in smali files), you can use armobjectdump/hexedit to look which files have, my bet would be you either needing to replace some of our files with the z3(hw files) or replacing some system libs(the one where the code needs to exist).
another bet would be trying to use our caf libs,however AFAIk would need changes to the kernel
Just to say i restarted a new project (look OP)
New logcat to debug.
Thanks in advance for help
Hello !
I'm trying to create simple as fk module... I edited system app and would like to replace already existing system app with it via magisk. I want to utilize magic mount to replace apk every time phone boots.
I tried reading guide on how to make module and the magic mount section says that everything is already in place for doing exactly this , I just need to place files inside module's system folder and everything is supposed to work but the first attempt went rly bad :
https://forum.xda-developers.com/attachments/ha-zip.5410919/?hash=036cbc145f7ed9195b564f943507950f
It didn't even get past unzipping no matter what I did - i made sure to keep all files in root of the folder , used various zip apps and levels but nothing...
Copying zip to temp directory
! Unzip error
So I obviously fled something up by creating module form ground up... Went and downloaded template from here :
GitHub - gedoor/magisk-module-template: template
template. Contribute to gedoor/magisk-module-template development by creating an account on GitHub.
github.com
Added my files to system folder , update description and edited the config.sh to add REPLACE="
/system/app/PowerKeeper
"
Zipped it and more errors... At least it unzips it alright now but idk what this error means during install :
- Copying zip to temp directory
- Installing Ha2.zip
/data/user/0/com.topjohnwu.magisk/cache/flash/update-binary: line 146: /data/magisk/sepolicy-inject: not found
/data/user/0/com.topjohnwu.magisk/cache/flash/update-binary: source: line 167: config.sh: not found
Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip
inflating: config.sh
! Installation failed
I realize the template that I've downloaded might be broken ... If anyone could look into my first link that I've shared or the file that I've attached that would be great! I'm not sure what or where to start from in order to get this working...
Ty!
You've got everything you need, but the update-binary and updater-script files need to be in the META-INF directory tree, see here for details on what the installer needs to look like:
https://topjohnwu.github.io/Magisk/guides.html#magisk-module-installer
The template you found failed because it's 4 years old. A lot has happened since then and Magisk's internals are very different nowadays.
Didgeridoohan said:
You've got everything you need, but the update-binary and updater-script files need to be in the META-INF directory tree, see here for details on what the installer needs to look like:
https://topjohnwu.github.io/Magisk/guides.html#magisk-module-installer
The template you found failed because it's 4 years old. A lot has happened since then and Magisk's internals are very different nowadays.
Click to expand...
Click to collapse
Thanks a lot !!!
I see you help other people too years ago , I was hoping you'd help me out too but didn't really think pming you based on some years old thread is the best idea and here you are lmao o:
It installed well now ! I'll go reboot , fingers crossed I don't end up in some bootloop (• ▽ •
Ty again!
Usually, the best way to summon me is to turn off the lights and say my name three times into the mirror. But posting in the Magisk forum works too (this is pretty much my home here on XDA and I always keep a close eye on what's going on here)...
Glad I could help and good luck with the modules.
Didgeridoohan said:
Usually, the best way to summon me is to turn off the lights and say my name three times into the mirror. But posting in the Magisk forum works too (this is pretty much my home here on XDA and I always keep a close eye on what's going on here)...
Glad I could help and good luck with the modules.
Click to expand...
Click to collapse
Ah can u help w bootloop now xD
Safe mode doesnt get magisk to disable module gotta delete it now... How though?
Idk if I wanna mess with magisk module uninstaller or if uninstalling whole magisk gets rid of module...
Will going to /data/adb/module and removing module fodler from there fix it ?
Rstment ^m^ said:
Ah can u help w bootloop now xD
Safe mode doesnt get magisk to disable module gotta delete it now... How though?
Idk if I wanna mess with magisk module uninstaller or if uninstalling whole magisk gets rid of module...
Will going to /data/adb/module and removing module fodler from there fix it ?
Click to expand...
Click to collapse
Ha ha! Not uncommon when testing modules you've made...
Removing the module from /data/adb/modules is almost always a surefire way of fixing things.
Interesting that Safe Mode didn't work... You had the Magisk patched boot image installed still?