[FIX available] Expected Arguments help [SOLVED] - Android Software/Hacking General [Developers Only]

I keep running into this issue with a rom port. It keeps saying that it is expecting 3 arguments but got 2, as listed below in recovery.log:
The updater-script originally came with 3 arguments, but I can only allow 2, as if I used 3 like so: format("yaffs2", "MTD", "system", my hd2 would give 7 vibrations of death for some odd reason.
Code:
Opening update package...
Installing update...
script aborted: format() expects 3 args, got 2
Welcome to TW_FET_1.47.950.3 release
v0.1
format() expects 3 args, got 2
E:Error in /sdcard/TW_FET_12_43.zip
(Status 7)
How do I change the 'expected arguments' because in other roms, there are only 2 arguments for format.
Any help would be appreciated!

Finally found out what the problem was.. feel like an idiot right now haha
>>> ** For future reference, it is the update-binary causing problems! Replace it with a binary from another build that takes format and mounts commands in the correct amount of arguments. ** <<<
The binary from the Desire HD takes:
-3 arguments for format
EX: format("MTD", "yaffs2", "system");
- and 4 arguments for mount
EX: mount ("MTD", "yaffs2", "system", "/system");
meanwhile, in AOSP, the update-binary takes
-2 arguments for format
EX: format("MTD", "system");
- and 3 arguments for mount
EX: mount("MTD", "system", "/system");
This should solve the problem.. and it took me 2 days to figure this out..

THANK YOU! This helps a lot!

what do i do when i have no idea what any of you just said? :| ive never not been able to mod this phone but now all the suddent i cant install anything. its an e980 LG optimus G pro. great phone love it to death, replaced the digitizer and the charging port on it, still going strong. very great phone ! bt now every thing i try to install gets an errorexpects 5 args, got 3. e: erropr in data/media/touchrecovery_atrix_5.8.1.8.zip i can't seem to figuire out what to do now i wanna try a new rom bored with stock but now im stuck :\ flasing new tot files with LG flash tool doesnt change this either.

jianC said:
Finally found out what the problem was.. feel like an idiot right now haha
>>> ** For future reference, it is the update-binary causing problems! Replace it with a binary from another build that takes format and mounts commands in the correct amount of arguments. ** <<<
The binary from the Desire HD takes:
-3 arguments for format
EX: format("MTD", "yaffs2", "system");
- and 4 arguments for mount
EX: mount ("MTD", "yaffs2", "system", "/system");
meanwhile, in AOSP, the update-binary takes
-2 arguments for format
EX: format("MTD", "system");
- and 3 arguments for mount
EX: mount("MTD", "system", "/system");
This should solve the problem.. and it took me 2 days to figure this out..
Click to expand...
Click to collapse
That really helped, I was having problems for a few minutes until I found this post. Thanks alot:good:

Related

[ROM] [PORT] CyanogenMod 10.1 for the Slate 7 Plus 4200xx

DISCLAIMER: I am NOT responsible for any damage you do to your device.{/B}{/U]
This is CyanogenMod 10.1, a highly customizable AOSP-based ROM, now ported to the HP Slate 7 Plus!
To avoid any crashes while using this ROM make a Nandroid backup and wipe cache, dalvik-cache and data.
This ROM requires ClockWorkMod to be on your device. You can get it here.
To support open development my trees are available on GitHub.
Device tree
Kernel tree
Downloads
Only one or two downloads will be here at a time to save space.
CyanogenMod is not yet ready, a few kernel tweaks are needed to get the thing to boot up
I stole the ROM zip from the server
When I try to flash it says :
Code:
about to run program [/tmp/backuptool.sh] with 2 args
Not backing up files from incompatible version: 10.1
run_program: child exited with status 127
format: unsupported fs_type "ext4" partition_type "EMMC"script aborted (no error message)
script aborted (no error message)E:Error in /sdcard/cm-10.1-20140223-UNOFFICIAL-birch.zip
(Status 7)
Installation aborted
I compared the format command in updater-script from your ROM with the stock one, and I can't find any difference.
I really don't understand ...
I even tried to only let this to updater-script :
Code:
format("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
package_extract_dir("system", "/system");
but it fails too with the same error ...
I found this thread : http://forum.xda-developers.com/showthread.php?t=2407649 not sure it can help.
---------- Post added at 03:52 PM ---------- Previous post was at 03:34 PM ----------
Ok the problem was update-binary file, I replaced it with stock update-binary file : ROM installed succesfully.
I suppose your update-binary doesn't support ext4 file system.
Now when rebooting I'm stuck on the first HP logo
zarto said:
I stole the ROM zip from the server
When I try to flash it says :
Code:
about to run program [/tmp/backuptool.sh] with 2 args
Not backing up files from incompatible version: 10.1
run_program: child exited with status 127
format: unsupported fs_type "ext4" partition_type "EMMC"script aborted (no error message)
script aborted (no error message)E:Error in /sdcard/cm-10.1-20140223-UNOFFICIAL-birch.zip
(Status 7)
Installation aborted
I compared the format command in updater-script from your ROM with the stock one, and I can't find any difference.
I really don't understand ...
I even tried to only let this to updater-script :
Code:
format("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
package_extract_dir("system", "/system");
but it fails too with the same error ...
I found this thread : http://forum.xda-developers.com/showthread.php?t=2407649 not sure it can help.
---------- Post added at 03:52 PM ---------- Previous post was at 03:34 PM ----------
Ok the problem was update-binary file, I replaced it with stock update-binary file : ROM installed succesfully.
I suppose your update-binary doesn't support ext4 file system.
Now when rebooting I'm stuck on the first HP logo
Click to expand...
Click to collapse
WTH
It could be a problem with SELinux, I hate that little devil sometimes.
Hi,
I have a question, I did install cwm on my hp slate 7 plus (4200ef), but is it normal that I cannot make a backup of the system with it?
And I don't know the manipulation to directly access the recovery mode, on the hp slate 7 plus .... I try many things like Power + volume up or down and nothing...
I would like to try cyanogenmod but I didn't backup the orginal firmware ... I would like a least backup my ToZlate firmware.... and parameters...
Thanks If you can tell me!!
fifounet75 said:
Hi,
I have a question, I did install cwm on my hp slate 7 plus (4200ef), but is it normal that I cannot make a backup of the system with it?
And I don't know the manipulation to directly access the recovery mode, on the hp slate 7 plus .... I try many things like Power + volume up or down and nothing...
I would like to try cyanogenmod but I didn't backup the orginal firmware ... I would like a least backup my ToZlate firmware.... and parameters...
Thanks If you can tell me!!
Click to expand...
Click to collapse
I used backup only once from CWM, it worked on a fat32 formatted SDCard. Stock ROM can be downloaded from HP website. Hold Power and Volume+ when Slate is off, you should see 4 little lines at the top of the screen.
Envoyé de mon HP Slate 7 Plus en utilisant Tapatalk
Thanks for your answer !
It worked I was able to go to the recovery...
Thanks for the backup !! I didn't thought that I would need a sd card...
I search on the HP web site but I didn't found the stock firmware... maybe on the US website.. I will search but not on the french site...
Thanks again.. I think I will try cyanogenmod as soon as it will be released !!!
Thanks for your work
http://h10025.www1.hp.com/ewfrf/wc/...fr&cc=fr&dlc=fr&sw_lang=&product=6475020#N147
CyanogenMod is not ready yet, still under development
I'm redoing the whole kernel as I believe that's the issue.
(offtopic) @zarto your new avatar looks like Gordon Freeman almost XD
I need to make an avatar in Androidify
will it be done today? i can test lateron...
TommeleTBone said:
will it be done today? i can test lateron...
Click to expand...
Click to collapse
I don't know at this point.
Sent from my Sero 7 Pro using Tapatalk
Other devices have been distracting me. Sorry guys.
I am porting PAC-ROM to my device and if it works I have an idea to get CM to boot.
Sent from my Sero 7 Pro using Tapatalk
cool. keep going
I think I found the issue
Sent from my Sero 7 Pro using Tapatalk
i’m ready
I will have the new build uploaded before the day ends. @zarto feel free to test the build before I upload it
Sent from my Sero 7 Pro using Tapatalk
Sorry guys, the build failed. I still have something up my sleeve though
This error was a configuration error and shouldn't be too hard to fix.
Sent from my Sero 7 Pro using Tapatalk
i’m still ready
TommeleTBone said:
i’m still ready
Click to expand...
Click to collapse
I don't blame ya, this is CM we're talking about
Sent from my Sero 7 Pro using Tapatalk
well, to be honest, i gota ceo of hp germany in my neck, we might get a "sale" when we have that up and running
Nice to see you again!

[GUIDE][ROM PORTING][CM12/CM13][MediaTek][mt6582] CM ROM Porting Guide.

_______________________________
| ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶ |
| ¶¶PORTING METHOD MTK¶ |
| ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶ |
---------------------------------------------
[emoji2]
NOTE:
---------
BEFORE WE START, NO ONE IS TO BE HELD RESPONSIBLE IF DEVICE GETS DAMAGE OR WHATS SO EVER..
###Chill, that was for Disclaimers!!!
*OK
××××××××××××××××××××××××××××××××××
¶¶¶¶for cm13¶¶¶¶
¶¶¶for cm12.1¶¶¶
×××××××××××××××××
Copy & Replace From Stock/CM12.1:::
---->system/etc/firmware
---->system/lib/hw/hwcomposer.mt65xx.so
system/lib/ {the following files} ↓↓↓
---->lib3a.so
---->libaudio.primary.defualt.so
---->libcamalgo.so
---->libcamdrv.so
---->libcameracustom.so
---->libdpframework.so
---->libfeatureio.so
---->libimageio.so
---->libMali.so
Patching Boot.img :::
---->kernel
---->ueventd.rc {add this only when bootloop}
Patching build.prop :::
{replace "xxx" with stock build.prop}
----> ro.product.brand=xxx
ro.product.name=xxx
ro.product.board=xxx
ro.product.manufacturer=xxx
ro.product.locale.language=xxx
ro.product.locale.region=xxx
ro.sf.lcd_density=xxx
ro.product.board=xxx
ro.board.platform=xxx
to.cm.device="your device name"
qemu.hw.mainkeys=xxx
Patching Updater Script :::
{replace " mmcblk0pxx " after the "p" where " xx " with your mount points}
---->Locate :
/META-INF/com/google/android/updater-script
----> format("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/data", "");
============================
Get More info from [https://www.facebook.com/groups/1024872487548231/]
=========================
*Make You Don't Mess Up With Your Precious Device.
*Thanks.
Credit:
#Ferhung
#Android Matrix Development {AMD}
@iykeDROID
=========================================
iykeDROID™ said:
Patching Boot.img :::
---->kernel
---->ueventd.rc {add this only when bootloop}
Patching build.prop :::
{replace "xxx" with stock build.prop}
----> ro.product.brand=xxx
ro.product.name=xxx
ro.product.board=xxx
ro.product.manufacturer=xxx
ro.product.locale.language=xxx
ro.product.locale.region=xxx
ro.sf.lcd_density=xxx
ro.product.board=xxx
ro.board.platform=xxx
to.cm.device="your device name"
qemu.hw.mainkeys=xxx
Patching Updater Script :::
{replace " mmcblk0pxx " after the "p" where " xx " with your mount points}
---->Locate :
/META-INF/com/google/android/updater-script
----> format("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/data", "");
============================
Get More info from [https://www.facebook.com/groups/computerplusandroid/]
=========================
*Make You Don't Mess Up With Your Precious Device.
*Thanks.
Credit:
#Ferhung
#Unknown Porting Team ; No Problems @iykeDROID
=========================================
Click to expand...
Click to collapse
No mount points on newer mt6580 bro, it seem like their rom structures are different
Bro this guide will work with all chipset ??
obaidmuneir said:
Bro this guide will work with all chipset ??
Click to expand...
Click to collapse
Not all chipset but works mostly across most MTK chipsets
@iykeDROID yeah bro we meet again ... i dont have experience building from source and bad laptop as you know ...just for fun i download
uhans5000 oreo 64bit
moto e4 lineage 15 oreo 32bit ( your work )
*what is my game ? *copy / paste replace files in system.img and boot.img and then flash those .img file directly to see if i boot or if anything works ...is this impossible cos of 32-64 bit issue
*where is driver for screen because phone is using different display so i need to make sure to make this work
i just do this for fun cos its only option for me in regard to time amd situation ...i dont publish result only for me ...if you want to advise me ...about trying some sort of port for fun okay thanks ....
IN days of LL i ported one or two rom succesfully so i am not 100% dum just 99%
see you around bro
Sent from my woods_f using XDA Labs

Port a custom rom to your phone without pc [MediaTek only]

Requirements ----
1)A file manager(MixPlorer recommended.Because of its multi-tab feature)
2)Archiver(Zarchiver recommend.Because of its fast compression-decompression feature and user-friendly interface.
PORTING For Same SoCs ( Ex: MT6572 to MT6572 )
*First extract your port rom using Zarchiver in a folder and lets call it the 'port' folder.
*U will see some folder like Meta.inf,system,boot.img,logo.bin etc.
*Get your stock rom and extract it too in another folder.
(Now we have both stock and port rom extracted)
*Now repace this files from stock to port folder--
FILE LIST FOR REPLACING:
Code:
*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth
Code:
For Fixing Problems...
*system/etc/permissions
*system/etc/security
*system/etc/audio
*system/etc/wifi
*system/lib/drm
*system/lisystem/lib/soundfx
* Now Replace the Stock Boot.img to Port ROM!
* Now Open The Port ROM folder and go to---
META-INF/
google/android
and
open updater-script in MixPlorer(or any other text editor you like)
* Do the same for the Stock ROM
* Now In the Port ROM's Updater Script, find a line that
starts with this...
format(".......
and only replace the mmcblk0p.. with the stock one!
* Do the same for this line...
mount("...
Example:
This is the PORT one!!!
Code:
format("ext4", "EMMC", "/dev/block/
mmcblk0p5", "0", "/system");
mount("ext4", "EMMC", "/dev/block/
mmcblk0p5", "/system");
This is the Stock one!!
Code:
format("ext4", "EMMC", "/dev/block/
mmcblk0p3", "/system");
mount("ext4", "EMMC", "/dev/block/
mmcblk0p3", "/system");
Now just Replace the "mmcblk0p3" from STOCK to PORT!!
It should look like this:
Code:
format("ext4", "EMMC", "/dev/block/
mmcblk0p3", "0", "/system");
mount("ext4", "EMMC", "/dev/block/
mmcblk0p3", "/system");
DO NOT REPLACE THE WHOLE LINE!
* Now go back to the Folder of Port ROM and You'll see 2
folders & 1 file(maybe more) named
-META-INF
-system
-boot.img
Select all these files with Zarchiver and press hold on them.
A pop-up menu will appear and hit compress.
Select this--
Compression FORMAT -- ZIP
Compression type -- Normal
Done...
Compression will be started...
After compression flash it from recovery.
If you see a status 6 or 7 error,then u must have did something wrong in updater script.
See some youtube video's to solve it.
And yeah,this is guide to port stock modded roms.If u want to port MIUI,CM,AOKP,SLIM etc...
Than your have to edit boot.img(kernel).
I will write a guide for this(yeah,without pc)
Keep porting roms
Facing problems???
I'm here
reserved
bump
Nice tutorial :laugh:
But I was not able to find any port ROMs for my Galaxy Star
Have u ported any for it from stock??
adth98 said:
Nice tutorial :laugh:
But I was not able to find any port ROMs for my Galaxy Star
Have u ported any for it from stock??
Click to expand...
Click to collapse
I guess somebody else already ported RR from SGS2!
Check 'GS Android Development' forum.
Yup I was using that ROM:victory:
sm_adil said:
Yup I was using that ROM:victory:
Click to expand...
Click to collapse
does rebooting takes a long time?
For me it took about 15-20 min...
But works fine also later on rebooting it takes lot of time....
Bro how to port custom roms like viper os??? Does it works for that too??
I have a local brandless phone.
Specs are:
SoC: MT6572
RAM: 512MB
ROM: 4GIG
Processor: 1.2GHz dual core
Since it's a crap phone, I'm looking for 8.1 Go ROM for it. Anyone have it?
Sent from my Xperia 1 using XDA Labs
Port custom ROM like miui aosp
Sir where is the guide to port custom ROM miui etc

Full firmware B535 package

Honor released a new full package since B525
Now it's B535
Link http://cdn.powerapp.io/lfs/v3/s/307...d3d6c3538cecf6e2f97c3b321be3487224aea6dc70a1c
Mirror: https://mega.nz/#!j5QwRLzI!CGBlUpD7s15B5u88KH0oWogXzb0m6eSVQ3b1Y1Ak_Cw
Unfortunately I got no massive changelog
This update optimized Magic Live wallet and other product experience, improve system stability. "," VersionInfo ": [{" array ": [" optimization - support binding bank card for payment
With this updates codes also a script file that only flashes a delete script see
ui_print("Unpacking data new files...");
delete_recursive("/data/hw_init");
package_extract_dir("data", "/data");
delete(
" ");
delete_recursive(
"/data/data",
"/data/system",
"/data/user",
"/data/share",
"/data/app",
"/data/app-asec",
"/data/app-lib",
"/data/app-private",
"/data/app_acc",
"/data/property",
"/data/lb",
"/data/lib_bee",
"/data/local",
"/data/media",
"/data/mediadrm",
"/data/misc",
"/data/pppd_via",
"/data/resource-cache",
"/data/sec_storage_data",
"/data/skin",
" ");
I guess this is flashed first before update
Sent from my NATASHA using Tapatalk

Problem with port on Mediatek 6580 kernel 3.18.35

Yesterday I made a port to a Doogee Shoot 2 (Mediatek 6580 with Kernel 3.18.35) from this ROM http://techboxlab.com/a9-lite-rom-for... I was pretty happy about the possibility of flashing it. Was a success, everything was working except a little detail: the device was lock and I made a call to see how the screen and sound was...the result? the phone goes crazy...I was rebooting the device. Once was on again I go to Play Store to update the apps...the phone goes to rest and when I unlock it, again this that show you in the video. What can it be? I followed to guides to do it and both are the same result, mixing both equal...
I thought that can be the gapps (the rom comes with gapps) so I flash over newer version, was the same. I don't know if it helps but here are some things, the flash takes a while (more than 10 minutes), and when the flash is over and I can reboot I have this: after the Unmount system line I get: "unmount of /system failed: no such volume"
the mount section of my updater script is:
ui_print(" = >>>>> Mount System <<<<< = ");
mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
ui_print(" = >>>>> Stating Flash Rom <<<<< = ");
package_extract_dir("system", "/system");
And the unmount system
ui_print("**************************************************");
ui_print(" = >>>>> Unmount System <<<<< = ");
unmount("/system");
set_progress(1.000000);
My youtube video with the example https://www.youtube.com/watch?v=ysgOy50-2ao
help please?
anyone?
AgustinH said:
anyone?
Click to expand...
Click to collapse
Try this guide https://forum.xda-developers.com/android/general/guide-how-to-port-nougat-based-roms-t3679512
This guide (another one) got deleted in the FB group. So here it is again: https://forum.xda-developers.com/an...uide-minimal-porting-guide-mtk-64bit-t3772641
Give it a go and see if it helps in anything porting related. Regarding the updater script, download on of the custom roms for your device and try using one of those updater scripts.

Categories

Resources