[MMS][SMS] Debugging / Optimisation of mmssms.db - Android Software Development

Hi all,
SMS and MMS are stored in an Sqlite database named mmssms.db, this database contain tables, triggers (34) and some indexes.
I was having "Ghost" threads in my MMS application, threads that can't be removed while they were empty, sometimes dated in 1970... so i dig in the mmssms.db. I found mistakes, bugs, errors in some triggers ... !
Here the result of two days work, this script will update the original build in MMS/SMS database, gaining speed and avoid some bugs.
I've recreated all trigger, corrected some big mistakes and optimise queries for speed. I've also recreated some indexes (added fields).
Some importants queries are now five times faster than before !
=> I've tried it in my phone with no side effect
- Do a titanium backup on "[SMS/MMS/APN] Dialer storage"
- Download the "update.zip" file
- Uncompress it on your sdcard => this will create an "update folder"
- copy your mmssms.db from /data/data/com.android.providers.telephony/databases/ to the "update folder"
- in terminal navigate to the "update folder"
- run the script : "sh update.sh"
=> There are now two files :
- a backup : mmssms.db.bck
- the updated db : mmssms.db
- Copy the mmssms.db back to your /data/data/com.android.providers.telephony/databases/ folder, erasing the old one
- Put the rights back on the mmssms.db (copying to the fat32 sd card should have removed the initial rights)
- Reboot
=> You can now delete "Ghost" threads, they should never come back again... depending if you've got a lot of messages or not you will experience performance gain, faster display .. etc. (got more than 8000 sms/mms)
------ Updates ------
20120227 - Update - 1.1.zip => Seems that id do not works for ICS... wait for clearance
20120307 - Here are the differences i have detected between Gingerbread / ICS in the mmssms.db
- Bad Queries that where here... are always here...
- Two tables have dissapeared : mychannels and wpm
- Some triggers has been reorganised but not completely
- On 7 indexes ... only 2 remains .. !!!
- update.ICS - 1.0 Added
- update.GingerBread - 1.2 Added (mistake corrected) => can be launched on top of 1.1
20120311 - Mistake, the ICS script was the Gingerbread one and vice versa ... - Corrected
- update.ICS - 1.1 created
- update.GingerBread - 1.3 created
20120318 - Added a debug log in GingerBread script
- update.GingerBread - 1.4 created
20120325 - Added sqlite3 for people who need it, put it in /system/xbin/ (Do not forget eXecute rights)

oh my gosh i just tried this and this works like a charm, have a thread with about 8500 sms and opening it is so much faster!
incredible work, thank you very much!

Is it working for all devices ? With all Roms ?
Envoyé depuis mon HTC Sensation XE with Beats Audio avec Tapatalk

KcDaRookie said:
oh my gosh i just tried this and this works like a charm, have a thread with about 8500 sms and opening it is so much faster!
incredible work, thank you very much!
Click to expand...
Click to collapse
You're welcome, happy that it help you like it does for me..

seandk said:
Is it working for all devices ? With all Roms ?
Click to expand...
Click to collapse
Well, i've not done extensive tests... but it should work with all roms/device as the mmssms.db is an "Android" database, its format does not often change.
The best things to do is :
1 - Backup
2 - Test

Hi, would it be possible to scan for duplicate messages and remove them; that would be an additional useful optimisation
Thanks, will give this a go...

as
humm.............................

iandol said:
Hi, would it be possible to scan for duplicate messages and remove them; that would be an additional useful optimisation
Click to expand...
Click to collapse
Hi, this should be pretty easy... but what is for you, a "duplicate" ?
It can be a combination of :
- Same text / same date / same time / same recipient / same thread
What kind of problem do you really have ?

$ export PATH=/data/local/bin:$PATH
$ sh /sdcard/Download/mms/update/Update.sh
mmssms Update - 1.1
- mmssms.db found
- patch file found
.. backuping mmssms.db
.. Applying Update
Error: near line 448: no such table: main.wpm
Error: near line 479: no such table: main.wpm
Error: near line 489: no such table: main.wpm
$
something wrong there?

UnitedOceanic said:
$ export PATH=/data/local/bin:$PATH
$ sh /sdcard/Download/mms/update/Update.sh
mmssms Update - 1.1
- mmssms.db found
- patch file found
.. backuping mmssms.db
.. Applying Update
Error: near line 448: no such table: main.wpm
Error: near line 479: no such table: main.wpm
Error: near line 489: no such table: main.wpm
$
something wrong there?
Click to expand...
Click to collapse
same here with ics mms.apk

UnitedOceanic said:
$ export PATH=/data/local/bin:$PATH
$ sh /sdcard/Download/mms/update/Update.sh
mmssms Update - 1.1
- mmssms.db found
- patch file found
.. backuping mmssms.db
.. Applying Update
Error: near line 448: no such table: main.wpm
Error: near line 479: no such table: main.wpm
Error: near line 489: no such table: main.wpm
$
something wrong there?
Click to expand...
Click to collapse
Seems that the "wpm" table do not exist anymore... you certainly have a newer version of mmssms.db than me.
If you know how to use titanium backup can you send me your mmssms.db ?
=> Your mmssms.db contain all of your sms/mms so .. it would be better to :
- Backup the "[SMS/MMS/APN] Dialer storage" within titanium backup (it contain the mmssms.db)
- Protect your backup => just in case ..
- Is the backup really done ..??...
- Sure ... ???
- If not you will loose your messages .. !!!!
- Ok then....
- "wipe data" from "[SMS/MMS/APN] Dialer storage" => Will delete mmssms.db
- Launch your mms/sms application
- Create an mms, an sms and send them to yourself => Will create a new empty mmssms.db
- Send me the mmssms.db that is in "/data/data/com.android.providers.telephony/databases/"
- Restore the "[SMS/MMS/APN] Dialer storage" within titanium backup to get your mms/sms back => Will get your mmssms.db back
Than i will look at the structure

here it is
running cm7.2 on the Motorola Milestone (the european cousin of the Droid)
i have 3 mms files in the ...provider.telephony folder
mmssms.db
mmssms.db-shm
mmssms.db-wal
is that relevant?

UnitedOceanic said:
here it is
running cm7.2 on the Motorola Milestone (the european cousin of the Droid)
i have 3 mms files in the ...provider.telephony folder
mmssms.db
mmssms.db-shm
mmssms.db-wal
is that relevant?
Click to expand...
Click to collapse
Mmm there is nothing in your mmssms.db, no tables, no nothing..
Did you opened your sms/mms application .. and send a dummy sms and mms to yourself ... perhaps this will trigger the creation of the db structure

Honusnap said:
Seems that the "wpm" table do not exist anymore... you certainly have a newer version of mmssms.db than me.
If you know how to use titanium backup can you send me your mmssms.db ?
=> Your mmssms.db contain all of your sms/mms so .. it would be better to :
- Backup the "[SMS/MMS/APN] Dialer storage" within titanium backup (it contain the mmssms.db)
- Protect your backup => just in case ..
- Is the backup really done ..??...
- Sure ... ???
- If not you will loose your messages .. !!!!
- Ok then....
- "wipe data" from "[SMS/MMS/APN] Dialer storage" => Will delete mmssms.db
- Launch your mms/sms application => Will create a new empty mmssms.db
- Send me the mmssms.db that is in "/data/data/com.android.providers.telephony/databases/"
- Restore the "[SMS/MMS/APN] Dialer storage" within titanium backup to get your mms/sms back => Will get your mmssms.db back
Than i will look at the structure
Click to expand...
Click to collapse
here it is
nexus s stock ics rom

mykos5 said:
here it is
nexus s stock ics rom
Click to expand...
Click to collapse
Thanks Mykos, for taking time to gave me an empty database...
I've found some differences, the initial script should work, it just throw an error cause the wpm table do not exist anymore (mychannels table has disappeared too). But the structure of others table is untouched.
There is less trigger in your db than in the Gingerbread version, they reorganised them.. they moved fruits from a basket to another... without throwing away the bad ones.
You can try the ICS script if you want to, do not forget to backup before testing.
I don't know if you'll see differences in speed if you do not have a lot of messages.
Some things can be improved but would take some time that i do not have at the moment.

it does not work on my Moto Defy @ CM7 nightly.
all messages gone after update.sh

matchung said:
it does not work on my Moto Defy @ CM7 nightly.
all messages gone after update.sh
Click to expand...
Click to collapse
Mmmm that's strange since no action of deleting is done, can you send me your mmssms.db ? (see how to do it in post #11)
ps : You can always restore the initial mmssms.db by using the backup file : mmssms.db.bck

