[DEV] itsmagic caller via CWM signed update.zip - Acer Iconia A500

Just made an update.zip for sc2k's itsmagic...
its just an caller if you forgotten to include it in your update.zip or something else was going wrong
You can find HERE on github
there you can find other stuff related...

So the zip contains the itsmagic script, and when you apply the zip it applies no changes but executes the script? Great work.

Thanks. Btw, I have also made a signed zip, that contain the original kernel only.
(for someone playing with kernel and cannot boot. Of coz, itmagic is called after restore)
http://www.mediafire.com/?cmoc97rf6qldp80

EDIT:
sorry dudes, last update was a big fail... it seems we must mount /system and /data before apply, i will fix it

Related

[Q] Couple of questions about ROM development

Hello!
First of all, thanks to all you repliers!
I'd really like to know a few things creating a ROM:
1. how can I create an update.zip starting from a system.img? (I know how to sign) In case can I simply install the img and then push /system changes, like root or busybox?
2. how can I install busybox manually? Can I create a script which does the job for me (i.e. busybox --install command at first boot then delete the script itself), avoiding me to write loads of symlinks?
3. when I've created an update.zip, is it easy to root the ROM? I mean, just push su and SuperUser.apk? Or I need a particular boot.img?
Thanks
elegos said:
Hello!
First of all, thanks to all you repliers!
I'd really like to know a few things creating a ROM:
1. how can I create an update.zip starting from a system.img? (I know how to sign) In case can I simply install the img and then push /system changes, like root or busybox?
Click to expand...
Click to collapse
Clockwork Recovery won't install system image files for some reason. You'll need to dump the yaffs2 filesystem then zip it up into the update.zip, then use an updater-script to set unix permissions (zip doesn't preserve these). Also, there's no need to sign the update.zip. It's only meaningful to the device's firmware if it is signed by the device's manufacturer.
elegos said:
Hello!
2. how can I install busybox manually? Can I create a script which does the job for me (i.e. busybox --install command at first boot then delete the script itself), avoiding me to write loads of symlinks?
Click to expand...
Click to collapse
Certainly. You can add a script and call it from updater-script during the install.
elegos said:
Hello!
3. when I've created an update.zip, is it easy to root the ROM? I mean, just push su and SuperUser.apk? Or I need a particular boot.img?
Thanks
Click to expand...
Click to collapse
Boot image is irrelevant to a properly rooted system. Just adding SuperUser should be sufficient.
That's cool!
1. as of the system.img, I see there is a system folder too - is that just enought zipping it?
2. may you please tell me how to call a script within an edify updater-script please?
3. thanks
I don't understand. You have a system.img and a system folder? In what? What are you starting from? If you use a zipped system, you WILL need to set unix permissions, symlinks and modes as these are NOT preserved in a zip file.
As far as calling scripts, something like this:
run_program PACKAGE:installbusybox.sh

[Q] Some help with creating an Update.zip for my A7 please

I'd appreciate it if someone could give me some assistance. Basically the situation is that I wanted to get VPN working on the A7 which required tun.ko. I cross compiled the kernel and managed to get a tun.ko file and I added it to my device. Installing the module did not work, so I left it.
At some point my A7 shut off, and now it will not boot, it hangs at the ANDROID screen, before getting to the HC animation (dexmod 1.42). I am assuming at this point that my tun.ko is the issue so I created a patch update to remove the modules I had added to see if that would work.
Note: This patch is exactly the same as the ElocityMod 1.4.2 ad-hoc patch, I just changed the script actions and re-bundled.
The script only does this:
delete_recursive SYSTEM:lib/modules
delete SYSTEM:lib/tun.ko
I created the /system/lib/modules dir, so I know it exists, as does the /system/lib/tun.ko. When I try to run the update script I get the following error:
Installing Update
close from_child
E:Error in /sdcard/update.zip
(Status 6[1536])
Installation aborted.
I am trying not to flash back to the 1.4.2 as I have some investment and stupidly did not back-up before I started this venture. Any help would be appreciated.
Brad
As a side note, according to the /proc/config.gz on the tablet (kernel config) the TUN/TAP is compiled into the kernel, but not compiled as a module. For this reason I doubt VPN will work unless the apps can recognize the TUN device instead of failing because the module does not exist.
with specifics to an update script, the script desired should be as follows
Code:
run_program("/sbin/busybox", "mount", "-orw,remount","/system");
delete("/system/lib/tun.ko");
run_program("/sbin/busybox", "mount", "-oro,remount","/system");
you will need to remember to sign your update.zip after creation if you're not familiar with the process. searching on xda should turn up results for 'sign update.zip'.
i'd list the specific files and not do recursive deleting. though if introducing a kernel module caused you problems, i don't think it was merely copying/removing that had an effect, but wouldn't you have had to either issue an 'insmod' command manually or you added a call to that module using insmod added to the init.rc or a bash script. you need to remove that reference too if you did.
if your 'investment' is related to your /data folder (with your stored apps and app settings), you can use my cwm fakeflash recovery to backup and restore your /data contents (installed apps, and system settings) after a factory reset and reloading dexter's rom (using factory recovery).
alternative solutions; maybe if you were doing these kind of experiments you MIGHT have left the usb device setting on (for adb connectivity). if so, try to adb shell into the device to correct your problem by hand; type adb devices from a command prompt for fun to see if the device still lists (it did for me when softbricked once).
domito said:
I'd appreciate it if someone could give me some assistance. Basically the situation is that I wanted to get VPN working on the A7 which required tun.ko. I cross compiled the kernel and managed to get a tun.ko file and I added it to my device. Installing the module did not work, so I left it.
At some point my A7 shut off, and now it will not boot, it hangs at the ANDROID screen, before getting to the HC animation (dexmod 1.42). I am assuming at this point that my tun.ko is the issue so I created a patch update to remove the modules I had added to see if that would work.
Note: This patch is exactly the same as the ElocityMod 1.4.2 ad-hoc patch, I just changed the script actions and re-bundled.
The script only does this:
delete_recursive SYSTEM:lib/modules
delete SYSTEM:lib/tun.ko
I created the /system/lib/modules dir, so I know it exists, as does the /system/lib/tun.ko. When I try to run the update script I get the following error:
Installing Update
close from_child
E:Error in /sdcard/update.zip
(Status 6[1536])
Installation aborted.
I am trying not to flash back to the 1.4.2 as I have some investment and stupidly did not back-up before I started this venture. Any help would be appreciated.
Brad
As a side note, according to the /proc/config.gz on the tablet (kernel config) the TUN/TAP is compiled into the kernel, but not compiled as a module. For this reason I doubt VPN will work unless the apps can recognize the TUN device instead of failing because the module does not exist.
Click to expand...
Click to collapse
..alternatively alternatively i also did a update.zip of the latest factory rom that may assist with your issue, if the above solutions do not work. assuming your 'investment' isn't in the /system folder, it can format your /system folder and reinstall the /system files from the factory firmware with all correct permissions. a little examination of my update.zip could be used as a template for creating a similar one for dexter's rom, for these particular times when you'd like to re-do your /system folder and leave the rest of your partitions and data intact.
locatable, roundabout, from my twitter. same name as here.
oh. you could just write a script to execute a bash script (file.sh) thats got simple copy commands to copy your 'investment' to sdcard (/sdcard in recovery). that might be the simplest non creative approach that would allow you to continue on with a normal factory reset and reload of dexter's rom.
using bash scripts might also aid you in doing what you want without having to know or experiment with proper scripting syntax.
..oh, AND you could just edit dexter's rom update.zip to only install the system.img, and remove the rest of the files for installation, and DON"T do a factory reset..
that could help with restoring your system filesystem while leaving the rest of your data intact. didn't occur until this morning, that might be you EASIEST of the multiple suggestions listed.
Thanks for the response!
bestialbub said:
with specifics to an update script, the script desired should be as follows
Code:
run_program("/sbin/busybox", "mount", "-orw,remount","/system");
delete("/system/lib/tun.ko");
run_program("/sbin/busybox", "mount", "-oro,remount","/system");
Click to expand...
Click to collapse
This was actually what I did for my first try, with the same result.
bestialbub said:
you will need to remember to sign your update.zip after creation if you're not familiar with the process. searching on xda should turn up results for 'sign update.zip'.
Click to expand...
Click to collapse
I did not do this, I was not sure I had to.
bestialbub said:
i'd list the specific files and not do recursive deleting. though if introducing a kernel module caused you problems, i don't think it was merely copying/removing that had an effect, but wouldn't you have had to either issue an 'insmod' command manually or you added a call to that module using insmod added to the init.rc or a bash script. you need to remove that reference too if you did.
Click to expand...
Click to collapse
I did insmod it as well as modprobe, it gave me an error which was likely because (as I found later) the TUN is compiled into the kernel, which means a module could not possibly load.
bestialbub said:
if your 'investment' is related to your /data folder (with your stored apps and app settings), you can use my cwm fakeflash recovery to backup and restore your /data contents (installed apps, and system settings) after a factory reset and reloading dexter's rom (using factory recovery).
Click to expand...
Click to collapse
I'll have to take a look at that, I was no aware it existed.
bestialbub said:
alternative solutions; maybe if you were doing these kind of experiments you MIGHT have left the usb device setting on (for adb connectivity). if so, try to adb shell into the device to correct your problem by hand; type adb devices from a command prompt for fun to see if the device still lists (it did for me when softbricked once).
Click to expand...
Click to collapse
The issue with the A7 is that it's got USB host only which means I cannot connect it to my PC and adb it. This was a known issue before I bought the A7.
bestialbub said:
..alternatively alternatively i also did a update.zip of the latest factory rom that may assist with your issue, if the above solutions do not work. assuming your 'investment' isn't in the /system folder, it can format your /system folder and reinstall the /system files from the factory firmware with all correct permissions. a little examination of my update.zip could be used as a template for creating a similar one for dexter's rom, for these particular times when you'd like to re-do your /system folder and leave the rest of your partitions and data intact.
locatable, roundabout, from my twitter. same name as here.
oh. you could just write a script to execute a bash script (file.sh) thats got simple copy commands to copy your 'investment' to sdcard (/sdcard in recovery). that might be the simplest non creative approach that would allow you to continue on with a normal factory reset and reload of dexter's rom.
using bash scripts might also aid you in doing what you want without having to know or experiment with proper scripting syntax.
..oh, AND you could just edit dexter's rom update.zip to only install the system.img, and remove the rest of the files for installation, and DON"T do a factory reset..
that could help with restoring your system filesystem while leaving the rest of your data intact. didn't occur until this morning, that might be you EASIEST of the multiple suggestions listed.
Click to expand...
Click to collapse
In the end I went more heavy handed than all that and it worked out fine. I did this before I saw your response otherwise I would have tried to finesse it some more just for the fun of it.
I re-flashed with dexmod 1.41 but I did not reset or wipe anything first. Applying this over top got me booted again with all my apps. 1 quick 1.42 update (and annoying root FB upgrade) and I am back to pre-fail conditions. I backed up my stuff too.
Thanks again for all the useful tips. This type of event has happened a few times and my gut says I am getting some corruption on the NVRAM or something. Only time will tell.
adb connectivity works fine, the solution is buried in one of 5stronginos threads, maybe the cwm recovery one. google for USB_OTG.APK i think, its posted on xda w a download link.
..i also prepackage it in my firmware repack.. findable from my twitter.
Sent from my X10i using Tapatalk
bestialbub said:
adb connectivity works fine, the solution is buried in one of 5stronginos threads, maybe the cwm recovery one. google for USB_OTG.APK i think, its posted on xda w a download link.
..i also prepackage it in my firmware repack.. findable from my twitter.
Sent from my X10i using Tapatalk
Click to expand...
Click to collapse
I found this one, which looks right.
http://forum.xda-developers.com/showpost.php?p=12813894&postcount=36
I'll give it a shot. Thanks for the info.

[Q] Any way to "install" system.img?

I've been tinkering with building aosp framework and kernel from source. I've got it loaded and running on my N7. I've made some changes to an xml file, and the subsequent build resulted in only a new system.img file being generated. Is there any way to "install" the system.img file without wiping the system area first? Or is "fastboot flash system system.img" the only way to update the system area of the ROM? I don't want to have to use Recovery to install gapps and supersu again if I can avoid it.
Try mounting the .IMG file into a folder you created with
sudo(or su) mount -o loop ~/system.img /path/to/created/folder
It may mount it and you should be able to get what you want out of the file and then just replace the individual files and reboot or flash them by themselves in a .zip.
di11igaf said:
Try mounting the .IMG file into a folder you created with
sudo(or su) mount -o loop ~/system.img /path/to/created/folder
It may mount it and you should be able to get what you want out of the file and then just replace the individual files and reboot or flash them by themselves in a .zip.
Click to expand...
Click to collapse
I tried everything I could think of including specifying all different types of filesystems including iso9660 and nothing recognizes the image. I tried it on my Ubuntu 12.04 machine as well as the tablet, no success, I guess I'll just have to flash it with fastboot.
There is ways to do it. Aosp used to include the necessary tools to do it, but I haven't really cloned aosp source since gingerbread so I can t remember exactly where or if they're still there(if I do some digging I can figure it out but you may already have flashed. I'll still look into it cause it may be of use to others).
Maybe try this in the future
Here's a binary that should work, make it executable first--
http://db.tt/OZnlRJ4L
./simg2img system.img output.img
Then
mkdir systest(make this folder anything you want)
mount -o loop output.img systest(or whatever you made the folder above)
I haven't tested this but I may when I get a chance.
Way cool man, it works. I was able to mount the output IMG without issue. . :good: :good: :good:
Sent from my aosp N7 JSS15Q w/A029 TouchScreen firmware

Fix Slimbean 3.1 Hardware/Virtual Keyboard problem (update.zip w/o atcmd_virtual_kbd)

http://forum.xda-developers.com/showthread.php?p=44680433&highlight=keyboard#post44680433
Slimbean 3.1 build is very functional for GT540 - thanks. I do not know if the Cyanogenmod 10 build is affected by the problem described in above post as well. But here is
GT540_Slimbean_Build1_kbd_fix.zip
Simply use ClockWorkMod (CWM) and install this zip AFTER Slimbean 3.1 was installed.
It will fix the "soft keyboard not showing up" problem, since the kernel is built without atcmd_virtual_kbd.
Also, CIFS and TUN are compiled into kernel (not as module, but statically linked in).
For more information see the contents of directory README/ within the zip file, which contains everything you need to reproduce what I've done.
Thanks for hitting thanks.
Cheers
cmuelle8
ps: Thanks to miroslav_mm for having been so thoughtful to include /proc/config.gz option. You'd think this is standard among open developers, but unfortunately it is not. I've seen tons of kernels without config.gz compiled in, which is a pain..
EDIT: You do NOT need to wipe cache/data to apply this, as it just exchanges boot.img, nothing else. If you lack CWM on the phone you can also extract the contained boot.img and push it with fastboot. This alternative method is documented in this forum, search for fastboot and boot.img ..

[6045*] [TWRP] custom recovery 2.8.7.0

TWRP 2.8.7.0 custom recovery
thanx to user @Unjustified Dev we have TWRP custom recovery for our phone.
download HERE
So anyone who download the TWRP should send him a dollar for beer or at least thank him!
Of course you do everything on your own!
To test before installation (linux users need sudo before fastboot):
Code:
fastboot -i 0x1bbb boot twrp-2.8.7.0-idol3.img
To install (linux users need sudo before fastboot):
Code:
fastboot -i 0x1bbb flash recovery twrp-2.8.7.0-idol3.img
!BEFORE YOU START, PLEASE READ THIS!
And don´t forget to thank Famewolf for the tutorial, because this could save your phone when something go bad!​
Thanks, tried it. It worked.
I also just installed SU directly, bypassing the previous root thread.
1. Download the .zip package from here: https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip
2. Put it on the root of my SD card.
3. In TWRP click install and find the .zip.
Wonderful. Just a question: is this recovery for Idol 3 4.7 (6039) or 5.5 (6045) ?
Gynoid said:
Wonderful. Just a question: is this recovery for Idol 3 4.7 (6039) or 5.5 (6045) ?
Click to expand...
Click to collapse
It's for 6045. For 4.7 TWRP, see this post: http://forum.xda-developers.com/showpost.php?p=61976520&postcount=18
Thanks!
is it functional for backing up our system in TWRP?
@DallasCZ could you please provide the original link to TWRP. That was a bit unfair to upload it elsewhere as I tend to track the number of downloads.
Sent from my LGMS395 using Tapatalk
gecko702 said:
is it functional for backing up our system in TWRP?
Click to expand...
Click to collapse
Yes although to my knowledge noone has actually done a restore yet. He's fixing some minor bugs and will be releasing a new version at some point.
famewolf said:
Yes although to my knowledge noone has actually done a restore yet. He's fixing some minor bugs and will be releasing a new version at some point.
Click to expand...
Click to collapse
i am in touch with the dev and allready downloading the new build..will be soon on my google drive
Unjustified Dev said:
@DallasCZ could you please provide the original link to TWRP. That was a bit unfair to upload it elsewhere as I tend to track the number of downloads.
Sent from my LGMS395 using Tapatalk
Click to expand...
Click to collapse
sorry, i corrected the link...
Convert TWRP Backup into flashable rom zip
I found these instructions that explain how to take a TWRP backup and turn it into a flashable zip file. This would allow someone to create a "factory" rom pre-rooted to be flashed.
For TWRP Backup
Transfer the TWRP backup from Phone to PC.
You’ll see a file named system.ext4.win which is the System partition backup of your device. Rename it to system.ext4.tar (Changing its extension from .win to .tar)
Extract the system.ext4.tar using an archive software like Winrar or 7zip.
If your TWRP backup is not in compression mode, you will directly get the system folder, else you will get a file named system.ext4, which should be renamed again to system.ext4.tar and extract it to get the system folder.
Take the boot.emmc.win file and rename it to boot.img.
Now collect a META-INF folder from any custom ROM which is made for your device. Make sure you get the correct Meta-Inf folder, else the Zip won’t work and might worsen the condition of your device.
Select the META-INF, System folders and the boot.img and right click your mouse and select add to Archive.
In the Archive settings, choose the extension of the compressed file as Zip (Make sure of this part)
Now you can use this Zip file to flash it on your Custom recovery.
we dont have the meta-inf folder...there is one in the update i got, but i dont know if this id the right one.
and we dont have custom rom to get meta-inf from.
also the main thing is, that i cannot unpack the system win file when renamed to .tar i dunno why (i got latest 7-zip app).
DallasCZ said:
we dont have the meta-inf folder...there is one in the update i got, but i dont know if this id the right one.
and we dont have custom rom to get meta-inf from.
also the main thing is, that i cannot unpack the system win file when renamed to .tar i dunno why (i got latest 7-zip app).
Click to expand...
Click to collapse
What they primarily want is the "update-binary" which is device specific. I don't remember if the update had one....I did take apart an update-supersu.zip and it uses a script as it's update binary...thought about trying to convert that. Theoretically you could take a meta-inf for another device's rom...and use it's meta-inf making sure to replace the update-binary. It also has an installer script that tells it to mount system and data....extract files from the zip and where to put them. I learned a bit when I was trying to make an update.zip to fix my build.prop.
It untar'd fine for me on my linux pc:
[email protected]:/workarea/android/idol3/TWRP/BACKUPS/408adcbe/1970-01-01--22-28-53_LRX22G_release-keys/work > tar -xvf ../system.ext4.win000
tar: Removing leading `/' from member names
/system/app/
/system/app/AntHalService/
/system/app/AntHalService/AntHalService.apk
/system/app/AntHalService/arm64/
/system/app/AntHalService/arm64/AntHalService.odex
/system/app/BasicDreams/
/system/app/BasicDreams/BasicDreams.apk
/system/app/BasicDreams/arm64/
/system/app/BasicDreams/arm64/BasicDreams.odex
/system/app/Bluetooth/
/system/app/Bluetooth/Bluetooth.apk
/system/app/Bluetooth/arm/
/system/app/Bluetooth/arm/Bluetooth.odex
famewolf said:
What they primarily want is the "update-binary" which is device specific. I don't remember if the update had one....I did take apart an update-supersu.zip and it uses a script as it's update binary...thought about trying to convert that. Theoretically you could take a meta-inf for another device's rom...and use it's meta-inf making sure to replace the update-binary. It also has an installer script that tells it to mount system and data....extract files from the zip and where to put them. I learned a bit when I was trying to make an update.zip to fix my build.prop.
It untar'd fine for me on my linux pc:
[email protected]:/workarea/android/idol3/TWRP/BACKUPS/408adcbe/1970-01-01--22-28-53_LRX22G_release-keys/work > tar -xvf ../system.ext4.win000
tar: Removing leading `/' from member names
/system/app/
/system/app/AntHalService/
/system/app/AntHalService/AntHalService.apk
/system/app/AntHalService/arm64/
/system/app/AntHalService/arm64/AntHalService.odex
/system/app/BasicDreams/
/system/app/BasicDreams/BasicDreams.apk
/system/app/BasicDreams/arm64/
/system/app/BasicDreams/arm64/BasicDreams.odex
/system/app/Bluetooth/
/system/app/Bluetooth/Bluetooth.apk
/system/app/Bluetooth/arm/
/system/app/Bluetooth/arm/Bluetooth.odex
Click to expand...
Click to collapse
i allready build some roms for my older device, so i know what it is about.
For the proper rom zip you have to make the updater script with all the simlinks and metadata ...in the latest update there were no simlinks in the updater script...
without them you can brick your phone.
for example simlinks from 4.4.2 Os from zte V5
Code:
symlink("/data/misc/audio/mbhc.bin", "/system/etc/firmware/wcd9306/wcd9306_mbhc.bin");
symlink("/data/misc/audio/wcd9320_anc.bin", "/system/etc/firmware/wcd9306/wcd9306_anc.bin");
symlink("/persist/WCNSS_qcom_cfg.ini", "/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini");
symlink("/persist/WCNSS_qcom_wlan_nv.bin", "/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin");
symlink("/system/lib/modules/pronto/pronto_wlan.ko", "/system/lib/modules/wlan.ko");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("mksh", "/system/bin/sh");
this you cannot copy from another device....
Never mind. I installed the second build.
How do I boot into the custom recovery? Is it power up + power button on the Idol 3?
Acreo Aeneas said:
Never mind. I installed the second build.
How do I boot into the custom recovery? Is it power up + power button on the Idol 3?
Click to expand...
Click to collapse
Reboot or power on till you see the alcatel screen pop up....right away hold down up arrow and it should go into recovery.
Thank you so much...been waiting for this....
so now let ROM's start pouring in )))))))
Hmm odd. I had to reflash it. For some reason it didn't take the first time I flashed the second build TWRP to my Idol 3.
What partitions should I backup using TWRP? I'd assume: Boot, System, and Data? Should I include System Image too?
Acreo Aeneas said:
Hmm odd. I had to reflash it. For some reason it didn't take the first time I flash the second build TWRP to my Idol 3.
What partitions should I backup using TWRP? I'd assume: Boot, System, and Data? Should I include System Image too?
Click to expand...
Click to collapse
The default of boot, system and data should be fine for personal use however if you have not yet rooted please read here first! http://forum.xda-developers.com/idol-3/help/want-to-able-to-install-ota-updates-t3163745
So Awesome! best looking twrp Ive seen yet xD. Also, works well too. I havent tested backing up data, but I did a successful restore of the system and boot So far so good!

Categories

Resources