[REQUEST] Zip binary for android x86 - ZenFone 2 General

Hi,
I need the zip binary file for android x86 devices. This is one of the few devices with x86 structure, so thought you people will know about it.
Why I need it?
I am making a root based app. It currently supports arm and arm64 because I have the "zip" binaries for them. I have found "busybox" for x86, but not the "zip" binary. If anyone would kindly share it here, I would be able to support devices like this one.
How to do it?
Mostly custom ROMs like AEX has the zip binary. To check, download a terminal emulator app from Play store. Then issue this command:
Code:
zip --help
If you get the help menu, then the zip binary is present in the system. You need to just search it.
Where to search for the zip binary?
The zip binary can be present in /system/bin or /system/xbin or /vendor/bin (if this device has any directory like that). You would need a root enabled browser to look into these directories. Once you find it, please upload it here. I will be really grateful.
Thanks a lot.

i'm getting help from zip --help
this is the zip from Mokee Rom , it was in xbin folder

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

How to create flashable zip from scratch?

Hi everyone,
I was wondering if someone could point me in the right direction to create a flashable ROM from *SCRATCH*. I have googled everything I can think of and everyone seems to have the same answer -- take someone else's zip file and just replace the files with your own, then tweak the updater-script if necessary.
This seems kind of bogus to me, but perhaps I don't quite understand edify scripting. Certainly doing this with amend scripting would work, but that was deprecated a long time ago so I would like to use edify. I think the root of the problem is that I don't understand what the update-binary file is all about.
Can someone please explain how to create a zip without just using someone else's and tweaking it? I recently updated my framework-res.apk file and put new battery icons and new charging animation in it. Then I pushed it back over to my phone with adb and it works great. I would really like to know how to create a flashable zip from this. Sure, I could just download someone else's zip file and then swap out their framework-res.apk file with mine but that doesn't teach me the real, underlying process.
I am a developer for my day job so I'm not new to this type of stuff, but I am new to Android development. I can create the directory structure necessary and place my signed apk file where it needs to go. Furthermore I can write the updater-script file myself (in edify syntax). But then I need to somehow generate the update-binary file before creating the final, flashable zip and signing it.
So how exactly do I create the update-binary file? Do I need to run my updater-script file through a compiler or something? Or maybe the update-binary file is universal for every flashable zip (though if this were the case, then why have the file in every zip -- just put it on every phone and then you don't need to bloat every flashable zip file with it).
Can someone please explain? Also, if you can do it without mentioning or requiring any Windows specific tools that would be great. I run Ubuntu so most of the Windows tools are useless to me (yes I know I could run a virtual machine, or use Wine, etc.). I prefer to do everything with Linux or some platform-independent way.
Thanks!
I use linux too (gentoo) and I make mine pretty much from scratch. Just create a working directory somewhere (I use /usr/src/[my_package_name]/) then create a directory layout just like you'd want to see on the android device. For your example make a directory called "system" and then "system/framework" then copy your framework-res.apk to system/framework/. Now make a META_INF directory, and add "com" then "google" then "android" (so you have [my_package_dir]/META_INF/com/google/android/ ). Now copy the updater_binary (this is basically the command interpreter for edify scripts--amend commands are built-in to the recovery system). Now make your script. FOr your example above, your realy only need a few commands: mount the system dir, then copy the package file(s) over:
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p25", "/system");
package_extract_dir("system", "/system");
You'll need to know the details for the specific device to know what arguments to use for the mount command. The above is for an Inspire or DesireHD.
Now just zip it all up (from your base package's directory):
Code:
zip -r -o my_package_file.zip META_INF/ system/
the "-r" means "recursive" and "-o" tells it what output file to use. The remaining arguments are the files (or directories in this case) to zip up.
That's great information...actually more detailed than what I needed but it's always better to have too much than too little. You answered my main question though which is what is the point of the update-binary file. If it's an interpreter for edify scripts then that makes total sense that it would be included in every zip (and furthermore be the same in every zip). I still think it's a bit of a waste though (just build that interpreter into the Android kernel itself so that people don't have to copy it around everywhere), but I'm not the one in charge of this stuff.
I guess I'm off to create a zip of my battery icons then. I'm on an Evo by the way, and if I remember correctly /system is mounted on /dev/block/mtdblock3. No big deal though, I can always cat /proc/mounts in a shell to find out.
Thank you very much!
P.S. You can save a few keystrokes on the zip command by dropping the -o and even dropping the .zip extension. Just try:
Code:
zip -r my_package_file *

Phoenix OS [2.6.3] x86_64 Xposed Framework v89 SDK25 by youling257

XPOSED FRAMEWORK INSTALLATION ON PHOENIX OS
Hello guys ,
After A long time ,Sir @youling257 released latest x86_64 Xposed Frameworks v89 for SDK25
It booted far eaisly with xposed frameworks being active.
Instructions:-
Similar to those of RemixOS ,
1.Download official xposed-v88 sdk25 x86 zip from
Framework http://dl-xda.xposed.info/framework/sdk25/x86/xposed-v88.1-sdk25-x86.zip
For x86_64
Framework https://github.com/youling257/XposedTools/releases
<------------+++++++++++++++++++++++++++++++++------------->
Installer
https://forum.xda-developers.com/showthread.php?t=3034811
No need for x86_64
<------------+++++++++++++++++++++++++++++++++------------->
2.Decompress it and copy the system folder and flash-script.sh (located at /META-INF/com/google/android/) from extracted folder .put them in a seperate folder inside /system partition or in root of hdd partition where is your PhoenixOS folder resides.
For x86_64 ,just decompress zip in Xposed folder and put folder in /system/*(here)
3.Boot Grub and select debug option if you have otherwise.hover over normal boot and press e to edit the boot option
Add
Code:
DEBUG=1
at the end of kernel args.
before the last line for initrd (not in this line).
And boot it with F10
4.Now ,in debug Mir-shell.Go to /mnt/* if you placed it in root parttion of your PhoenixOS folder from Windows 10 or in /system/*/ folder if you placed it there.
Code:
cd /mnt/xposed/ //for me * is xposed
Or
cd /system/xposed/
* is the folder where you copied flash-script.sh and system folder.
Now run
Code:
sh flash-script.sh
For x86_64
Code:
sh script
It should flash latest xposed framework .Ignore failing to set selinux file contexts for files.
Now simply reboot .
Credits
youling257
Camlin3 said:
XPOSED FRAMEWORK INSTALLATION ON PHOENIX OS
Click to expand...
Click to collapse
Hi!
I've installed version 1.5.0 of Phoenix OS 32bit (not UEFI). How do I install Xposed?
Maybe it's not booting by Grub.
I've tried to install Xposed Framework by using the XposedInstaller.apk on Phoenix OS. But after installation and reboot, my Phoenix OS was failed to boot and stuck at logo.
(p/s) Do you know how to disable the "Change Keyboard" window popup when pressing the "Ctrl+Shift" key combination? I try to using Xposed for this reason.
Please help!
Need your expertise
Hi there, I'm new here and need your help with setting up exposed on phoenix os.
Will you please help me with detailed and step by step guidance. Or can you share screen shot of each of the steps you've listed in the process.
I really want to set this up, hope you'll be able to find time to help me out here.
Thank you...
mcuong said:
Hi!
I've installed version 1.5.0 of Phoenix OS 32bit (not UEFI). How do I install Xposed?
Maybe it's not booting by Grub.
I've tried to install Xposed Framework by using the XposedInstaller.apk on Phoenix OS. But after installation and reboot, my Phoenix OS was failed to boot and stuck at logo.
(p/s) Do you know how to disable the "Change Keyboard" window popup when pressing the "Ctrl+Shift" key combination? I try to using Xposed for this reason.
Please help!
Click to expand...
Click to collapse
Unfortunately PhoenixOS based upon lollipop aka x32 bit doesn't support xposedc,it caused bootloop.
Sunnyghoshal said:
Hi there, I'm new here and need your help with setting up exposed on phoenix os.
Will you please help me with detailed and step by step guidance. Or can you share screen shot of each of the steps you've listed in the process.
I really want to set this up, hope you'll be able to find time to help me out here.
Thank you...
Click to expand...
Click to collapse
Since,there is no 32 bit more pos on nougat so it can't be helped .For x64 device,no developer is interested in making xposed framework for x86_64 devices.
Thread Updated .
unable to install xposed on phoenix os 64 bit missing script file?
hi i followed your instructions to get xposed installed on a 64bit phoenix os, but the zip file [xposed framework by youling257] that u gave for the 64bit does not have a "script" file inside it,so can u be a bit more clear as to how you managed to install the xposed framework. cos going through your instructions u told to run the script file for the 64bit is that some custom script u wrote to install the framework if so can u please provide that for download as well.
nitroboozter said:
hi i followed your instructions to get xposed installed on a 64bit phoenix os, but the zip file [xposed framework by youling257] that u gave for the 64bit does not have a "script" file inside it,so can u be a bit more clear as to how you managed to install the xposed framework. cos going through your instructions u told to run the script file for the 64bit is that some custom script u wrote to install the framework if so can u please provide that for download as well.
Click to expand...
Click to collapse
You can use updater-script Instead ,however here it is ,put it beside system folder and set permission executable .
I tested this on Bliss x86 7.2 Stable, and it worked great.
I took the x86_64 zip and extracted it's contents into a folder named 'system'. I then put the 'system' folder and installer script into '/tmp'. I then opened terminal, elevated privileges with 'su', then executed the installer script.
Okay, I tried various methods mentioned here.
I have latest Phoenix OS, of course x86_64, sadly no more stable x86 anymore.
I have Framework downloaded from https://github.com/youling257/XposedTools/releases
Then extracted it, TWICE, one with folder and one with contents of inside folder. So I had 3 possible types of same thing (zip, folder, extracted from folder)
Now those 3 things, and also, with script.txt and a copy renamed top script.sh, 5 total were moved to /system,/mnt,/sdcard.
As you can see, I left no chance of lack of anything. Yet I got errors. (attached)
Then I tried with no apk, as mentioned no installer needed. I got various errors.
I then downloaded it, placed in priv-app with XposedInstaller.apk name, also installed it.
Then still I got errors. (Look at attachment)
I have also attached the script I am keep using. Is it for 32bit or what?
Please do help. This Xposed thing made me reinstall my 5 multiple OS booting system to REINSTALL.
fddm said:
I tested this on Bliss x86 7.2 Stable, and it worked great.
I took the x86_64 zip and extracted it's contents into a folder named 'system'. I then put the 'system' folder and installer script into '/tmp'. I then opened terminal, elevated privileges with 'su', then executed the installer script.
Click to expand...
Click to collapse
Which script you use. Mine give error xposedinstaller.apk not found and after installation finished when i manually install xposedinstaller.apk its says xposed is installed but not active.
On phoniex 2.6.3
netship said:
Which script you use. Mine give error xposedinstaller.apk not found and after installation finished when i manually install xposedinstaller.apk its says xposed is installed but not active.
On phoniex 2.6.3
Click to expand...
Click to collapse
Sounds like it should be working. Maybe check that the toggle at the top right of xposed installer is enabled and give it a reboot?
Yeah! it is working now
Thanks much for this. Running LineageOS 14.1 r2 x86_64. Used the files from the OP's github link, dropped the extracted files into my system folder with X-plore file manager, rebooted and was ready to go. Simple and easy, I appreciate it!!!
Seems to be running, installer says Xposed framework active, but I can not download and install any module installer reports permission issues, but LOS 14.1r2 us rooted (I'm using 32bit system)
Any help?
Camlin3 said:
XPOSED FRAMEWORK INSTALLATION ON PHOENIX OS
Click to expand...
Click to collapse
Thank you friend
You're just a wizard.
the truth is I'm not using Phoenix OS, but Lineage OS 14 x86_64, but according to your instructions it works.
pepelillo said:
Seems to be running, installer says Xposed framework active, but I can not download and install any module installer reports permission issues, but LOS 14.1r2 us rooted (I'm using 32bit system)
Any help?
Click to expand...
Click to collapse
If you got issues about xposed, you can install Xposed Framework with Android PC Toolbox.
https://forum.xda-developers.com/ph...release-phoenixos-android-pc-toolbox-t3748153
PizzaG said:
Thanks much for this. Running LineageOS 14.1 r2 x86_64. Used the files from the OP's github link, dropped the extracted files into my system folder with X-plore file manager, rebooted and was ready to go. Simple and easy, I appreciate it!!!
Click to expand...
Click to collapse
DoanART said:
Thank you friend
You're just a wizard.
the truth is I'm not using Phoenix OS, but Lineage OS 14 x86_64, but according to your instructions it works.
Click to expand...
Click to collapse
You people can hit thanks instead or a little free will donation to sir @youling257 will be appreciated.I mean see yourself, from almost 2years ,No one dared to release xposed for x86_64 but @youling257 has done this again after Solarwarez ,even rovo89 himself declined my request many times. But who cares.
can't install on x64 AMD A8
always show not compatible with ur architecture
Yohanes_Adi said:
always show not compatible with ur architecture
Click to expand...
Click to collapse
Try editing build.prop for same architecture value ....
PS:BTW its weird ...

[Guide] Unpack Update.app in phone

So there's threads about how to unpack UPDATE.APP on windows/PC/OS X so i decided why not do it on android too, this apps requires some additional tools to be downloaded just as OS X/Windows and linux needs as well. but process is otherwise similar. this tutorial doesn't need root!
NOTE THIS TUTORIAL isn't fully working on OREO on Huawei devices, it has some issues and i haven't found a workaround for it yet!​
Needed apps
Termux https://play.google.com/store/apps/details?id=com.termux
Recommended apps
Hacker keyboard
Needed files
https://github.com/atarii/split_updata.pl/blob/master/splitupdate
@Atarii 's modification of splitupdate to manually enter the partitions you want to unpack
The desired FW you wan't to unpack
Unpack process:
Download Termux
Open termux and type
termux-setup-storage This will allow termux to access your /sdcard
pkg install perl (this will install perl which the update.app process is using) once asked press y and enter.
copy the downloaded files to root of your SDCARD *We keep this simple*
Once copied type: cd storage
perl splitupdate UPDATE.APP partitionyouwanttoextract if everything goes well you should be good to go and having the selected files in a folder called output where selected files should be stored.
The unpack tutorial is done. But wait! If you want to browse the files you need to do one more thing or two.
Download android image kitchen
https://play.google.com/store/apps/details?id=com.redlee90.imagekitchenforandroid
This will allow you to *unpack boot/recovery and convert system image (also vendor, product, cust and version)
*in order to unpack a boot or recovery file you'll need to remove all code using a hex edit file until you see ANDROID text. Else it won't unpack. You can unpack aosp images easily with this tool and modify what you want and repack to flash it on your device tested with twrp image for honor 8.
I would suggest to not unpack/repack boot using this tool since it'll cause problem.
There's a python script that works to unpack boot and recovery which can be found https://github.com/liudongmiao/bootimg/blob/master/bootimg.py
For this you'll need to install python.
pkg install python and hit y and enter
Now you just do as the splitupdate part where you extract the file.
Command to unpack
python bootimg.py --unpack-bootimg similar is for ramdisk but you replace bootimg with ramdisk.
To repack just simply python bootimg.py --repack-bootimg
Please note if you repack ramdisk the boot might not work (it's a while since I tested this) now this covers up how you unpack boot and extract update.app from phone.
Credits to @Atarii for telling how to unpack boot on phone and for his custom splipupdate script
Sent from my FRD-L09 using Tapatalk
Known Issues:
If you get Killed when trying to extract system.img this is most likely because the image size is too big, this isn't due to small space available i guess its due to all ram is being taken yet i can't tell.
i get permission issues. yeah this can happen sometimes try chmod +x or chmod 0777 with root, it might help.
when typing termux-setup-storage i get lots of errors and i'm on 8.0 EMUI
This is not your fault it's a bug caused by android i'd guess, or app isn't adopted completely for 8.0

[GUIDE] Porting Kernel Source to Snapdragon Device

Some OEMs violating GPL licenses and won't publish linux kernel sources for their Android devices.
On this post I’ll explain how to port kernel source to any android device.
Maybe you can port kernel sources to other SoCs with similiar ways but I've explained qcom way.
What do we need ?
A Computer which has Linux or Mac installation.
Device to test.
Let’s Start, Shall we ?
First of all we need to take dmesg of stock kernel using adb shell dmesg > dmesg.txt command. (I recommend you to take it while device is booting)
You got dmesg ? Nice. Open it with any text editor and search for “hardware” or “machine” and note the result to somewhere. By doing this we’ll get the name of device-tree-blobs.
Download android image kitchen and extract it to somewhere.
Now hold and move your device’s stock boot.img to unpackimg.(bat/sh)
Now your stock kernel got extracted to split_img/boot.img-zImage. After this line I will referance this file as “stock kernel”
Fetch split-appended-dtb using git clone https://github.com/MacTavishAO/split-appended-dtb-mac command. We’ll use this tool to extract dtb from stock kernel.
Copy stock kernel to split-appended-dtb-mac folder.
Now we will extract dtb(device-tree-blobs) from stock kernel. If you are on Linux use ./split-appended-dtb boot.img-zImage command for Mac use ./split-appended-dtb-mac boot.img-zImage command.
Now we have bunch of files named dtbdump_xx.dtb. We have to find out which one our device uses. Use grep -r <machine name that we found at step 2> . to find out which dtb our device using. (Write different parts of machine name to find out)
Install dtc using apt install device-tree-compiler command.
Let’s say it turns out dtbdump_21.dtb is the right one. We have to decompile dtb file to dts using dtc -I dtb -O dts -o extracted.dts dtbdump_21.dtb command.
Now we have to extract defconfig from stock kernel.
Use wget https://github.com/torvalds/linux/raw/master/scripts/extract-ikconfig && chmod a+x extract-ikconfig command to download necessary tool.
Use ./extract-ikconfig boot.img-zImage > extracted_defconfig to get defconfig from stock kernel.
Now we got what we need, we need to download kernel source to start porting to our device.
After this point I’ll start to explain as porting to Qualcomm device but almost same on other system-on-chips.
Go to Settings -> About Phone -> and note “Kernel version”
We need to download soc manufacturer’s sources. From here find msm-X.X that matching with your phone and copy link of it.
And from here find tag matching your chipset and write it down somewhere.
Use git clone <sources from 2 steps up> -b <tag>
Now enter to msm-X.X folder.
Copy extracted_defconfig to arch/<your device's architecture>/configs/ folder.
If your device is arm64 copy extracted.dts to arch/arm64/boot/dts/qcom/ if this directory doesn’t exist copy to arch/arm/boot/dts/qcom/ folder. (If you have 3.x qcom device skip the arm64 part and copy it directly into arm)
Open “Makefile” file in arch/arm(64)/boot/dts/qcom/ and add extracted.dts to the line matching with your chipset.
It’s time to import drivers. After this step I cannot help you because every devices’ hardware isn’t same but I can give some tactics.
To get driver names you can read dts file or install any device info app from Google Play Store etc.
Search these names and GitHub you can find files and commits which will help you to add drivers.
You did all of these without my help ? Excellent! Now it’s time to build kernel. I suggest you to use @natchanchance 's kernel compilation guide.
After compiling kernel. Copy compiled kernel to split_img folder which mentioned at early of this tutorial. rename it to boot.img-zImage and double click repackimg.(bat.sh) and you have new file named image-new.img.
Boot it using fastboot boot image-new.img command and if everything is working you can use fastboot flash boot image-new.img to use it permanently.
Leave a comment here about your questions. I'll try to reply all of them.
Planned to make a guide video about it but I don't have much time. Keep checking this thread may I post soon.
Reserved
Reserved.
Reserved
Thanks Dude!
This is very useful guide especially fir those who want to port the kernel source.
Thanks man. I am following your guide.
Thanks ?
While looking for matching dtbdump file I got a match in all four files for PMI8996, which file should I use?
"We have to decompile dtb file to dts using dtc" stuck at this step.
Any help on which "App" to use to find driver names..
Thanks
CPUZ / AIDA64
ataberkozen said:
It’s time to import drivers. After this step I cannot help you because every devices’ hardware isn’t same but I can give some tactics.
To get driver names you can read dts file or install any device info app from Google Play Store etc.
Search these names and GitHub you can find files and commits which will help you to add drivers.
Click to expand...
Click to collapse
I've found another way to find hardware info using hwinfo tool inside termux. The trick is to use it with root permissions.
Install hwinfo in termux:
Code:
apt-get install hwinfo
Run it with root permission tee into a text file:
Code:
su -c $(which hwinfo) | tee hwinfo.txt

Categories

Resources