With ICS version on MIUI Desire ICS rom :
Code:
sh update.sh
mmssms Update - ICS.1.0
- mmssms.db found
- patch file found
.. backuping mmssms.db
.. Applying Update
Error: near line 448: no such table: main.wpm
Error: near line 479: no such table: main.wpm
Error: near line 489: no such table: main.wpm
... :/

servabat said:
With ICS version on MIUI Desire ICS rom :
Code:
sh update.sh
mmssms Update - ICS.1.0
- mmssms.db found
- patch file found
.. backuping mmssms.db
.. Applying Update
Error: near line 448: no such table: main.wpm
Error: near line 479: no such table: main.wpm
Error: near line 489: no such table: main.wpm
... :/
Click to expand...
Click to collapse
Well ... my mistake, the script in the Gingerbread rar was the one for ICS and vice versa... this as been corrected.

Thanks for this interesting tweak.
Is it possible to introduce your script in the custom ROM before flashing?

Related

Extract Android SQLite Databases For Contacts, SMSs, Etc

Hi All,
I'm a Windows/Web/Database developer and I've decided to bite the bullet and learn some Java and write apps for Android. I've done Hello World and a few other programs and now I want to start playing with things like contacts and SMSs.
To make life easier I want to get copies of the various SQLite databases so that I can write my SQL queries and general play with them in my SQLite admin program on Windows.
I assume that they are just regular SQLite files like I've used in other projects so what I'd like to know if possible is:
Is my assumption about them being regular SQLite files correct?
Where do they live on the phone?
How do I get them off the phone/emulator?
Also, I don't know whether it makes a difference to what I want to do but I've not rooted my phone and don't really want to. Based on that, if it needs rooting to get them I'd be really grateful if anyone happens to have gone through this exercise before and can just attach them to a reply post.
Thanks for your time in advance
For anyone who's interested, after a load of digging I've found the following:
Contacts = /data/data/com.android.providers.contacts/databases/contacts.db
SMS = /data/data/com.android.providers.telephony/databases/mmssms.db
Bookmarks = /data/data/com.android.browser/databases/browser.db
You can get them off the emulator using the adb pull command. E.g.
adb pull /data/data/com.android.providers.contacts/databases/contacts.db d:\contacts.db
Cheers
k420 said:
For anyone who's interested, after a load of digging I've found the following:
Contacts = /data/data/com.android.providers.contacts/databases/contacts.db
SMS = /data/data/com.android.providers.telephony/databases/mmssms.db
Bookmarks = /data/data/com.android.browser/databases/browser.db
You can get them off the emulator using the adb pull command. E.g.
adb pull /data/data/com.android.providers.contacts/databases/contacts.db d:\contacts.db
Cheers
Click to expand...
Click to collapse
Adding one for Calls :
Calls -
Code:
/data/data/com.android.providers.contacts/databases/contacts2.db
Example to access :
Code:
[email protected]:/ # sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db
providers.contacts/databases/contacts2.db <
SQLite version 3.7.11 2012-03-20 11:35:50
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .headers on
.headers on
sqlite>.mode column
.mode column
sqlite> select _id,number+random(),duration,name contact_name ,datetime(date/1000, 'unixepoch', 'localtime') timestamp
from calls
where number not like '1832%'
order by _id desc
limit 0 , 6 ;
_id number+random() duration contact_name timestamp
---------- -------------------- ---------- ------------ -------------------
16396 -7814232970342288419 0 2016-03-16 14:59:53
16395 -2897789212886021933 112 2016-03-16 14:27:11
16393 -5099152494103830835 262 Rajaselvam M 2016-03-16 12:28:56
16389 8412659988096325402 13 2016-03-16 09:36:48
16385 1480282204589577101 125 அம்ம 2016-03-16 08:05:07
16384 -1575337348523869115 0 Saami 2016-03-15 22:05:50
sqlite>
this is great, i dont suppose you have some code to extract sms and contacts as well do you.
i copy pasted your above code into db browser for sqlite and it worked great.
but i do not know how to write the code myself
I lost my android device but need the contacts from it...HELP!
is there any way i can extract this data from my Mac computer or do I have to do it from the android device? cause I lost the actual phone and for some reason the last month or so of contacts inputted werent backed up to my google account.
[email protected] said:
is there any way i can extract this data from my Mac computer or do I have to do it from the android device? cause I lost the actual phone and for some reason the last month or so of contacts inputted werent backed up to my google account.
Click to expand...
Click to collapse
You have to grab the actual file in order to read your contacts. The only way you'd have it on your mac is if you did a root backup of your phone.

Build.prop Worktool for Windows (v1.7 - July 26 2011)

