Registry format conversor: xml to reg - Windows Mobile Development and Hacking General

I've written a small tool in perl to ease these kind of conversions between the two registry file formats (the old one (.reg) and the new one using a weird and ugly xml format (.xml)).
This is an example session:
$ cat reg-file.xml | perl xml2reg.pl > reg-file.reg
To run this script you'll need to install XML::Registry and XML:arser (depends on).
I don't know if it's useful to have a reg2xml conversor or just implement a '-i' flag on it to inverse the procedure. Maybe cool for registry diffing and parsing?
UPDATE
This is the version 0.3. I've implemented the -i flag and a bit of help with -h and applied some contrib patches. This release fixes the dec/hex bug.
$ perl xml2reg.pl -h
Usage:
xml to reg: $ cat my-reg.xml | perl xml2reg.pl > my-reg.reg
reg to xml: $ cat my-reg.reg | perl xml2reg.pl -i > my-reg.xml
Click to expand...
Click to collapse
Have phun

Thanks pancake
Works like a charm here!

Nice work man!
Pretty helpful

THX! I need this tool!
Can this pl script be used under WinXP?
I've tried it like this, but there's some wrong:
Code:
D:\temp>type 100.xml|xml2reg.pl>100.reg
no element found at line 1, column 0, byte -1 at D:/Perl/lib/XML/Parser.pm line
187
D:\temp>

Errr, it's my fault
It works perfectly!
Usage:
Code:
D:\temp>type 110.xml|perl xml2reg.pl>110.reg
Wide character in print at xml2reg.pl line 60, <STDIN> line 13.
Wide character in print at xml2reg.pl line 60, <STDIN> line 13.
Wide character in print at xml2reg.pl line 60, <STDIN> line 13.
the Wide character convert success too!
But another problem, I cant apply the '-i' flag

xml2reg v0.2 implements '-i' flag
liay said:
(...)
But another problem, I cant apply the '-i' flag
Click to expand...
Click to collapse
The -i flag was not yet implemented. I've done't and here there's the new version 0.2 with -i and -h
$ cat foo.reg | perl xml2reg -i > foo.xml
Click to expand...
Click to collapse

Great work!Tanks again!
I've writen 2 BAT cmd which can be used under winxp's command prompt.
And the perl script has modified to fix some bug, now it can convert HKCR & HKCU

thanks! i was looking for this tool for ages! you are da man
im sure is is something silly but all im getting is blank files when converting,obviously im doing something wrong...any help would be appreciated.thanks

YES! ... very useful for all this mxip_*_*.provxml inside the new roms. Thanks

faria said:
thanks! i was looking for this tool for ages! you are da man
im sure is is something silly but all im getting is blank files when converting,obviously im doing something wrong...any help would be appreciated.thanks
Click to expand...
Click to collapse
What are you exactly doing?

pancake/nop said:
What are you exactly doing?
Click to expand...
Click to collapse
im trying to convert xmls to reg.....using the bat files above...is there any other apps that are required in the pc?
in your first post you said that we need; XML::Registry and XML:arser.
can you be more specific please?

faria said:
im trying to convert xmls to reg.....using the bat files above...is there any other apps that are required in the pc?
in your first post you said that we need; XML::Registry and XML:arser.
can you be more specific please?
Click to expand...
Click to collapse
Both are perl modules, if you have ActivePerl installed there's a tool called PPM which allows you to connect to Perl modules repositories a install anyone you need.
I did:
>ppm.bat
>search registry
... showed results....
>install XML-Registry
...wait.....
...done!....
I already had XML:arser installed so no need to get it again.
Hope this helps!

WARNIGN:
I believe this app has a major bug, it doesn't convert hex to decimal:
Code:
"MainCamSupportCaptSize"=dword:2d4
gets converted to
Code:
<parm name="MainCamSupportCaptSize" datatype="integer" value="2d4" />
Now I am not an expert but from my research integer has to be specified in decimal notation, not hexadecimal.
So the converted output should be:
Code:
<parm name="MainCamSupportCaptSize" datatype="integer" value="724" />
Could someone verfiy this. If my analysis is correct anyone who used this tool should check their output. Obviously this affects the other direction as well: an integer from a XML file would be interpreted as hex and a much higher value would be written to registry.

ZakMcRofl said:
WARNING:
I believe this app has a major bug, it doesn't convert hex to decimal:
Click to expand...
Click to collapse
Try again, hope to be fixed with 'eval "0x".$2'. I have no xml-reg files to test't now, but it should be ok
Thanks for the tip.

Thanks for the very quick fix!
But you forgot the brackets at eval in line 32, I added them and now it works.
See attachment.
Thanks for your tool.
BTW: why does it write translation="filesystem" at every string? Haven't come accross this yet in my provxml files.

oops
Thanks for the PR. applied.

