Related
When I tried to create a CWM script for flashing certain mods on systemui.apk, email.apk and twwallpaperchooser.apk, after flashing permission of these apks are rw-rw-rw instead of rw-r--r--. I am not sure why this is happening and I have tried different scripts as well.
Code:
ui_print("");
ui_print("--------------");
ui_print(".XXXXXXXXXX.");
ui_print("--------------");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
delete("/system/app/com.google.android.email.apk");
package_extract_dir("system", "/system");
set_perm(0, 0, 0644, "/system/app/com.android.email.apk");
set_perm(0, 0, 0644, "/system/app/com.android.systemui.apk");
set_perm(0, 0, 0644, "/system/app/com.sec.android.app.twwallpaperchooser.apk");
show_progress(0.100000, 0);
ui_print(".Sucessfully fixed all bugs.");
ui_print("----------------------------");
unmount("/system");
Please help me to set right permissions
have you tried permission
have you tried cwm then its either in advanced or on the first page theres an option that says fix permissions, depending on how many apps on phone could take 2-50+ secondsm. im no expert but whenever i change permissions and get them wrong this always reverts them back to default for me. or you could try using solid explorer, or root explorer to manually set permission with no scripting required.
good luck otherwise hope i helped
A couple of people asked me how to create a CWM Flashable zip so I thought Id make a quick guide for it Firstly, I've provided a quick runthough of making such a zip. Secondly, I've given a quick brief of the Edify Scripting Language which is used to make flashable zips
And finally, Ill include a sample zip with detailed instructions of how it works
I. Creating your CWM flashable zip
Tools Required
1) Archiving tool (WinZip/WinRAR)
2) Unix based text editor (Anything for Linux Users, Notepad++ recommended for Windows users ) DO NOT use Notepad or Wordpad.
3) Good eyesight (Important to catch small typing mistakes lol )
How To
First, we create a new folder where we are gonna put all our files. Let that be ROM
Inside it, we gotta create this new Folder META-INF
Here's how the file Structure of META-INF is going to look like
META-INF
-->com
------>google
---------->android
-------------->update-binary
-------------->updater-script
The names colored in Blue are files while the others are folders. Just create the folders as per the Layout I just posted.
Now, you must be wondering about the two fines in question ?
The first file, update-binary is a binary file which performs all the actions of the CWM Flashable zip. There are loads of binaries each with their own properties and syntaxes. Ill show some of the common variations of the syntaxes next to the command.
I've attached a binary that works fine with Xperia phones. Just unrar the file and keep it in the directory as I said . You might need another for another rom though
The second and most important file of all is the updater-script. Note that it has no file extension. However, it can be edited like a normal textfile using Notepad++. This file will determine all the commands to be performed by the CWM zip. So here's where the commands go.. Ill explain the commands at the end of this. The commands are in a language called Edify. Google can give some hints of usage if nothing else
Note : The Encoding of this updater-script should be ANSI and the EOL formatting should be Unix. Otherwise, Flash will fail with a Status 6 Error. If you get a Status Error 7, either the update binary is out of date( Unlikely) or you made a logical error.
After typing out all the commands, Click the Save As. Make sure to select "Any type" for Filetype to save as,then give the name updater-script.
After this, we proceed to add any files we want to flash to the zip. The updater-script is in charge of what file goes where.etc so if you understand how to do that properly, you're pretty much ready to make the files
Now, after adding all the files you want, we select the folders META-INF and all the other folders/files present in ROM (without the folder ROM itself) and create a ZIP Archive with *Compression Ratio set to STORE*.. That is very important. Dont make any edits,etc..
After making that zip,we now need to sign it to get CWM or any other recovery to flash it.Im including a zip that contains two files for Signing zip files. Rename your created zip to a.zip and place it in the same directory as the two files from Sign.zip.. Run Sign.bat and a new file update.zip If you open it, you'll notice 3 new files in the META-INF folder (This is the sign created for CWM to verify ) And voila, now you have your own CWM flashable zip
II. Creating the Updater-Script using Edify
Now, we have to look into writing the updater-script to write the commands to be performed The Edify Language has all its commands separated by Semicolons. Presence of extra spaces or Newlines between two commands is not considered. With that said, I think we can start with a list of Commands Note: All address starting with a '/' are in Phone's system and not the zip file.
I've included a list of the commands you'll probably need
Command: ui_print()
Example: ui_print("My Name is Sam!");
Explanation: As expected this command writes the line "My Name is Sam! " and shows it as output when this line is encountered in CWM. Can also support concatenation of strings ie, ui_print("My Name is" + "Sam"); is equally valid and same output.
Command: showprogress()
Example: showprogress(0.6, 10);
Explanation: This command will set the fraction of Progress Bar Filled to the first parameter specified in the time in seconds given as second parameter. eg, if previously, ProgressBar was 30%(0.3) filled, running that command would cause the Progress bar to slowly fill up so that when 10 seconds pass, The total percent filled is 60% (0.6) and ProgressBar stops filling up after that till another Progress statement is encountered.I read somewhere that using two digits of precision,ie 0.85.etc can cause errors so be wary.
Command: setprogress()
Example: setprogress(0.6);
Explanation: This command can be used to set the value of the Progressbar Instantaneously. However, note that the value of progress completed given (ie, 0.6) is less than or equal to the amount specified in the previous show_progress() command.
Command: unmount()
Example: unmount("/cache");
Explanation: Unmounts the partition marked at the address given in file. Always unmount your partitions before your script exists.. Its just plain etiquette
Command: format()
Example: format("ext4", "EMMC", "/dev/block/mmcblk0p11"); or format("ext4", "EMMC", "/dev/block/mmcblk0p11", "0");
Explanation: First major command to vary with update-binary. Make sure you use the right command based on the binary or you'll get an error when you flash via CWM. First part denotes partition type,2nd is EMMC for most phones, Ithink ? (Please Confirm) and 3rd is the partition to be wiped. To be honest, I have no clue what the "0" does but thats the way I got it working. Always unmount a partition first before formatting. *ALWAYS*
Command: mount()
Example: mount("ext4", "EMMC", "/dev/block/mmcblk0p10", "/system");
Explanation: Mounts the partition in /dev/block/mmcblk0p10 as /system with filetype ext4 and Type EMMC. Similarly, you can mount data with mmcblkop11, and cache with mmcblkop12. This might vary with update-binary files but it works fine on the one I uploaded When you need to make an edit to Phone's Files, you need to mount the partition first. Its preferable to mount in this manner as opposed to using busybox because this method is universal whereas when busybox is missing or misconfigured, you get Errors and its not easy to resolve.
Command: delete()
Example: delete("system/app/YourApp.apk", "/system/app/a.apk");
Explanation: Simply deletes whichever files are specified in the parameters. Supports unlimited parameters. Do NOT use with folders. And make sure that in the example, System is mounted first so that it can delete the file correctly. No error is shown if file is missing or couldnt be deleted !
Command: delete_recursive()
Example: delete_recursive("/system/app");
Explanation: Deletes all the files in the specified folders and also the folders themselves. Accepts multiple arguements. See delete() for more details.
Command: package_extract_dir()
Example: package_extract_dir("system", "/system");
Explanation: Extracts the contents of the folder system in zip to the directory of /system in phone.
Command: package_extract_file()
Example: package_extract_dir("system/app/a.apk", "/system/app/anew.apk");
Explanation: Extracts the file specified in zip to the directory of /system/app in phone and names new file as anew.apk in Example..
Command: set_perm()
Example: set_perm(0, 2000, 0777, "/system/etc/init.d/1script", "/system/app/12.apk");
Explanation: Sets the permission of the files specified as 777 with uid as 0 and gid as 2000. Google for Android User ids and Group Ids to get more clues. Supports multiple files. In example, 2 files are given.
Command: set_perm_recursive()
Example: set_perm_recursive(0, 2000, 0777, 0644, "Dir1", "Dir2");
Explanation: Sets the permission of all files in Dir1,Dir2.etc as 0644 (recursively searches Folders and subfolders for files) And sets 0777 as permission for folders (Checked Recursively).. uid will be 0 and gid 2000 in example.
Click to expand...
Click to collapse
These commands should be enough to get you started Ill post a few more tomorrow when Im properly awake.. Very sleepy now Sorry guys,, Will upload rest later And try to open a rom or two and take a peak at updater-script Should give you a good idea until I upload my sample file as well Cheers Gn
This concludes Part 2 of the Guide. Finally Finished Part III Sorry For Dealy
III. An Example Of A Working Updater-Script with functions explained.
For the sample, we'll go through my installer Script for the Xperiance Rom Series Addon Package. Its not much to go on, but sometimes, editing someone else's finished work makes it alot easier to learn yourself Let me know if you guys want any more help Feel free to PM me anytime Cheers
####
#Your Stylish Intro Never forget it
####
ui_print(" ");
ui_print(" ");
ui_print("==============================================");
ui_print("| Xperiance Lite v1.0 |");
ui_print("==============================================");
ui_print("| Xperiance Lite By Min3r |");
ui_print("| Xperia U ST25i |");
ui_print("| Working On 6.1.1.[B.1.10/B.1.54/C.1.10] |");
ui_print("|********************************************|");
ui_print("| Addons Pack |");
ui_print("|********************************************|");
ui_print("| AC!D Audio Engine by Team AC!D |");
ui_print("| Cybershot Experience 4.7 by Rizal Lovins |");
ui_print("| InfiniteView Mod by reaper61616 |");
ui_print("| Jellybean 4.2 Keyboard |");
ui_print("| Xperia T Statusbar by destroyy |");
ui_print("==============================================");
ui_print("Flashing in Progress.....");
ui_print(" ");
ui_print(" ");
#Mount System & Data
mount("ext4", "EMMC", "/dev/block/mmcblk0p10", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p11", "/data");
#Copying all the Directories
package_extract_dir("system", "/system");
#Setting Required Permissions
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/beatsbass");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/beatsnormal");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_beatbox_bt");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_beats_wireless_bt");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_gec");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_gec_bt");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_htc_earbud");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_htc_midtier");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_ibeats");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_ibeats_solo");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_ibeats_solo_v2");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/image_ibeats_v2");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/load_mg_driver");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/load_sony_driver");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-acdb-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-native-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/pm_snd");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/snd");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/sound");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/sound8960");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/xaplay");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/snd3254");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d/10acidmod");
set_perm(1000, 1000, 0644, "/system/app/SystemUI.apk");
set_perm_recursive(1000, 1000, 0777, 0777, "/system/app/SystemUI.apk");
set_perm(1000, 1000, 0644, "/system/app/QuickPanelSettings.apk");
set_perm_recursive(1000, 1000, 0777, 0777, "/system/app/QuickPanelSettings");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-gs-camctrl-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQStrMgrTest");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQUnitTest");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQVideoRendererTestApp");
ui_print(" ");
ui_print(" ");
#Wiping Dalvik Cache
delete_recursive("/data/dalvik-cache");
#Unmounting
unmount("/system");
unmount("/cache");
Click to expand...
Click to collapse
Making this guide took me the better part of 2 hours so please take the 5 seconds necessary to hit the Thanks button to remind me my work isnt for naught
Changelog
29/12 : Added Sample Script & Rearranged commands in order of the natural order in which they are likely to be used
Created : 27/12
Most wanted for me
Sent from my Xperia U using Forum Runner
drsanket_xperia_u said:
Most wanted for me
Sent from my Xperia U using Forum Runner
Click to expand...
Click to collapse
Sorry for delay bro.. I managed to get net working temporarily but the speed is low, huge lag at times and frequent disconnecting.. It took me over 3 tries to just make the thread :/ Requests keep timing out
Impressive. Thx.
Explanations r really helpful
This is some awesome guide. Always wanted it
---------- Post added at 03:22 PM ---------- Previous post was at 03:21 PM ----------
drsanket_xperia_u said:
Most wanted for me
Sent from my Xperia U using Forum Runner
Click to expand...
Click to collapse
Me too
Why not busybox mount?
Hit
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For keep up my Developing!!
That question came to my mind too first time I saw this usage ;P It took me a while to guess the answer (This is my own derived answer.. If any experienced devs know better, please enlighten us all )
There are loads of busybox binaries and not all are fully compatible with our phones. So why create a dependency on them when we have an inbuilt function to do the same ?
Plus, the obvious fact that we are limiting usage to just 1 binary instead of calling up busybox as well should be sufficient Hope it helps
Cheers
This is a great guide.
You mentioned the update-binary is good for 2012 xperia line up, would this include xperia t (LT30a).
can i put this in my zip file, or do i need to sign it with the sign.rar?
Again Thanks.
Glad you liked it mate Several ppl asked me at the same time so I thought it would be better if I made a guide so everyone can use it I hope I can complete it soon.. Keep getting interrupted at hostel when I try to make
And yes, it should work But in case it doesnt, just get a binary from any of the zips for custom roms there Also, I believe signing is based mostly on the script not binary so shouldnt be necessary. But as a precaution, Id advice you do it all the same to avoid issues You can resign an edited zip (without deleting the old certificates.etc )
Sample Script added And if you have any doubts about how a specific script works, feel free to post here or message me
And Ill see about adding more advanced function in future updates for Advanced users ;D
Great work bro..!!
Earlier i used to do it without knowing what i was doing
Now i know what i am doing Thanks a lot..!!
Can u please explain a lil more on busybox and binary thing?? I didn't get it... :silly:
Busybox is a binary which adds alot of unix shell commands to Android. Unfortuntately, not all Busybox binaries (versions of a software,kinda ) work without bugs, and some are incompatible with some phones.. So the less you depend on busybox for your operations, The more likely it is to work properly Plus, if update-binary works, then you can be sure that mounting can work fine
Thanks mate
Wow, Thanks for the GUIDE man... :good: for ya +1
Thanks
Sent from my GT-S5570 using xda app-developers app
it will be great if there is a video tutorial
Sent from my Xperia U using xda premium
To be honest, I don't think it will be necessary but If enough people are interested, Ill try making one, next week Till then, if you have any doubts, Feel free to PM me anytime
hello min3r broo wow finally I gonna learn about updater-script
thanks for these tut
reading now...:angel:
Great information pal,can you please try to post an easy and friendly tutorial explaining what all changes are to be done in framework.jar,services.jar etc while porting a rom to make it boot..this would be really be of great help..
Has anyone got one to boot on the Mega?
I have tried various ideas and have got the install working but it fails to boot after the reboot.
Is anyone further along than this?
Kangburra said:
Has anyone got one to boot on the Mega?
I have tried various ideas and have got the install working but it fails to boot after the reboot.
Is anyone further along than this?
Click to expand...
Click to collapse
Having similar issues, aroma is not parsing to update-script on 3 versions 2.00, 2.5 and 2.76. Standard install process not going great and cannot for the love of the big g work out why, yet i did a small test flash to system and all went fine. just gonna take time to plod on through lol
---------- Post added at 03:45 PM ---------- Previous post was at 03:22 PM ----------
scrub that by removing kernel its booted ok now
So you are able to flash a complete Rom with Aroma?
Sent from my GT-I9205 using Tapatalk 2
Kangburra said:
So you are able to flash a complete Rom with Aroma?
Sent from my GT-I9205 using Tapatalk 2
Click to expand...
Click to collapse
No
Aroma bums out at handing over to the update script. The updater script works fine on its own this was tested on 2.00 2.5 and 2.76 the first two worked fine on n7000 so I know its not my scripting. I have mentioned this to the peeps eho know.
The only thing struggling to flash is kernel but as we need stock anway for the mo thats not an issue. But that will be easy to sort just ran out of yime yesterday
Whats the issue you facing in aroma or normsl update script. Can you post your script here
Sent from my GT-I9205 using xda premium
thering1975 said:
No
Aroma bums out at handing over to the update script. The updater script works fine on its own this was tested on 2.00 2.5 and 2.76 the first two worked fine on n7000 so I know its not my scripting. I have mentioned this to the peeps eho know.
The only thing struggling to flash is kernel but as we need stock anway for the mo thats not an issue. But that will be easy to sort just ran out of yime yesterday
Whats the issue you facing in aroma or normsl update script. Can you post your script here
Sent from my GT-I9205 using xda premium
Click to expand...
Click to collapse
I have gone down the updater-script from the kitchen, I am having problems with permissions but I have got it booting now.
I am working on tweaks and bloat for now and trying them out.
What permissions you having probs with. Whats the issue
Sent from my GT-I9205 using xda premium
I have removed them.
I am down to this
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 04755, "/system/xbin/busybox");
Now just need to try it out.
Odd what issues did that cause you
thering1975 said:
Odd what issues did that cause you
Click to expand...
Click to collapse
I got the ROM to boot with this
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 04755, "/system/xbin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
which is from the S3 script.
I cam attech my installer script
If u want for future ref
Sent from my GT-I9205 using xda premium
thering1975 said:
I cam attech my installer script
If u want for future ref
Sent from my GT-I9205 using xda premium
Click to expand...
Click to collapse
I have got it now, thanks, I am working on the bloat now.
First I am no Real Developer. So read an test what I say.
In fact this may be a known issue for real developers.
This belongs to GT-P5210
I found my self installing various Zip files in recovery mod that Failed!
After carefully study various ZIP files that work and comparing them with the ZIP files that does not, I found that the ones that work have the "update-binary" with size of 322,688 bytes and the ones that fail have only 194,636!
Tis is for those of you like me that are starting to learn how to develop.
Get an update file that work in P5210: For example go and get
Code:
http://roms.bindroid.com/downloads/viewcategory/11-stock
and download the file : no_bloatware_stock_rom.zip
Now using 7zip or any other compressor, go ahead and decompress the file. You will see the following folders: META-INF\com\google\android
Inside android there is a binary called: update-binary
that I understand interprets the commands inside the script called: updater-script
Is this update-binary the one I am talking about. This is 322,688 bytes!
- - - - - - - - - - - - - - - - - - - - -
Now lest download a zip file that does not work in our P5210.
I been studying a way to back up our partitions. So I been reading on:
Online Nandroid / Nandroid Backup without re-booting
http://forum.xda-developers.com/showthread.php?t=1620255
At the bottom of the first post is the link to the program. This program is install on a rooted device via zip file on recovery mode.
Here is a direct link for "onandroidv9.20.zip" so you to follow me.
http://forum.xda-developers.com/attachment.php?attachmentid=2389865&d=1384355365
Try to install using TWRP by saving the file onandroidv9.20.zip on your Internal memory using the PC.
In TWRP then you will do Install and then search /emmc for onandroidv9.20.zip. Select the file and install.
You will see:
Code:
Updating partition details...
Installing '/emmc/onandroidv9.20.zip' ...
Check for MD5 file ...
Skip MD5 check: no MD5 file found.
[COLOR="Red"]E:Error executing updater binary in zip '/emmc/onandroidv9.20./onandroidv9.20.zip'
Error flashing zip '/emmc/onandroidv9.20./onandroidv9.20.zip'[/COLOR]
Injecting TWRP into boot Image...
TWRP Injection complete.
Updating partition details...
[COLOR="Red"]FAILED[/COLOR]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
So then I thought this has to be with the issue our P5210 is x86. And for sure my friend DutchDanny compiled that "update-binary" special for us.
So since this files have no signature I decide to copy the "update-binary" from the DutchDanny Files and replace the one inside onandroidv9.20.zip and I rename this modified file onandroidv9.20x86.zip
Then I try to install it in TWRP and guess what!!!! Yes it install without any issue.
So this "update-binary" that I saw first on DutchDanny files is been copied on all roms that we see posted here. So this is known to our real developers.
But I thought it should be shown, so that we can force the Failing Zip Files to work in P5210.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Now Here is an Interesting Thing.......
Our GT-P5210 is x86. Not : armeabi or armeabi-v7a nor mips!!!!!
But most of all application in the market are armeabi or armeabi-v7a. They do not have a x86 version.
But when you are running Android normally yesssssss all apks work fine. So how is that possible?
Some people has claim that there are a secondary armeabi processor inside or x86 device. Others think there is emulation!! I do not know.
But I know I had side load many apks really old at the beginning of Android when there was no x86 and they most all work. A few exceptions.
For example MXPlayer requires a special MXPlayer Code Pack. And if you look inside MXPlayer apk that there is a folder "lib" that have sub folders "x86, armeabi or armeabi-v7a and mips". With the applicable libraries that for sure are compiled for each different processor.
If you go into MX Player Codec (x86).apk in lib you will see only "Lib\x86" as expected. It is to be used only in x86.
What I a saying, It is possible that our P5210 have some sort of way of ruining armeabi code while ruining normally. But there are things that require true x86 code like some libraries. This only while you are ruining normally the OS. And I expect that when in Recovery this does not apply making many zip designed for armeabi to fail.
I hope this is useful for you.
Edited:
Correction: There is no second CPU but in fact allmost all apps run under Java Dalvik and libraries via emulation ( houdini library) please see below.
Wow, good info! It also makes me realize just how much I have to learn.
Wow, good troubleshooting. Thank you for taking the time and putting this on paper. I hope with more research somone will crack this x86 product.
Sent from my GT-P5210 using xda app-developers app
imagelost said:
Wow, good troubleshooting. Thank you for taking the time and putting this on paper. I hope with more research somone will crack this x86 product.
Sent from my GT-P5210 using xda app-developers app
Click to expand...
Click to collapse
Next see my post for more info in our OS , x86, armeabi and Java Virtual Machine (Dalvik)
http://forum.xda-developers.com/showpost.php?p=49316921&postcount=51
http://forum.xda-developers.com/showpost.php?p=49324166&postcount=54
Sorry for the slight OT post but the tab 3 10.1 has an intel X86 processor. It is able to run native android apps (compiled for ARM) using something called libhoudini
http://commonsware.com/blog/2013/11/21/libhoudini-what-it-means-for-developers.html
This is just my understanding. sorry if anythin gi've said is wrong.
Thanks
I kow there are many old developers that do not think like me. But I am greatfull of any information that gets to be publis here.
I searched for moths for the answer of how this P52xx where managing old ARM base apk and compiled libraries. No one gave published here an anser . Just A few day I relize that most work becouse of Java Dalvic, and that the libs where handle by this houdini magic.
But please understand that this update.zip are build to run in recovery mode. It is our understanding that there is no houdini magic runing on recovery mode. Thanksfull most is dome on script, but those scrit are translated by update-binary. As I understand this update-binary the is recquired to be compiled for x86. Since no houdini is availabe in recovery mode.
I have to make also clear, that it is my understanding that if an update.zip uses more binary files, they also may be required to be compiled for x86. We can mention busybox, toolbox but may be more!! So if you have an update.zip that keep failng, Bring the atention to the developer and ask him politely to understand that our tablets require this binaries compiled for x86.
Sory for the spelling errors I have no dictionary where I am at know.
Thank you a lot
Thanks a lot OP!that was really heplful thread:good::good::good:,i thought the problem was to rename the update-script to update-binary and delete the other 'update-binary'.
LYandroid;49475925... said:
i thought the problem was to rename the update-script to update-binary and delete the other 'update-binary':
Click to expand...
Click to collapse
I am no expert, but :
update-binary : is the program that interprets the instructions place in the "script", then execute them. Once compiled it never changes excepts for updates or improvements.
update-t or updater-script : is just a script, where we place our set of instructions to perform a task. This change all the time since it will contains different instructions, for every different task we desire to do.
You can not rename one to the other, they are two different things. Normally you need both the binary and the script. But I have seen binaries that do not require the script, I guess they are compile specially to include in them the commands!
I have a motorola xt890 "Razr i" who has also an intel processor atom z580 x86, some developers also try to port first cm for our devices, we already have a build that boot and everything its awesome, but hasnt have sound , also about the updater script, there is a special one for the x86 architechture, some devs on our forum have it already
Maybe you should check the info about, its on the Motorola Razr I development forum from here.
Enviado desde mi XT890 mediante Tapatalk
Thanks for the info on changing the update-binary. I also had to change the line in my updater-script that was trying to run busybox from /sbin to /system/xbin.
Sent from my SM-N900V using XDA Premium HD app
I am trying to install this script with TWRP using your method, but it seems failed.
http://forum.xda-developers.com/showthread.php?p=49903814
would you mind to try it?
I downloaded the script installation zip, changed the update-binary, and it gave an error before executing any of the updater-script. When I changed all lines in the updater-script trying to run programs in busybox from /sbin to /system/xbin, most of the updater-script executed. The one error was my fault in syntax. I know my busybox is installed to /system/xbin, but I don't know anything about busybox itself and it's symlinks. Where is everyone else's busybox installed? Is the location of busybox simply another difference with x86 android builds or am I missing some symlink?
Sent from my SM-N900V using XDA Premium HD app
I been busy. Sorry for the delay.
I am not sure of what I am about to say but here is my understanding. Please keep in mind I am also learning.
1) busybox is an added User binary file that we add to the Android system partition. Most of us did not actually added it ourself, we use an application to add it to Android "system" partition. So when we boot to Android OS it is then there ready for us.
2) But In linux (Yes Android Java Dalvik run on top of Linux) where the User place his own binaries is not well define or implemented. So you will find time after time a problem similar to this situation.
3) So, I confessed I am not sure where busybox binary should really be. I know that normally I will see the Real busybox is in one place and find simlinks ( shorcuts) in the rest of those locations.
4) Now it is important to keep in mind that the folders: /sbin, /xbin, /system, /system\bin, /system/xbin not necessary are the same when you boot in Android OS or when you boot in Recovery!!!!!! Read this 2 or 3 times!!! It is important.
5) In the case of Recovery Partition busybox is there because the developer that created that partition did it for us. Clearly where it is will depend on what the recovery partition's developer decided to place it. I do not know right now where is in CWM that DutchDanny made since I no longer have that in my Tablet. Latter I can try to inspect the recovery.img and tell you.
6) Where is busybox in my P5210:
* I am inspecting my TWRP and I can see that we have a "/bin/busybox". And I do not see folders "xbin" neither in "/xbin" nor in "\system\xbin".
* I am currently testing rom "Bindroid One ver 2.01". In this OS I can see only "/system/xbin/busybox". I have no sysmlinks! Interesting, Not important to me. Keep in mind that I am testing I had no need for it or installing any application that may had require it.
@chchia & @themoneyman It seems both of you are talking about same script but i can be wrong?
Butt....... lets look at the script anyway.
Code:
ui_print(" ");
ui_print("================================");
ui_print("********************************");
ui_print(" ");
ui_print(" T w e a k D r y p t ");
ui_print(" ");
ui_print(" by ");
ui_print(" ");
ui_print(" Team T.D.T ");
ui_print(" ");
ui_print("********************************");
ui_print("================================");
ui_print(" ");
ui_print("Mounting /system /data /cache");
ui_print("");
run_program("/sbin/mount", "/system");
run_program("/sbin/mount", "/data");
run_program("/sbin/mount", "/cache");
show_progress(1, 15);
run_program("/sbin/sleep", "5");
run_program("/sbin/busybox","mv","-f","/system/etc/init.d/50selinuxrelabel","/tmp");
run_program("/sbin/busybox","mv","-f","/system/etc/init.d/90userinit","/tmp");
run_program("/sbin/busybox","mv","-f","/system/etc/init.d/00banner","/tmp");
ui_print("");
ui_print("Deleting old files,please wait..");
ui_print("");
delete_recursive("/data/tombstones");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/boot-cache");
delete_recursive("/data/resource-cache");
delete("/data/system/batterystats.bin");
delete("/system/etc/init.d/00syscleaner");
delete("/system/etc/init.d/01batterytweaker");
delete("/system/etc/init.d/02netweakz");
delete("/system/etc/init.d/03ram_optimize");
delete("/system/etc/init.d/11sdspeedfix");
delete("/system/etc/init.d/05zipalign");
delete("/system/etc/init.d/06gpurender");
delete("/system/etc/init.d/07zipaligndata");
delete("/system/etc/init.d/08kernelTweak");
delete("/system/etc/init.d/09cron");
delete("/system/etc/init.d/10TouchscreenSensitivity");
delete("/system/etc/init.d/04sqlite3");
delete_recursive("/system/etc/init.d");
delete_recursive("/system/etc/cron");
run_program("/sbin/sleep", "5");
ui_print("Installing scripts ");
ui_print("");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
show_progress(0.200000, 40);
run_program("/sbin/busybox","mv","-f","/tmp/50selinuxrelabel","/system/etc/init.d");
run_program("/sbin/busybox","mv","-f","/tmp/90userinit","/system/etc/init.d");
run_program("/sbin/busybox","mv","-f","/tmp/00banner","/system/etc/init.d");
ui_print("Fixing permissions");
ui_print("");
set_perm_recursive(0, 2000, 0777, 0777, "/system/etc/init.d");
set_perm(0, 0, 0777, "/system/bin/uninstall");
set_perm(0, 0, 0777, "/system/bin/scan");
set_perm(0, 0, 0777, "/system/bin/tweakd");
set_perm(0, 0, 0777, "/system/xbin/sqlite3");
set_perm(0, 0, 0777, "/system/xbin/openvpn");
set_perm(0, 0, 0777, "/system/xbin/zipalign");
set_perm(0, 0, 0777, "/system/lib/libncurses.so");
set_perm(0, 0, 0777, "/system/lib/libsqlite.so");
set_perm(0, 0, 0777, "/system/lib/libsqlite_jni.so");
set_perm(0, 0, 0777, "/system/etc/init.d/01syscleaner");
set_perm(0, 0, 0777, "/system/etc/init.d/02cpu_kernel_gov");
set_perm(0, 0, 0777, "/system/etc/init.d/03sqlite3");
set_perm(0, 0, 0777, "/system/etc/init.d/04zipalign");
set_perm(0, 0, 0777, "/system/etc/init.d/05zipaligndata");
set_perm(0, 0, 0777, "/system/etc/init.d/06cron");
set_perm(0, 0, 0777, "/system/etc/init.d/07storage");
set_perm(0, 0, 0777, "/system/etc/init.d/08batterytweak");
set_perm(0, 0, 0777, "/system/etc/init.d/09VM");
set_perm(0, 0, 0777, "/system/etc/init.d/10Ksm");
set_perm(0, 0, 0777, "/system/etc/init.d/11Touch_Sens");
set_perm(0, 0, 0777, "/system/etc/hosts");
set_perm(0, 0, 0777, "/system/etc/gps.conf");
set_perm(0, 0, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
set_perm_recursive(0, 2000, 0777, 0777, "/data/tweakdrypt");
run_program("/sbin/sleep", "3");
ui_print("Unmounting partitions...");
ui_print("");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("Installation Completed !!!!");
ui_print("");
ui_print("| Reboot System Now |");
themoneyman said:
... I also had to change the line in my updater-script that was trying to run busybox from /sbin to /system/xbin....
Click to expand...
Click to collapse
Wao!!! to me this is strange since I have not seen or recall a "\system\xbin" folder in the Recovery. But I may be wrong. But I may bee misunderstanding you too. I will explain.
in the updater-script there are line that are to be run at recovery. For example:
line 21
Code:
run_program("/[COLOR="Blue"]sbin[/COLOR]/busybox","mv","-f","/system/etc/init.d/50selinuxrelabel","/tmp");"
You see zip installation files is executed in Recovery. Waooo here is what happen, think In this:
I am going to assume that you are wrong. There is no \system\xbin folder in Recovery. So if there is no folder much less a bussybox in that folder.....
So in order for the previos code line to execute busybox in recovery will have to be in "/sbin/busybox". But you said it work for you in "/system/xbin". To me it should not work. But lets see.
You are sugesting to change "/sbin" fir "/systen/xbin" line 21 should look like:
Code:
run_program("[COLOR="Red"]/system/xbin[/COLOR]/busybox","mv","-f","/system/etc/init.d/50selinuxrelabel","/tmp");"
Normally if you try to execute that las one, It wont work because there is no folder "/system/xbin" in recovery.
But look at Line 16
Code:
run_program("/sbin/mount", "/system");
Because this script mount the Android /system partition now all files that should only be available at Android are ready to be use in the Recovery!!! End result: What you are doing works in this particular script Only because the Android /system partition is mounted!!! But keep an eye in other script that may not mount /system before using /xbin/busubox!!!!
chchia said:
I am trying to install this script with TWRP using your method, but it seems failed.
http://forum.xda-developers.com/showthread.php?p=49903814
would you mind to try it?
Click to expand...
Click to collapse
Uff, I do not have time for this now I am really busy. I downloaded as you see I posted the script.
Here is what I think is the problem
Unzip "TDT_V4.1_(jb_kk).zip" ( I am assuming you are using jb in your tablet)
You will see in it: data , META-INF, system and a readme.txt
Browse those folders.
You will see there are binaries there!!!!!
now read the script /META-INF/com/google/android/updater-script (yes the same I show before)
line 49 reads
Code:
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
What those line do is copy and overwriting ALL the binaries inside the packages system and data folders and deposit them in your Android partitions!!!!
Here is the sad part for all us users of a x86 device. Our original binaries where compile and optimize for x86 device. The binaries this developer and many other you will try to use in the future most likely where not made for x86!!! Copying over our original binaries may be wrong!!!!!!!
In fact I am learning with your request. I never thought on this problem we have. Waoooo!
My best suggestion is go to the developer and ask him to create this packakes for an x86 device. All binaries should be compile specialy for x86......
In any case: Guys PLease report to us if this package "TDT_V4.1_(jb_kk).zip" was finally installed? Did it work?
Whats the easiest way to install a rom on the device. Because what the op states its a sht load of steps just to get one zip to install
Sent from my SM-N900T using Tapatalk
Nello just found this tweak on a s4 rom, credit to the owner.
In my 6p I get super fluid and smooth UI, like iPhone. Try it, just download and flash it in recovery
I took in exam google plus app, that have supe scrolling lag. After this tweaks lag is gone, and 60 FPS while scrolling, to test it just open the worst lag scrolling app that you have, enjoy
I made a flashable zip, just flash it in recovery and you are good to go
Works great for me. I can tell that things load faster when it first boots up too.
Any impact on battery?
fedef12evo said:
Then reboot, and pur correct permissions to build.proprio
Click to expand...
Click to collapse
What does this even mean?
Works great! No problems at all. Need time to see how it affects battery life.
---------- Post added at 07:53 AM ---------- Previous post was at 07:51 AM ----------
hoseth0711 said:
What does this even mean?
Click to expand...
Click to collapse
Then reboot, put correct permissions to build.prop properly?
The Frustrated Indian said:
Works great! No problems at all. Need time to see how it affects battery life.
---------- Post added at 07:53 AM ---------- Previous post was at 07:51 AM ----------
Then reboot, put correct permissions to build.prop properly?
Click to expand...
Click to collapse
Thanks. So this is what it should look like, right?
Interesting. Listening in, what base you're using it on?
Skickat från min iPhone med Tapatalk
Nothing happens on 7.1.1 dp. Placebo.
I'm using it in cm14.1 official, and I can tell scrolling is super smooth after these tweaks, going to put screen soon for battery
I thnk if this mode enabled it will break CPU setting specially if we use governor profile. But i feel different after applied this mod,smooth scrolling :laugh:
It seems like it work on Nexus 7 2013
I can confirm no impact on battery life
I'm always skeptical about these prop mod's.....so of course I tried this and my stock rooted 7.1.1 DP runs just a slick as any AOSP rom I have run. Can't believe this worked.
Yea it actually works very good
fedef12evo said:
I made a flashable zip, just flash it in recovery and you are good to go
Click to expand...
Click to collapse
So when you say just flash it, you mean. Just flash it..? lol
Sorry for the noob question. I'm not the greatest at changing permissions and all that sorcery.
fedef12evo said:
I made a flashable zip, just flash it in recovery and you are good to go
Click to expand...
Click to collapse
Does this effect any other build.prop edits that you have made?
idbl_fanatic said:
Does this effect any other build.prop edits that you have made?
Click to expand...
Click to collapse
No, it just adds the text to the bottom of your build.prop
The OP took someone else's mod.zip and editted for his needs. Here's the update-script in the zip
Code:
ui_print("***********************************************");
ui_print(" Mod for Android");
ui_print("***********************************************");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
package_extract_dir("system", "/system");
package_extract_file("add_to_buildprop.sh", "/tmp/add_to_buildprop.sh");
set_perm(0, 0, 0755, "/tmp/add_to_buildprop.sh");
run_program("/tmp/add_to_buildprop.sh");
ui_print("Copying Scripts...");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d/01config");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d/02tweaks");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d/03filesystems");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d/04zipalign");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d/05databases");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d/06cputweaks");
set_progress(0.4);
show_progress(1, 15);
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);
package_extract_file("recovery.img", "/dev/block/platform/msm_sdcc.1/by-name/recovery");
show_progress(0.100000, 0);
run_program("/sbin/busybox", "umount", "/system");
show_progress(1, 15);
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
run_program("/sbin/busybox", "umount", "/data");
ui_print("Installation complete!");
add_to_buildprop.sh is the only file he has in the zip, so you can see he copy/pasted someone else's mod zip file with all those actions being taken on non-existent files.
And for those who want to know what build.prop changes it makes here are the lines being added to the bulid.prop:
persist.sys.dalvik.hyperthreading=true
# System Properties
cpu.fps=auto
gpu.fps=auto
# CPU & GPU Properties
ro.sys.cpu.defaultfreq=auto
ro.sys.gpu.defaultfreq=auto
I doubt any of these properties actually exist in the code. The first line.. hyperthreading? That's a proprietary name/technology owned by Intel. Somehow I seriously doubt it's being using in Android code.
Phone is super smooth with cm14.1 now
Thanks
Let's see how this goes...
EDIT: System indeed seems more fluid.