Script is standalone : you can download latest version without upgrading from previous version
v1.6 > Big update on 3G+ tweak addon, more powerful and much faster
Build.prop Worktool - A powerful but safe build.prop manager/editor
Hi !
Okay guys, since I know how powerful the build.prop can be, I love to play with it.
But I was bored to edit using Root Explorer, or using ADB command-line...
So... Let me present you my outrageously complicated (internally) script to manage your build.prop right from your computer, with ease, fun and safety !
GENERAL :
For any Windows NT kernel (Developped under Windows 7 x64... so should work everywhere )
Portable and ready to use - No installation required, all files included (ADB with drivers also)
Lightweight (<3Mb unzipped, because of ADB very big lol)
Tested on XPERA x10i but should work on ANY Android powered device (if your ROM uses a build.prop located into /system/)
KEY FEATURES :
Easy open/edit your build.prop in your default text editor
Backup creation/management
Save backup on your computer and/or on your device
Safe (Automatic backup generator - Manages up to 2 backup files, exhaustive log file)
Automatic permissions management
Add-on capability : possible to add automated installation scripts to tweak your build.prop
List of present add-ons : 3G+ enhancement tweak
Very clean : deletes all temporary files, auto start/stop ADB server and kills the process when useless
Convenient : direct access to this thread, easy to use
v1.6+ : (beta) Build.prop XPlorer, to check with ease your build.prop
I based the main script on my 3G+ enhancement script, available on the official thread.
** As usual... Use at your own risk **
Test, comment, criticize, if you find anything, just drop a comment or PM
FAQ
FAQ​- Supported devices
It is first developped for Sony Ericsson XPERIA x10, but it should work on any Android device with these requirements :
* Rooted
* File system is mounted Read/Write.
* Build.prop is located into /system/ and named "build.prop"
Sony Ericsson XPERIA x10 : fully working
Samsung Galaxy S2 : half working (file system is read-only...)
- How it's working ?
The script works generally in this way :
It downloads from your device your build.prop and creates two temporary backups.
Then, it opens one of the temporary backup into notepad, to let you edit all you want.
Once file closed/saved, the file is reconfigured automatically, then sent back to your device.
The script allows you next to keep, on wish, the remaining backup and to reboot your device.
- Is this safe ?
The script makes a backup of your build.prop every time you try to access it. There's also human-friendly log file to help you identify problems with ease.
There is also NO automatic upload to your device : the script will always ask you before if you want to upload the new build.prop to your device. Even if you upload it, backup is stored and can even be stored safely on your device for future use.
- Is this all automatic ?
Yes. The script makes backups by itself, reboot your device for you (if you wish), and of course change permissions. But don't worry : it will ask your approval for any important process
- The 3G tweak makes my connection unstable !
The Manager is based on my 3G+ enhancement script, using "Full Mode". In the original script, there is also a "Lite Mode" for some networks (like AT&T) I included in v1.3.
To make your network stable, the script will disable the two lines below :
ro.ril.enable.dtm=1 (will be turned to 0)
ro.ril.enable.a53=1 (will be turned to 0)
To get full details about the 3G+ tweak, check the thread :
http://forum.xda-developers.com/showthread.php?t=951765
Why is there "so many" different batch files ?
It's easier for me to improve/maintain the batch by splitting it into different functions. There's a main script, and subroutines called when needed.
Of course, all the subroutines, including addons, are programmed to be run only from main script. You can run any subroutine separately, but it will mostly crash and create useless files not being deleted. Always run the main script, and do no try to run separately subroutine - not dangerous, but 100% useless/buggy.
- It's not working.
* Make sure your device is :
** ROOTED,
** Full external access to system (su command) [if not, will drop errors like "Operations not permitted" or "file system is mounted read only")
** USB Debugging is enabled,
** Connected using USB and all USB drivers are installed/working.
* You might need administrative privileges in Windows to fully run the program.
* If you're running your device from recovery, you may need to mount /system/ folder before running the script (Partition tools > Mount /system).
- It's still not working.
* Drop a message in the official thread.
* If you get errors about file system Read only, try to run your device in Recovery mode, and fix permissions.
- Will the script create lots of files/make a big drive footprint ?
I hate programs creating lots of temp files. So, the script was developped to create files AND to clean/remove them all once everything is done. Even if it crashes without removing files, you just need to restart the script - it will clean all previous temporary files.
If ADB is run, it WILL be fully closed once everything is done. Server will be killed, then ADB process (named adb.exe) will be killed. Your system will be as clean as it was before running the script.
The script is of course fully portable : there's no installation needed. You can put the script where you want, but you just need to keep all script files/folders in the same folder.
In a future release, I'll add something to purge the log file.
- Which OS is supported ?
It's developped in Windows 7 x64. You should be able to fully run it on any 2000+ Windows NT OS.
As it is NT script, it will work only on Windows computer. It will also not work properly on pure DOS (it's using NT commands and Windows-related commands not included in older Windows NT systems, like NT4).
Report if you tested it on other Microsoft OS (NT 4, Windows 95, 98 or 2000, Dos 6.22...)
- I wanna contribute.
Just right click the .cmd/bat files, edit them with Notepad or anything you want
You can also send me a message (thread or PM) if you notice some piece of code I can improve with other commands (I don't know DOS commands enough )
v1.0 (11/5/2011) = initial release
v1.1 (13/5/2011) = removed BFC tags, updated error 2 (ADB get-state, to help you identify problem), removed 3G tweak returns error 3 if not present (addon = not necessary), added template.bat to create add-ons, improved launcher.bat (add-on primitive detection), added add-on installation detector (displays backup/reboot options only when add-on was installed), corrected folder "\" bug
v1.2 (13 may formely 14/5/2011) = added automated deleter/file checker for 3G+ tweak. Still early stage but looks to work. Automated batch thanks to http://www.dostips.com
v1.3 (16/5/2011) = added 3G+ enhancement lite mode (for networks like AT&T) and removed 1 step on auto deletion, fixed bug of false error when trying to download from device a build.prop.bak not existing, added management options to Backup (send local backup to device, delete backup on device), solved backup internal error
v1.4 (29/5/2011) = fixed window console size, enhanced menus, faster script closing, log file generator, several bugs fixed, enhanced help (readme in Notepad, direct open XDA thread in Firefox), added adb.exe process killer
v1.5 (6/6/2011) = added console title, fixed some menu bugs, updated Readme, weblinks now open in the default user browser, build.prop will now open in default notepad editor, improved interface, fixed unexpected exit bug, added contact me using default email (still experimental)
v1.6 (15/6/2011) = improved ADB process killing, deeply improved 3G tweak script with sed and no more TXT file, readme opens in your default editor, improved interface, updated template, unified common subroutines into BAKengine.bat, user-friendly explorer of build.prop (not great for now), deleted Substengine (deprecated), "0" in menues now refers to Go Back/Exit, improved missing engines detection, added general temp/log file purger/deleter ** To celebrate The Legend of Zelda series 25th Anniversary, my script is now tagged "Powered by Hyrule DOS"
DETAILLED 3G Addon update :
- detects presence of previous installation and files
- Sed command : fastest detection and subtitute of lines
- Optimized for fastest operation and fully clean build.prop file
- Several stuff...
External SED support thanks to GNU Utilities for win32 @ http://unxutils.sourceforge.net/
v1.7 (26/7/2011) = fixed no deletion of TEMP folder/files, fixed ADB command not found, new entries for XPlorer
Known bugs :
* (Main) Will not detect if build.prop.bak and build.prop.old are the same (not very important, I'll improve this later)
* Report anything you find
Developper/Advanced user addendum
(Write in progress)
Backup management
The script creates up to two backups, localed in main directory :
- build.prop.bak
- build.prop.old
Build.prop.old is generated if the script detects there's an existing build.prop.bak, to avoid accidental loss of it.
Build.prop.old is the final backup, and WILL BE DELETED if detected. The script manages backups like this :
1. If an existing build.prop.bak is present...
>> Script will detect for build.prop.old presence - if it exists, it will be deleted,
>> the build.prop.bak will be renamed to build.prop.old.
2. If there is no build.prop.bak detected...
>> Script will generate a build.prop.bak.
ADB Error detection
Error 2 (device not connected) works using a trick - it's not really related to device state.
In fact, the script will attempt to connect your device to download your build.prop. Once it is done - or not - the script checks if a local build.prop file was created. If it's not present, it means ADB encountered an error - about 90% because device is not connected - and will display error 2.
Keep in mind then there is small chance that your error does NOT come of device not connected : administrative privileges missing (don't allow the script to create the file), drivers buggy, ...)
Hi,
I cant use your WorkTool V1.6
It says ADB cmd not found.
v1.7 out, sorry for delay, I prepared it few days ago then I forgot to upload ^^
Really good work
Perceval from Hyrule said:
FAQ​- Supported devices
It is first developped for Sony Ericsson XPERIA x10, but it should work on any Android device with these requirements :
* Rooted
* File system is mounted Read/Write.
* Build.prop is located into /system/ and named "build.prop"
Sony Ericsson XPERIA x10 : fully working
Samsung Galaxy S2 : half working (file system is read-only...)
- How it's working ?
The script works generally in this way :
It downloads from your device your build.prop and creates two temporary backups.
Then, it opens one of the temporary backup into notepad, to let you edit all you want.
Once file closed/saved, the file is reconfigured automatically, then sent back to your device.
The script allows you next to keep, on wish, the remaining backup and to reboot your device.
- Is this safe ?
The script makes a backup of your build.prop every time you try to access it. There's also human-friendly log file to help you identify problems with ease.
There is also NO automatic upload to your device : the script will always ask you before if you want to upload the new build.prop to your device. Even if you upload it, backup is stored and can even be stored safely on your device for future use.
- Is this all automatic ?
Yes. The script makes backups by itself, reboot your device for you (if you wish), and of course change permissions. But don't worry : it will ask your approval for any important process
- The 3G tweak makes my connection unstable !
The Manager is based on my 3G+ enhancement script, using "Full Mode". In the original script, there is also a "Lite Mode" for some networks (like AT&T) I included in v1.3.
To make your network stable, the script will disable the two lines below :
ro.ril.enable.dtm=1 (will be turned to 0)
ro.ril.enable.a53=1 (will be turned to 0)
To get full details about the 3G+ tweak, check the thread :
http://forum.xda-developers.com/showthread.php?t=951765
Why is there "so many" different batch files ?
It's easier for me to improve/maintain the batch by splitting it into different functions. There's a main script, and subroutines called when needed.
Of course, all the subroutines, including addons, are programmed to be run only from main script. You can run any subroutine separately, but it will mostly crash and create useless files not being deleted. Always run the main script, and do no try to run separately subroutine - not dangerous, but 100% useless/buggy.
- It's not working.
* Make sure your device is :
** ROOTED,
** Full external access to system (su command) [if not, will drop errors like "Operations not permitted" or "file system is mounted read only")
** USB Debugging is enabled,
** Connected using USB and all USB drivers are installed/working.
* You might need administrative privileges in Windows to fully run the program.
* If you're running your device from recovery, you may need to mount /system/ folder before running the script (Partition tools > Mount /system).
- It's still not working.
* Drop a message in the official thread.
* If you get errors about file system Read only, try to run your device in Recovery mode, and fix permissions.
- Will the script create lots of files/make a big drive footprint ?
I hate programs creating lots of temp files. So, the script was developped to create files AND to clean/remove them all once everything is done. Even if it crashes without removing files, you just need to restart the script - it will clean all previous temporary files.
If ADB is run, it WILL be fully closed once everything is done. Server will be killed, then ADB process (named adb.exe) will be killed. Your system will be as clean as it was before running the script.
The script is of course fully portable : there's no installation needed. You can put the script where you want, but you just need to keep all script files/folders in the same folder.
In a future release, I'll add something to purge the log file.
- Which OS is supported ?
It's developped in Windows 7 x64. You should be able to fully run it on any 2000+ Windows NT OS.
As it is NT script, it will work only on Windows computer. It will also not work properly on pure DOS (it's using NT commands and Windows-related commands not included in older Windows NT systems, like NT4).
Report if you tested it on other Microsoft OS (NT 4, Windows 95, 98 or 2000, Dos 6.22...)
- I wanna contribute.
Just right click the .cmd/bat files, edit them with Notepad or anything you want
You can also send me a message (thread or PM) if you notice some piece of code I can improve with other commands (I don't know DOS commands enough )
v1.0 (11/5/2011) = initial release
v1.1 (13/5/2011) = removed BFC tags, updated error 2 (ADB get-state, to help you identify problem), removed 3G tweak returns error 3 if not present (addon = not necessary), added template.bat to create add-ons, improved launcher.bat (add-on primitive detection), added add-on installation detector (displays backup/reboot options only when add-on was installed), corrected folder "\" bug
v1.2 (13 may formely 14/5/2011) = added automated deleter/file checker for 3G+ tweak. Still early stage but looks to work. Automated batch thanks to http://www.dostips.com
v1.3 (16/5/2011) = added 3G+ enhancement lite mode (for networks like AT&T) and removed 1 step on auto deletion, fixed bug of false error when trying to download from device a build.prop.bak not existing, added management options to Backup (send local backup to device, delete backup on device), solved backup internal error
v1.4 (29/5/2011) = fixed window console size, enhanced menus, faster script closing, log file generator, several bugs fixed, enhanced help (readme in Notepad, direct open XDA thread in Firefox), added adb.exe process killer
v1.5 (6/6/2011) = added console title, fixed some menu bugs, updated Readme, weblinks now open in the default user browser, build.prop will now open in default notepad editor, improved interface, fixed unexpected exit bug, added contact me using default email (still experimental)
v1.6 (15/6/2011) = improved ADB process killing, deeply improved 3G tweak script with sed and no more TXT file, readme opens in your default editor, improved interface, updated template, unified common subroutines into BAKengine.bat, user-friendly explorer of build.prop (not great for now), deleted Substengine (deprecated), "0" in menues now refers to Go Back/Exit, improved missing engines detection, added general temp/log file purger/deleter ** To celebrate The Legend of Zelda series 25th Anniversary, my script is now tagged "Powered by Hyrule DOS"
DETAILLED 3G Addon update :
- detects presence of previous installation and files
- Sed command : fastest detection and subtitute of lines
- Optimized for fastest operation and fully clean build.prop file
- Several stuff...
External SED support thanks to GNU Utilities for win32 @ http://unxutils.sourceforge.net/
v1.7 (26/7/2011) = fixed no deletion of TEMP folder/files, fixed ADB command not found, new entries for XPlorer
Known bugs :
* (Main) Will not detect if build.prop.bak and build.prop.old are the same (not very important, I'll improve this later)
* Report anything you find
Click to expand...
Click to collapse
Hey mate...
lovely piece of work..!
saved me hours at my work...
thanks a lot works flawlessly on
sony xperia tipo dual with cm 10
Ur da bomb
As you probably already know, you are DA BOMB, BABY!
I just [snicker] used your tool to save my rather idiotic...er, 'brain' from suffering through a dumb, hard night re-flashing SlimKat 4.4.2 back onto my LG Optimus G e970 just to fix something I should've never done to begin with (change screen density to make it easier to read, of course, but without really knowing what I was doing)...
aherm...well, anyway, here I sit at a pre-midnight hour thanking you profusely, sir, because, as I said at the start...
UR DA BOMB!!!
Here's hoping you get bored a lot more often...it's a keeper, fer sure.:victory:
Good work dude... Nice toolkit, loved it very much... I am integrating your tool into my new upcoming toolkit. Dont worry i am not gonna steal it, will just use it. Will surely give you proper credits for that
Does this work with the stock recovery without root?
My device: Xperia XA2
thanks for this useful helper. i know how to modify build.prop - thats not the reason why i came here. what i don't know is the meaning of all this different entries in build.prop for example ro.expect.recovery_id - which there was a catalog with information about included in a build.prop Tweak GUI
sorry but the program cant detect/ acces build.prop
my device is rooted, has debugging on and is connected via USB
plz help

[v9.52] Online Nandroid / Nandroid Backup without re-booting [CWM + TWRP + 4EXT]

Nandroid backups are usually performed in recovery mode. This means you would have to turn off your phone and reboot in recovery mode, which wastes a whole lot of time rebooting and a lot more time offline. For me, this has been a killer as I do regular nandroid backups. Having to reboot in recovery and finding missed calls, sms from my wife and friends is totally not accepatable for me. So, I set to develop an online nandroid backup tool, namely Online Nandroid, which can do nandroid backups without switching off my phone.
Today, I am releasing it to public, as it may serve good for some others too. Originally I developed Online Nandroid specifically for Xperia devices, but now I am releasing it for all android devices.
This tool, eventhough called "Online Nandroid", does not upload/save backups to any online/cloud services. Online here means that it does backup while phone is live or still running Android.
The short name onandroid is meant to be pronouced as o-nandroid or o'nandroid and NOT on-android.
{
"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"
}
Online Nandroid backups the below partitions to /sdcard/clockworkmod/backup directory.
mmcblk0_start (for Acer devices)
uboot (for MTK based devices)
boot
recovery
wimax (for Samsung devices)
appslog (for HTC and Sony (Ericsson) devices)
kernel
system
data
cache
datadata (for Samsung devices)
efs (for Samsung devices)
preload (for Samsung devices)
.cust_backup (for Huawei devices)
flexrom (for Acer devices)
custpack (for Alcatel devices)
mobile_info (for Alcatel devices)
boot (for HP Touchpad)
.android_secure
sd-ext
The date format used for folder name is the same used by CWM itself and nandroid backups created with Online Nandroid can safely be restored using CWM, TWRP and 4EXT recoveries.
Feedback (especially ideas to improve) are most welcome.
Official List of Supported Devices: http://bit.ly/OnlineNandroid-SupportedDevices
Requirements:
1. Rooted android phone
2. A terminal emulator installed on phone
3. Latest version of Busybox
4. A working CWM, TWRP or 4EXT based recovery installed
5. Some patience
Installation:
1. Download and copy zip file to SD card
2. Reboot into recovery
3. Choose install zip from SD card, select zip and flash
4. Reboot
Usage:
1. Open terminal emulator
2. Type su to obtain root
3. Type onandroid
4. Wait and watch
[HIGHLIGHT]If you are getting error mkyaffs2image not found in path, try fix tool in this post.[/HIGHLIGHT]
.
[HIGHLIGHT]If you are getting error dedupe not found in path, try dedupe tool in this post.[/HIGHLIGHT]
.
[HIGHLIGHT]If Online Nandroid is failing to find boot and recovery partitions, flash the zip file for your device from here. If your device is not on the list, post a comment there or post a reply in this thread with your device model.[/HIGHLIGHT]
[HIGHLIGHT]If you have a Motorola RAZR i and are unable to flash the provided zip files, visit this thread and get zip files specific for your device.[/HIGHLIGHT]
The behaviour of Online Nandroid can be adjusted by using command line flags, some of which are described in detail below. Each command line flag has its longer counter-part and both forms can be mixed. For a complete list of command line flags and short descriptions, you can type:
Code:
onandroid -h
OR
onandroid --help
Custom Backup Name:
* Example:
Code:
onandroid -c NAME
OR
onandroid --custom NAME
* Please be careful not to include characters not allowed in filenames.
Timezone modifier:
* Example: Use phone timezone for backup file name
Code:
onandroid -p
OR
onandroid --phone
* Example: Use UTC (default) for backup file name
Code:
onandroid -u
OR
onandroid --utc
* Note: UTC is used as default (if no timezone modifier is passed). This is to comply with CWM nandroid backups.
Backup Modes:
* Good old backup mode (default).
* Example:
Code:
onandroid -o
OR
onandroid --old
* Note: This is the most commonly known, default backup format.
* Split backup mode (CWM6+ only).
* Example:
Code:
onandroid -l
OR
onandroid --split
* Note: This is specifically useful if you have partitions which are over 2GB in size. Use this only if you have CWM 6+.
* CWM6 style incremental / dedupe backup mode.
* Example:
Code:
onandroid -i
OR
onandroid --incremental
* Garbage collect. For incremental backups (used for cleanup after deleting incremental backups).
* Example:
Code:
onandroid -gc
OR
onandroid --garbage-collect
* Advanced / Selective backup mode. For backing up only specific partitions.
* Example:
Code:
onandroid -a PARTITIONS
OR
onandroid --advanced PARTITIONS
* Partition letters / names can be found by typing onandroid -ah
* TWRP backup mode.
* Example:
Code:
onandroid -w
OR
onandroid --twrp
* By default, TWRP backup mode creates uncompressed backups. If compressed backups are required, use it like this:
Code:
onandroid -w -ce
OR
onandroid --twrp --compression-enable
* By default, TWRP backup mode generates md5sum. If md5sums are not required, use it like this:
Code:
onandroid -w -md
OR
onandroid --twrp --md5-disable
Replace Older Backups (with same name) - used with custom backup names:
* While using custom backup names, Online Nandroid will not allow an already existing backup name to be specified, by default. Trying this will return an error and halt backup. If you want to replace the older backup with a new backup, by using the same custom backup name, you can specify the below command line flag.
* Example:
Code:
onandroid -c MyBackup -r
OR
onandroid --custom MyBackup --replace
* Note: This will only work with custom backup names. This can be used to update a backup from a previous state, by way of using advanced backup mode in combination with this mode.
Change Log:
Code:
v1.0 - Initial release.
v1.1 - Bug Fix: incorrect implementation of help command.
v1.2 - Bug Fix: changed script permissions from 777 to 755
Improvement: changed elapsed display of seconds only to minutes & seconds.
v1.3 - Bug Fix: error if /sbin/sh is not present.
v2.0 - Fixed: various bugs and re-organized script.
Added: timezone modifier.
Improved: usage instructions screen.
Added: su detection.
v2.1 - Bug Fix: .android_secure partition not being backed-up correctly.
v2.2 - Bug Fix: size calculation of .android_secure partition.
v2.3 - Improvement: size calculation in .android_secure partition.
v3.0 - Bug Fix: unknown uid 0 (incorrect detection of root).
Added: sd-ext backup.
Added: battery level check.
Added: SD card check.
Improved: .android_secure backup.
Fixed: various bugs and re-organized script.
v3.1 - Bug Fix: SD card not found error on some devices.
Re-organization of script and removal of bloat code.
v3.2 - Bug Fix: Incorrect detection of root.
Added: New logging mechanism.
v3.3 - Bug Fix: Incorrect sdcard mounting.
Bug Fix: Various fixes for busybox conflicts.
Improvement: Logging mechanism.
v3.4 - Bug Fix: Empty md5sum.
Bug Fix: Size calculation of sdcard.
Bug Fix: Script exiting before sd-ext and .android_secure partitions backed-up.
v3.5 - Bug Fix: Busyboxed 'which' command.
Removed some log lines for cleaning-up.
v3.6 - Removed: mount format detection bloat due to non-busyboxed version.
v3.7 - Busyboxed "cat" commands.
Added: Battery level detection for Xperia X10.
Re-positioned root detection.
v4.0 - Added: LED and vibrate notification on backup completion.
Bug Fix: Minor bug in "tar" detection.
Bug Fix: Cannot create log file.
v4.1 - Bug Fix: Corrected size checking of .android_secure partition.
v4.2 - Added: md5sum verification.
Improved: md5sum generation.
v5.0 - Added: Backup of boot, recovery, wimax and appslog partitions.
Added: Proper sdcard detection.
Added: Detailed error logging.
Added: Cleaning-up temp mounts upon exits.
Added: LED notification for Xperia U.
Added: Version number to log.
Added: ext2/3/4 and rfs file system support.
Added: Avoid mkyaffs2image detection if device does not have a yaffs2 partition.
Added: Force remounting and unmounting.
Added: system, data, cache, datadata and .android_secure partition detection.
Improved: sd-ext detection.
Improved: sd-ext backup.
Improved: md5sum generation and validation.
Improved: sd-ext detection.
Improved: Usage instructions screen.
Improved: Battery level detection.
Improved: LED and vibrate notification.
Increased safety space from 7MB to 10MB.
Code clean-up and re-organization.
v5.1 - Bug Fix: Minor bug in sd card detection when device has internal storage and an external sd card mounted.
Bug Fix: Bug in .android_secure backup.
v5.2 - Bug Fix: SD Card detection in Jellybean devices.
Bug Fix: boot partition detection in devices with sboot partition.
Added: /efs partition backup (for Samsung devices).
Increased: Safety size from 10 to 12.
v5.3 - Added: Partition detection via part_detect_tool.
Bug Fix: boot, recovery, wimax and appslog partition backup for non-mtd devices.
Bug Fix: boot, recovery, wimax and appslog partition detection (Exact partition names).
Improvement: Busyboxed some cut and grep commands.
Removed: Some unwanted code in partition detection.
v5.4 - Bug Fix: Error logging of partition layout.
Bug Fix: sd-ext detection bug.
Improvement: Logging of required space.
v5.5 - Bug Fix: SD Card detection.
Bug Fix: sd-ext detection.
Bug Fix: sd-ext backup method.
Bug Fix: boot, recovery, wimax and appslog partition size calculation.
Bug Fix: socket ignored error by tar.
Bug Fix: /data/media included in /data partition backup.
Bug Fix: sd-ext included in /data partition backup for app2sd, link2sd, etc... setups.
Bug Fix: Eliminate /data/media while calculating used size of /data partition.
v5.6 - Bug Fix: basename error on some devices.
Bug Fix: md5sum spitting an error if .android_secure not backed-up.
Bug Fix: Fixed regression bug in sd card and sd-ext detection.
v5.7 - Bug Fix: partition detection.
Bug Fix: sd card space calculation on some devices.
Improvement: some busyboxing.
v5.75 - Bug Fix: partition detection. (bug introduced in v5.7)
v5.8 - Bug Fix: partition detection.
v5.9 - Added: /.cust_backup partition backup (for Huawei devices).
Bug Fix: Partition detection.
Bug Fix: Include sd-ext folder in data partition while skipping it's contents.
v6.00 - Added: CWM 6 style incremental backups.
Added: Garbage cleaning for incremental backups.
Added: Advanced backup / Selective backup.
Added: Long arguments for timezone.
Added: Setting alternate storage media via command line flag.
Added: Setting sd-ext path via command line flag.
Added: Battery level checking for HTC One X.
Added: Split backup mode (CWM 6+ only).
Added: Backup mode detection via .default_backup_format file (used by CWM).
Added: Advanced backup mode detection via .advanced_backup_partitions file.
Added: /flexrom and mmcblk0_start partitions backup (for Acer devices).
Added: Revamped and more useful progress indicators.
Added: Na Rnfgre Rtt.
Added: Replacing named backups with command line flag.
Added: Disabling notifications with command line flag.
Added: Setting progress indicator type with command line flags.
Added: Trapping exit/kill signals and cleaning up before exiting.
Added: Prompt whether to replace if backup name exists.
Added: BusyBox version checking.
Removed: Partition skip messages for device specific partitions.
Removed: Safety pin size adjustment.
Improved: Size calculation of /data partition if /data/media exists.
Improved: Battery level checking.
Improved: Code used for processing arguments.
Improved: .android_secure detection.
Improved: .android_secure size calculation.
Improved: Help screens.
Improved: Detection and backup of /.cust_backup partition.
Improved: Size calculation in all partitions.
Improved: SD Card detection and automatic selection of external SD Card.
Improved: Logging in log file.
Improved: Some more busyboxing.
Changed: Argument for setting timezone. (-p for phone timezone instead of -h)
Changed: Minor version numbers to 2 digits.
Re-organisation of code.
v6.01 - Bug Fix: sdcard detection in some devices using native app2sd.
v6.10 - Bug Fix: Actually fixed the bug mentioned in v6.01 changelog.
Added: HP Touchpad boot partition backup. (Partition letter p)
Bug Fix: mkyaffs2image requirement detection
BugFix: Removed disk dump of boot partition for Acer devices and HP Touchpad.
v6.11 - Bug Fix: Filesystem detection in data partition for incremental backups.
Bug Fix: wrong partition detected as sd-ext in some devices.
v6.12 - Bug Fix: filesystem detection in data partition on some devices.
v6.13 - Bug Fix: .android_secure detection when an alternate storage media is selected.
Bug Fix: Remount error in AROMA terminal.
Bug Fix: Avoid clearing log file while checking the version number only.
v6.14 - Bug Fix: Busyboxed ls command in md5 verification.
Bug Fix: Added some detailed error logging for could not change to path errors.
Bug Fix: Could not change to path errors.
v7.00 - Added: TWRP support.
Added: Specific exit codes for exits upon an error.
Added: Device details to log file.
Added: Output PID to onandroid.pid file upon each run.
Added: /preload partition backup. (Partition letter "o".)
Added: Flag to backup yaffs2 partitions as tar archives.
Added: Notice to install patch file, if boot partition was not found.
Removed: cpuid backup on Acer devices, since it freezes on some ROMs.
Removed: sd-ext not found message. Not all devices have one.
Removed: .android_secure not found message. Not all devices have one.
Improved: More elegant backup process.
Improved: Some internal variable naming.
Bug Fix: Notification disable did not work in some devices.
Bug Fix: Busyboxing of some commands.
Bug Fix: Minor bug in error logging.
v7.01 - Bug Fix: Duplicate md5sum generation while using replace mode.
Removed: A redundent code block.
v7.50 - Added: Copy log file to backup folder at the end of backup.
Added: Replace the word "date" in backup name with current date.
Added: Finally busyboxed md5sum dd and tar calls.
Added: Kill all sub-processes upon exits.
Added: Ability to backup emmc partitions for MTK based devices.
Bug Fix: Incomplete backups while using compression (default) in TWRP mode.
Bug Fix: Partition size detection of emmc partitions.
Bug Fix: Notification on some devices.
Bug Fix: sd-ext detection on some devices.
Bug Fix: Could not change to folder bug in some devices, in TWRP mode.
v7.52 - Bug Fix: Minor mistake in description of nandroid_dd function.
Bug Fix: Reverted fix in v7.50 for partition size detection of emmc partitions.
v7.53 - Bug Fix: Unknown operand bug in power level detection.
Bug Fix: Restore not working on some Android 4.2 devices.
Bug Fix: Progress percentage for split backup mode.
Bug Fix: Double backup of /data/data directory in TWRP mode.
v8.00 - Added: License to script file.
Added: Ability to specify path to busybox via command line flag.
Added: Ability to specify path to busybox via onandroid.busybox file.
Added: Partition layout detection for MediaTek (MTK) based devices without patch file.
Added: Proper sd-ext detection if sd-ext is mounted at /data.
Added: A second help screen with -h2 / --help2 .
Added: Information to log file about installed recovery.
Added: /custpack partition backup, for Alcatel devices. (Partition letter "h".)
Added: /mobile_info partition backup, for Alcatel devices. (Partition letter "i".)
Added: TWRP setting TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID support.
Added: TWRP setting TW_FORCE_CPUINFO_FOR_DEVICE_ID support.
Added: Exclude Google Music cache files.
Added: Replace the string "romname" in custom backup name, with name of ROM.
Improved: Excludes detection.
Improved: Excludes in incremental backup mode.
Added: TWRP compression using gzip (use -cg flag).
Bug Fix: Unmounting and removing temporary mounts fail at times.
Bug Fix: Progress percentage stuck during split backup on some devices.
Bug Fix: Exit code for busybox not found.
v8.10 - Added: /data/data partition backup (partition letter "j").
Added: Output which busybox is being used.
Bug Fix: TWRP default backup name to use hyphen instead of dot.
Bug Fix: Minor bug in excludes detection.
Bug Fix: Premature end of backup process.
v8.11 - Bug Fix: The infamous cat write error.
Bug Fix: Gzip compression not working on some devices.
Bug Fix: Unknown operand error with some busybox versions.
v8.12 - Bug Fix: Recovery partition backup on HTC One (Sprint).
Bug Fix: Minor bug in partition size calculation.
v8.20 - Added: Return device ID used by TWRP (-d flag).
Removed: (cp)uid from list of partitions help screen.
v8.21 - Bug Fix: boot and recovery partition backup on MTD devices.
v8.22 - Bug Fix: SD Card detection on some devices with emulated SD Card.
v9.00 - Added: Option to exclude dalvik-cache from backups (-xd flag).
Added: AmonRA, 4EXT and Safestrap recovery detection.
Added: Split TWRP backups larger than 2GB.
Added: uboot partition backup for some MTK based devices (Partition letter "k").
Added: Prevent multiple instances of script from running.
Added: -d / --device-id flag to help screen 2.
Added: Localization support via external language files.
Added: boot partition backup on Nook Color (Partition letter "n").
Added: kernel partition backup (Partition letter "g").
Changed: onandroid.log file inside backup folder to recovery.log.
Changed: Made exclusion of Google Music files from backups, optional (-xg flag).
Changed: Log function to use log applet from toolbox.
Bug Fix: Specifying partition letter h (for /custpack) brings up help screen.
Bug Fix: Partition detection on Allwinner devices.
Bug Fix: Busybox version error did not exit script.
Bug Fix: .advanced_backup_partitions file not detected at TWRP folder.
Removed: Command line flag for busybox path, as it cannot be relied upon.
Improved: Some coding style improvements.
Improved: Backup replace mode now replaces once all partitions are backed up only.
Improved: Progress indicators.
v9.10 - Added: Exclude dalvik-cache from sd-ext
Bug Fix: WRONG_ARGS displayed on help screen.
Bug Fix: Minor fixes and improvements.
v9.20 - Bug Fix: Multiple instances error with some apps.
Bug Fix: Wrong sd-ext detection on some devices.
v9.50 - Added: LED notification for Samsung Galaxy Relay 4G.
Added: Ability to manually specify device ID for TWRP (-ds flag).
Added: modem partition backup (partition letter q).
Added: TA partition backup (partition letter v).
Added: Support for Action CPUs.
Improved: Space calculation.
Improved: Merged boot partition letter for different devices.
Bug Fix: Replace mode deletes old backup if not enough space.
Bug Fix: Wrong sd-ext detection on some devices.
Bug Fix: Partition size calculation on emmc devices.
Bug Fix: Slow file listing in TWRP mode on some devices.
v9.51 - Added: Preservation of SELinux contexts.
Bug Fix: Data partition size calculated incorrectly when excluding Google Music cache.
Bug Fix: TWRP backups taking too long for file list.
v9.51 - Bug Fix: TWRP backups taking too long for file list.
Twitter: @OnlineNandroid
Source: http://bit.ly/OnlineNandroid
Issue Tracker: http://bit.ly/OnlineNandroid-issues
Older Versions: http://bit.ly/OnlineNandroid-downloads
Apps / GUIs, Tools, ROMs using Online Nandroid
Apps / GUIs:
App Backup
XDA ROM Hub
Online Nandroid Backup
Onandroid
Universal Android AIO Flasher Tool$
Droid Manager
Orange Backup
Android Tweaker
Samsung Galaxy S4 Toolkit
ZipInstaller
Other Tools:
Tasker Profile by FadeFx
Tutorial: How to Setup Online Nandroid in Script Manager / SManager
Tasker Wizard
ROMs with Online Nandroid:
RE-FLEXxx-STRYKER (for Iconia A500)
CriskeloRomV6 (for Galaxy S III)
evodevcustom5.07
X-ZOOM For Micromax A60
Galaxy MOD
WinterMod Evo
Vanilla RootBox
JellySandwich ONE
ArchiDroid
For Developers
Moved here: https://github.com/ameer1234567890/OnlineNandroid/wiki/For-Developers
I assume that it's not recommended to do other stuff on the phone while it's backing up. Wouldn't a change in /data while backing up corrupt said file?
doomed151 said:
I assume that it's not recommended to do other stuff on the phone while it's backing up. Wouldn't a change in /data while backing up corrupt said file?
Click to expand...
Click to collapse
It's always better not to be doing anything else while backup is running. Anyways, the system gets slow while backing up, so you wont be able to do a lot many. I do not think any changed data would corrupt the backup and I have even tried doing some things like texting, calling, playing music, etc while backup is running and it has never given any issues.
Very nice script, I must say
It can easily be converted to an app, the only thing is the backup part has to be done on another thread to prevent ANR errors!
See my USB OTG app (link in signature), it also uses shell commands to do its work
Hi, thanks for this. Very convenient indeed.
Now I no longer need to reboot in recovery to do a nandroid backup.
Will try restoring from the backuo created.
Thanks again. B-)
Sent from my MK16i using XDA
Version 1.2 released!
# onandroid
sh: applet not found
why? file is ok installed but command dont work
How come I keep getting this error? Stock ics xperia ray with sirkays xray kernel.
kamil004 said:
# onandroid
sh: applet not found
why? file is ok installed but command dont work
Click to expand...
Click to collapse
Try re-flashing the latest (v1.2) zip file.
*boy*racer* said:
How come I keep getting this error? Stock ics xperia ray with sirkays xray kernel.
Click to expand...
Click to collapse
You do not have CWM recovery installed, as mentioned on requirements.
ameer1234567890 said:
Try re-flashing the latest (v1.2) zip file.
Click to expand...
Click to collapse
same error, applet not found.
mayby put this file in other folder?
EDIT:
I change #!/sbin/sh > #!/system/bin/sh in onandroid file and alls work perfectly
ameer1234567890 said:
You do not have CWM recovery installed, as mentioned on requirements.
Click to expand...
Click to collapse
I have CWM built in the kernel. Is that a problem?
Sent from my Xperia Ray using xda premium
kamil004 said:
same error, applet not found.
mayby put this file in other folder?
EDIT:
I change #!/sbin/sh > #!/system/bin/sh in onandroid file and alls work perfectly
Click to expand...
Click to collapse
Good to know that it worked. I shall include a fix in the next version.
*boy*racer* said:
I have CWM built in the kernel. Is that a problem?
Click to expand...
Click to collapse
That should not be a problem at all.
Does normal nandroid backup from within CWM work?
ameer1234567890 said:
That should not be a problem at all.
Does normal nandroid backup from within CWM work?
Click to expand...
Click to collapse
Yeah it works fine from CWM itself. I will download a different version and see what happens.
EDIT: no I still get same error. Oh well, thanks anyway
Sent from my Xperia Ray using xda premium
Version 1.3 released!
*boy*racer* said:
Yeah it works fine from CWM itself. I will download a different version and see what happens.
EDIT: no I still get same error. Oh well, thanks anyway
Click to expand...
Click to collapse
What is the version of CWM? What ROM are you using?
ameer1234567890 said:
What is the version of CWM? What ROM are you using?
Click to expand...
Click to collapse
CWM - 5.0.2.7
Rom - stock ICS (4.1.A.0.562)
Kernel - stock with added CWM
Sent from my Xperia Ray using xda premium

kitchen rom

I'm creating a cooked rom based on the stock rom ita LT9 4.1.2, you can change the battery in the status bar without Xposed? I would include the circular battery with percentage inside. decompiling an apk? which one?
stefano_te said:
I'm creating a cooked rom based on the stock rom ita LT9 4.1.2, you can change the battery in the status bar without Xposed? I would include the circular battery with percentage inside. decompiling an apk? which one?
Click to expand...
Click to collapse
I think it's enough that you throw it into the SystemUI.apk(have a look inside that apk, if it's not there then it is in secframework.apk) (/res/.../XHDPI). Open the apk in winrar (you might have to rename it from .apk to .zip) and drag and drop the new files. Decompiling isn't necessary for this sort of thing.
Also, check this out:
http://forum.xda-developers.com/showthread.php?t=1918500
I did this a long time ago so some of what I just said might be wrong, if you need more help then just say so.
I would like to use as a basis the stock rom 4.1.2 : N7000XXLT9_N7000ITVLT3_ITV.zip
I used the kitchen to create workfolder following all the steps suggested by the program , I found the following problems:
1 ) during the procedure appeared to me the following warning :
Warning : A valid boot.img is not found . You have the option to add a
' fake ' boot.img So THAT the features of the kitchen can still
function normally.
This boot.img will be automatically removed from your ROM 's
ZIP file When Is It built .
Add boot.img (y / n)? (default: y) "
is this normal? how to solve ?
2 ) Working folder information ( v)
Android OS version: 4.1.2
Device: GT- N7000
Model: GT- N7000
ROM Name : JZO54K.N7000XXLT9
CSC version: It 's normal that there is nothing written here ?
Rooted ( Superuser app + su) : NO
Rooted ( unsecured boot.img ) : UNKNOWN how I fix this ?
BusyBox installed : NO
BusyBox run-parts support: UNKNOWN UNKNOWN how I fix this ?
Apps2SD (Apps to EXT) enabled: NO
/ data / app enabled: NO
Custom boot animation allowed : NO
Nano text editor installed : NO
Bash shell support: NO
/ system / framework is deodexed : NO
/ system / app is deodexed : NO
modem.bin found: YES
ROM will wipe all data : NO
3) throughout the META-INF folder there are only 2 files: update-script; update-script.bak
4) scripts / get_api_level: line 18: more: command not found
5) I checked the update-script and there are 3 warning in the report:
7/101: copy_dir PACKAGEystem SYSTEM:
8/101: format PRELOAD:
>> WARNING: Partition not recognized
9/101: copy_dir PACKAGEreload PRELOAD:
>> WARNING: PRELOAD: not found in working folder
10/101: symlink dumpstate SYSTEM:bin/dumpcrash
11/101: symlink toolbox SYSTEM:bin/cat
82/101: set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
83/101: run_program PACKAGE:create_preload_symlinks
>> WARNING: create_preload_symlinks not found in working folder
84/101: set_perm 0 3003 06755 SYSTEM:bin/ip
How do I resolve this? I tried a lot of on-line but have not found anything. My goal is to make me a custom rom from the last stock (LT9) ... what should I do?
Check my old tutorial I used myself when cooking Custom Roms for the N7000 with the kitchen. Following the steps should avoid most problems.
ThaiDai said:
Check my old tutorial I used myself when cooking Custom Roms for the N7000 with the kitchen. Following the steps should avoid most problems.
Click to expand...
Click to collapse
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue?
Please wait ...
scripts/choose_rom: line 110: more: command not found
Enter selection number (default=1, cancel=0, r=refresh):
is a problem? I can go on with 1 (default)?
stefano_te said:
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue?
Please wait ...
scripts/choose_rom: line 110: more: command not found
Enter selection number (default=1, cancel=0, r=refresh):
is a problem? I can go on with 1 (default)?
Click to expand...
Click to collapse
Sorry, but only repeating the problems you actually have won't solve anything because it isn't really clear what you did before.
The error here seems to be a hint that your cygwin installation isn't correct.
So please try to follow the steps in my tutorial exactly. Start from scratch.
ThaiDai said:
Sorry, but only repeating the problems you actually have won't solve anything because it isn't really clear what you did before.
The error here seems to be a hint that your cygwin installation isn't correct.
So please try to follow the steps in my tutorial exactly. Start from scratch.
Click to expand...
Click to collapse
It works. I have re-installed windows ...
can you tell me how to add new info in device info? (rom name, rom maker, release date, build version ...)
stefano_te said:
It works. I have re-installed windows ...
can you tell me how to add new info in device info? (rom name, rom maker, release date, build version ...)
Click to expand...
Click to collapse
No. Because you do this partly when using the kitchen step by step. Or when changing your updater-script.
The kitchen is a great help and simplifies cooking a rom - but it still is a little bit more complicated than heating baby food in the microwave. And if you really want your "custom" rom you should start to learn what happens in each step. And this can't be done by revealing everything...