Default entries
Hi,
I just try r2x to convert an rgu file to xml, and it misses the default entries of keys. Eg. the rgu file has an entry as follows:
Code:
[HKEY_CLASSES_ROOT\.tiff]
@="tiffile"
and it has been converted to
Code:
<characteristic type="HKCR\.tiff" translation="filesystem" >
</characteristic>
but it should be
Code:
<characteristic type="HKCR\.tiff" translation="filesystem" >
<parm name="Default" value="tiffile" datatype="string" />
</characteristic>

Here is a workaround...
Code:
if ( defined($ARGV[0]) && $ARGV[0] eq "-i" ) {
my $level = 0;
while(<STDIN>) {
my $str=$_;
[COLOR="Red"]$str=~s/^@/\"@\"/;[/COLOR]
if ($str=~/^\"/) {
if ($str=~/"=dword:/) {
$str=~/"(.*)"=dword:(.*)/;
print "\t\t\t<parm name=\"$1\" datatype=\"integer\" value=\"".eval("0x$2")."\" />\n";
} else {
$str=~/"(.*)"="(.*)"/;
next unless defined $1;
my $value = defined($2)?$2:"";
my $key = $1;
$key="Default" if ($key eq "@");

Great code !
May I know what is the purpose of parameter ($dump = new XML::Registry) ?
I dont see any usage of this parameter throughout the source code .

liay said:
Errr, it's my fault
It works perfectly!
Usage:
Code:
D:\temp>type 110.xml|perl xml2reg.pl>110.reg
Wide character in print at xml2reg.pl line 60, <STDIN> line 13.
Wide character in print at xml2reg.pl line 60, <STDIN> line 13.
Wide character in print at xml2reg.pl line 60, <STDIN> line 13.
the Wide character convert success too!
But another problem, I cant apply the '-i' flag
Click to expand...
Click to collapse
Sorry, I have the same problem and I cannot understand the solution (I'm not a perl user) can you explain it a little better?
Thanks in advance

Related

updated itsutils

see http://wiki.xda-developers.com/index.php?pagename=XdaUtils
download: http://nah6.com/~itsme/download/itsutl050119.zip
changes: 040318 -> 050119
* made hexdumping interface more universal among different tools
* switched compiler from EVC3 to EVC4
* added tffsreader interface to itsutils.dll
* itsutils logs to \storage on smartphones
* added 'readphysicalmemory' -p option to pmemdump
* pps now also works on smartphones
* added more handle interpreters to 'testpi.cpp'
* added cpu speed testing tool
* added several requests and notifications to RilClass.cpp
* dump can now also save a chunk of a file
* more types of hexdump formatting.
* pdblist now also supports volumes
* added pdocread tool, to read from tffs / DOC chips
* added new himalaya, and magician roms support to pnewbootloader
* added option to pput, to take data from stdin.
* pregutl now compiles both to wince and win32 tool
* merged psdread and psdwrite tools
willem
Perfect... !!!
THANX )
How about dumping INROM files? Do you plane to look into it?
THANX again
buzz
for that i already wrote dumprom a while back.
it is not really on my priority list to make file extracted with dumprom individually accessible via dumprom.
a thing i am thinking about for a while, is to create a loader for IDA, to directly access wince roms.
error itsutils
hi, :wink:
i have this error with e200 smartphone 2003 (last rom imate) unloked with "SecurityOFF" :
Code:
Copying D:\spv\itsutils\build\itsutils.dll to WCE:\windows\itsutils.dll
ERROR: ITGetProcessList - Erreur non spécifiée
:?
my SecurityPolicy :
Code:
<characteristic type="SecurityPolicy">
<parm name="4119" value="16"/>
<parm name="4101" value="16"/>
<parm name="4102" value="1"/>
<parm name="4097" value="1"/>
</characteristic>
:roll:
did you sign itsutils.dll ?
yes, with "signcode.exe" in smartphone SDK ...
and :
Code:
<parm name="4102" value="1"/>
is only for exe ? not dll ?
hmm. I don't know, I have the same settings, and still have to sign before I can run stuff.
the page on msdn describing the policies is gone.
can you run the attached file on your phone? it tests very basically if the itsutils.dll works.
it should result in a file 'tstits.log' containing something like this:
Code:
hLib= 8d0e3000
GetProcAddress= 019610e0
resultcode=0000000a size=0 buf=00000000
sign this file too, before copying it to your phone.
I have make a hard reset , and only SecurityOff,
result (withtout signature):
Code:
hLib= 8cee7ecc
GetProcAddress= 013810e0
resultcode=0000000a size=0 buf=00000000
result (with signature):
Code:
hLib= 8cee7ecc
GetProcAddress= 013810e0
resultcode=0000000a size=0 buf=00000000
is same ? ...
in attached file your exe with my signature ...
if that can help ...
that means that the dll is ok.
does 'pdir' work? that requires less rapi privileges.
does 'pps -v' output anything?
or 'pps -t' ?
or 'pmemdump 0x80000000'
yes when i call functions with rapi "classic" like "pdir" it is ok,
but when i call a function with CeRapiInvoke > error !!
:x
btw, my security settings are like this:
Code:
<wap-provisioningdoc>
<characteristic type="SecurityPolicy">
<parm name="4097" value="1"/>
<parm name="4101" value="64"/>
<parm name="4102" value="1"/>
<parm name="4119" value="196"/>
</characteristic>
</wap-provisioningdoc>
and I execute them like this:
Code:
rapiconfig.exe /p enable-rapi.xml
ok i found this post : http://smartphonedn.com/forums/viewtopic.php?t=880
I test ...
no and no ! :evil:
:arrow:
do all tools fail with different functions that report an error?
or does a simple tool like 'preboot' work?
it calls only one simple function remotely. - it should reboot your phone
.. and does it copy itsutils every time? or does it notice after one time that it is still on the device?
hmm. is your e200 maybe a smartphone2002 device?
I hae not checked to see if my tools still work on windows CE 3.0
maybe I introduced something that is not backward compatible.
The RapiConfigOut.xml of "rapiconfig.exe /p enable-rapi.xml" is :
Code:
<wap-provisioningdoc>
<characteristic type="SecurityPolicy">
<parm name="4097" value="1"/>
<parm name="4101" value="64"/>
<parm name="4102" value="1"/>
<parm name="4119" value="196"/>
</characteristic>
</wap-provisioningdoc>
:wink:
--------------------------------------------------------
the Spv e200 (orange) is a Windows Mobile Smartphone 2003 (no SE !)
--------------------------------------------------------
pdir ok
prun = ok
--------------------------------------------------------
preboot =
Code:
Copying D:\spv\itsutils\build\itsutils.dll to WCE:\windows\itsutils.dll
result=80004005
but no reboot ! :?
--------------------------------------------------------
pdblist -v =
Code:
volume {00000000000000000000000000000000} SystemHeap
volume {9a8ff820d3acfc9199a72d0b2b06e7c1} \Storage\mxip_notify.vol
volume {7089f1c2067b0c0de186a36d5714b303} \Storage\mxip_lang.vol
volume {5b803001329e90b88143b87b0f611b87} \Storage\mxip_initdb.vol
volume {eaa83ddb9441e7ba450a9c4dff287aa1} \Storage\cemail.vol
volume {ed8ff821f6acfc2042a760c8ca285f06} \Storage\mxip_system.vol
:wink:
--------------------------------------------------------
pmemdump -f essai.txt =
Code:
Copying D:\spv\itsutils\build\itsutils.dll to WCE:\windows\itsutils.dll
ERROR: ITGetContext - Erreur non spécifiée
error getting process context
--------------------------------------------------------
".. and does it copy itsutils every time?" -> yes
"or does it notice after one time that it is still on the device? " -> never !
...
and are you a link/name for a other software with "ceRapiInvoke" for testing ... ?
thank you
pps -v =
Code:
Copying D:\spv\itsutils\build\itsutils.dll to WCE:\windows\itsutils.dll
result=80004005 buf=00000000 size=00000000
ERROR: ITGetProcessList - Erreur non spécifiée
here another version of tstitsutils.exe, which tests more.
can you run it again?

how to backup original rom. Help pls

Hi Everybody
I used the search function but maybe I am blind. What is the right way to dl the original rom from my x1? Do I need anything special to do that? (I lost about 3 years of htc knowledge while not using it at all).
Thank you in advance
H
solution
was a bit messy as I had to get half of the solution from another thread
kokotas
08-07-2008, 11:11 AM
Well, I don't think that the 2nd link is really helpful.
Try reading here: http://forum.xda-developers.com/showthread.php?t=382609
I guess that you could dump the ROM using itsme's tools (http://www.xs4all.nl/~itsme/projects/xda/tools.html) as pof shows in the above link and then someone could reconstruct(kaiser-way (http://forum.xda-developers.com/showthread.php?p=1586817#post1586817)) the .raws in a .nbh!
ps:if you have problem "updating itsutils.dll,etc" try typing in a cmd:
cd "where itsutils are extracted"
prapi -s HKLM\Security\Policies\Policies "00001001" integer 1
prapi -s HKLM\Security\Policies\Policies "0000101a" integer 1
before you run pdocread!
Regards!
My 5 cents: Just as a tip from my side. I copied and pasted the result of the pdocread.exe -l to my notepad, changed the settings there double checked (made about 100000 spelling mistakes had to do it 5 times but it worked fine). It takes a loooong time....but works.
The part about the prapi was verry important for me without that it didnt work!
while doing this for every part i dled, there came up on the x1 a huge text about some settings, honestly I didnt understood half of it, so i tapped NO and it worked
Cheers
H
hi prob this one and got the followring errors:
Code:
c:\htc\utils>pdocread.exe -l
Copying c:\htc\utils\itsutils.dll to WCE:\windows\itsutils.dll
Could not update itsutils.dll to the current version, maybe it is inuse?
try restarting your device, or restart activesync
or maybe your device is application-locked.
c:\htc\utils>prapi -s HKLM\Security\Policies\Policies "00001001" integer 1
ERROR: CeProcessConfig - r=00169390 ce=00000019 le=00000000 hr=80070005
- Zugriff verweigert (Access Denied)
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Security\Policies\Policies" translation="filesystem">
<parm-error name="00001001" datatype="integer" value="1" desc="Access Denied"/></characteristic>
</characteristic>
</wap-provisioningdoc>
c:\htc\utils>prapi -s HKLM\Security\Policies\Policies "0000101a" integer 1
ERROR: CeProcessConfig - r=00169390 ce=00000019 le=00000000 hr=80070005
- Zugriff verweigert (Access Denied)
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Security\Policies\Policies" translation="filesystem">
<parm-error name="0000101a" datatype="integer" value="1" desc="Access Denied"/></characteristic>
</characteristic>
</wap-provisioningdoc>
Solution: install the enablerapi.zip on the phone. extract it, copy it to the phone and install it. after this everything works.

CM10 Building guide + Linux + troubleshooting

Guide to build cm10 for the n7000. It works for sure on linux.
If you want to build for another samsung phone replace all n700's with the new model number
First of all u need to:
Initialize you're build environment.
Follow the steps descibed here: Linux is at the top.
http://source.android.com/source/initializing.html //if you're on ubuntu 12.04 or higher skip the Installing the JDK part
Now do sudo apt-get install libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools pngcrush schedtool
Setting up android tools:
cd ~
mkdir android-SDK
cd android-SDK
wget http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz
tar -xvzf android-sdk_r20.0.3-linux.tgz
cd tools
./android update sdk -u --filter platform-tools,android-16,extra-android-support
export PATH=$PATH:~/android-SDK/android-sdk-linux/platform-tools
export PATH=$PATH:~/android-SDK/android-sdk-linux/tools
Now add the 2 lines above to ~/.bashrc using your favourite text editor
Getting the source:
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=$PATH:~/bin
Now add the line above to ~/.bashrc using your favourite text editor
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
create ~/android/system/.repo/local_manifest.xml using this content: //If you want the latest kernel read the bottum of post 3 or read the comments.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jellybean">
<copyfile dest="build.sh" src="samsung/build.sh" />
</project>
<project name="CyanogenMod/android_device_samsung_n7000" path="device/samsung/n7000" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="jellybean" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="jellybean" />
</manifest>
cd ~/android/system/
repo sync -j16
cd ~/android/system/device/samsung/n7000/
Connect your galaxy note to the PC
./proprietary-files.sh
If you want to change the boot animation to the CM10 one or a different one read the last lines of post 3.
Building:
If you want to built android with a costum kernel you can use: export TARGET_PREBUILT_KERNEL=<path to zImage>/zImage
cd ~/android/system
repo sync -j16
./build.sh n7000
updating source:
repo sync -j16
Troubleshooting
Possible problems:
error: project –j16 not found
The – is a non unicode character. You can type the command by hand on you're keyboard instead of copy-pasting to fix this.
If that doesn't work use repo sync
Repo sync general error fix:
rm -r the directory it complains about
cd ~/android/system
repo sync -d -j16
Error nvram_net.txt_AU is missing or just in general and nvram_net.txt_ file:
open the file vendor/samsung/n7000/n7000-vendor-blobs.mk
and remove these lines:
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_AU:system/etc/wifi/nvram_net.txt_AU \
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_IL:system/etc/wifi/nvram_net.txt_IL \
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_SG:system/etc/wifi/nvram_net.txt_SG \
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_TN:system/etc/wifi/nvram_net.txt_TN \
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_murata_AU:system/etc/wifi/nvram_net.txt_murata_AU \
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_murata_IL:system/etc/wifi/nvram_net.txt_murata_IL \
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_murata_SG:system/etc/wifi/nvram_net.txt_murata_SG \
vendor/samsung/n7000/proprietary/system/etc/wifi/nvram_net.txt_murata_TN:system/etc/wifi/nvram_net.txt_murata_TN \
Also open the file
device\samsung\n7000/proprietary-n7000-files.txt
and remove all lines containing:
nvram_net.txt_murata_*
nvram_net.txt_*
Tips & Trics
Removing CM apps:
To remove roms manager terms or torch:
Edit the file: vendor\cm\config\common.mk
And remove
vendor/cm/proprietary/<App Name>.apk:system/app/<App name>.apk \
Removing other apps:
Edit the file : build\target\product\core.mk
Edit the file : build\target\product\full_base.mk
Edit the file : build\target\product\generic_no_telephony.mk
To change the name of the zip and some info:
Edit the file: vendor\cm\config\common.mk
And change the else part in the file:
ifdef CM_RELEASE
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
else
CM_VERSION := <Enter new zip name here>
endif
Editing LCD density:
Edit the file device\samsung\n7000\n7000.mk
And change ro.sf.lcd_density to whatever you like.
a hint 320 is default
213 is nexus 7 mode
160 is tablet mode
Editing Trebuchet Settings:
Edit the file packages\apps\Trebuchet\res\values\config.xml
Edditing normal Settings:
Edit the file packages\apps\Settings\res\values\bools.xml
Finding out what went wrong:
./build.sh n7000 2> error.log
This means all errors and warnings will be logged to error.log
To find the actual error, you could use "grep -ins error error.log"
Moving the source:
Copy all the files to there new location.
This can be done with cp -rf old location new loaction
The force option is to avoid can't find .git errors
Warning the next part requires to be done all together without interuptions!!!
On the new loaction use rm -rf to remove the files. // I know this will delete the files. Force option is to avois sym link errors.
Now curl the repo to the new location using the steps in the first post.
Repo init as described in the first post.
Repo sync -j16 //The tric is it will restore all files that are still usable and redownload all corrput files
Changing to new kernel thanks to utacka:
local_manifest.xml - to use the latest 9100 kernel update // this file can be found in the .repo dir
change from teamhacksung/android_kernel_samsung_smdk4210 to teamhacksung/android_kernel_samsung_smdk4210_new
Also you may temporarily need to remove it from cm.dependencies in device/samsung/n7000, it'll do weird stuff (like syncing two different kernel repos to the same place) if you don't make that change.
Changing bootanimation:
Copy your new bootanimation zip file to: vendor\cm\prebuilt\common\bootanimation\<Your zip file>
Now make this change in vendor/cm/config/common.mk: //this wil be around line 46
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/bootanimation/<Your zip file>:system/media/bootanimation.zip
endif
The Cm10 bootanimation can be found here: http://goo.gl/x2KC8
Building time
My building time just to give you a heads up on what to expect:
System spec:
6 GB ddr3 ram
Core i5-2500 processor
2tb SATA6 samsung HDD
128GB vertex 2 SSD
Motherboard DH67CL intel
Graphic crad Radeon HD 6870 extreme edtion
VM-Ware workstation Ubuntu 12.04 64 bit headless with image on hdd and workstation on SSD with 4.5 GB ram and windows 8 release preview 64 bit as host OS.
Building after clean 53 min
Building after update 6 min.
Native Lubuntu 12.04 64 bit installed on HDD:
Building after clean 58 min
Building after update 12 min.
Just curious if you have any tips on building on OSX?? I have tried several times and cm10 just will not compile..
I commented out the quemu stuff.. but I still end up failing somewhere along the road. No problems at all on ubuntu VM, just takes 150+ minutes :crying:
madbuda said:
Just curious if you have any tips on building on OSX?? I have tried several times and cm10 just will not compile..
I commented out the quemu stuff.. but I still end up failing somewhere along the road. No problems at all on ubuntu VM, just takes 150+ minutes :crying:
Click to expand...
Click to collapse
I can't really help if i don't know the issue. The problem is most likely related to missing packages.
Could you try building with ./build.sh n7000 2> error.log
And then uploading/posting the contents of the error.log file.
The 2 means log all errors and warnings to the error.log file.
Some VM advise for the best speed:
Use a headless ubuntu server. Login trough ssh. \\The ssh part does not increase speed, but it allows copy pasting.
Give it all you're cores and a lot of memory in the VM settings.
Finally don't use the computer while building it slows the building down
Thanks, didn't even think about how many CPUs I gave to my VM.
Clean built in less than an hour now
Sent from my SCH-I535 using xda app-developers app
Thanks for the guide.. It was really helpfull to me, but I faced some problems, so I think it need an update in the following areas:
1 - Your config builds using the old Kernel... To build with the new one (Preview#4), you need to edit local_manifest.xml , and change teamhacksung/android_kernel_samsung_smdk4210 to teamhacksung/android_kernel_samsung_smdk4210_new . You also need to edit cm.dependencies in device/samsung/n7000 , the same way...
2 - Sun Java is no longer in Ubuntu repositories, so the instructions in: http://source.android.com/source/initializing.html will not work properly, and by following them you will end up building with OpenJDK, It will probably work, but is highly experimental and can result in inexpected problems.
mundano said:
Thanks for the guide.. It was really helpfull to me, but I faced some problems, so I think it need an update in the following areas:
1 - Your config builds using the old Kernel... To build with the new one (Preview#4), you need to edit local_manifest.xml , and change teamhacksung/android_kernel_samsung_smdk4210 to teamhacksung/android_kernel_samsung_smdk4210_new . You also need to edit cm.dependencies in device/samsung/n7000 , the same way...
2 - Sun Java is no longer in Ubuntu repositories, so the instructions in: http://source.android.com/source/initializing.html will not work properly, and by following them you will end up building with OpenJDK, It will probably work, but is highly experimental and can result in inexpected problems.
Click to expand...
Click to collapse
Thats the official building manual from google which also states that openJDK is not expermental for ICS and JB (different page).
This is also confirmed in the android-building group ...
Also OpenJDK 6 builds CM10 without any issues.
The sun java 6 can't be installed headless (if not in repository) because you need to click accept at the official download side....
Kernel is at 3th post bottum (Tips and Trics):
It will not be in the official manual because if it gets stable enough it will get merged in the CM10 repo
mnm1992 said:
Kernel is at 3th post bottum (Tips and Trics):
It will not be in the official manual because if it gets stable enough it will get merged in the CM10 repo
Click to expand...
Click to collapse
ooppss... Didn't saw that one..
I will try OpenJDK.
Thank you mnm1992, you really helped me, it is an all-in-one guide :laugh:.
Hi mnm1992, the manifest have changed to new ones since codeworkx have merged it into main streamline, check this: http://forum.xda-developers.com/showthread.php?p=31166205
Skickat från min GT-N7000 via Tapatalk 2

[Q] Any way to remove the 512 character limit on Nook Touch notes?

In the interface for reading books, you can highlight a word or set of words, then attach a note to that.
The notes are limited to 512 characters, but you can have an unlimited number of notes for a book. I currently work around the limit by highlighting a word, writing the note, then highlighting the next word and continuing the note.
Is there a way to remove the limit of 512 characters, or increase it to a very large number? My nook is fully rooted, so I imagine it is a simple config file or sqlite entry somewhere, but I don't know where to look.
I determined that the 512 character limit is hard coded into the Reader.apk app. I modified the app to increase the limit to 8192 characters (16 times as much) and have posted the details below.
Attached is the apk for the updated app. To install it, you must first uninstall the old reader.apk as this one is signed using a different key.
For those who wish to make the changes themselves, the following are the steps needed.
Pre-requisites
Nook must be rooted (obviously)
Android SDK must be installed. Link to sdk download page
APKTool must be installed. Link to APKTool download page
Install the Nook framework file. This is needed to properly recompile the apk later.
Code:
adb pull /system/framework/framework-res.apk
Code:
apktool if framework-res.apk
Copy the original Reader.apk file into the current directory.
Code:
adb pull /system/app/Reader.apk
Decompile the apk file using apktool
Code:
apktool d Reader.apk
Make the changes needed
Modify the AndroidManifest.xml file. Remove the "sharedUserId" flag.
Change this
HTML:
<manifest android:sharedUserId="android.media" android:versionCode="1" android:versionName="1.0" package="com.bn.nook.reader.activities"
xmlns:android="http://schemas.android.com/apk/res/android">
to this
HTML:
<manifest android:versionCode="1" android:versionName="1.0" package="com.bn.nook.reader.activities"
xmlns:android="http://schemas.android.com/apk/res/android">
Modify the following files. Search for "0x200" and replace it with "0x2000" (ie add a zero; this will multiply max size by 16):
Reader/smali/com/bn/nook/reader/ui/AddNoteView$1.smali
Reader/smali/com/bn/nook/reader/commonui/ReaderCommonUIConstants.smali
Modify the following file. Search for "512" and replace it with "8192" (the decimal equivalent of hex 0x2000)
Reader/res/layout/add_note_layout.xml
Recompile the source code into a new apk.
Code:
apktool b Reader ReaderUnsigned.apk
Create a signing key; Skip this step if you have created one already. Note: keytool is located in the Android SDK->Tools folder.
Code:
keytool -genkey -v keystore myAndroidKey.keystore -alias myAndroidKeyAlias -keyalg RSA -validity 10000
Sign your new apk.
Code:
jarsigner -verbose -keystore myAndroidKey.keystore ./ReaderUnsigned.apk myAndroidKeyAlias
Use zipalign (also in sdk->tools) to align your apk.
Code:
zipalign -v 4 ReaderUnsigned.apk ReaderSigned.apk
Rename the system reader.apk file to uninstall/backup the apk.
Code:
adb shell mv /system/app/Reader.apk /system/app/Reader.apk.bak
Remove any entries of the previous Reader.apk signing key from the "/data/system/packages.xml" file.
Pull the packages.xml file.
Code:
adb pull /data/system/packages.xml
Edit the packages.xml file. Search for "com.bn.nook.reader". Remove this entire tag:
HTML:
<package name="com.bn.nook.reader" ...>...</package>
Push the packages.xml file back.
Code:
adb push packages.xml /data/system/packages.xml
Install your new app and enjoy the larger note sizes!
Code:
adb install ReaderSigned.apk

Set Maximum CPU frequency on any Android ROM for the HP TOUCHPAD

The maximum and minimum cpu frequencies allow by the Kernel can be set to all the Android ROM ever made for the HP TOUCHPAD until now and forever!
This is apply as a native setting ( as shipped from the factory, we could say )
The ROM will not be modify, no need for ROOT access or install SuperSu or any Apps.
It can be done to an existing installed ROM, no need to re-flash, is safe and will not damage your installation or prevent you from using your TP. Even if you do not do it right, you will get your TP running as always.
This is only done in a Linux OS, I am using ubuntu, which it can also be run under a Virtual Machine in any other OS.
1. Get the boot.img from the zip ROM or the current uImage from the TP boot directory.
(The boot.img must be copy to the root/hpboot directory of the PC, not on the tablet)
2. Run each of this commands separately in terminal in the directory the boot.img is.
dumpimage -i boot.img kernel.uImage
dumpimage -i boot.img -p 1 ram
dd if=ram of=ramdisk.img.gz bs=64 skip=1
gunzip ramdisk.img.gz
mkdir ramdisk; cd ramdisk
cpio -i < ../ramdisk.img
3. Go to the ramdisk direcoty and open this file in a text editor:
init.tenderloin.power.rc
Copy and Paste under # CPU Scaling and # CPU boost the following:
Note: You can add different settings to each cpu0 or cpu1.
Different frequencies to each and also assigned different Governors to each cpu.
You have total and individual control.
# CPU Scaling
# Replace the numbers at the first two lines at the end with the frequencies your TP can handle.
# Replace the numbers at the last two lines at the end with the frequencies your TP can handle.
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 192000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 192000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1782000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1782000
# Configure Performance Governor
# This is optional, but it will speed boot time using both CPU at maximum frequencies.
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance"
# CPU boost
# Set your desire speed can not be higher than your maximum frequencies.
write /sys/module/cpu_boost/parameters/boost_ms 20
write /sys/module/cpu_boost/parameters/sync_threshold 1782000
write /sys/module/cpu_boost/parameters/input_boost_freq 1782000
You can configure the type of governor after the system finished booting on this line. Is all up to the Kernel and your choice, but interactive is good.
# Configure Interactive
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive"
4. Save the changes and repack the ramdisk with kernel.
Open Terminal in the ramdisk folder and paste:
find . | cpio --create --format='newc' | gzip > ../ramdisk_Pack.img
5. Go to the folder where the original boot.img file is and you should have a file ( ramdisk_Pack.img )
Paste the following two commands:
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n "TENDERLOIN MAX CPU" -d ./ramdisk_Pack.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n "Tenderloin Android MAX CPU" -d kernel.uImage:ramdisk.uImage uImage.Android_MAX_CPU
6. There is a file name uImage.Android_MAX_CPU in the same folder as your original boot.img, copy it to your TP boot directory and reboot.
If you enter a wrong frequency and it did not finished then do a hard reset and select the other boot image and use it as always. If it finished booting then you are running faster than ever!
To take in consideration:
The Kernel in the ROM has the frequencies that supports, most of the ROM comes with a top frequencies of 1782000. The SKZ kernel allows for a maximum frequency of 1890000.
The HP Touchpad where made with different suppliers of components. Due to this differences not all supports the same maximum frequencies. Very few can work under 1890000 or 18360000. But you can get lucky and have one. You should know and test the maximum speed that it will take, you can do that with Kernels apps before making modifications to the Boot Image, also the minimum frequencies are important as well.
The advantages of creating your own personal Maximum Speed Boot Image:
1 You will get faster boot time as the CPUs are set to work after the system starts the booting process and do not have to wait until the GUI starts and the Kernel app applies the settings.
2. Keep your ROM secure, no ROOT and no Super User, use it as is.
3. Less apps to install to take space and waste of Memory. Kernel apps and Super User have background services that are all time running just to give you the extra speed. Other apps can get the extra Ram for more processing.
4. There is more benefits of running the device at a higher frequency with no extra processing power, than have multiple apps to fine tune your CPU and governors but use resources.
View attachment 4613960
I don't know how to do with this, please help.
[email protected]:/mnt/g/devices/tenderloin/12.5.1/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rak_Pack.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
Try 'cpio --help' or 'cpio --usage' for more information.
In this post I did a detail explanation on how to unpack the boot image.
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
Create a directory on root ( hpboot ) copy and paste the command on terminal as is on the post and it should work.
View attachment 4614596
[email protected]:/mnt/g/devices/tenderloin$ cd ./hpboot/
[email protected]:/mnt/g/devices/tenderloin/hpboot$ ls
boot.img
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dumpimage -i boot.img kernel.uImage
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dumpimage -i boot.img -p 1 ram
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dd if=ram of=ramdisk.img.gz bs=64 skip=1
28781+1 records in
28781+1 records out
1842017 bytes (1.8 MB, 1.8 MiB) copied, 0.431285 s, 4.3 MB/s
[email protected]:/mnt/g/devices/tenderloin/hpboot$ gunzip ramdisk.img.gz
[email protected]:/mnt/g/devices/tenderloin/hpboot$ mkdir ramdisk; cd ramdisk
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ cpio -i < ../ramdisk.img
6819 blocks
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rakRW.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
Try 'cpio --help' or 'cpio --usage' for more information.
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$
I did it due to https://forum.xda-developers.com/hp-...te-to-t3846567 , but it stuck just like last time I did it.
What does this mean?
cpio: You must specify one of -oipt options.
I can not see the picture you attached and the link does not work.
Are you doing all the commands inside a Linux machine?
zcarrt said:
--SNIP--
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rakRW.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
--SNIP--
Click to expand...
Click to collapse
It may be copied wrong. It should be: cpio --create -–format=’newc’ (not one dash but two, i.e. not -create, -format, but --create, --format)
The working path shows: [email protected]:/mnt/g/devices/tenderloin/hpboot$
I am not a Linux guru, but it look the boot.img is on the root of the tablet and not the PC.
The commands will only work properly if the directory is created in the root of the PC no where else.
((correction))
Yes, you are correct, is something about pasting a double dash that it turns into a hyphen (single dash). When editing the post it shows as intended, double dash. When publish, shows as a single dash, unless the font size is change on here and type again.
How I did it:
Enter the command in ubuntu terminal ( worked ) then copy and paste into LibreOffice Writer.
Write the guide, then copy and paste into the forum, to avoid any mistakes.
Then surprise ! a double dash is change to a hyphen and I am not even aware of it..!
Thanks for correcting!
HP_TOUCHPAD said:
The working path shows: [email protected]:/mnt/g/devices/tenderloin/hpboot$
I am not a Linux guru, but it look the boot.img is on the root of the tablet and not the PC.
The commands will only work properly if the directory is created in the root of the PC no where else.
Click to expand...
Click to collapse
I thought that, too, but there wouldn't be enough room for the dd command to work, and the error message wouldn't have been a cpio error.
my path:
[email protected]:~/hpboot$
There should not be any mounted device anywhere.
HP_TOUCHPAD said:
I can not see the picture you attached and the link does not work.
Are you doing all the commands inside a Linux machine?
Click to expand...
Click to collapse
I did it in windows 10 Ubuntu bash last time , I will try it properly in a Linux machine again. Thanks.
zcarrt said:
I did it in windows 10 Ubuntu bash last time , I will try it properly in a Linux machine again. Thanks.
Click to expand...
Click to collapse
The problem was on the formatting on my post. When I paste the guide for some reason it shows as a hyphen instead of a double dash.
I corrected the error. This is how it should be, also should work in the windows10 linux subsystem.
find . | cpio --create --format='newc' | gzip > ../ramdisk_Pack.img
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
Usage: mkimage -l image
-l ==> list image header information
mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
mkimage [-D dtc_options] [-f fit-image.its|-F] fit-image
-D => set all options for device tree compiler
-f => input filename for FIT source
Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)
mkimage -V ==> print version information and exit
Use -T to see a list of available image types
Any help please?
Thanks.
kojam said:
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
go to this post and run the script, if all work on your system then you have everything to build it.
https://forum.xda-developers.com/showpost.php?p=78028080&postcount=4
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
5. Go to the folder where the original boot.img file is and you should have a file ( ramdisk_Pack.img )
Paste the following two commands:
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n “TENDERLOIN MAX CPU” -d ./ramdisk_Pack.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n “Tenderloin Android MAX CPU” -d kernel.uImage:ramdisk.uImage uImage.Android_MAX_CPU
go to this post and run the script, if all work on your system then you have everything to build it.
https://forum.xda-developers.com/showpost.php?p=78028080&postcount=4
Click to expand...
Click to collapse
Thanks for your reply.
I was in that folder (where ramdisk_Pack.img is) in terminal, then I entered/pasted those commands in terminal...
What am I doing wrong? Explain it to me like I'm 5yrs old please. LOL :laugh::silly:
Thanks a million!
Click to expand...
Click to collapse
kojam said:
HP_TOUCHPAD said:
Thanks for your reply.
I was in that folder (where ramdisk_Pack.img is) in terminal, then I entered/pasted those commands in terminal...
What am I doing wrong? Explain it to me like I'm 5yrs old please. LOL :laugh::silly:
Thanks a million!
Click to expand...
Click to collapse
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
Quite alright friend.
It is I who thanks you for this.
I was able to get create the file after following your update/corrected instructions.
Thanks again!
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
Thanks!
Worked!
Click to expand...
Click to collapse

Categories

Resources