How to modify .line numbers in smali file? - apk

I have used apktool to decompile an apk to its smali source.
In all smali files there are .lineXYZ codes. They are random
i.e
.line 2
and somewhere next it would be like .line 33
so i am unable to get their sequence. I have created a line number modification tool which renames line number and applied to smli files. But apktool did not compile it again and exited without telling me anything.
then i created a tool to detect highest line number in the project and added my code to decompiled code. Still apk did exist without saying anything.
I know there is a file known as apktool.yml but i do not know if there is any problem in that.
Any help is appreciated and i am waiting for a solution.

.line markers are just for debugging and show up in stacktraces. You don't need to modify them when you're adding code.

Related

RPG400 - RPG Source Code compilation error - Data descriptions for file not found

My source code is referring to some Screen Names & DB tables. Sample declarations given below:
FSCRNNAME CF E WORKSTN
FDBNM1 IF E K DISK
I'm using the MicroFocus Rumba editor for compiling and using the built-in Compile within the Rumba Editor "Work with Members using PDM" (option 14 - for compile).
While compiling, I'm getting the following errors:
Error Messages:
1) "DATA DESCRIPTIONS FOR FILE SCRNAME NOT FOUND"
2) "DATA DESCRIPTIONS FOR FILE DBNM1 NOT FOUND"
3) "External description not found for file specified as externally described. File ignored.
Has anyone have a solution for this ?
Thanks!
The libraries containing the files SCRNAME and DBNM1 have to be in the library list for the compile.
Sorry, I don't know Rumba so I don't know how you would set your library list. But it sounds like you might be using an emulator, so maybe you could use the ADDLIBLE command before you use option 14 to compile.
It seems that the compiler cannot find the video file.
If you compile interactively, before running 14 on the PDM make sure that the library containing the compiled video is listed.
to search for the full video type in command line
WRKOBJ SCRNNAME
if you find it, it means that it is in the library list
otherwise
WRKOBJ * ALL / SCRNNAME
to find all the libraries that contain it
When you have found the library you can add it to the library list.
ADDLIBLE libraryName will add it in the first position
EDTLIBL send allows you to edit it in the position you prefer.
If you compile in Batch make sure that the library containing the video file is in the library list associated with the job queue of your JOB
with F18 from PDM you can set the job queue to be associated with the compiled
WRKJOBQ to modify job queues, including build parameters.

(Koala) Can't compile variables in Sass

It's my first time using Koala.
Everything works fine so far, but when I want to use variables it starts giving me errors. I really don't know what I'am doing wrong, cause I followed all steps.
For example:
$test: #00000; would give me error (doesn't matter in which .scss file I put it in.
I have uploaded a screenshot of my structure and the error.
The actual problem with the code is that you supplied 5 digits for the value of a hexadecimal value.
You should either use 3 or 6 and not 5
$test: #000000; // not #00000
The reason why it worked by not importing _variables.scss is because it is a partial file and by not importing it, it never gets compiled and so it basically doesn't evaluate the line causing the error. That line is just ignored.

How to browse for file (Win7/64bits)

I need to quickly write a simple GUI over a command line application. Two steps are required:
Specify an input file path,
Specify an output file path (non existing)
I found out a previous post, however trying to get the above (1) to work seems like an insane task.
Indeed BrowseForFolder seems to only work in some weird cases, you can use BIF_BROWSEINCLUDEFILES for only *.pdf and/or *.txt (trial and errors). I can get an error if I select a *.dll and/or a *.jpg (don't ask).
So instead, I gave up this approach and followed another one, in this case (objIE.Document.all.FileSelect), only the name of the selected file is returned the path seems to be always set to "c:/fakepath" for some reason. So again I am missing the full path to be able to pass that to the command line app.
Is there any sane way (<10 lines of codes) to get (1) and (2) working on Win7/64bits (VBS, HTA...)?
Don't know if people are still interested in the BrowseForFolder file selection issue, but here's what I've found.
I had the same issue selecting files with BrowseForFolder using &H4000 / BIF_BROWSEINCLUDEFILES. I could get a return with .docx but not .doc files and as you say .pdf files.
For me .txt wouldn't return anything, as didn't WMI Backup .rec files that I needed for a script I'm writing, resulting in this error information:-
Error: Unspecified error
Code: 80004005
Source: (null)
After looking at other solutions I came back to this one as my preferred choice, plus it was doing my head in that it didn't want to work. So at the bitter end it seems to be this easy.
To get my .rec files recognized I add this to the registry:-
[HKEY_CLASSES_ROOT\.rec]
#="WMI.Backup"
[HKEY_CLASSES_ROOT\WMI.Backup]
#="WMI Backup"
"BrowseInPlace"="1"
To get .txt files recognized I add this to the registry:-
[HKEY_CLASSES_ROOT\txtfile]
"BrowseInPlace"="1"
So "BrowseInPlace"="1" seems to be the nugget.
Seems so unbelievably easy that I'm sure this solution is out there somewhere but I never came across it so thought I'd put it online.
I would be interested to find that it works for others as I fear that this issue may of sent me mad, still can't believe it seems to work.
Hope this helps.
Here are 3 different ways to do what you want:
http://www.robvanderwoude.com/vbstech_ui_fileopen.php

make error latex

make -C doc html latexpdf
yields this:
Package hyperref Message: Driver (autodetected): hpdftex.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/hypcap.sty))
(/usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty)
Writing index file Arakoon.idx
(./Arakoon.aux)
Runaway argument?
{{1.10.3}{9}{Client side support\relax }{subsection.1.10.
! File ended while scanning use of \#newl#bel.
<inserted text>
\par
l.113 \begin{document}
?
If someone is still looking for this: For me usually, when a prior build had failed due to an error, subsequent builds would fail with this error. Solved it by deleting the main .aux file and building it again.
It is impossible to say with any confidence, but it looks like a fragile (non-robust) command in a subsubsection heading or a maths label (would be label 10.1.3), because:
It occurs at \begin{document}, when the .aux files are loaded,
The error indicates a malformed directive in the .aux file, and the presence of a \relax there - typically what command reduce to after having performed their side effect.
Two suggestions:
Generate an MWE by making a new document from this with all the body of your document except that heading/ equation (and perhaps the sentence following) deleted. Does this create the same error? If so, post it here. You might need some trial and error to find out which Lat3ex command is responsible, but it should contain the text Client side support.
Do read https://tex.stackexchange.com/questions/4736/what-is-the-difference-between-fragile-and-robust-commands - if I am right, you have a fragile command where it shouldn't be. Figure out what should be there instead.

Getting the Compiler:Error-Row when the compile error occurs in an include file

Does anybody know whether it's possible to get the error-row of a file being compiled when the error occurs in an include file?
For example, I'm compiling a file, say abc.p, that uses def.i all over the place. At some point, I make a change to abc.p that causes a compile error in one of the includes, so the message says that the error occurred at line 123 of def.i, but I want to know at which line in abc.p that is. In other words, the line number where the offending include file is used.
Even though "Compiler:Get-File-Name(n)" returns def.i and "Compiler:File-Name" returns abc.p, both "Compiler:Get-Row(n)" as well as "Compiler:Error-Row" returns the line number in def.i.
Any ideas?
My guess would be to save the compiler listing or debug file and look at that.
Beyond that, I don't think there's a way to do it now - you need to submit an enhancement request to get this functionality.
My way of tracking this kind of error is with
compile source.p preprocess source.pp.
open source.pp in the procedure editor and check syntax.
This gives you the error location in the expanded source.
Once you have found that locate code that is not part of the include and search for that code in the original source.

Resources