createTarFork() process ended with ERROR: 255 on backup

Hiya XDA, So i'm trying to back up my phone (Running CM13) to my memory stick, and it worked before, but now it seems to have broken and I don't know what the issue is. My log (adb pull /tmp/recovery.log) is below
Heres what I've tried
Reflashing TWRP
Going to a slightly older version (3.0.2-1)
Enabling and disabling encryption
with and without compression
Skipping MD5 and leaving it on
[BACKUP STARTED]
* Backup Folder: /usb-otg/TWRP/BACKUPS/ENU7N15A10005575/2016-12-10--16-58-06_cm_angler-userdebug_6.0.1_MOB30Z_b4fbca03c0/
Backing up Boot...
I:Reading '/dev/block/mmcblk0p34', writing '/usb-otg/TWRP/BACKUPS/ENU7N15A10005575/2016-12-10--16-58-06_cm_angler-userdebug_6.0.1_MOB30Z_b4fbca03c0/boot.emmc.win'
Iartition Backup time: 4
Backing up System...
Error opening: '/system/addon.d' (Not a directory)
I:Error in Generate_TarList!
Error creating backup.
I:InfoManager saving '/usb-otg/TWRP/BACKUPS/ENU7N15A10005575/2016-12-10--16-58-06_cm_angler-userdebug_6.0.1_MOB30Z_b4fbca03c0/system.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copying file /tmp/recovery.log to /usb-otg/TWRP/BACKUPS/ENU7N15A10005575/recovery.log
I:Set page: 'action_complete'
Iperation_end - status=1
E:error opening '/usb-otg/LOST.DIR' -- error: No such file or directory
E:error opening '/usb-otg/TWRP' -- error: No such file or directory
Looks as though your memory stick isn't formatted correctly. Try Fat32 or possibly EXT4
It is Fat32?
frap129 said:
Looks as though your memory stick isn't formatted correctly. Try Fat32 or possibly EXT4
Click to expand...
Click to collapse
I don't have access to a Linux machine, but I could format it in my phone?
I'll try that. and will post any updates.
UPDATE:
Formatted it in Android, still same error
UPDATE 2:
Tried a different USB stick, same error.
The USB sticks I am using are:
amazon.com/SanDisk-Cruzer-Orbit-Drive-SDCZ58-032G-B35/dp/B00BPHTH4C
and
amazon.com/SanDisk-Ultra-Flair-Performance-SDCZ73-064G-G46/dp/B015CH1NAQ/
Remove /system/addon-d in twrp ?
Will my phone work properly after doing that?
UPDATE:
Renamed it to addon-dee in my prefered Filemanager (ES) and it's backing up now.
(thank god I decided to use a USB3 stick this time)
UPDATE 2:
Phone backed up and now is working fine! thanks.
I was having the same error until I updated TWRP to the unofficial 3.0.2-3
I have this problem and l have 17g free space in my internal storage but receive error 255 and i don't find addon in my storage plz help me for fixing this error
Sent from my Le X820 using XDA-Developers mobile app
m890 said:
I have this problem and l have 17g free space in my internal storage but receive error 255 and i don't find addon in my storage plz help me for fixing this error
Sent from my Le X820 using XDA-Developers mobile app
Click to expand...
Click to collapse
Should be under /system/ . Are you rooted? I don't know if you can see that part of system if you're not rooted.
My device is rooted but this file isn't there.
Sent from my Le X820 using Tapatalk
m890 said:
I have this problem and l have 17g free space in my internal storage but receive error 255 and i don't find addon in my storage plz help me for fixing this error
Sent from my Le X820 using XDA-Developers mobile app
Click to expand...
Click to collapse
It's not always the same file. Look at your log to see which file/dir is problematic.
SOLVED createTarFork() process ended with ERROR=255
SOLUTION
This solution worked on my Zenfone 3, running lineage Android 7.1.2.
I tried many other things, like flashing different versions of TWRP, deleting the recovery directory, renaming files and all the like.
You may deselect compression, change the TWRP-date / time : nothing works !
You need an PC / Notebook with adb installed.
- start your phone in recovery-mode (TWRP)
- connect to PC and get the recovery.log with following adb command
adb pull /tmp/recovery.log
You will find a copy of the file recovery.log in the directory, from which you started the command
- open an editor or choose your favourite file viewer to open recover.log
- search for the last entry of the word "Error"
- in the line before that, the recovery.log states the name of the file that causes the problem
(in my case it was /system/addon.d)
- disconnect phone from PC.
- restart your phone in "normal" restart (do NOT boot to recovery mode)
- use a root file browser (I used ES-explorer with root enabled) and navigate to that directory/file
- delete the file (which I did not do - I tried some other steps)
- restart phone
This took 3-4 minutes, but I did not delete the file addon.d right away. Instead, I did this:
step 1
navigated to /system/addon.d and copied addon.d to SD-card
step 2
in /system/ , I renamed addon.d "addon_BU.d".
This was successful. In /system/ , the only file visible was now "addon_BU.d"
step 3
tried to create a directory named addon.d inside /system/ because my recovery.log said quote\ ... system/addon.d (not a directory) ... \unquote
FAILED. The directory could not be created by ES-explorer
step 4
copied my backup file addon.d from SD-card back into its original location /system/.
This, I though, would work just fine, because I had renamed the original addon.d to addon_BU.d.
So after restoring addon.d , the only thing left to do would be delte addon_BU.d.
ES-explorer reported no error, but - surprise - there was no file "addon.d" present in /system/
The only file still there was "addon_BU.d"
well, let's go to
step 5
rename addon_BU.d back to it's original name "addon.d" using ES-explorer
FAILED.
addon_BU.d could not be renamed - this file really was screwed up big time !!!
I ended up with no addon.d - so I could have deleted it right away istead of starting my trial with step 1 ...
step 6
Anyway. Shut dowm my phone.
Rebooted my phone normally (not to recovery mode !!!)
This took considerably longer than normal - my heart rate had began to increase slightly if not to say I began to feel like a squirrel on red bull...
After roughly 3 minutes, I had a successful reboot to my OS (lineage Android 7.1.2)
step 7
Reboot again, this time to recovery mode (=TWRP)
and: backups work again.
Don't ask me why this worked and if it will work for you, but hey, give it a triy and let me know...
TheLMGN said:
Hiya XDA, So i'm trying to back up my phone (Running CM13) to my memory stick, and it worked before, but now it seems to have broken and I don't know what the issue is. My log (adb pull /tmp/recovery.log) is below
Heres what I've tried
Reflashing TWRP
Going to a slightly older version (3.0.2-1)
Enabling and disabling encryption
with and without compression
Skipping MD5 and leaving it on
[BACKUP STARTED]
* Backup Folder: /usb-otg/TWRP/BACKUPS/ENU7N15A10005575/2016-12-10--16-58-06_cm_angler-userdebug_6.0.1_MOB30Z_b4fbca03c0/
Backing up Boot...
I:Reading '/dev/block/mmcblk0p34', writing '/usb-otg/TWRP/BACKUPS/ENU7N15A10005575/2016-12-10--16-58-06_cm_angler-userdebug_6.0.1_MOB30Z_b4fbca03c0/boot.emmc.win'
Iartition Backup time: 4
Backing up System...
Error opening: '/system/addon.d' (Not a directory)
I:Error in Generate_TarList!
Error creating backup.
I:InfoManager saving '/usb-otg/TWRP/BACKUPS/ENU7N15A10005575/2016-12-10--16-58-06_cm_angler-userdebug_6.0.1_MOB30Z_b4fbca03c0/system.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copying file /tmp/recovery.log to /usb-otg/TWRP/BACKUPS/ENU7N15A10005575/recovery.log
I:Set page: 'action_complete'
Iperation_end - status=1
E:error opening '/usb-otg/LOST.DIR' -- error: No such file or directory
E:error opening '/usb-otg/TWRP' -- error: No such file or directory
Click to expand...
Click to collapse
1gnc said:
SOLUTION
This solution worked on my Zenfone 3, running lineage Android 7.1.2.
I tried many other things, like flashing different versions of TWRP, deleting the recovery directory, renaming files and all the like.
You may deselect compression, change the TWRP-date / time : nothing works !
You need an PC / Notebook with adb installed.
- start your phone in recovery-mode (TWRP)
- connect to PC and get the recovery.log with following adb command
adb pull /tmp/recovery.log
You will find a copy of the file recovery.log in the directory, from which you started the command
- open an editor or choose your favourite file viewer to open recover.log
- search for the last entry of the word "Error"
- in the line before that, the recovery.log states the name of the file that causes the problem
(in my case it was /system/addon.d)
- disconnect phone from PC.
- restart your phone in "normal" restart (do NOT boot to recovery mode)
- use a root file browser (I used ES-explorer with root enabled) and navigate to that directory/file
- delete the file (which I did not do - I tried some other steps)
- restart phone
This took 3-4 minutes, but I did not delete the file addon.d right away. Instead, I did this:
step 1
navigated to /system/addon.d and copied addon.d to SD-card
step 2
in /system/ , I renamed addon.d "addon_BU.d".
This was successful. In /system/ , the only file visible was now "addon_BU.d"
step 3
tried to create a directory named addon.d inside /system/ because my recovery.log said quote\ ... system/addon.d (not a directory) ... \unquote
FAILED. The directory could not be created by ES-explorer
step 4
copied my backup file addon.d from SD-card back into its original location /system/.
This, I though, would work just fine, because I had renamed the original addon.d to addon_BU.d.
So after restoring addon.d , the only thing left to do would be delte addon_BU.d.
ES-explorer reported no error, but - surprise - there was no file "addon.d" present in /system/
The only file still there was "addon_BU.d"
well, let's go to
step 5
rename addon_BU.d back to it's original name "addon.d" using ES-explorer
FAILED.
addon_BU.d could not be renamed - this file really was screwed up big time !!!
I ended up with no addon.d - so I could have deleted it right away istead of starting my trial with step 1 ...
step 6
Anyway. Shut dowm my phone.
Rebooted my phone normally (not to recovery mode !!!)
This took considerably longer than normal - my heart rate had began to increase slightly if not to say I began to feel like a squirrel on red bull...
After roughly 3 minutes, I had a successful reboot to my OS (lineage Android 7.1.2)
step 7
Reboot again, this time to recovery mode (=TWRP)
and: backups work again.
Don't ask me why this worked and if it will work for you, but hey, give it a triy and let me know...
Click to expand...
Click to collapse
Hi, thank you for a fix but this is an 10 month old thread. The issue was with TWRP 3.0.2-2. Along with an EFS issue that plagued TWRP 3.0.1-2, both issues have long since been resolved.
Sent from my Nexus 5X using Tapatalk
simple and working solution :
by @yannick818
"looks like it's an error with parallel apps oder multiple users. since i do not use something like that, i just removed this user with the android terminal emulator:
su
pm remove-user 999
everything was fine after that"
I could resolve my nandroid /data backup error on my EMUI 8.0 Mediapad M5 device with those following steps:
1 - Use a correct TWRP implementation
TWRP need to access the uncyphered partition /data.
There no possibility to backup it, if TWRP does not implement deciphering user data partition.
2 - Remove all users except user 0 (the administrator)
You can verify that there is no unwanted users, looking at directory /data/user : the only subdirectory should be "0".
To remove the others users :
Remove the PrivateSpace if you have one (Settings > Security & Privacy > PrivateSpace, and tap on the garbage can).
Remove all the secondary users (Settings > Users & accounts > users, and tap on each users to delete them). Keep just the main administrator user.
On EMUI, remove all twins applications (Settings > Apps & Notifications > App Twin, and disable all twin apps).
On OxygenOS, remove all parallel apps (Settings > Apps > Parallel Apps, and disable all parallel apps).
On MIUI, remove all dual apps (Settings > Dual Apps, and disable all dual apps)
On others devices ... you must find all parameters that create those unwanted users.
If you are not able to get the correct settings to suppress those users, in last resort you can try this command : "pm remove-user user-no. (For example "pm remove-user 999").
3 - Do not forget to protect your backups by a password
This would be stupid to cipher your /data partition and keep backups of this partition unprotected.
These steps fixed the nandroid backup problem for /data partition on my Huawei Mediapad M5 device.
I post on this forum because I hope that this will be helpful for others devices owners.

Categories

Resources