To get into samadhi, you do that:
"For a person endowed with virtue, consummate in virtue, there is no
need for an act of will, 'May freedom from remorse arise in me.' It is
in the nature of things that freedom from remorse arises in a person
endowed with virtue, consummate in virtue.
"For a person free from remorse, there is no need for an act of will,
'May joy arise in me.' It is in the nature of things that joy arises
in a person free from remorse.
"For a joyful person, there is no need for an act of will, 'May
rapture arise in me.' It is in the nature of things that rapture
arises in a joyful person.
"For a rapturous person, there is no need for an act of will, 'May my
body be serene.' It is in the nature of things that a rapturous person
grows serene in body.
"For a person serene in body, there is no need for an act of will,
'May I experience pleasure.' It is in the nature of things that a
person serene in body experiences pleasure.
"For a person experiencing pleasure, there is no need for an act of
will, 'May my mind grow concentrated.' It is in the nature of things
that the mind of a person experiencing pleasure grows concentrated.
or even
Not content with those virtues pleasing to the noble ones, he exerts
himself further in solitude by day or seclusion by night. For him,
living thus heedfully, joy arises. In one who has joy, rapture arises.
In one who has rapture, the body becomes serene. When the body is
serene, one feels pleasure. Feeling pleasure, the mind becomes
centered. When the mind is centered, phenomena become manifest. When
phenomena are manifest, he is reckoned as one who dwells heedfully.
ie with this sutta https://www.accesstoinsight.org/tipitaka/sn/sn55/sn55.040.than.html, which means fewer objects cognized, then it is mano which has piti and the kaya has passambhati then sukhaṃ vediyati, and the citta has sukhha then samadhi.
If you did that, you did good.
The biggest problem people have is that
first they think that any samadhi is good samadhi, but Ananda says the opposite https://www.accesstoinsight.org/tipitaka/mn/mn.108.than.html
they confuse the proper way to judge their samadhi with some idiotic judgement about having thoughts or not, or being able to watch some kasina for several hours, or following some objects, like the breath, ''without distractions''.
The way to judge whether you had good satipatthana, good samadhi is with the ''abandonment of the defilements'', which are this stuf
- "And what, monks, are the defilements of the mind?[2] (1) Covetousness and unrighteous greed are a defilement of the mind; (2)
ill will is a defilement of the mind; (3) anger is a defilement of the
mind; (4) hostility...(5) denigration...(6) domineering...(7)
envy...(8) jealousy...(9) hypocrisy...(10) fraud...(11)
obstinacy...(12) presumption...(13) conceit...(14) arrogance...(15)
vanity...(16) negligence is a defilement of the mind.[3]
https://www.accesstoinsight.org/tipitaka/mn/mn.007.nypo.html
and knowing about it,
"In the same way, there are cases where a foolish, inexperienced,
unskillful monk remains focused on the body in and of itself — ardent,
alert, and mindful — putting aside greed and distress with reference
to the world. As he remains thus focused on the body in and of
itself, his mind does not become concentrated, his defilements [Comm:
the five Hindrances] are not abandoned. He does not take note of that
fact (does not pick up on that theme). He remains focused on
feelings in and of themselves... the mind in and of itself... mental
qualities in and of themselves — ardent, alert, and mindful — putting
aside greed and distress with reference to the world. As he remains
thus focused on mental qualities in and of themselves, his mind does
not become concentrated, his defilements are not abandoned. He does
not take note of that fact. As a result, he is not rewarded with a
pleasant abiding here and now, nor with mindfulness and alertness. Why
is that? Because the foolish, inexperienced, unskillful monk does not
take note of his own mind (does not pick up on the theme of his own
mind).
https://www.accesstoinsight.org/tipitaka/sn/sn47/sn47.008.than.html
not knowing whether the mind is defiled or not is the biggest mistake anybody can do (that plus saying that a defiled mind is not a defiled mind)
but when the defilements are indeed weakened, like above from MN7
- "He knows: 'I have given up, renounced, let go, abandoned and relinquished [the defilements] in part'; and he gains enthusiasm for
the goal, gains enthusiasm for the Dhamma, gains gladness connected
with the Dhamma. When he is gladdened, joy is born in him; being
joyous in mind, his body becomes tranquil; when his body is tranquil,
he feels happiness; and the mind of him who is happy becomes
concentrated.
- they also believe that they get the good satipatthana by sitting and ''watching the mind'' and doing nothing prior to that, whereas the good satipatthana and good samadhi is rooted in the " purified ethics and correct view."
https://suttacentral.net/sn47.3/en/sujato
but people prefer to live their life which has nothing to do with the dhamma, then decide to meditate so they sit for 1h ''watching the mind'', then they get nowhere and they go back to their life which has nothing to do with the dhamma.
When it comes to ''retreats'' they jump to the retreat from their life which has nothing to with the dhamma, they spend 13 days trying to purify their thoughts, and on the last they get some frail positive result. Then they go back home to live their life which has nothing to do with the dhamma and they notice they lose the few positive results they had on the retreat. Then they ask ''how do I get back the positive results I had in the retreat? I do not understand why when I meditate at home I do not get any result. please help me''.
Whereas the proper way to have good satipatthana and good samadhi is to filter the thoughts way before the ''formal sit'' so that when there is formal sitting, most of the thoughts are already good and there can be purification of vedana and sanna, ie piti and so on. Sitting is mostly for samadhi, with vitakka already mostly good, whereas sati sampajanna is done way before ''sitting''.
To get insights into the lack of self and the awfulness of craving, you have to know, see things the proper way:
Form, bhikkhus, is not-self. What is not-self is to be seen as it
really is with right discernment thus: 'This is not mine, I am not
this, this is not my self'. Feeling is not-self... Perception is
not-self... Constructions are not-self... Consciousness is not-self.
What is not-self is to be seen as it really is with right discernment
thus: 'This is not mine, I am not this, this is not my self'. Seeing
thus, an instructed noble disciple is disenchanted with Form,
disenchanted with Feeling, disenchanted with Perception, disenchanted
with Constructions, disenchanted with Consciousness. Being
disenchanted, he is dispassionate. Through dispassion, he is
liberated. With liberation, there is the knowledge: 'I am liberated.'
He undersrands: 'Birth is destroyed, the brahmic life has been
fulfilled, what had to be done has been done. There is nothing else
for this world.'
https://www.buddha-vacana.org/misc.html
even with samadhi, just like it was done with satipatthana
‘The first absorption is a basis for ending the defilements.’ That’s
what I said, but why did I say it? Take a mendicant who, quite
secluded from sensual pleasures, secluded from unskillful qualities,
enters and remains in the first absorption. They contemplate the
phenomena there—included in form, feeling, perception, choices, and
consciousness—as impermanent, as suffering, as diseased, as an
abscess, as a dart, as misery, as an affliction, as alien, as falling
apart, as empty, as not-self. They turn their mind away from those
things, and apply it to the deathless: ‘This is peaceful; this is
sublime—that is, the stilling of all activities, the letting go of all
attachments, the ending of craving, fading away, cessation,
extinguishment.’ Abiding in that they attain the ending of
defilements. If they don’t attain the ending of defilements, with the
ending of the five lower fetters they’re reborn spontaneously, because
of their passion and love for that meditation. They are extinguished
there, and are not liable to return from that world.
https://suttacentral.net/an9.36/en/sujato